From 76a005d77036c9a95e66e4f7bfc19fa98e2de62a Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 5 Jul 2022 16:44:30 -0700 Subject: [PATCH 01/56] optional options if they don't have anything in the structure --- packages/cli/src/lib/SchemaComposer.ts | 2 +- packages/js/client/src/PolywrapClient.ts | 2 +- packages/js/core/src/types/Client.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 76d01732ab..2f683c3171 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -93,7 +93,7 @@ export class SchemaComposer { } try { - return await this._client.getSchema(new Uri(uri)); + return await this._client.getManifest(new Uri(uri)); } catch (e) { gluegun.print.error(e); throw e; diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index 0ca72f7a5c..2895bff034 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -869,7 +869,7 @@ const contextualizeClient = ( }, getManifest: ( uri: TUri, - options: GetManifestOptions + options?: GetManifestOptions ) => { return client.getManifest(uri, options); }, diff --git a/packages/js/core/src/types/Client.ts b/packages/js/core/src/types/Client.ts index bd9a7cfa86..02893b8661 100644 --- a/packages/js/core/src/types/Client.ts +++ b/packages/js/core/src/types/Client.ts @@ -55,19 +55,19 @@ export interface Client SubscriptionHandler, WorkflowHandler, UriResolverHandler { - getRedirects(options: GetRedirectsOptions): readonly UriRedirect[]; + getRedirects(options?: GetRedirectsOptions): readonly UriRedirect[]; - getPlugins(options: GetPluginsOptions): readonly PluginRegistration[]; + getPlugins(options?: GetPluginsOptions): readonly PluginRegistration[]; getInterfaces( - options: GetInterfacesOptions + options?: GetInterfacesOptions ): readonly InterfaceImplementations[]; - getEnvs(options: GetEnvsOptions): readonly Env[]; + getEnvs(options?: GetEnvsOptions): readonly Env[]; getEnvByUri( uri: TUri, - options: GetEnvsOptions + options?: GetEnvsOptions ): Env | undefined; getUriResolvers(options: GetUriResolversOptions): readonly UriResolver[]; From ec36c2b5541983d9164b69c4655964c174b57581 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 5 Jul 2022 16:45:43 -0700 Subject: [PATCH 02/56] todo --- packages/cli/src/lib/SchemaComposer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 2f683c3171..b720714b3c 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -92,6 +92,7 @@ export class SchemaComposer { } } + // Need to work from here outwards: CLI -> Client -> Core + schema try { return await this._client.getManifest(new Uri(uri)); } catch (e) { From 746d3982d67d44b4985901430d6e18931e896d2f Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 13 Jul 2022 02:38:37 +0200 Subject: [PATCH 03/56] refactor(compose): first steps to remove schema and work only with abi --- packages/cli/src/commands/plugin.ts | 7 +- packages/cli/src/lib/CodeGenerator.ts | 5 +- packages/cli/src/lib/SchemaComposer.ts | 68 ++++++++++--------- packages/js/client/src/PolywrapClient.ts | 34 ++-------- .../client/src/__tests__/core/sanity.spec.ts | 26 ------- .../js/client/src/plugin/PluginWrapper.ts | 6 +- packages/js/client/src/wasm/WasmWrapper.ts | 42 ++---------- .../js/core/src/__tests__/resolveUri.spec.ts | 7 +- packages/js/core/src/types/Client.ts | 12 +--- packages/js/core/src/types/Wrapper.ts | 16 +---- packages/schema/bind/src/types.ts | 1 - packages/schema/compose/src/index.ts | 48 ++++--------- packages/schema/compose/src/resolve.ts | 32 ++++----- packages/schema/compose/src/types.ts | 14 ++-- 14 files changed, 88 insertions(+), 230 deletions(-) diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 9571bd2e66..4848465627 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -119,17 +119,12 @@ async function run(options: PluginCommandOptions) { process.exitCode = 1; } - // Output the built schema & manifest - const schemas = await schemaComposer.getComposedSchemas( - ComposerFilter.Schema - ); - const publishSchemaPath = path.join(publishDir, "schema.graphql"); + // Output the built manifest const publishManifestPath = path.join(publishDir, "polywrap.plugin.json"); if (!fs.existsSync(publishDir)) { fs.mkdirSync(publishDir); } - writeFileSync(publishSchemaPath, schemas.schema); await outputManifest(manifest, publishManifestPath); } diff --git a/packages/cli/src/lib/CodeGenerator.ts b/packages/cli/src/lib/CodeGenerator.ts index 10d2eae3aa..cf1eaeee84 100644 --- a/packages/cli/src/lib/CodeGenerator.ts +++ b/packages/cli/src/lib/CodeGenerator.ts @@ -81,15 +81,13 @@ export class CodeGenerator { } // Get the fully composed schema - const composed = await schemaComposer.getComposedSchemas(); + const composed = await schemaComposer.getComposedAbis(); if (!composed) { throw Error(intlMsg.lib_codeGenerator_noComposedSchema()); } const abi = composed.abi; - this._schema = composed.schema; - if (!abi) { throw Error(intlMsg.lib_codeGenerator_abiMissing()); } @@ -118,7 +116,6 @@ export class CodeGenerator { const binding = await generateBinding({ projectName: await project.getName(), abi, - schema: this._schema || "", outputDirAbs: codegenDirAbs, bindLanguage, }); diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index b720714b3c..f9b15eb8a2 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -1,19 +1,20 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { Project, AnyProjectManifest } from "./"; +import { AnyProjectManifest, Project } from "./"; -import { Uri, PolywrapClient } from "@polywrap/client-js"; +import { PolywrapClient, Uri } from "@polywrap/client-js"; import { - composeSchema, - ComposerOutput, - ComposerFilter, ComposerOptions, - SchemaFile, + ComposerOutput, + composeSchema, + ManifestFile, } from "@polywrap/schema-compose"; import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; +import { Abi } from "@polywrap/schema-parse"; +import { deserializeWrapManifest } from "@polywrap/wrap-manifest-types-js"; export interface SchemaComposerConfig { project: Project; @@ -28,42 +29,40 @@ export class SchemaComposer { this._client = this._config.client; } - public async getComposedSchemas( - output: ComposerFilter = ComposerFilter.All - ): Promise { + public async getComposedAbis(): Promise { if (this._composerOutput) { return Promise.resolve(this._composerOutput); } const { project } = this._config; - const schemaNamedPath = await project.getSchemaNamedPath(); + const manifestNamedPath = await project.getSchemaNamedPath(); const import_redirects = await project.getImportRedirects(); - const getSchemaFile = (schemaPath?: string): SchemaFile | undefined => - schemaPath + const getManifest = (manifestPath?: string): ManifestFile | undefined => + manifestPath ? { - schema: this._fetchLocalSchema(schemaPath), - absolutePath: schemaPath, + abi: this._fetchLocalManifest(manifestPath), + absolutePath: manifestPath, } : undefined; const options: ComposerOptions = { - schemas: [], + abis: [], resolvers: { external: (uri: string) => - this._fetchExternalSchema(uri, import_redirects), - local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), + this._fetchExternalManifest(uri, import_redirects), + local: (path: string) => + Promise.resolve(this._fetchLocalManifest(path)), }, - output, }; - const schemaFile = getSchemaFile(schemaNamedPath); - if (!schemaFile) { - throw Error(`Schema cannot be loaded at path: ${schemaNamedPath}`); + const manifest = getManifest(manifestNamedPath); + if (!manifest) { + throw Error(`Manifest cannot be loaded at path: ${manifestNamedPath}`); } - options.schemas.push(schemaFile); + options.abis.push(manifest.abi); this._composerOutput = await composeSchema(options); return this._composerOutput; @@ -73,13 +72,13 @@ export class SchemaComposer { this._composerOutput = undefined; } - private async _fetchExternalSchema( + private async _fetchExternalManifest( uri: string, import_redirects?: { uri: string; schema: string; }[] - ): Promise { + ): Promise { // Check to see if we have any import redirects that match if (import_redirects) { for (const redirect of import_redirects) { @@ -87,26 +86,29 @@ export class SchemaComposer { const uriParsed = new Uri(uri); if (Uri.equals(redirectUri, uriParsed)) { - return this._fetchLocalSchema(redirect.schema); + return this._fetchLocalManifest(redirect.schema); } } } // Need to work from here outwards: CLI -> Client -> Core + schema try { - return await this._client.getManifest(new Uri(uri)); + const { abi } = await this._client.getManifest(new Uri(uri)); + // TODO: Remove as unknown once Abi JSON Schema has been implemented + return (abi as unknown) as Abi; } catch (e) { gluegun.print.error(e); throw e; } } - private _fetchLocalSchema(schemaPath: string) { - return fs.readFileSync( - path.isAbsolute(schemaPath) - ? schemaPath - : path.join(this._config.project.getManifestDir(), schemaPath), - "utf-8" - ); + private _fetchLocalManifest(manifestPath: string): Abi { + const currentPath = path.isAbsolute(manifestPath) + ? manifestPath + : path.join(this._config.project.getManifestDir(), manifestPath); + const manifest = fs.readFileSync(currentPath); + const { abi } = deserializeWrapManifest(manifest); + // TODO: Remove as unknown once Abi JSON Schema has been implemented + return (abi as unknown) as Abi; } } diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index 2895bff034..19a9e7ed02 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -9,12 +9,10 @@ import { Env, GetEnvsOptions, GetFileOptions, - GetManifestOptions, GetImplementationsOptions, GetInterfacesOptions, GetPluginsOptions, GetRedirectsOptions, - GetSchemaOptions, InterfaceImplementations, InvokeOptions, InvokeResult, @@ -171,24 +169,13 @@ export class PolywrapClient implements Client { ); } - @Tracer.traceMethod("PolywrapClient: getSchema") - public async getSchema( - uri: TUri, - options: GetSchemaOptions = {} - ): Promise { - const wrapper = await this._loadWrapper(this._toUri(uri), options); - const client = contextualizeClient(this, options.contextId); - return await wrapper.getSchema(client); - } - @Tracer.traceMethod("PolywrapClient: getManifest") public async getManifest( - uri: TUri, - options: GetManifestOptions + uri: TUri ): Promise { - const wrapper = await this._loadWrapper(this._toUri(uri), options); - const client = contextualizeClient(this, options.contextId); - return await wrapper.getManifest(options, client); + const wrapper = await this._loadWrapper(this._toUri(uri), undefined); + const client = contextualizeClient(this, undefined); + return await wrapper.getManifest(client); } @Tracer.traceMethod("PolywrapClient: getFile") @@ -861,17 +848,8 @@ const contextualizeClient = ( ) => { return client.getFile(uri, options); }, - getSchema: ( - uri: TUri, - options: GetSchemaOptions = {} - ) => { - return client.getSchema(uri, { ...options, contextId }); - }, - getManifest: ( - uri: TUri, - options?: GetManifestOptions - ) => { - return client.getManifest(uri, options); + getManifest: (uri: TUri) => { + return client.getManifest(uri); }, getImplementations: ( uri: TUri, diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index a3205afebd..238ed5fade 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -80,30 +80,4 @@ describe("sanity", () => { }, ]); }); - - test("loadPolywrap - pass string or Uri", async () => { - const implementationUri = "wrap://ens/some-implementation.eth"; - const schemaStr = "test-schema"; - - const client = new PolywrapClient({ - plugins: [ - { - uri: implementationUri, - plugin: { - factory: () => ({} as PluginModule<{}>), - manifest: { - schema: schemaStr, - implements: [], - }, - }, - }, - ], - }); - - const schemaWhenString = await client.getSchema(implementationUri); - const schemaWhenUri = await client.getSchema(new Uri(implementationUri)); - - expect(schemaWhenString).toEqual(schemaStr); - expect(schemaWhenUri).toEqual(schemaStr); - }); }); diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 94d4c00af6..9c73bd1cbe 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -8,7 +8,6 @@ import { Uri, GetFileOptions, Env, - GetManifestOptions, isBuffer, } from "@polywrap/core-js"; import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; @@ -45,10 +44,7 @@ export class PluginWrapper extends Wrapper { return Promise.resolve(this._plugin.manifest.schema); } - public async getManifest( - _options: GetManifestOptions, - _client: Client - ): Promise { + public async getManifest(_client: Client): Promise { throw Error("client.getManifest(...) is not implemented for Plugins."); } diff --git a/packages/js/client/src/wasm/WasmWrapper.ts b/packages/js/client/src/wasm/WasmWrapper.ts index 4f421c4d9f..161a8af814 100644 --- a/packages/js/client/src/wasm/WasmWrapper.ts +++ b/packages/js/client/src/wasm/WasmWrapper.ts @@ -3,18 +3,17 @@ import { WrapExports } from "./types"; import { createImports } from "./imports"; import { - InvokeOptions, - InvokeResult, - InvocableResult, - Wrapper, - Uri, Client, combinePaths, Env, - UriResolverInterface, GetFileOptions, - GetManifestOptions, + InvocableResult, + InvokeOptions, + InvokeResult, isBuffer, + Uri, + UriResolverInterface, + Wrapper, } from "@polywrap/core-js"; import { deserializeWrapManifest, @@ -54,7 +53,6 @@ export class WasmWrapper extends Wrapper { public static requiredExports: readonly string[] = ["_wrap_invoke"]; private _info: WrapManifest | undefined = undefined; - private _schema?: string; private _wasm: Uint8Array | undefined = undefined; constructor( @@ -118,22 +116,11 @@ export class WasmWrapper extends Wrapper { } @Tracer.traceMethod("WasmWrapper: getManifest") - public async getManifest( - options: GetManifestOptions, - client: Client - ): Promise { + public async getManifest(client: Client): Promise { if (this._info !== undefined) { return this._info; } - this._schema = (await this.getFile( - { - path: "schema.graphql", - encoding: "utf-8", - }, - client - )) as string; - const moduleManifest = "wrap.info"; const data = (await this.getFile( @@ -228,21 +215,6 @@ export class WasmWrapper extends Wrapper { } } - @Tracer.traceMethod("WasmWrapper: getSchema") - public async getSchema(client: Client): Promise { - if (this._schema) { - return this._schema; - } - - const schema = "schema.graphql"; - this._schema = (await this.getFile( - { path: schema, encoding: "utf8" }, - client - )) as string; - - return this._schema; - } - @Tracer.traceMethod("WasmWrapper: _processInvokeResult") private _processInvokeResult( state: State, diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index cbffb343bf..746f1c2c2d 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -23,7 +23,6 @@ import { SubscribeOptions, Subscription, PluginPackage, - GetManifestOptions, } from ".."; import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; @@ -106,9 +105,8 @@ describe("resolveUri", () => { }, encoded: false }), - getSchema: (_client: Client): Promise => Promise.resolve(""), getFile: (options: GetFileOptions, client: Client) => Promise.resolve(""), - getManifest: (options: GetManifestOptions, client: Client) => Promise.resolve({} as WrapManifest) + getManifest: (client: Client) => Promise.resolve({} as WrapManifest) }; }; @@ -127,9 +125,8 @@ describe("resolveUri", () => { }, encoded: false }), - getSchema: (_client: Client): Promise => Promise.resolve(""), getFile: (options: GetFileOptions, client: Client) => Promise.resolve(""), - getManifest: (options: GetManifestOptions, client) => Promise.reject("") + getManifest: (client) => Promise.reject("") }; }; diff --git a/packages/js/core/src/types/Client.ts b/packages/js/core/src/types/Client.ts index 02893b8661..cdb03b3214 100644 --- a/packages/js/core/src/types/Client.ts +++ b/packages/js/core/src/types/Client.ts @@ -38,8 +38,6 @@ export type GetUriResolversOptions = Contextualized; export type GetSchemaOptions = Contextualized; -export type GetManifestOptions = Contextualized; - export interface GetFileOptions extends Contextualized { path: string; encoding?: "utf-8" | string; @@ -72,15 +70,7 @@ export interface Client getUriResolvers(options: GetUriResolversOptions): readonly UriResolver[]; - getSchema( - uri: TUri, - options: GetSchemaOptions - ): Promise; - - getManifest( - uri: TUri, - options: GetManifestOptions - ): Promise; + getManifest(uri: TUri): Promise; getFile( uri: TUri, diff --git a/packages/js/core/src/types/Wrapper.ts b/packages/js/core/src/types/Wrapper.ts index b11e46a6c1..b3c22dbec1 100644 --- a/packages/js/core/src/types/Wrapper.ts +++ b/packages/js/core/src/types/Wrapper.ts @@ -2,7 +2,6 @@ import { Uri, Client, GetFileOptions, - GetManifestOptions, InvokeOptions, Invocable, Invoker, @@ -22,7 +21,7 @@ export abstract class Wrapper implements Invocable { * Invoke the Wrapper based on the provided [[InvokeOptions]] * * @param options Options for this invocation. - * @param client The client instance requesting this invocation. + * @param invoker The client instance requesting this invocation. * This client will be used for any sub-invokes that occur. */ public abstract invoke( @@ -46,20 +45,9 @@ export abstract class Wrapper implements Invocable { * Get a manifest from the Wrapper package. * Not implemented for plugin wrappers. * - * @param options Configuration options for manifest retrieval * @param client The client instance requesting the manifest. */ - public abstract getManifest( - options: GetManifestOptions, - client: Client - ): Promise; - - /** - * Get the Wrapper's schema - * - * @param client The client instance the schema. - */ - public abstract getSchema(client: Client): Promise; + public abstract getManifest(client: Client): Promise; } export type WrapperCache = Map; diff --git a/packages/schema/bind/src/types.ts b/packages/schema/bind/src/types.ts index 974e77c202..2e7b3f03a1 100644 --- a/packages/schema/bind/src/types.ts +++ b/packages/schema/bind/src/types.ts @@ -12,7 +12,6 @@ export interface BindOptions { projectName: string; bindLanguage: BindLanguage; abi: Abi; - schema: string; config?: Record; outputDirAbs: string; } diff --git a/packages/schema/compose/src/index.ts b/packages/schema/compose/src/index.ts index c67bfe82f0..21de02e5db 100644 --- a/packages/schema/compose/src/index.ts +++ b/packages/schema/compose/src/index.ts @@ -1,4 +1,4 @@ -import { SchemaFile, SchemaResolvers } from "./types"; +import { ManifestFile, AbiResolvers } from "./types"; import { resolveImportsAndParseSchemas } from "./resolve"; import { renderSchema } from "./render"; @@ -7,55 +7,31 @@ import { Abi, combineAbi } from "@polywrap/schema-parse"; export * from "./types"; export { renderSchema }; -export interface ComposerOutput { - schema?: string; - abi?: Abi; -} - -export enum ComposerFilter { - Schema = 1 << 0, - Abi = 1 << 1, - All = Schema | Abi, -} - export interface ComposerOptions { - schemas: SchemaFile[]; - resolvers: SchemaResolvers; - output: ComposerFilter; + abis: ManifestFile[]; + resolvers: AbiResolvers; } -export async function composeSchema( - options: ComposerOptions -): Promise { - const abis = await resolveImports(options.schemas, options.resolvers); - - const abi = abis.length === 1 ? abis[0] : combineAbi(abis); - - // Forming our output structure for the caller - const includeSchema = options.output & ComposerFilter.Schema; - const includeAbi = options.output & ComposerFilter.Abi; - - return { - schema: includeSchema ? renderSchema(abi, true) : undefined, - abi: includeAbi ? abi : undefined, - } as ComposerOutput; +export async function composeSchema(options: ComposerOptions): Promise { + const abis = await resolveImports(options.abis, options.resolvers); + return abis.length === 1 ? abis[0] : combineAbi(abis); } export async function resolveImports( - schemas: SchemaFile[], - resolvers: SchemaResolvers + manifests: ManifestFile[], + resolvers: AbiResolvers ): Promise { const abis: Abi[] = []; - if (schemas.length === 0) { + if (manifests.length === 0) { throw Error("No schema provided"); } - for (const schema of schemas) { + for (const manifest of manifests) { abis.push( await resolveImportsAndParseSchemas( - schema.schema, - schema.absolutePath, + manifest.abi, + manifest.absolutePath, resolvers ) ); diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index 89e7df4958..2266e431ca 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -5,8 +5,8 @@ import { ExternalImport, LocalImport, - SchemaResolver, - SchemaResolvers, + AbiResolver, + AbiResolvers, SYNTAX_REFERENCE, } from "./types"; import { parseExternalImports, parseLocalImports, parseUse } from "./parse"; @@ -122,9 +122,9 @@ export async function resolveUseStatements( } export async function resolveImportsAndParseSchemas( - schema: string, - schemaPath: string, - resolvers: SchemaResolvers, + abi: Abi, + abiPath: string, + resolvers: AbiResolvers, noValidate = false ): Promise { const importKeywordCapture = /^#+["{3}]*import\s/gm; @@ -218,9 +218,7 @@ export async function resolveImportsAndParseSchemas( ); // Parse the newly formed schema - const abi = parseSchema(newSchema, { noValidate }); - - return abi; + return parseSchema(newSchema, { noValidate }); } interface Namespaced { @@ -643,9 +641,9 @@ function resolveInterfaces( async function resolveExternalImports( importsToResolve: ExternalImport[], - resolveSchema: SchemaResolver, + resolveManifest: AbiResolver, abi: Abi -): Promise { +): Promise { // Keep track of all imported object type names const typesToImport: ImportMap = {}; @@ -653,14 +651,10 @@ async function resolveExternalImports( const { uri, namespace, importedTypes } = importToResolve; // Resolve the schema - const schema = await resolveSchema(uri); - - if (!schema) { - throw Error(`Unable to resolve schema at "${uri}"`); - } + const manifest = await resolveManifest(uri); // Parse the schema into Abi - const extAbi = parseSchema(schema); + const extAbi = manifest.abi as Abi; let extTypesToImport = importedTypes; @@ -929,15 +923,15 @@ async function resolveExternalImports( async function resolveLocalImports( importsToResolve: LocalImport[], - resolveSchema: SchemaResolver, + resolveManifest: AbiResolver, abi: Abi, - resolvers: SchemaResolvers + resolvers: AbiResolvers ): Promise { for (const importToResolve of importsToResolve) { const { importedTypes, path } = importToResolve; // Resolve the schema - let schema = await resolveSchema(path); + let schema = await resolveManifest(path); if (!schema) { throw Error(`Unable to resolve schema at "${path}"`); diff --git a/packages/schema/compose/src/types.ts b/packages/schema/compose/src/types.ts index ef69c821c2..aa2bb4f266 100644 --- a/packages/schema/compose/src/types.ts +++ b/packages/schema/compose/src/types.ts @@ -1,15 +1,15 @@ -import { CapabilityType } from "@polywrap/schema-parse"; +import { Abi, CapabilityType } from "@polywrap/schema-parse"; -export interface SchemaFile { - schema: string; +export interface ManifestFile { + abi: Abi; absolutePath: string; } -export type SchemaResolver = (uriOrPath: string) => Promise; +export type AbiResolver = (uriOrPath: string) => Promise; -export interface SchemaResolvers { - external: SchemaResolver; - local: SchemaResolver; +export interface AbiResolvers { + external: AbiResolver; + local: AbiResolver; } export interface ExternalImport { From ea498590e60d7f05c0ee55837d6353eec1e23b1c Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 13 Jul 2022 21:05:28 +0200 Subject: [PATCH 04/56] feat: schema.graphql removed from pipeline --- packages/cli/lang/en.json | 4 +- packages/cli/lang/es.json | 4 +- packages/cli/src/commands/plugin.ts | 2 - packages/cli/src/lib/CodeGenerator.ts | 11 +- packages/cli/src/lib/Compiler.ts | 53 +++---- packages/cli/src/lib/SchemaComposer.ts | 70 +++++---- packages/cli/src/lib/project/AppProject.ts | 6 +- packages/cli/src/lib/project/PluginProject.ts | 6 +- .../cli/src/lib/project/PolywrapProject.ts | 6 +- packages/cli/src/lib/project/Project.ts | 4 +- .../js/client/src/plugin/PluginWrapper.ts | 4 - .../src/bindings/typescript/app-ts/index.ts | 3 +- .../bindings/typescript/plugin-ts/index.ts | 6 +- packages/schema/compose/src/index.ts | 36 ++--- packages/schema/compose/src/resolve.ts | 26 ++-- packages/schema/compose/src/types.ts | 9 +- yarn.lock | 134 +++++++++--------- 17 files changed, 162 insertions(+), 222 deletions(-) diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index ed5e6d05d0..83b22e07e6 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -218,9 +218,9 @@ "lib_compiler_compileWasmModulesError": "Failed to compile Wasm modules", "lib_compiler_compileWasmModulesText": "Compile Wasm modules", "lib_compiler_compileWasmModulesWarning": "Warnings while compiling Wasm modules", - "lib_compiler_failedSchemaReturn": "Schema composer failed to return a combined schema.", + "lib_compiler_failedAbiReturn": "Abi composer failed to return a combined abi.", "lib_compiler_noModulesToBuild": "No modules to build declared.", - "lib_compiler_missingSchema": "Missing schema definition", + "lib_compiler_missingAbi": "Missing ABI definition", "lib_compiler_missingModule": "Missing module definition", "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index d1a9b2bf91..87bc4c6dd4 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -218,9 +218,9 @@ "lib_compiler_compileWasmModulesError": "Failed to compile Wasm modules", "lib_compiler_compileWasmModulesText": "Compile Wasm modules", "lib_compiler_compileWasmModulesWarning": "Warnings while compiling Wasm modules", - "lib_compiler_failedSchemaReturn": "Schema composer failed to return a combined schema.", + "lib_compiler_failedAbiReturn": "Abi composer failed to return a combined abi.", "lib_compiler_noModulesToBuild": "No modules to build declared.", - "lib_compiler_missingSchema": "Missing schema definition", + "lib_compiler_missingAbi": "Missing ABI definition", "lib_compiler_missingModule": "Missing module definition", "lib_compiler_noInterfaceModule": "Interfaces cannot have implementation file", "lib_compiler_step": "Compiling WASM module", diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 4848465627..40dc09073d 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -12,8 +12,6 @@ import { parseClientConfigOption, } from "../lib"; -import { ComposerFilter } from "@polywrap/schema-compose"; -import { writeFileSync } from "@polywrap/os-js"; import path from "path"; import fs from "fs"; import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; diff --git a/packages/cli/src/lib/CodeGenerator.ts b/packages/cli/src/lib/CodeGenerator.ts index cf1eaeee84..66b79ec4d8 100644 --- a/packages/cli/src/lib/CodeGenerator.ts +++ b/packages/cli/src/lib/CodeGenerator.ts @@ -80,14 +80,9 @@ export class CodeGenerator { ); } - // Get the fully composed schema - const composed = await schemaComposer.getComposedAbis(); + // Get the fully composed abi + const abi = await schemaComposer.getComposedAbis(); - if (!composed) { - throw Error(intlMsg.lib_codeGenerator_noComposedSchema()); - } - - const abi = composed.abi; if (!abi) { throw Error(intlMsg.lib_codeGenerator_abiMissing()); } @@ -129,7 +124,7 @@ export class CodeGenerator { ); } else { const binding = await project.generateSchemaBindings( - composed, + abi, path.relative(project.getManifestDir(), codegenDirAbs) ); diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 2a4bd84cf7..913ae23a61 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -23,7 +23,6 @@ import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { Abi } from "@polywrap/schema-parse"; -import { ComposerOutput } from "@polywrap/schema-compose"; import { normalizePath, writeDirectorySync, @@ -34,7 +33,7 @@ import fs from "fs"; import path from "path"; interface CompilerState { - composerOutput: ComposerOutput; + abi: Abi; compilerOverrides?: CompilerOverrides; } @@ -101,9 +100,6 @@ export class Compiler { // Init & clean output directory resetDir(this._config.outputDir); - // Output: schema.graphql - await this._outputComposedSchema(state); - // Output: wrap.info await this._outputWrapManifest(state); @@ -162,7 +158,7 @@ export class Compiler { const polywrapManifest = await project.getManifest(); // Compose the schema - const composerOutput = await this._composeSchema(); + const abi = await this._composeAbi(); // Allow the build-image to validate the manifest & override functionality const buildImageDir = `${__dirname}/defaults/build-images/${polywrapManifest.language}`; @@ -186,7 +182,7 @@ export class Compiler { } const state: CompilerState = { - composerOutput, + abi, compilerOverrides, }; @@ -202,26 +198,26 @@ export class Compiler { return manifest.language === "interface"; } - private async _composeSchema(): Promise { + private async _composeAbi(): Promise { const { schemaComposer } = this._config; // Get the fully composed schema - const composerOutput = await schemaComposer.getComposedSchemas(); + const abi = await schemaComposer.getComposedAbis(); - if (!composerOutput) { - throw Error(intlMsg.lib_compiler_failedSchemaReturn()); + if (!abi) { + throw Error(intlMsg.lib_compiler_failedAbiReturn()); } - return composerOutput; + return abi; } private async _generateCode(state: CompilerState): Promise { - const { composerOutput, compilerOverrides } = state; + const { abi, compilerOverrides } = state; const { project } = this._config; // Generate the bindings const binding = await project.generateSchemaBindings( - composerOutput, + abi, compilerOverrides?.generationSubPath ); @@ -326,21 +322,6 @@ export class Compiler { return dockerImageId; } - private async _outputComposedSchema(state: CompilerState): Promise { - const { outputDir } = this._config; - - if (!state.composerOutput.schema) { - // This is not being shown with intlMsg because this will be removed - throw Error("Compiler.outputComposedSchema: no schema found"); - } - - writeFileSync( - `${outputDir}/schema.graphql`, - state.composerOutput.schema, - "utf-8" - ); - } - private async _outputWrapManifest( state: CompilerState, quiet = false @@ -348,14 +329,14 @@ export class Compiler { const { outputDir, project } = this._config; let manifestPath = `${outputDir}/wrap.info`; const run = async () => { - if (!state.composerOutput.abi) { + if (!state.abi) { throw Error(intlMsg.lib_wrap_abi_not_found()); } const manifest = await project.getManifest(); const abi: Abi = { - ...state.composerOutput.abi, + ...state.abi, }; const filteredAbi: Record = { ...abi }; @@ -427,15 +408,15 @@ export class Compiler { } private async _validateState(state: CompilerState): Promise { - const { composerOutput } = state; + const { abi } = state; const { project } = this._config; - const manifest = await project.getManifest(); - if (!composerOutput.schema) { - const missingSchemaMessage = intlMsg.lib_compiler_missingSchema(); - throw Error(missingSchemaMessage); + if (!abi) { + throw Error(intlMsg.lib_compiler_missingAbi()); } + const manifest = await project.getManifest(); + if (manifest.language !== "interface" && !manifest.module) { const missingModuleMessage = intlMsg.lib_compiler_missingModule(); throw Error(missingModuleMessage); diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index f9b15eb8a2..e70e4b0f1f 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -1,14 +1,13 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { AnyProjectManifest, Project } from "./"; +import { Project, AnyProjectManifest } from "./"; -import { PolywrapClient, Uri } from "@polywrap/client-js"; +import { Uri, PolywrapClient } from "@polywrap/client-js"; import { - ComposerOptions, - ComposerOutput, composeSchema, - ManifestFile, + ComposerOptions, + SchemaFile, } from "@polywrap/schema-compose"; import fs from "fs"; import path from "path"; @@ -23,47 +22,43 @@ export interface SchemaComposerConfig { export class SchemaComposer { private _client: PolywrapClient; - private _composerOutput: ComposerOutput | undefined; + private _composerOutput: Abi | undefined; constructor(private _config: SchemaComposerConfig) { this._client = this._config.client; } - public async getComposedAbis(): Promise { + public async getComposedAbis(): Promise { if (this._composerOutput) { return Promise.resolve(this._composerOutput); } const { project } = this._config; - const manifestNamedPath = await project.getSchemaNamedPath(); + const schemaNamedPath = await project.getSchemaNamedPath(); const import_redirects = await project.getImportRedirects(); - const getManifest = (manifestPath?: string): ManifestFile | undefined => - manifestPath + const getSchemaFile = (schemaPath?: string): SchemaFile | undefined => + schemaPath ? { - abi: this._fetchLocalManifest(manifestPath), - absolutePath: manifestPath, + schema: this._fetchLocalSchema(schemaPath), + absolutePath: schemaPath, } : undefined; + const schemaFile = getSchemaFile(schemaNamedPath); + if (!schemaFile) { + throw Error(`Schema cannot be loaded at path: ${schemaNamedPath}`); + } const options: ComposerOptions = { - abis: [], + manifest: schemaFile, resolvers: { external: (uri: string) => - this._fetchExternalManifest(uri, import_redirects), - local: (path: string) => - Promise.resolve(this._fetchLocalManifest(path)), + this._fetchExternalSchema(uri, import_redirects), + local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), }, }; - const manifest = getManifest(manifestNamedPath); - if (!manifest) { - throw Error(`Manifest cannot be loaded at path: ${manifestNamedPath}`); - } - - options.abis.push(manifest.abi); - this._composerOutput = await composeSchema(options); return this._composerOutput; } @@ -72,7 +67,7 @@ export class SchemaComposer { this._composerOutput = undefined; } - private async _fetchExternalManifest( + private async _fetchExternalSchema( uri: string, import_redirects?: { uri: string; @@ -86,29 +81,30 @@ export class SchemaComposer { const uriParsed = new Uri(uri); if (Uri.equals(redirectUri, uriParsed)) { - return this._fetchLocalManifest(redirect.schema); + const manifest = fs.readFileSync( + path.join(this._config.project.getManifestDir(), redirect.schema) + ); + // TODO: Remove this once ABI JSON Schema has been implemented + return (deserializeWrapManifest(manifest).abi as unknown) as Abi; } } } - // Need to work from here outwards: CLI -> Client -> Core + schema try { - const { abi } = await this._client.getManifest(new Uri(uri)); - // TODO: Remove as unknown once Abi JSON Schema has been implemented - return (abi as unknown) as Abi; + const manifest = await this._client.getManifest(new Uri(uri)); + return manifest.abi; } catch (e) { gluegun.print.error(e); throw e; } } - private _fetchLocalManifest(manifestPath: string): Abi { - const currentPath = path.isAbsolute(manifestPath) - ? manifestPath - : path.join(this._config.project.getManifestDir(), manifestPath); - const manifest = fs.readFileSync(currentPath); - const { abi } = deserializeWrapManifest(manifest); - // TODO: Remove as unknown once Abi JSON Schema has been implemented - return (abi as unknown) as Abi; + private _fetchLocalSchema(schemaPath: string) { + return fs.readFileSync( + path.isAbsolute(schemaPath) + ? schemaPath + : path.join(this._config.project.getManifestDir(), schemaPath), + "utf-8" + ); } } diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index dcda2ea43a..13002c3a25 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -9,7 +9,6 @@ import { import { AppManifest } from "@polywrap/polywrap-manifest-types-js"; import { Client } from "@polywrap/core-js"; -import { ComposerOutput } from "@polywrap/schema-compose"; import { bindSchema, BindOutput } from "@polywrap/schema-bind"; import { Abi } from "@polywrap/schema-parse"; import path from "path"; @@ -106,13 +105,12 @@ export class AppProject extends Project { } public async generateSchemaBindings( - composerOutput: ComposerOutput, + abi: Abi, generationSubPath?: string ): Promise { return bindSchema({ projectName: await this.getName(), - abi: composerOutput.abi as Abi, - schema: composerOutput.schema as string, + abi, outputDirAbs: this._getGenerationDirectory(generationSubPath), bindLanguage: appManifestLanguageToBindLanguage( await this.getManifestLanguage() diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index 87669b0ddd..117b580d7a 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -10,7 +10,6 @@ import { resetDir } from "../system"; import { PluginManifest } from "@polywrap/polywrap-manifest-types-js"; import { bindSchema, BindOutput, BindOptions } from "@polywrap/schema-bind"; -import { ComposerOutput } from "@polywrap/schema-compose"; import { Abi } from "@polywrap/schema-parse"; import path from "path"; @@ -106,7 +105,7 @@ export class PluginProject extends Project { } public async generateSchemaBindings( - composerOutput: ComposerOutput, + abi: Abi, generationSubPath?: string ): Promise { const manifest = await this.getManifest(); @@ -124,8 +123,7 @@ export class PluginProject extends Project { const options: BindOptions = { projectName: manifest.name, - abi: composerOutput.abi as Abi, - schema: composerOutput.schema as string, + abi, outputDirAbs: moduleDirectory, bindLanguage, }; diff --git a/packages/cli/src/lib/project/PolywrapProject.ts b/packages/cli/src/lib/project/PolywrapProject.ts index 6e20fd239c..a29539a2cb 100644 --- a/packages/cli/src/lib/project/PolywrapProject.ts +++ b/packages/cli/src/lib/project/PolywrapProject.ts @@ -27,7 +27,6 @@ import { } from "@polywrap/polywrap-manifest-types-js"; import { normalizePath } from "@polywrap/os-js"; import { BindOptions, BindOutput, bindSchema } from "@polywrap/schema-bind"; -import { ComposerOutput } from "@polywrap/schema-compose"; import { Abi } from "@polywrap/schema-parse"; import regexParser from "regex-parser"; import path from "path"; @@ -147,7 +146,7 @@ export class PolywrapProject extends Project { } public async generateSchemaBindings( - composerOutput: ComposerOutput, + abi: Abi, generationSubPath?: string ): Promise { const manifest = await this.getManifest(); @@ -166,8 +165,7 @@ export class PolywrapProject extends Project { const options: BindOptions = { projectName: manifest.name, - abi: composerOutput.abi as Abi, - schema: composerOutput.schema as string, + abi, outputDirAbs: moduleDirectory, bindLanguage, }; diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index e18c4802a3..11c37d95b3 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -7,7 +7,7 @@ import { } from "../"; import { BindOutput } from "@polywrap/schema-bind"; -import { ComposerOutput } from "@polywrap/schema-compose"; +import {Abi} from "@polywrap/schema-parse"; export interface ProjectConfig { rootDir: string; @@ -68,7 +68,7 @@ export abstract class Project { >; public abstract generateSchemaBindings( - composerOutput: ComposerOutput, + abi: Abi, generationSubPath?: string ): Promise; diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 9c73bd1cbe..fb2f099f0c 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -40,10 +40,6 @@ export class PluginWrapper extends Wrapper { throw Error("client.getFile(...) is not implemented for Plugins."); } - public async getSchema(_client: Client): Promise { - return Promise.resolve(this._plugin.manifest.schema); - } - public async getManifest(_client: Client): Promise { throw Error("client.getManifest(...) is not implemented for Plugins."); } diff --git a/packages/schema/bind/src/bindings/typescript/app-ts/index.ts b/packages/schema/bind/src/bindings/typescript/app-ts/index.ts index 8d9bf009b0..d9df1769a6 100644 --- a/packages/schema/bind/src/bindings/typescript/app-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/app-ts/index.ts @@ -26,12 +26,11 @@ export const generateBinding: GenerateBindingFn = ( outputDirAbs: options.outputDirAbs, }; const output = result.output; - const schema = options.schema; const abi = applyTransforms(options.abi); output.entries = renderTemplates( path.join(__dirname, "./templates"), - { ...abi, schema }, + { ...abi }, {} ); diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts index 5a5b5c3815..d7083b71f9 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts @@ -35,11 +35,7 @@ export const generateBinding: GenerateBindingFn = ( }; const output = result.output; - output.entries = renderTemplates( - templatePath(""), - { ...abi, schema: options.schema }, - {} - ); + output.entries = renderTemplates(templatePath(""), { ...abi }, {}); return result; }; diff --git a/packages/schema/compose/src/index.ts b/packages/schema/compose/src/index.ts index 21de02e5db..99505a7471 100644 --- a/packages/schema/compose/src/index.ts +++ b/packages/schema/compose/src/index.ts @@ -1,41 +1,21 @@ -import { ManifestFile, AbiResolvers } from "./types"; +import { SchemaFile, AbiResolvers } from "./types"; import { resolveImportsAndParseSchemas } from "./resolve"; import { renderSchema } from "./render"; -import { Abi, combineAbi } from "@polywrap/schema-parse"; +import { Abi } from "@polywrap/schema-parse"; export * from "./types"; export { renderSchema }; export interface ComposerOptions { - abis: ManifestFile[]; + manifest: SchemaFile; resolvers: AbiResolvers; } export async function composeSchema(options: ComposerOptions): Promise { - const abis = await resolveImports(options.abis, options.resolvers); - return abis.length === 1 ? abis[0] : combineAbi(abis); -} - -export async function resolveImports( - manifests: ManifestFile[], - resolvers: AbiResolvers -): Promise { - const abis: Abi[] = []; - - if (manifests.length === 0) { - throw Error("No schema provided"); - } - - for (const manifest of manifests) { - abis.push( - await resolveImportsAndParseSchemas( - manifest.abi, - manifest.absolutePath, - resolvers - ) - ); - } - - return abis; + return await resolveImportsAndParseSchemas( + options.manifest.schema, + options.manifest.absolutePath, + options.resolvers + ); } diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index 2266e431ca..886227775c 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -5,9 +5,10 @@ import { ExternalImport, LocalImport, - AbiResolver, + SchemaResolver, AbiResolvers, SYNTAX_REFERENCE, + AbiResolver, } from "./types"; import { parseExternalImports, parseLocalImports, parseUse } from "./parse"; import { renderSchema } from "./render"; @@ -122,8 +123,8 @@ export async function resolveUseStatements( } export async function resolveImportsAndParseSchemas( - abi: Abi, - abiPath: string, + schema: string, + schemaPath: string, resolvers: AbiResolvers, noValidate = false ): Promise { @@ -218,7 +219,9 @@ export async function resolveImportsAndParseSchemas( ); // Parse the newly formed schema - return parseSchema(newSchema, { noValidate }); + const abi = parseSchema(newSchema, { noValidate }); + + return abi; } interface Namespaced { @@ -641,9 +644,9 @@ function resolveInterfaces( async function resolveExternalImports( importsToResolve: ExternalImport[], - resolveManifest: AbiResolver, + resolveAbi: AbiResolver, abi: Abi -): Promise { +): Promise { // Keep track of all imported object type names const typesToImport: ImportMap = {}; @@ -651,10 +654,11 @@ async function resolveExternalImports( const { uri, namespace, importedTypes } = importToResolve; // Resolve the schema - const manifest = await resolveManifest(uri); + const extAbi = await resolveAbi(uri); - // Parse the schema into Abi - const extAbi = manifest.abi as Abi; + if (!extAbi) { + throw Error(`Unable to resolve abi at "${uri}"`); + } let extTypesToImport = importedTypes; @@ -923,7 +927,7 @@ async function resolveExternalImports( async function resolveLocalImports( importsToResolve: LocalImport[], - resolveManifest: AbiResolver, + resolveSchema: SchemaResolver, abi: Abi, resolvers: AbiResolvers ): Promise { @@ -931,7 +935,7 @@ async function resolveLocalImports( const { importedTypes, path } = importToResolve; // Resolve the schema - let schema = await resolveManifest(path); + let schema = await resolveSchema(path); if (!schema) { throw Error(`Unable to resolve schema at "${path}"`); diff --git a/packages/schema/compose/src/types.ts b/packages/schema/compose/src/types.ts index aa2bb4f266..a24e15a5b7 100644 --- a/packages/schema/compose/src/types.ts +++ b/packages/schema/compose/src/types.ts @@ -1,15 +1,16 @@ import { Abi, CapabilityType } from "@polywrap/schema-parse"; -export interface ManifestFile { - abi: Abi; +export interface SchemaFile { + schema: string; absolutePath: string; } -export type AbiResolver = (uriOrPath: string) => Promise; +export type AbiResolver = (uri: string) => Promise; +export type SchemaResolver = (path: string) => Promise; export interface AbiResolvers { external: AbiResolver; - local: AbiResolver; + local: SchemaResolver; } export interface ExternalImport { diff --git a/yarn.lock b/yarn.lock index c3dff9c2a8..612ec0464c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -116,9 +116,9 @@ "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.6", "@babel/compat-data@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.6.tgz#8b37d24e88e8e21c499d4328db80577d8882fa53" - integrity sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== "@babel/core@7.9.0": version "7.9.0" @@ -163,7 +163,7 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.18.6", "@babel/generator@^7.4.0", "@babel/generator@^7.9.0": +"@babel/generator@^7.18.6", "@babel/generator@^7.18.7", "@babel/generator@^7.4.0", "@babel/generator@^7.9.0": version "7.18.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== @@ -274,9 +274,9 @@ "@babel/types" "^7.18.6" "@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz#57e3ca669e273d55c3cda55e6ebf552f37f483c8" - integrity sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" + integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== dependencies: "@babel/helper-environment-visitor" "^7.18.6" "@babel/helper-module-imports" "^7.18.6" @@ -284,8 +284,8 @@ "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.18.6" "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@babel/types" "^7.18.8" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -379,10 +379,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.6.tgz#845338edecad65ebffef058d3be851f1d28a63bc" - integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6", "@babel/parser@^7.18.8", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" + integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -748,9 +748,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-classes@^7.18.6", "@babel/plugin-transform-classes@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz#3501a8f3f4c7d5697c27a3eedbee71d68312669f" - integrity sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" + integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-environment-visitor" "^7.18.6" @@ -807,9 +807,9 @@ "@babel/plugin-syntax-flow" "^7.8.3" "@babel/plugin-transform-for-of@^7.18.6", "@babel/plugin-transform-for-of@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz#e0fdb813be908e91ccc9ec87b30cc2eabf046f7c" - integrity sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -898,9 +898,9 @@ "@babel/helper-replace-supers" "^7.18.6" "@babel/plugin-transform-parameters@^7.18.6", "@babel/plugin-transform-parameters@^7.8.7": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz#cbe03d5a4c6385dd756034ac1baa63c04beab8dc" - integrity sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" + integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -1034,9 +1034,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-typescript@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz#8f4ade1a9cf253e5cf7c7c20173082c2c08a50a7" - integrity sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" + integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" @@ -1278,26 +1278,26 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.6.tgz#a228562d2f46e89258efa4ddd0416942e2fd671d" - integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" + integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.6" + "@babel/generator" "^7.18.7" "@babel/helper-environment-visitor" "^7.18.6" "@babel/helper-function-name" "^7.18.6" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/parser" "^7.18.8" + "@babel/types" "^7.18.8" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.9.0": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.7.tgz#a4a2c910c15040ea52cdd1ddb1614a65c8041726" - integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.9.0": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" + integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== dependencies: "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" @@ -3094,11 +3094,11 @@ integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== "@octokit/plugin-paginate-rest@^2.16.8": - version "2.21.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.1.tgz#9ab7a21e9f35a6d5526a3082da3f8f43908449e4" - integrity sha512-NVNTK63yoTFp07GqISWK+uDfGH1CAPhQXS7LzsJBvaK5W+UlvG549pLZC55FK0FqANVl6q/9ra3SR5c97xF/sw== + version "2.21.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.2.tgz#070be9bb18cb78e52b471ddc3551d28355e2d5e2" + integrity sha512-S24H0a6bBVreJtoTaRHT/gnVASbOHVTRMOVIqd9zrJBP3JozsxJB56TDuTUmd1xLI4/rAE2HNmThvVKtIdLLEw== dependencies: - "@octokit/types" "^6.38.2" + "@octokit/types" "^6.39.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -3144,7 +3144,7 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.38.2", "@octokit/types@^6.39.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0": version "6.39.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.39.0.tgz#46ce28ca59a3d4bac0e487015949008302e78eee" integrity sha512-Mq4N9sOAYCitTsBtDdRVrBE80lIrMBhL9Jbrw0d+j96BAzlq4V+GLHFJbHokEsVvO/9tQupQdoFdgVYhD2C8UQ== @@ -3540,9 +3540,9 @@ "@types/json-schema" "*" "@types/estree@*": - version "0.0.52" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.52.tgz#7f1f57ad5b741f3d5b210d3b1f145640d89bf8fe" - integrity sha512-BZWrtCU0bMVAIliIV+HJO1f1PR41M7NKjfxrFJwwhKI1KwhwOxYw1SXg9ao+CIMt774nFuGiG6eU+udtbEI9oQ== + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/fs-extra@9.0.12": version "9.0.12" @@ -5324,7 +5324,7 @@ browserslist@4.10.0: node-releases "^1.1.52" pkg-up "^3.1.0" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.20.2, browserslist@^4.21.0, browserslist@^4.6.2, browserslist@^4.6.4, browserslist@^4.9.1: +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.20.2, browserslist@^4.21.1, browserslist@^4.6.2, browserslist@^4.6.4, browserslist@^4.9.1: version "4.21.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.1.tgz#c9b9b0a54c7607e8dc3e01a0d311727188011a00" integrity sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ== @@ -5602,9 +5602,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001359: - version "1.0.30001363" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz#26bec2d606924ba318235944e1193304ea7c4f15" - integrity sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg== + version "1.0.30001366" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001366.tgz#c73352c83830a9eaf2dea0ff71fb4b9a4bbaa89c" + integrity sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA== capture-exit@^2.0.0: version "2.0.0" @@ -6322,17 +6322,17 @@ copyfiles@2.4.1: yargs "^16.1.0" core-js-compat@^3.21.0, core-js-compat@^3.22.1, core-js-compat@^3.6.2: - version "3.23.3" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.3.tgz#7d8503185be76bb6d8d592c291a4457a8e440aa9" - integrity sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw== + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.4.tgz#56ad4a352884317a15f6b04548ff7139d23b917f" + integrity sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q== dependencies: - browserslist "^4.21.0" + browserslist "^4.21.1" semver "7.0.0" core-js-pure@^3.20.2: - version "3.23.3" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.3.tgz#bcd02d3d8ec68ad871ef50d5ccbb248ddb54f401" - integrity sha512-XpoouuqIj4P+GWtdyV8ZO3/u4KftkeDVMfvp+308eGMhCrA3lVDSmAxO0c6GGOcmgVlaKDrgWVMo49h2ab/TDA== + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.4.tgz#aba5c7fb297063444f6bf93afb0362151679a012" + integrity sha512-lizxkcgj3XDmi7TUBFe+bQ1vNpD5E4t76BrBWI3HdUxdw/Mq1VF4CkiHzIKyieECKtcODK2asJttoofEeUKICQ== core-js@^2.4.0: version "2.6.12" @@ -6340,9 +6340,9 @@ core-js@^2.4.0: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.5.0: - version "3.23.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.3.tgz#3b977612b15da6da0c9cc4aec487e8d24f371112" - integrity sha512-oAKwkj9xcWNBAvGbT//WiCdOMpb9XQG92/Fe3ABFM/R16BsHgePG00mFOgKf7IsCtfj8tA1kHtf/VwErhriz5Q== + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.4.tgz#92d640faa7f48b90bbd5da239986602cfc402aa6" + integrity sha512-vjsKqRc1RyAJC3Ye2kYqgfdThb3zYnx9CrqoCcjMOENMtQPC7ZViBvlDxwYU/2z2NI/IPuiXw5mT4hWhddqjzQ== core-util-is@1.0.2: version "1.0.2" @@ -7272,9 +7272,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.172: - version "1.4.180" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.180.tgz#380b06037836055d12c7de181ee90b8ed911c3e7" - integrity sha512-7at5ash3FD9U5gPa3/wPr6OdiZd/zBjvDZaaHBpcqFOFUhZiWnb7stkqk8xUFL9H9nk7Yok5vCCNK8wyC/+f8A== + version "1.4.187" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.187.tgz#b884493df00816dc2ce928958c4f6a51a93fe1a8" + integrity sha512-t3iFLHVIMhB8jGZ+8ui951nz6Bna5qKfhxezG3wzXdBJ79qFKPsE2chjjVFNqC1ewhfrPQrw9pmVeo4FFpZeQA== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -11528,9 +11528,9 @@ json5@^1.0.1: minimist "^1.2.0" jsonc-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" - integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" + integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg== jsonfile@^4.0.0: version "4.0.0" @@ -13001,9 +13001,9 @@ node-releases@^1.1.52: integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== node-releases@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" - integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== noms@0.0.0: version "0.0.0" From 8e7e925698d570a5d9177ef425c65b2168e7c314 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 18 Jul 2022 22:59:25 +0200 Subject: [PATCH 05/56] chore: started plugins refactor with abi --- packages/cli/src/lib/SchemaComposer.ts | 12 +- .../js/client/src/createPolywrapClient.ts | 4 +- packages/js/core/src/types/Client.ts | 2 - packages/js/core/src/types/Plugin.ts | 5 +- .../js/plugins/ethereum/src/wrap-man/index.ts | 9 + .../js/plugins/ethereum/src/wrap-man/info.ts | 3548 +++++++++++++++++ .../plugins/ethereum/src/wrap-man/manifest.ts | 15 + .../plugins/ethereum/src/wrap-man/module.ts | 305 ++ .../js/plugins/ethereum/src/wrap-man/types.ts | 145 + .../plugins/file-system/src/wrap-man/index.ts | 9 + .../file-system/src/wrap-man/manifest.ts | 16 + .../file-system/src/wrap-man/module.ts | 85 + .../file-system/src/wrap-man/schema.ts | 149 + .../plugins/file-system/src/wrap-man/types.ts | 189 + .../js/plugins/http/src/wrap-man/index.ts | 9 + packages/js/plugins/http/src/wrap-man/info.ts | 1 + .../js/plugins/http/src/wrap-man/manifest.ts | 15 + .../js/plugins/http/src/wrap-man/module.ts | 37 + .../js/plugins/http/src/wrap-man/schema.ts | 95 + .../js/plugins/http/src/wrap-man/types.ts | 78 + packages/js/plugins/sha3/package.json | 2 +- packages/js/plugins/sha3/src/index.ts | 2 +- .../js/plugins/sha3/src/wrap-man/index.ts | 9 + packages/js/plugins/sha3/src/wrap-man/info.ts | 532 +++ .../js/plugins/sha3/src/wrap-man/manifest.ts | 14 + .../js/plugins/sha3/src/wrap-man/module.ts | 127 + .../js/plugins/sha3/src/wrap-man/types.ts | 43 + .../plugin-ts/templates/wrap.info.mustache | 0 .../schema/compose/src/__tests__/index.ts | 16 +- packages/schema/compose/src/index.ts | 6 +- 30 files changed, 5457 insertions(+), 22 deletions(-) create mode 100644 packages/js/plugins/ethereum/src/wrap-man/index.ts create mode 100644 packages/js/plugins/ethereum/src/wrap-man/info.ts create mode 100644 packages/js/plugins/ethereum/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/ethereum/src/wrap-man/module.ts create mode 100644 packages/js/plugins/ethereum/src/wrap-man/types.ts create mode 100644 packages/js/plugins/file-system/src/wrap-man/index.ts create mode 100644 packages/js/plugins/file-system/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/file-system/src/wrap-man/module.ts create mode 100644 packages/js/plugins/file-system/src/wrap-man/schema.ts create mode 100644 packages/js/plugins/file-system/src/wrap-man/types.ts create mode 100644 packages/js/plugins/http/src/wrap-man/index.ts create mode 100644 packages/js/plugins/http/src/wrap-man/info.ts create mode 100644 packages/js/plugins/http/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/http/src/wrap-man/module.ts create mode 100644 packages/js/plugins/http/src/wrap-man/schema.ts create mode 100644 packages/js/plugins/http/src/wrap-man/types.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/index.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/info.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/module.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/types.ts create mode 100644 packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info.mustache diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index e70e4b0f1f..b1d8665a79 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -22,15 +22,15 @@ export interface SchemaComposerConfig { export class SchemaComposer { private _client: PolywrapClient; - private _composerOutput: Abi | undefined; + private _abi: Abi | undefined; constructor(private _config: SchemaComposerConfig) { this._client = this._config.client; } public async getComposedAbis(): Promise { - if (this._composerOutput) { - return Promise.resolve(this._composerOutput); + if (this._abi) { + return Promise.resolve(this._abi); } const { project } = this._config; @@ -59,12 +59,12 @@ export class SchemaComposer { }, }; - this._composerOutput = await composeSchema(options); - return this._composerOutput; + this._abi = await composeSchema(options); + return this._abi; } public reset(): void { - this._composerOutput = undefined; + this._abi = undefined; } private async _fetchExternalSchema( diff --git a/packages/js/client/src/createPolywrapClient.ts b/packages/js/client/src/createPolywrapClient.ts index a68d704194..36b4768c79 100644 --- a/packages/js/client/src/createPolywrapClient.ts +++ b/packages/js/client/src/createPolywrapClient.ts @@ -57,10 +57,10 @@ export const createPolywrapClient = Tracer.traceFunc( !pluginPackage || typeof pluginPackage !== "object" || !pluginPackage.factory || - !pluginPackage.manifest + !pluginPackage.abi ) { throw Error( - `Plugin package is malformed. Expected object with keys "factory" and "manifest". Got: ${pluginPackage}` + `Plugin package is malformed. Expected object with keys "factory" and "abi". Got: ${pluginPackage}` ); } diff --git a/packages/js/core/src/types/Client.ts b/packages/js/core/src/types/Client.ts index cdb03b3214..8c8d8f3658 100644 --- a/packages/js/core/src/types/Client.ts +++ b/packages/js/core/src/types/Client.ts @@ -36,8 +36,6 @@ export type GetEnvsOptions = Contextualized; export type GetUriResolversOptions = Contextualized; -export type GetSchemaOptions = Contextualized; - export interface GetFileOptions extends Contextualized { path: string; encoding?: "utf-8" | string; diff --git a/packages/js/core/src/types/Plugin.ts b/packages/js/core/src/types/Plugin.ts index 4ff082c4a9..73d8107d79 100644 --- a/packages/js/core/src/types/Plugin.ts +++ b/packages/js/core/src/types/Plugin.ts @@ -73,8 +73,9 @@ export abstract class PluginModule< /** The plugin package's manifest */ export interface PluginPackageManifest { - /** The Wrapper's schema */ - schema: string; + // TODO (cbrzn): Change to ABI once JSON Schema has been merged + /** The Wrapper's ABI */ + abi: unknown; /** All interface schemas implemented by this plugin. */ implements: Uri[]; diff --git a/packages/js/plugins/ethereum/src/wrap-man/index.ts b/packages/js/plugins/ethereum/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/ethereum/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ethereum/src/wrap-man/info.ts b/packages/js/plugins/ethereum/src/wrap-man/info.ts new file mode 100644 index 0000000000..9c5c5d5021 --- /dev/null +++ b/packages/js/plugins/ethereum/src/wrap-man/info.ts @@ -0,0 +1,3548 @@ +export const abi = { + objectTypes: [ + { + type: "TxReceipt", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "to", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "from", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "contractAddress", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "contractAddress", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "root", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "root", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasUsed", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasUsed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "logsBloom", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "logsBloom", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "transactionHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "transactionHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[Log]", + name: "logs", + required: true, + kind: 34, + array: { + type: "[Log]", + name: "logs", + required: true, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Log", + name: "logs", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Log", + name: "logs", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "blockNumber", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockNumber", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "blockHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "blockHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "confirmations", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "cumulativeGasUsed", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "cumulativeGasUsed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "effectiveGasPrice", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "effectiveGasPrice", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "byzantium", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "byzantium", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "type", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "status", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "status", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "TxResponse", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "hash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "hash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "to", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "from", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "nonce", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "nonce", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasLimit", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasLimit", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "chainId", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "chainId", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "blockNumber", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockNumber", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "blockHash", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "blockHash", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "timestamp", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timestamp", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "confirmations", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "raw", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "raw", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "r", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "r", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "s", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "s", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "v", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "v", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "type", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[Access]", + name: "accessList", + required: null, + kind: 34, + array: { + type: "[Access]", + name: "accessList", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Access", + name: "accessList", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Access", + name: "accessList", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "TxRequest", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "to", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "from", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "nonce", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "nonce", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "data", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "value", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "chainId", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "chainId", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "type", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "TxOverrides", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "value", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "StaticTxResult", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "result", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "result", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "error", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "error", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Log", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "BigInt", + name: "blockNumber", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockNumber", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "blockHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "blockHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "removed", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "removed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "topics", + required: true, + kind: 34, + array: { + type: "[String]", + name: "topics", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "topics", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "topics", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "transactionHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "transactionHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "logIndex", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "logIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "EventNotification", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Log", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Log", + name: "log", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Access", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "storageKeys", + required: true, + kind: 34, + array: { + type: "[String]", + name: "storageKeys", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "storageKeys", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "storageKeys", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Connection", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "node", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "node", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "networkNameOrChainId", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "networkNameOrChainId", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Network", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "name", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "name", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "chainId", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "chainId", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "ensAddress", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "ensAddress", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + envType: { + type: "Env", + name: null, + required: null, + kind: 65536, + properties: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "callContractView", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "callContractView", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "callContractView", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "callContractStatic", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "StaticTxResult", + name: "callContractStatic", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "StaticTxResult", + name: "callContractStatic", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getBalance", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "getBalance", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "getBalance", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "encodeParams", + required: true, + kind: 64, + arguments: [ + { + type: "[String]", + name: "types", + required: true, + kind: 34, + array: { + type: "[String]", + name: "types", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "values", + required: true, + kind: 34, + array: { + type: "[String]", + name: "values", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "encodeParams", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "encodeParams", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "encodeFunction", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "encodeFunction", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "encodeFunction", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "solidityPack", + required: true, + kind: 64, + arguments: [ + { + type: "[String]", + name: "types", + required: true, + kind: 34, + array: { + type: "[String]", + name: "types", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "values", + required: true, + kind: 34, + array: { + type: "[String]", + name: "values", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "solidityPack", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "solidityPack", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "solidityKeccak256", + required: true, + kind: 64, + arguments: [ + { + type: "[String]", + name: "types", + required: true, + kind: 34, + array: { + type: "[String]", + name: "types", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "values", + required: true, + kind: 34, + array: { + type: "[String]", + name: "values", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "solidityKeccak256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "solidityKeccak256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "soliditySha256", + required: true, + kind: 64, + arguments: [ + { + type: "[String]", + name: "types", + required: true, + kind: 34, + array: { + type: "[String]", + name: "types", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "values", + required: true, + kind: 34, + array: { + type: "[String]", + name: "values", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "soliditySha256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "soliditySha256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getSignerAddress", + required: true, + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "getSignerAddress", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "getSignerAddress", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getSignerBalance", + required: true, + kind: 64, + arguments: [ + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "getSignerBalance", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "getSignerBalance", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getSignerTransactionCount", + required: true, + kind: 64, + arguments: [ + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "getSignerTransactionCount", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "getSignerTransactionCount", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getGasPrice", + required: true, + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "getGasPrice", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "getGasPrice", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "estimateTransactionGas", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "estimateTransactionGas", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "estimateTransactionGas", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "estimateContractCallGas", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "estimateContractCallGas", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "estimateContractCallGas", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "checkAddress", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "checkAddress", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "checkAddress", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "toWei", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "eth", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "eth", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "toWei", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "toWei", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "toEth", + required: true, + kind: 64, + arguments: [ + { + type: "BigInt", + name: "wei", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "wei", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "toEth", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "toEth", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "awaitTransaction", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "txHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "txHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "confirmations", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "timeout", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timeout", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "TxReceipt", + name: "awaitTransaction", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxReceipt", + name: "awaitTransaction", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "waitForEvent", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "event", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "event", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timeout", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "EventNotification", + name: "waitForEvent", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "EventNotification", + name: "waitForEvent", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getNetwork", + required: true, + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Network", + name: "getNetwork", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Network", + name: "getNetwork", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "callContractMethod", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "TxResponse", + name: "callContractMethod", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxResponse", + name: "callContractMethod", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "callContractMethodAndWait", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "TxReceipt", + name: "callContractMethodAndWait", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxReceipt", + name: "callContractMethodAndWait", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sendTransaction", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "TxResponse", + name: "sendTransaction", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxResponse", + name: "sendTransaction", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sendTransactionAndWait", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "TxReceipt", + name: "sendTransactionAndWait", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxReceipt", + name: "sendTransactionAndWait", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "deployContract", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "abi", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "abi", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "bytecode", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "bytecode", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "deployContract", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "deployContract", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "signMessage", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "signMessage", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "signMessage", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sendRPC", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "params", + required: true, + kind: 34, + array: { + type: "[String]", + name: "params", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "params", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "params", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sendRPC", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "sendRPC", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/js/plugins/ethereum/src/wrap-man/manifest.ts b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..96b656fffd --- /dev/null +++ b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + ], +}; diff --git a/packages/js/plugins/ethereum/src/wrap-man/module.ts b/packages/js/plugins/ethereum/src/wrap-man/module.ts new file mode 100644 index 0000000000..71b726160a --- /dev/null +++ b/packages/js/plugins/ethereum/src/wrap-man/module.ts @@ -0,0 +1,305 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_callContractView extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; +} + +export interface Args_callContractStatic extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Args_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Args_encodeParams extends Record { + types: Array; + values: Array; +} + +export interface Args_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +export interface Args_solidityPack extends Record { + types: Array; + values: Array; +} + +export interface Args_solidityKeccak256 extends Record { + types: Array; + values: Array; +} + +export interface Args_soliditySha256 extends Record { + types: Array; + values: Array; +} + +export interface Args_getSignerAddress extends Record { + connection?: Types.Connection | null; +} + +export interface Args_getSignerBalance extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Args_getSignerTransactionCount extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Connection | null; +} + +export interface Args_getGasPrice extends Record { + connection?: Types.Connection | null; +} + +export interface Args_estimateTransactionGas extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Args_estimateContractCallGas extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Args_checkAddress extends Record { + address: Types.String; +} + +export interface Args_toWei extends Record { + eth: Types.String; +} + +export interface Args_toEth extends Record { + wei: Types.BigInt; +} + +export interface Args_awaitTransaction extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Connection | null; +} + +export interface Args_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Connection | null; +} + +export interface Args_getNetwork extends Record { + connection?: Types.Connection | null; +} + +export interface Args_callContractMethod extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Args_callContractMethodAndWait extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Connection | null; + txOverrides?: Types.TxOverrides | null; +} + +export interface Args_sendTransaction extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Args_sendTransactionAndWait extends Record { + tx: Types.TxRequest; + connection?: Types.Connection | null; +} + +export interface Args_deployContract extends Record { + abi: Types.String; + bytecode: Types.String; + args?: Array | null; + connection?: Types.Connection | null; +} + +export interface Args_signMessage extends Record { + message: Types.String; + connection?: Types.Connection | null; +} + +export interface Args_sendRPC extends Record { + method: Types.String; + params: Array; + connection?: Types.Connection | null; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig, + Types.Env +> { + + abstract callContractView( + args: Args_callContractView, + client: Client + ): MaybeAsync; + + abstract callContractStatic( + args: Args_callContractStatic, + client: Client + ): MaybeAsync; + + abstract getBalance( + args: Args_getBalance, + client: Client + ): MaybeAsync; + + abstract encodeParams( + args: Args_encodeParams, + client: Client + ): MaybeAsync; + + abstract encodeFunction( + args: Args_encodeFunction, + client: Client + ): MaybeAsync; + + abstract solidityPack( + args: Args_solidityPack, + client: Client + ): MaybeAsync; + + abstract solidityKeccak256( + args: Args_solidityKeccak256, + client: Client + ): MaybeAsync; + + abstract soliditySha256( + args: Args_soliditySha256, + client: Client + ): MaybeAsync; + + abstract getSignerAddress( + args: Args_getSignerAddress, + client: Client + ): MaybeAsync; + + abstract getSignerBalance( + args: Args_getSignerBalance, + client: Client + ): MaybeAsync; + + abstract getSignerTransactionCount( + args: Args_getSignerTransactionCount, + client: Client + ): MaybeAsync; + + abstract getGasPrice( + args: Args_getGasPrice, + client: Client + ): MaybeAsync; + + abstract estimateTransactionGas( + args: Args_estimateTransactionGas, + client: Client + ): MaybeAsync; + + abstract estimateContractCallGas( + args: Args_estimateContractCallGas, + client: Client + ): MaybeAsync; + + abstract checkAddress( + args: Args_checkAddress, + client: Client + ): MaybeAsync; + + abstract toWei( + args: Args_toWei, + client: Client + ): MaybeAsync; + + abstract toEth( + args: Args_toEth, + client: Client + ): MaybeAsync; + + abstract awaitTransaction( + args: Args_awaitTransaction, + client: Client + ): MaybeAsync; + + abstract waitForEvent( + args: Args_waitForEvent, + client: Client + ): MaybeAsync; + + abstract getNetwork( + args: Args_getNetwork, + client: Client + ): MaybeAsync; + + abstract callContractMethod( + args: Args_callContractMethod, + client: Client + ): MaybeAsync; + + abstract callContractMethodAndWait( + args: Args_callContractMethodAndWait, + client: Client + ): MaybeAsync; + + abstract sendTransaction( + args: Args_sendTransaction, + client: Client + ): MaybeAsync; + + abstract sendTransactionAndWait( + args: Args_sendTransactionAndWait, + client: Client + ): MaybeAsync; + + abstract deployContract( + args: Args_deployContract, + client: Client + ): MaybeAsync; + + abstract signMessage( + args: Args_signMessage, + client: Client + ): MaybeAsync; + + abstract sendRPC( + args: Args_sendRPC, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/ethereum/src/wrap-man/types.ts b/packages/js/plugins/ethereum/src/wrap-man/types.ts new file mode 100644 index 0000000000..a4fde4d2d9 --- /dev/null +++ b/packages/js/plugins/ethereum/src/wrap-man/types.ts @@ -0,0 +1,145 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +export interface Env extends Record { + connection?: Types.Connection | null; +} +/// Env END /// + +/// Objects START /// +export interface TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +export interface TxResponse { + hash: Types.String; + to?: Types.String | null; + from: Types.String; + nonce: Types.UInt32; + gasLimit: Types.BigInt; + gasPrice?: Types.BigInt | null; + data: Types.String; + value: Types.BigInt; + chainId: Types.BigInt; + blockNumber?: Types.BigInt | null; + blockHash?: Types.String | null; + timestamp?: Types.UInt32 | null; + confirmations: Types.UInt32; + raw?: Types.String | null; + r?: Types.String | null; + s?: Types.String | null; + v?: Types.UInt32 | null; + type?: Types.UInt32 | null; + accessList?: Array | null; +} + +export interface TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +export interface TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +export interface StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +export interface Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +export interface EventNotification { + data: Types.String; + address: Types.String; + log: Types.Log; +} + +export interface Access { + address: Types.String; + storageKeys: Array; +} + +export interface Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +export interface Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/js/plugins/file-system/src/wrap-man/index.ts b/packages/js/plugins/file-system/src/wrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/file-system/src/wrap-man/manifest.ts b/packages/js/plugins/file-system/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..946e7ef7f8 --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/fs.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/file-system/src/wrap-man/module.ts b/packages/js/plugins/file-system/src/wrap-man/module.ts new file mode 100644 index 0000000000..ba85991542 --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/module.ts @@ -0,0 +1,85 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_readFile extends Record { + path: Types.String; +} + +export interface Args_readFileAsString extends Record { + path: Types.String; + encoding?: Types.FileSystem_Encoding | null; +} + +export interface Args_exists extends Record { + path: Types.String; +} + +export interface Args_writeFile extends Record { + path: Types.String; + data: Types.Bytes; +} + +export interface Args_mkdir extends Record { + path: Types.String; + recursive?: Types.Boolean | null; +} + +export interface Args_rm extends Record { + path: Types.String; + recursive?: Types.Boolean | null; + force?: Types.Boolean | null; +} + +export interface Args_rmdir extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract readFile( + args: Args_readFile, + client: Client + ): MaybeAsync; + + abstract readFileAsString( + args: Args_readFileAsString, + client: Client + ): MaybeAsync; + + abstract exists( + args: Args_exists, + client: Client + ): MaybeAsync; + + abstract writeFile( + args: Args_writeFile, + client: Client + ): MaybeAsync; + + abstract mkdir( + args: Args_mkdir, + client: Client + ): MaybeAsync; + + abstract rm( + args: Args_rm, + client: Client + ): MaybeAsync; + + abstract rmdir( + args: Args_rmdir, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/file-system/src/wrap-man/schema.ts b/packages/js/plugins/file-system/src/wrap-man/schema.ts new file mode 100644 index 0000000000..a4b03ae219 --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/schema.ts @@ -0,0 +1,149 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module implements FileSystem_Module @imports( + types: [ + "FileSystem_Module", + "FileSystem_Encoding" + ] +) { + readFile( + path: String! + ): Bytes! + + readFileAsString( + path: String! + encoding: FileSystem_Encoding + ): String! + + exists( + path: String! + ): Boolean! + + writeFile( + path: String! + data: Bytes! + ): Boolean + + mkdir( + path: String! + recursive: Boolean + ): Boolean + + rm( + path: String! + recursive: Boolean + force: Boolean + ): Boolean + + rmdir( + path: String! + ): Boolean +} + +### Imported Modules START ### + +type FileSystem_Module @imported( + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Module" +) { + readFile( + path: String! + ): Bytes! + + readFileAsString( + path: String! + encoding: FileSystem_Encoding + ): String! + + exists( + path: String! + ): Boolean! + + writeFile( + path: String! + data: Bytes! + ): Boolean + + mkdir( + path: String! + recursive: Boolean + ): Boolean + + rm( + path: String! + recursive: Boolean + force: Boolean + ): Boolean + + rmdir( + path: String! + ): Boolean +} + +### Imported Modules END ### + +### Imported Objects START ### + +enum FileSystem_Encoding @imported( + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Encoding" +) { + ASCII + UTF8 + UTF16LE + UCS2 + BASE64 + BASE64URL + LATIN1 + BINARY + HEX +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### +`; diff --git a/packages/js/plugins/file-system/src/wrap-man/types.ts b/packages/js/plugins/file-system/src/wrap-man/types.ts new file mode 100644 index 0000000000..b34d031052 --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/types.ts @@ -0,0 +1,189 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/fs.polywrap.eth" */ +export enum FileSystem_EncodingEnum { + ASCII, + UTF8, + UTF16LE, + UCS2, + BASE64, + BASE64URL, + LATIN1, + BINARY, + HEX, +} + +export type FileSystem_EncodingString = + | "ASCII" + | "UTF8" + | "UTF16LE" + | "UCS2" + | "BASE64" + | "BASE64URL" + | "LATIN1" + | "BINARY" + | "HEX" + +export type FileSystem_Encoding = FileSystem_EncodingEnum | FileSystem_EncodingString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_readFile extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_readFileAsString extends Record { + path: Types.String; + encoding?: Types.FileSystem_Encoding | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_exists extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_writeFile extends Record { + path: Types.String; + data: Types.Bytes; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_mkdir extends Record { + path: Types.String; + recursive?: Types.Boolean | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_rm extends Record { + path: Types.String; + recursive?: Types.Boolean | null; + force?: Types.Boolean | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_rmdir extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +export const FileSystem_Module = { + readFile: async ( + args: FileSystem_Module_Args_readFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "readFile", + args + }); + }, + + readFileAsString: async ( + args: FileSystem_Module_Args_readFileAsString, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "readFileAsString", + args + }); + }, + + exists: async ( + args: FileSystem_Module_Args_exists, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "exists", + args + }); + }, + + writeFile: async ( + args: FileSystem_Module_Args_writeFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "writeFile", + args + }); + }, + + mkdir: async ( + args: FileSystem_Module_Args_mkdir, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "mkdir", + args + }); + }, + + rm: async ( + args: FileSystem_Module_Args_rm, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "rm", + args + }); + }, + + rmdir: async ( + args: FileSystem_Module_Args_rmdir, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "rmdir", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/http/src/wrap-man/index.ts b/packages/js/plugins/http/src/wrap-man/index.ts new file mode 100644 index 0000000000..f367d143d9 --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./schema"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/http/src/wrap-man/info.ts b/packages/js/plugins/http/src/wrap-man/info.ts new file mode 100644 index 0000000000..c2af24d2c5 --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/info.ts @@ -0,0 +1 @@ +{"abi":{"objectTypes":[{"type":"Header","name":null,"required":null,"kind":1,"properties":[{"type":"String","name":"key","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"key","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"UrlParam","name":null,"required":null,"kind":1,"properties":[{"type":"String","name":"key","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"key","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"Response","name":null,"required":null,"kind":1,"properties":[{"type":"Int","name":"status","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Int","name":"status","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"statusText","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"statusText","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Header]","name":"headers","required":null,"kind":34,"array":{"type":"[Header]","name":"headers","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Header","name":"headers","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Header","name":"headers","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"body","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"body","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"Request","name":null,"required":null,"kind":1,"properties":[{"type":"[Header]","name":"headers","required":null,"kind":34,"array":{"type":"[Header]","name":"headers","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Header","name":"headers","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Header","name":"headers","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[UrlParam]","name":"urlParams","required":null,"kind":34,"array":{"type":"[UrlParam]","name":"urlParams","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"UrlParam","name":"urlParams","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"UrlParam","name":"urlParams","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"ResponseType","name":"responseType","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":null,"enum":{"type":"ResponseType","name":"responseType","required":true,"kind":16384},"unresolvedObjectOrEnum":null},{"type":"String","name":"body","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"body","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]}],"enumTypes":[{"type":"ResponseType","name":null,"required":null,"kind":8,"constants":["TEXT","BINARY"]}],"interfaceTypes":[],"importedObjectTypes":[],"importedModuleTypes":[],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"get","required":true,"kind":64,"arguments":[{"type":"String","name":"url","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"url","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Request","name":"request","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Request","name":"request","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Response","name":"get","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Response","name":"get","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"post","required":true,"kind":64,"arguments":[{"type":"String","name":"url","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"url","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Request","name":"request","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Request","name":"request","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Response","name":"post","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Response","name":"post","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[],"interfaces":[]}}} \ No newline at end of file diff --git a/packages/js/plugins/http/src/wrap-man/manifest.ts b/packages/js/plugins/http/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..730cf8326f --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { schema } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + schema, + implements: [ + ], +}; diff --git a/packages/js/plugins/http/src/wrap-man/module.ts b/packages/js/plugins/http/src/wrap-man/module.ts new file mode 100644 index 0000000000..f2016d681b --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/module.ts @@ -0,0 +1,37 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_get extends Record { + url: Types.String; + request?: Types.Request | null; +} + +export interface Args_post extends Record { + url: Types.String; + request?: Types.Request | null; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract get( + args: Args_get, + client: Client + ): MaybeAsync; + + abstract post( + args: Args_post, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/http/src/wrap-man/schema.ts b/packages/js/plugins/http/src/wrap-man/schema.ts new file mode 100644 index 0000000000..480916adc5 --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/schema.ts @@ -0,0 +1,95 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + get( + url: String! + request: Request + ): Response + + post( + url: String! + request: Request + ): Response +} + +type Header { + key: String! + value: String! +} + +type UrlParam { + key: String! + value: String! +} + +type Response { + status: Int! + statusText: String! + headers: [Header!] + body: String +} + +type Request { + headers: [Header!] + urlParams: [UrlParam!] + responseType: ResponseType! + body: String +} + +enum ResponseType { + TEXT + BINARY +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### +`; diff --git a/packages/js/plugins/http/src/wrap-man/types.ts b/packages/js/plugins/http/src/wrap-man/types.ts new file mode 100644 index 0000000000..f43de77bd7 --- /dev/null +++ b/packages/js/plugins/http/src/wrap-man/types.ts @@ -0,0 +1,78 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +export interface Header { + key: Types.String; + value: Types.String; +} + +export interface UrlParam { + key: Types.String; + value: Types.String; +} + +export interface Response { + status: Types.Int; + statusText: Types.String; + headers?: Array | null; + body?: Types.String | null; +} + +export interface Request { + headers?: Array | null; + urlParams?: Array | null; + responseType: Types.ResponseType; + body?: Types.String | null; +} + +/// Objects END /// + +/// Enums START /// +export enum ResponseTypeEnum { + TEXT, + BINARY, +} + +export type ResponseTypeString = + | "TEXT" + | "BINARY" + +export type ResponseType = ResponseTypeEnum | ResponseTypeString; + +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index de80a28b74..a1c878c794 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/sha3/src/index.ts b/packages/js/plugins/sha3/src/index.ts index 508686dcd5..a3d522b5c7 100644 --- a/packages/js/plugins/sha3/src/index.ts +++ b/packages/js/plugins/sha3/src/index.ts @@ -16,7 +16,7 @@ import { Args_shake_128, Args_shake_256, manifest, -} from "./wrap"; +} from "./wrap-man"; import { sha3_512, diff --git a/packages/js/plugins/sha3/src/wrap-man/index.ts b/packages/js/plugins/sha3/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/sha3/src/wrap-man/info.ts b/packages/js/plugins/sha3/src/wrap-man/info.ts new file mode 100644 index 0000000000..be4a9c59f2 --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/info.ts @@ -0,0 +1,532 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "sha3_512", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sha3_512", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "sha3_512", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sha3_384", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sha3_384", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "sha3_384", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sha3_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sha3_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "sha3_256", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "sha3_224", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sha3_224", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "sha3_224", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "keccak_512", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_512", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_512", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "keccak_384", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_384", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_384", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "keccak_224", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_224", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_224", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "hex_keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "hex_keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "hex_keccak_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "buffer_keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "message", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "buffer_keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "buffer_keccak_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "shake_128", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Int", + name: "outputBits", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Int", + name: "outputBits", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "shake_128", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "shake_128", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "shake_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Int", + name: "outputBits", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Int", + name: "outputBits", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "shake_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "shake_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/js/plugins/sha3/src/wrap-man/manifest.ts b/packages/js/plugins/sha3/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..8de225b990 --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/manifest.ts @@ -0,0 +1,14 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [], +}; diff --git a/packages/js/plugins/sha3/src/wrap-man/module.ts b/packages/js/plugins/sha3/src/wrap-man/module.ts new file mode 100644 index 0000000000..4c77351a4e --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/module.ts @@ -0,0 +1,127 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_sha3_512 extends Record { + message: Types.String; +} + +export interface Args_sha3_384 extends Record { + message: Types.String; +} + +export interface Args_sha3_256 extends Record { + message: Types.String; +} + +export interface Args_sha3_224 extends Record { + message: Types.String; +} + +export interface Args_keccak_512 extends Record { + message: Types.String; +} + +export interface Args_keccak_384 extends Record { + message: Types.String; +} + +export interface Args_keccak_256 extends Record { + message: Types.String; +} + +export interface Args_keccak_224 extends Record { + message: Types.String; +} + +export interface Args_hex_keccak_256 extends Record { + message: Types.String; +} + +export interface Args_buffer_keccak_256 extends Record { + message: Types.Bytes; +} + +export interface Args_shake_128 extends Record { + message: Types.String; + outputBits: Types.Int; +} + +export interface Args_shake_256 extends Record { + message: Types.String; + outputBits: Types.Int; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract sha3_512( + args: Args_sha3_512, + client: Client + ): MaybeAsync; + + abstract sha3_384( + args: Args_sha3_384, + client: Client + ): MaybeAsync; + + abstract sha3_256( + args: Args_sha3_256, + client: Client + ): MaybeAsync; + + abstract sha3_224( + args: Args_sha3_224, + client: Client + ): MaybeAsync; + + abstract keccak_512( + args: Args_keccak_512, + client: Client + ): MaybeAsync; + + abstract keccak_384( + args: Args_keccak_384, + client: Client + ): MaybeAsync; + + abstract keccak_256( + args: Args_keccak_256, + client: Client + ): MaybeAsync; + + abstract keccak_224( + args: Args_keccak_224, + client: Client + ): MaybeAsync; + + abstract hex_keccak_256( + args: Args_hex_keccak_256, + client: Client + ): MaybeAsync; + + abstract buffer_keccak_256( + args: Args_buffer_keccak_256, + client: Client + ): MaybeAsync; + + abstract shake_128( + args: Args_shake_128, + client: Client + ): MaybeAsync; + + abstract shake_256( + args: Args_shake_256, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/sha3/src/wrap-man/types.ts b/packages/js/plugins/sha3/src/wrap-man/types.ts new file mode 100644 index 0000000000..bbcdcda02d --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/types.ts @@ -0,0 +1,43 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info.mustache new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 05c9037b74..921d6f8c6b 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -1,4 +1,4 @@ -import { ComposerOutput, ComposerOptions, ComposerFilter } from ".."; +import { ComposerOptions } from ".."; import path from "path"; import { readdirSync, Dirent } from "fs"; @@ -15,7 +15,7 @@ const root = GetPathToComposeTestFiles(); export interface TestCase { name: string; input: ComposerOptions; - output?: ComposerOutput; + abi: Abi; } type TestCases = { @@ -85,7 +85,13 @@ async function importCase( }; const input: ComposerOptions = { - schemas: [], + schemaFile: { + schema: moduleInput!, + absolutePath: path.join( + directory, + "input/module.graphql" + ), + }, resolvers: { external: resolveExternal, local: resolveLocal, @@ -94,13 +100,13 @@ async function importCase( }; if (moduleInput) { - input.schemas.push({ + input.schemaFile = { schema: moduleInput, absolutePath: path.join( directory, "input/module.graphql" ), - }); + }; } let output: ComposerOutput = { }; diff --git a/packages/schema/compose/src/index.ts b/packages/schema/compose/src/index.ts index 99505a7471..ac1d20e7ca 100644 --- a/packages/schema/compose/src/index.ts +++ b/packages/schema/compose/src/index.ts @@ -8,14 +8,14 @@ export * from "./types"; export { renderSchema }; export interface ComposerOptions { - manifest: SchemaFile; + schemaFile: SchemaFile; resolvers: AbiResolvers; } export async function composeSchema(options: ComposerOptions): Promise { return await resolveImportsAndParseSchemas( - options.manifest.schema, - options.manifest.absolutePath, + options.schemaFile.schema, + options.schemaFile.absolutePath, options.resolvers ); } From bcdaa96b0feed40c6fec2ef4428c69deff47e0ae Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 19 Jul 2022 13:12:10 +0200 Subject: [PATCH 06/56] chore(plugins): builds with abi & wrap-man --- packages/js/plugins/ethereum/package.json | 2 +- .../js/plugins/ethereum/src/Connection.ts | 2 +- packages/js/plugins/ethereum/src/index.ts | 2 +- .../js/plugins/ethereum/src/utils/mapping.ts | 2 +- .../js/plugins/ethereum/src/wrap-man/info.ts | 623 +++------------- packages/js/plugins/file-system/package.json | 2 +- packages/js/plugins/file-system/src/index.ts | 2 +- .../fileSystemEncodingToBufferEncoding.ts | 2 +- .../plugins/file-system/src/wrap-man/index.ts | 2 +- .../plugins/file-system/src/wrap-man/info.ts | 699 ++++++++++++++++++ .../file-system/src/wrap-man/schema.ts | 149 ---- packages/js/plugins/graph-node/package.json | 2 +- packages/js/plugins/graph-node/src/index.ts | 2 +- .../plugins/graph-node/src/wrap-man/index.ts | 9 + .../plugins/graph-node/src/wrap-man/info.ts | 498 +++++++++++++ .../graph-node/src/wrap-man/manifest.ts | 14 + .../plugins/graph-node/src/wrap-man/module.ts | 28 + .../plugins/graph-node/src/wrap-man/types.ts | 120 +++ packages/js/plugins/http/package.json | 2 +- packages/js/plugins/http/src/index.ts | 2 +- packages/js/plugins/http/src/util.ts | 2 +- .../js/plugins/http/src/wrap-man/index.ts | 2 +- packages/js/plugins/http/src/wrap-man/info.ts | 388 +++++++++- .../js/plugins/http/src/wrap-man/manifest.ts | 4 +- .../js/plugins/http/src/wrap-man/schema.ts | 95 --- packages/js/plugins/ipfs/package.json | 2 +- packages/js/plugins/ipfs/src/index.ts | 2 +- .../js/plugins/ipfs/src/wrap-man/index.ts | 9 + packages/js/plugins/ipfs/src/wrap-man/info.ts | 445 +++++++++++ .../js/plugins/ipfs/src/wrap-man/manifest.ts | 16 + .../js/plugins/ipfs/src/wrap-man/module.ts | 47 ++ .../js/plugins/ipfs/src/wrap-man/types.ts | 112 +++ packages/js/plugins/logger/package.json | 2 +- packages/js/plugins/logger/src/index.ts | 2 +- .../js/plugins/logger/src/wrap-man/index.ts | 9 + .../js/plugins/logger/src/wrap-man/info.ts | 164 ++++ .../plugins/logger/src/wrap-man/manifest.ts | 16 + .../js/plugins/logger/src/wrap-man/module.ts | 27 + .../js/plugins/logger/src/wrap-man/types.ts | 79 ++ packages/js/plugins/sha3/package.json | 2 +- .../uri-resolvers/ens-resolver/package.json | 2 +- .../uri-resolvers/ens-resolver/src/index.ts | 5 +- .../ens-resolver/src/wrap-man/index.ts | 9 + .../ens-resolver/src/wrap-man/info.ts | 1 + .../ens-resolver/src/wrap-man/manifest.ts | 16 + .../ens-resolver/src/wrap-man/module.ts | 36 + .../ens-resolver/src/wrap-man/schema.ts | 402 ++++++++++ .../ens-resolver/src/wrap-man/types.ts | 673 +++++++++++++++++ .../file-system-resolver/package.json | 2 +- .../file-system-resolver/src/index.ts | 2 +- .../src/wrap-man/index.ts | 9 + .../file-system-resolver/src/wrap-man/info.ts | 616 +++++++++++++++ .../src/wrap-man/manifest.ts | 16 + .../src/wrap-man/module.ts | 36 + .../src/wrap-man/types.ts | 231 ++++++ .../uri-resolvers/ipfs-resolver/package.json | 2 +- .../uri-resolvers/ipfs-resolver/src/index.ts | 2 +- .../ipfs-resolver/src/wrap-man/index.ts | 9 + .../ipfs-resolver/src/wrap-man/info.ts | 505 +++++++++++++ .../ipfs-resolver/src/wrap-man/manifest.ts | 16 + .../ipfs-resolver/src/wrap-man/module.ts | 36 + .../ipfs-resolver/src/wrap-man/types.ts | 151 ++++ packages/js/plugins/uts46/package.json | 2 +- packages/js/plugins/uts46/src/index.ts | 2 +- .../js/plugins/uts46/src/wrap-man/index.ts | 9 + .../js/plugins/uts46/src/wrap-man/info.ts | 159 ++++ .../js/plugins/uts46/src/wrap-man/manifest.ts | 15 + .../js/plugins/uts46/src/wrap-man/module.ts | 44 ++ .../js/plugins/uts46/src/wrap-man/types.ts | 48 ++ 69 files changed, 5837 insertions(+), 808 deletions(-) create mode 100644 packages/js/plugins/file-system/src/wrap-man/info.ts delete mode 100644 packages/js/plugins/file-system/src/wrap-man/schema.ts create mode 100644 packages/js/plugins/graph-node/src/wrap-man/index.ts create mode 100644 packages/js/plugins/graph-node/src/wrap-man/info.ts create mode 100644 packages/js/plugins/graph-node/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/graph-node/src/wrap-man/module.ts create mode 100644 packages/js/plugins/graph-node/src/wrap-man/types.ts delete mode 100644 packages/js/plugins/http/src/wrap-man/schema.ts create mode 100644 packages/js/plugins/ipfs/src/wrap-man/index.ts create mode 100644 packages/js/plugins/ipfs/src/wrap-man/info.ts create mode 100644 packages/js/plugins/ipfs/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/ipfs/src/wrap-man/module.ts create mode 100644 packages/js/plugins/ipfs/src/wrap-man/types.ts create mode 100644 packages/js/plugins/logger/src/wrap-man/index.ts create mode 100644 packages/js/plugins/logger/src/wrap-man/info.ts create mode 100644 packages/js/plugins/logger/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/logger/src/wrap-man/module.ts create mode 100644 packages/js/plugins/logger/src/wrap-man/types.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/module.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts create mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/types.ts create mode 100644 packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts create mode 100644 packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts create mode 100644 packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/module.ts create mode 100644 packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/types.ts create mode 100644 packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts create mode 100644 packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts create mode 100644 packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/module.ts create mode 100644 packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/types.ts create mode 100644 packages/js/plugins/uts46/src/wrap-man/index.ts create mode 100644 packages/js/plugins/uts46/src/wrap-man/info.ts create mode 100644 packages/js/plugins/uts46/src/wrap-man/manifest.ts create mode 100644 packages/js/plugins/uts46/src/wrap-man/module.ts create mode 100644 packages/js/plugins/uts46/src/wrap-man/types.ts diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index a2bc60c4cd..cd7aa46551 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ethereum/src/Connection.ts b/packages/js/plugins/ethereum/src/Connection.ts index a370075ca0..9bc730d6c7 100644 --- a/packages/js/plugins/ethereum/src/Connection.ts +++ b/packages/js/plugins/ethereum/src/Connection.ts @@ -1,4 +1,4 @@ -import { Connection as SchemaConnection } from "./wrap"; +import { Connection as SchemaConnection } from "./wrap-man"; import { Signer, ethers } from "ethers"; import { diff --git a/packages/js/plugins/ethereum/src/index.ts b/packages/js/plugins/ethereum/src/index.ts index d30fcf8f26..549d4b99b2 100644 --- a/packages/js/plugins/ethereum/src/index.ts +++ b/packages/js/plugins/ethereum/src/index.ts @@ -36,7 +36,7 @@ import { Network, Connection as SchemaConnection, manifest, -} from "./wrap"; +} from "./wrap-man"; import { Connections, Connection, diff --git a/packages/js/plugins/ethereum/src/utils/mapping.ts b/packages/js/plugins/ethereum/src/utils/mapping.ts index 7d3d603ef2..eb15b01667 100644 --- a/packages/js/plugins/ethereum/src/utils/mapping.ts +++ b/packages/js/plugins/ethereum/src/utils/mapping.ts @@ -1,4 +1,4 @@ -import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../wrap"; +import { Access, TxReceipt, TxResponse, TxRequest, Log } from "../wrap-man"; import { ethers } from "ethers"; diff --git a/packages/js/plugins/ethereum/src/wrap-man/info.ts b/packages/js/plugins/ethereum/src/wrap-man/info.ts index 9c5c5d5021..3a9f3a0fad 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/info.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/info.ts @@ -13,12 +13,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "to", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "to", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -30,12 +25,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "from", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "from", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -81,12 +71,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "root", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "root", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -98,12 +83,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasUsed", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasUsed", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -155,20 +135,10 @@ export const abi = { array: null, map: null, scalar: null, - object: { - type: "Log", - name: "logs", - required: true, - kind: 8192, - }, + object: { type: "Log", name: "logs", required: true, kind: 8192 }, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "Log", - name: "logs", - required: true, - kind: 8192, - }, + item: { type: "Log", name: "logs", required: true, kind: 8192 }, }, map: null, scalar: null, @@ -285,12 +255,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "type", - required: true, - kind: 4, - }, + scalar: { type: "UInt32", name: "type", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -302,12 +267,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "status", - required: null, - kind: 4, - }, + scalar: { type: "UInt32", name: "status", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -328,12 +288,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "hash", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "hash", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -345,12 +300,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "to", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "to", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -362,12 +312,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "from", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "from", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -379,12 +324,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "nonce", - required: true, - kind: 4, - }, + scalar: { type: "UInt32", name: "nonce", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -396,12 +336,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasLimit", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasLimit", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -413,12 +348,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -430,12 +360,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "data", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "data", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -447,12 +372,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "value", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "value", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -464,12 +384,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "chainId", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "chainId", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -549,12 +464,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "raw", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "raw", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -566,12 +476,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "r", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "r", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -583,12 +488,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "s", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "s", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -600,12 +500,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "v", - required: null, - kind: 4, - }, + scalar: { type: "UInt32", name: "v", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -617,12 +512,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "type", - required: null, - kind: 4, - }, + scalar: { type: "UInt32", name: "type", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -677,12 +567,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "to", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "to", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -694,12 +579,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "from", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "from", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -711,12 +591,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "nonce", - required: null, - kind: 4, - }, + scalar: { type: "UInt32", name: "nonce", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -728,12 +603,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasLimit", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasLimit", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -745,12 +615,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -762,12 +627,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "data", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "data", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -779,12 +639,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "value", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "value", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -796,12 +651,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "chainId", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "chainId", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -813,12 +663,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "type", - required: null, - kind: 4, - }, + scalar: { type: "UInt32", name: "type", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -839,12 +684,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasLimit", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasLimit", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -856,12 +696,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -873,12 +708,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "value", - required: null, - kind: 4, - }, + scalar: { type: "BigInt", name: "value", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -899,12 +729,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "result", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "result", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -916,12 +741,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "Boolean", - name: "error", - required: true, - kind: 4, - }, + scalar: { type: "Boolean", name: "error", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -993,12 +813,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "Boolean", - name: "removed", - required: true, - kind: 4, - }, + scalar: { type: "Boolean", name: "removed", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1010,12 +825,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "address", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1027,12 +837,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "data", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "data", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1049,21 +854,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "topics", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "topics", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "topics", - required: true, - kind: 4, - }, + item: { type: "String", name: "topics", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1095,12 +890,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "UInt32", - name: "logIndex", - required: true, - kind: 4, - }, + scalar: { type: "UInt32", name: "logIndex", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1121,12 +911,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "data", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "data", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1138,12 +923,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "address", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1156,12 +936,7 @@ export const abi = { array: null, map: null, scalar: null, - object: { - type: "Log", - name: "log", - required: true, - kind: 8192, - }, + object: { type: "Log", name: "log", required: true, kind: 8192 }, enum: null, unresolvedObjectOrEnum: null, }, @@ -1181,12 +956,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "address", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1241,12 +1011,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "node", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "node", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1284,12 +1049,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "name", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "name", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1301,12 +1061,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "chainId", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "chainId", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1400,12 +1155,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1422,21 +1172,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1510,12 +1250,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1532,21 +1267,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1710,12 +1435,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "types", - required: true, - kind: 4, - }, + item: { type: "String", name: "types", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1744,12 +1464,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "values", - required: true, - kind: 4, - }, + item: { type: "String", name: "values", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1789,12 +1504,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -1811,21 +1521,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1879,12 +1579,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "types", - required: true, - kind: 4, - }, + item: { type: "String", name: "types", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1913,12 +1608,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "values", - required: true, - kind: 4, - }, + item: { type: "String", name: "values", required: true, kind: 4 }, }, map: null, scalar: null, @@ -1972,12 +1662,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "types", - required: true, - kind: 4, - }, + item: { type: "String", name: "types", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2006,12 +1691,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "values", - required: true, - kind: 4, - }, + item: { type: "String", name: "values", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2065,12 +1745,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "types", - required: true, - kind: 4, - }, + item: { type: "String", name: "types", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2099,12 +1774,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "values", - required: true, - kind: 4, - }, + item: { type: "String", name: "values", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2422,12 +2092,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2444,21 +2109,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2574,12 +2229,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "eth", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "eth", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2592,12 +2242,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "toWei", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "toWei", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2616,12 +2261,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "BigInt", - name: "wei", - required: true, - kind: 4, - }, + scalar: { type: "BigInt", name: "wei", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2634,12 +2274,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "toEth", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "toEth", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2658,12 +2293,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "txHash", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "txHash", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2768,12 +2398,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "event", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "event", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2790,21 +2415,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -2937,12 +2552,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -2959,21 +2569,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -3064,12 +2664,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -3086,21 +2681,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -3292,12 +2877,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "abi", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "abi", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -3331,21 +2911,11 @@ export const abi = { kind: 18, array: null, map: null, - scalar: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "args", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "args", - required: true, - kind: 4, - }, + item: { type: "String", name: "args", required: true, kind: 4 }, }, map: null, scalar: null, @@ -3461,12 +3031,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "method", - required: true, - kind: 4, - }, + scalar: { type: "String", name: "method", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, @@ -3492,12 +3057,7 @@ export const abi = { object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "String", - name: "params", - required: true, - kind: 4, - }, + item: { type: "String", name: "params", required: true, kind: 4 }, }, map: null, scalar: null, @@ -3530,12 +3090,7 @@ export const abi = { kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "sendRPC", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "sendRPC", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, diff --git a/packages/js/plugins/file-system/package.json b/packages/js/plugins/file-system/package.json index 2beb0c9a07..e0c6f9c0a5 100644 --- a/packages/js/plugins/file-system/package.json +++ b/packages/js/plugins/file-system/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/file-system/src/index.ts b/packages/js/plugins/file-system/src/index.ts index 66b46ef9f7..663225d9e4 100644 --- a/packages/js/plugins/file-system/src/index.ts +++ b/packages/js/plugins/file-system/src/index.ts @@ -9,7 +9,7 @@ import { Args_mkdir, Args_rm, Args_rmdir, -} from "./wrap"; +} from "./wrap-man"; import fileSystemEncodingToBufferEncoding from "./utils/fileSystemEncodingToBufferEncoding"; import fs from "fs"; diff --git a/packages/js/plugins/file-system/src/utils/fileSystemEncodingToBufferEncoding.ts b/packages/js/plugins/file-system/src/utils/fileSystemEncodingToBufferEncoding.ts index ea7871cbbd..76ea7948b4 100644 --- a/packages/js/plugins/file-system/src/utils/fileSystemEncodingToBufferEncoding.ts +++ b/packages/js/plugins/file-system/src/utils/fileSystemEncodingToBufferEncoding.ts @@ -1,4 +1,4 @@ -import { FileSystem_Encoding, FileSystem_EncodingEnum } from "../wrap"; +import { FileSystem_Encoding, FileSystem_EncodingEnum } from "../wrap-man"; const fileSystemEncodingToBufferEncoding = ( encoding: FileSystem_Encoding | null | undefined diff --git a/packages/js/plugins/file-system/src/wrap-man/index.ts b/packages/js/plugins/file-system/src/wrap-man/index.ts index f367d143d9..27baf319a8 100644 --- a/packages/js/plugins/file-system/src/wrap-man/index.ts +++ b/packages/js/plugins/file-system/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; +export * from "./info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/file-system/src/wrap-man/info.ts b/packages/js/plugins/file-system/src/wrap-man/info.ts new file mode 100644 index 0000000000..93f819a33f --- /dev/null +++ b/packages/js/plugins/file-system/src/wrap-man/info.ts @@ -0,0 +1,699 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [ + { + type: "FileSystem_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "readFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "readFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "readFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "readFileAsString", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "readFileAsString", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "readFileAsString", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "exists", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "exists", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "exists", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "writeFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "mkdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "mkdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rm", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "force", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "force", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rm", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rmdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rmdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "FileSystem_Encoding", + name: null, + required: null, + kind: 520, + constants: [ + "ASCII", + "UTF8", + "UTF16LE", + "UCS2", + "BASE64", + "BASE64URL", + "LATIN1", + "BINARY", + "HEX", + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Encoding", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "readFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "readFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "readFile", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "readFileAsString", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "readFileAsString", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "readFileAsString", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "exists", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "exists", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "exists", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "writeFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "mkdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "mkdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rm", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "force", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "force", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rm", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rmdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rmdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [{ type: "FileSystem_Module" }, { type: "FileSystem_Encoding" }], + interfaces: [ + { + type: "FileSystem_Module", + name: null, + required: null, + kind: 2048, + array: null, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + }, +}; diff --git a/packages/js/plugins/file-system/src/wrap-man/schema.ts b/packages/js/plugins/file-system/src/wrap-man/schema.ts deleted file mode 100644 index a4b03ae219..0000000000 --- a/packages/js/plugins/file-system/src/wrap-man/schema.ts +++ /dev/null @@ -1,149 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module implements FileSystem_Module @imports( - types: [ - "FileSystem_Module", - "FileSystem_Encoding" - ] -) { - readFile( - path: String! - ): Bytes! - - readFileAsString( - path: String! - encoding: FileSystem_Encoding - ): String! - - exists( - path: String! - ): Boolean! - - writeFile( - path: String! - data: Bytes! - ): Boolean - - mkdir( - path: String! - recursive: Boolean - ): Boolean - - rm( - path: String! - recursive: Boolean - force: Boolean - ): Boolean - - rmdir( - path: String! - ): Boolean -} - -### Imported Modules START ### - -type FileSystem_Module @imported( - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Module" -) { - readFile( - path: String! - ): Bytes! - - readFileAsString( - path: String! - encoding: FileSystem_Encoding - ): String! - - exists( - path: String! - ): Boolean! - - writeFile( - path: String! - data: Bytes! - ): Boolean - - mkdir( - path: String! - recursive: Boolean - ): Boolean - - rm( - path: String! - recursive: Boolean - force: Boolean - ): Boolean - - rmdir( - path: String! - ): Boolean -} - -### Imported Modules END ### - -### Imported Objects START ### - -enum FileSystem_Encoding @imported( - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Encoding" -) { - ASCII - UTF8 - UTF16LE - UCS2 - BASE64 - BASE64URL - LATIN1 - BINARY - HEX -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/js/plugins/graph-node/package.json b/packages/js/plugins/graph-node/package.json index 621658b6d6..1c9b4196df 100644 --- a/packages/js/plugins/graph-node/package.json +++ b/packages/js/plugins/graph-node/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/graph-node/src/index.ts b/packages/js/plugins/graph-node/src/index.ts index 97fb020fb6..d0abd3f3fe 100644 --- a/packages/js/plugins/graph-node/src/index.ts +++ b/packages/js/plugins/graph-node/src/index.ts @@ -4,7 +4,7 @@ import { Args_querySubgraph, HTTP_Module, manifest, -} from "./wrap"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/graph-node/src/wrap-man/index.ts b/packages/js/plugins/graph-node/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/graph-node/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/graph-node/src/wrap-man/info.ts b/packages/js/plugins/graph-node/src/wrap-man/info.ts new file mode 100644 index 0000000000..d7f72463ed --- /dev/null +++ b/packages/js/plugins/graph-node/src/wrap-man/info.ts @@ -0,0 +1,498 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "HTTP_Request", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[HTTP_UrlParam]", + name: "urlParams", + required: null, + kind: 34, + array: { + type: "[HTTP_UrlParam]", + name: "urlParams", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "HTTP_UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_ResponseType", + name: "responseType", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "HTTP_ResponseType", + name: "responseType", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Request", + }, + { + type: "HTTP_Header", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Header", + }, + { + type: "HTTP_UrlParam", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "UrlParam", + }, + { + type: "HTTP_Response", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "Int", + name: "status", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Int", name: "status", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "statusText", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "statusText", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Response", + }, + ], + importedModuleTypes: [ + { + type: "HTTP_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "get", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "HTTP_Response", + name: "get", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Response", + name: "get", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "post", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "HTTP_Response", + name: "post", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Response", + name: "post", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "HTTP_ResponseType", + name: null, + required: null, + kind: 520, + constants: ["TEXT", "BINARY"], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "ResponseType", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "querySubgraph", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "subgraphAuthor", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "subgraphAuthor", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "subgraphName", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "subgraphName", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "query", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "query", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "querySubgraph", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "querySubgraph", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [ + { type: "HTTP_Module" }, + { type: "HTTP_Request" }, + { type: "HTTP_Header" }, + { type: "HTTP_UrlParam" }, + { type: "HTTP_ResponseType" }, + { type: "HTTP_Response" }, + ], + interfaces: [], + }, +}; diff --git a/packages/js/plugins/graph-node/src/wrap-man/manifest.ts b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..8de225b990 --- /dev/null +++ b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts @@ -0,0 +1,14 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [], +}; diff --git a/packages/js/plugins/graph-node/src/wrap-man/module.ts b/packages/js/plugins/graph-node/src/wrap-man/module.ts new file mode 100644 index 0000000000..019e364770 --- /dev/null +++ b/packages/js/plugins/graph-node/src/wrap-man/module.ts @@ -0,0 +1,28 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_querySubgraph extends Record { + subgraphAuthor: Types.String; + subgraphName: Types.String; + query: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract querySubgraph( + args: Args_querySubgraph, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/graph-node/src/wrap-man/types.ts b/packages/js/plugins/graph-node/src/wrap-man/types.ts new file mode 100644 index 0000000000..4ef10e944c --- /dev/null +++ b/packages/js/plugins/graph-node/src/wrap-man/types.ts @@ -0,0 +1,120 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/http.polywrap.eth" */ +export interface HTTP_Request { + headers?: Array | null; + urlParams?: Array | null; + responseType: Types.HTTP_ResponseType; + body?: Types.String | null; +} + +/* URI: "ens/http.polywrap.eth" */ +export interface HTTP_Header { + key: Types.String; + value: Types.String; +} + +/* URI: "ens/http.polywrap.eth" */ +export interface HTTP_UrlParam { + key: Types.String; + value: Types.String; +} + +/* URI: "ens/http.polywrap.eth" */ +export interface HTTP_Response { + status: Types.Int; + statusText: Types.String; + headers?: Array | null; + body?: Types.String | null; +} + +/* URI: "ens/http.polywrap.eth" */ +export enum HTTP_ResponseTypeEnum { + TEXT, + BINARY, +} + +export type HTTP_ResponseTypeString = + | "TEXT" + | "BINARY" + +export type HTTP_ResponseType = HTTP_ResponseTypeEnum | HTTP_ResponseTypeString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/http.polywrap.eth" */ +interface HTTP_Module_Args_get extends Record { + url: Types.String; + request?: Types.HTTP_Request | null; +} + +/* URI: "ens/http.polywrap.eth" */ +interface HTTP_Module_Args_post extends Record { + url: Types.String; + request?: Types.HTTP_Request | null; +} + +/* URI: "ens/http.polywrap.eth" */ +export const HTTP_Module = { + get: async ( + args: HTTP_Module_Args_get, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/http.polywrap.eth", + method: "get", + args + }); + }, + + post: async ( + args: HTTP_Module_Args_post, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/http.polywrap.eth", + method: "post", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/http/package.json b/packages/js/plugins/http/package.json index 4e85398062..733d9e81af 100644 --- a/packages/js/plugins/http/package.json +++ b/packages/js/plugins/http/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/http/src/index.ts b/packages/js/plugins/http/src/index.ts index ef692214fd..a3e2e685fa 100644 --- a/packages/js/plugins/http/src/index.ts +++ b/packages/js/plugins/http/src/index.ts @@ -5,7 +5,7 @@ import { Args_post, Response, manifest, -} from "./wrap"; +} from "./wrap-man"; import { fromAxiosResponse, toAxiosRequestConfig } from "./util"; import axios from "axios"; diff --git a/packages/js/plugins/http/src/util.ts b/packages/js/plugins/http/src/util.ts index 94d5165fb2..883a5db048 100644 --- a/packages/js/plugins/http/src/util.ts +++ b/packages/js/plugins/http/src/util.ts @@ -1,4 +1,4 @@ -import { Request, Response, ResponseTypeEnum, Header } from "./wrap"; +import { Request, Response, ResponseTypeEnum, Header } from "./wrap-man"; import { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/wrap-man/index.ts b/packages/js/plugins/http/src/wrap-man/index.ts index f367d143d9..27baf319a8 100644 --- a/packages/js/plugins/http/src/wrap-man/index.ts +++ b/packages/js/plugins/http/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; +export * from "./info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/http/src/wrap-man/info.ts b/packages/js/plugins/http/src/wrap-man/info.ts index c2af24d2c5..3014e00ced 100644 --- a/packages/js/plugins/http/src/wrap-man/info.ts +++ b/packages/js/plugins/http/src/wrap-man/info.ts @@ -1 +1,387 @@ -{"abi":{"objectTypes":[{"type":"Header","name":null,"required":null,"kind":1,"properties":[{"type":"String","name":"key","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"key","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"UrlParam","name":null,"required":null,"kind":1,"properties":[{"type":"String","name":"key","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"key","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"Response","name":null,"required":null,"kind":1,"properties":[{"type":"Int","name":"status","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Int","name":"status","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"statusText","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"statusText","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Header]","name":"headers","required":null,"kind":34,"array":{"type":"[Header]","name":"headers","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Header","name":"headers","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Header","name":"headers","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"body","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"body","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]},{"type":"Request","name":null,"required":null,"kind":1,"properties":[{"type":"[Header]","name":"headers","required":null,"kind":34,"array":{"type":"[Header]","name":"headers","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Header","name":"headers","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Header","name":"headers","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[UrlParam]","name":"urlParams","required":null,"kind":34,"array":{"type":"[UrlParam]","name":"urlParams","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"UrlParam","name":"urlParams","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"UrlParam","name":"urlParams","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"ResponseType","name":"responseType","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":null,"enum":{"type":"ResponseType","name":"responseType","required":true,"kind":16384},"unresolvedObjectOrEnum":null},{"type":"String","name":"body","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"body","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[]}],"enumTypes":[{"type":"ResponseType","name":null,"required":null,"kind":8,"constants":["TEXT","BINARY"]}],"interfaceTypes":[],"importedObjectTypes":[],"importedModuleTypes":[],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"get","required":true,"kind":64,"arguments":[{"type":"String","name":"url","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"url","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Request","name":"request","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Request","name":"request","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Response","name":"get","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Response","name":"get","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"post","required":true,"kind":64,"arguments":[{"type":"String","name":"url","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"url","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Request","name":"request","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Request","name":"request","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Response","name":"post","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Response","name":"post","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[],"interfaces":[]}}} \ No newline at end of file +export const abi = { + objectTypes: [ + { + type: "Header", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "UrlParam", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Response", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "Int", + name: "status", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Int", name: "status", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "statusText", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "statusText", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[Header]", + name: "headers", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Request", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "[Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[Header]", + name: "headers", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[UrlParam]", + name: "urlParams", + required: null, + kind: 34, + array: { + type: "[UrlParam]", + name: "urlParams", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "ResponseType", + name: "responseType", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "ResponseType", + name: "responseType", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + ], + enumTypes: [ + { + type: "ResponseType", + name: null, + required: null, + kind: 8, + constants: ["TEXT", "BINARY"], + }, + ], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "get", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Response", + name: "get", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { type: "Response", name: "get", required: null, kind: 8192 }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "post", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Response", + name: "post", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Response", + name: "post", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/js/plugins/http/src/wrap-man/manifest.ts b/packages/js/plugins/http/src/wrap-man/manifest.ts index 730cf8326f..96b656fffd 100644 --- a/packages/js/plugins/http/src/wrap-man/manifest.ts +++ b/packages/js/plugins/http/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { schema } from "./"; +import { abi } from "./"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - schema, + abi, implements: [ ], }; diff --git a/packages/js/plugins/http/src/wrap-man/schema.ts b/packages/js/plugins/http/src/wrap-man/schema.ts deleted file mode 100644 index 480916adc5..0000000000 --- a/packages/js/plugins/http/src/wrap-man/schema.ts +++ /dev/null @@ -1,95 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - get( - url: String! - request: Request - ): Response - - post( - url: String! - request: Request - ): Response -} - -type Header { - key: String! - value: String! -} - -type UrlParam { - key: String! - value: String! -} - -type Response { - status: Int! - statusText: String! - headers: [Header!] - body: String -} - -type Request { - headers: [Header!] - urlParams: [UrlParam!] - responseType: ResponseType! - body: String -} - -enum ResponseType { - TEXT - BINARY -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/js/plugins/ipfs/package.json b/packages/js/plugins/ipfs/package.json index 7c180b1a33..5de7a94fe2 100644 --- a/packages/js/plugins/ipfs/package.json +++ b/packages/js/plugins/ipfs/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ipfs/src/index.ts b/packages/js/plugins/ipfs/src/index.ts index d0db1d7530..93b3af0615 100644 --- a/packages/js/plugins/ipfs/src/index.ts +++ b/packages/js/plugins/ipfs/src/index.ts @@ -7,7 +7,7 @@ import { Ipfs_ResolveResult, Env, manifest, -} from "./wrap"; +} from "./wrap-man"; import { IpfsClient } from "./utils/IpfsClient"; import { execSimple, execFallbacks } from "./utils/exec"; diff --git a/packages/js/plugins/ipfs/src/wrap-man/index.ts b/packages/js/plugins/ipfs/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/ipfs/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/ipfs/src/wrap-man/info.ts b/packages/js/plugins/ipfs/src/wrap-man/info.ts new file mode 100644 index 0000000000..a1b183e2a9 --- /dev/null +++ b/packages/js/plugins/ipfs/src/wrap-man/info.ts @@ -0,0 +1,445 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "Ipfs_Options", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Options", + }, + { + type: "Ipfs_ResolveResult", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "ResolveResult", + }, + ], + importedModuleTypes: [ + { + type: "Ipfs_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "addFile", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "addFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [], + importedEnvTypes: [], + envType: { + type: "Env", + name: null, + required: null, + kind: 65536, + properties: [ + { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + }, + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "addFile", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "addFile", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [ + { type: "Ipfs_Module" }, + { type: "Ipfs_Options" }, + { type: "Ipfs_ResolveResult" }, + ], + interfaces: [ + { + type: "Ipfs_Module", + name: null, + required: null, + kind: 2048, + array: null, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + }, +}; diff --git a/packages/js/plugins/ipfs/src/wrap-man/manifest.ts b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..dbf3af414e --- /dev/null +++ b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/ipfs.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/ipfs/src/wrap-man/module.ts b/packages/js/plugins/ipfs/src/wrap-man/module.ts new file mode 100644 index 0000000000..2e558b1801 --- /dev/null +++ b/packages/js/plugins/ipfs/src/wrap-man/module.ts @@ -0,0 +1,47 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_cat extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +export interface Args_resolve extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +export interface Args_addFile extends Record { + data: Types.Bytes; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig, + Types.Env +> { + + abstract cat( + args: Args_cat, + client: Client + ): MaybeAsync; + + abstract resolve( + args: Args_resolve, + client: Client + ): MaybeAsync; + + abstract addFile( + args: Args_addFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/ipfs/src/wrap-man/types.ts b/packages/js/plugins/ipfs/src/wrap-man/types.ts new file mode 100644 index 0000000000..e40827d782 --- /dev/null +++ b/packages/js/plugins/ipfs/src/wrap-man/types.ts @@ -0,0 +1,112 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +export interface Env extends Record { + disableParallelRequests?: Types.Boolean | null; +} +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/ipfs.polywrap.eth" */ +export interface Ipfs_Options { + timeout?: Types.UInt32 | null; + provider?: Types.String | null; + disableParallelRequests?: Types.Boolean | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +export interface Ipfs_ResolveResult { + cid: Types.String; + provider: Types.String; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_cat extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_resolve extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_addFile extends Record { + data: Types.Bytes; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +export const Ipfs_Module = { + cat: async ( + args: Ipfs_Module_Args_cat, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "cat", + args + }); + }, + + resolve: async ( + args: Ipfs_Module_Args_resolve, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "resolve", + args + }); + }, + + addFile: async ( + args: Ipfs_Module_Args_addFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "addFile", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/logger/package.json b/packages/js/plugins/logger/package.json index e982a5197f..ee9a8af794 100644 --- a/packages/js/plugins/logger/package.json +++ b/packages/js/plugins/logger/package.json @@ -12,7 +12,7 @@ "version": "0.2.0", "main": "build/index.js", "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/logger/src/index.ts b/packages/js/plugins/logger/src/index.ts index b40ea2dac4..d9526c8ec4 100644 --- a/packages/js/plugins/logger/src/index.ts +++ b/packages/js/plugins/logger/src/index.ts @@ -4,7 +4,7 @@ import { Logger_LogLevel, Logger_LogLevelEnum, manifest, -} from "./wrap"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/wrap-man/index.ts b/packages/js/plugins/logger/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/logger/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/logger/src/wrap-man/info.ts b/packages/js/plugins/logger/src/wrap-man/info.ts new file mode 100644 index 0000000000..f819a7458c --- /dev/null +++ b/packages/js/plugins/logger/src/wrap-man/info.ts @@ -0,0 +1,164 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [ + { + type: "Logger_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "log", + required: true, + kind: 64, + arguments: [ + { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/logger.core.polywrap.eth", + namespace: "Logger", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "Logger_LogLevel", + name: null, + required: null, + kind: 520, + constants: ["DEBUG", "INFO", "WARN", "ERROR"], + uri: "ens/logger.core.polywrap.eth", + namespace: "Logger", + nativeType: "LogLevel", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "log", + required: true, + kind: 64, + arguments: [ + { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [{ type: "Logger_Module" }, { type: "Logger_LogLevel" }], + interfaces: [ + { + type: "Logger_Module", + name: null, + required: null, + kind: 2048, + array: null, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + }, +}; diff --git a/packages/js/plugins/logger/src/wrap-man/manifest.ts b/packages/js/plugins/logger/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..fb4620ef31 --- /dev/null +++ b/packages/js/plugins/logger/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/logger.core.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/logger/src/wrap-man/module.ts b/packages/js/plugins/logger/src/wrap-man/module.ts new file mode 100644 index 0000000000..15f9609ded --- /dev/null +++ b/packages/js/plugins/logger/src/wrap-man/module.ts @@ -0,0 +1,27 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_log extends Record { + level: Types.Logger_LogLevel; + message: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract log( + args: Args_log, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/logger/src/wrap-man/types.ts b/packages/js/plugins/logger/src/wrap-man/types.ts new file mode 100644 index 0000000000..cf143be7c1 --- /dev/null +++ b/packages/js/plugins/logger/src/wrap-man/types.ts @@ -0,0 +1,79 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/logger.core.polywrap.eth" */ +export enum Logger_LogLevelEnum { + DEBUG, + INFO, + WARN, + ERROR, +} + +export type Logger_LogLevelString = + | "DEBUG" + | "INFO" + | "WARN" + | "ERROR" + +export type Logger_LogLevel = Logger_LogLevelEnum | Logger_LogLevelString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/logger.core.polywrap.eth" */ +interface Logger_Module_Args_log extends Record { + level: Types.Logger_LogLevel; + message: Types.String; +} + +/* URI: "ens/logger.core.polywrap.eth" */ +export const Logger_Module = { + log: async ( + args: Logger_Module_Args_log, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/logger.core.polywrap.eth", + method: "log", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index a1c878c794..8c7cd5f113 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/package.json b/packages/js/plugins/uri-resolvers/ens-resolver/package.json index 7f2b37040e..5095dc0e8d 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/ens-resolver/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts index 17dcc81de5..f65dc7a7f9 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts @@ -7,7 +7,7 @@ import { Bytes, Ethereum_Module, manifest, -} from "./wrap"; +} from "./wrap-man"; import { ethers } from "ethers"; import { Base58 } from "@ethersproject/basex"; @@ -209,3 +209,6 @@ export const ensResolverPlugin: PluginFactory = ( }; export const plugin = ensResolverPlugin; + + +export const abi = {"objectTypes":[],"enumTypes":[],"interfaceTypes":[],"importedObjectTypes":[{"type":"UriResolver_MaybeUriOrManifest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"uri","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"uri","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Bytes","name":"manifest","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"manifest","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"MaybeUriOrManifest"},{"type":"Ethereum_Connection","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"node","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"node","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"networkNameOrChainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"networkNameOrChainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Connection"},{"type":"Ethereum_TxOverrides","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxOverrides"},{"type":"Ethereum_StaticTxResult","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"result","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"result","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"error","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"error","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"StaticTxResult"},{"type":"Ethereum_TxRequest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxRequest"},{"type":"Ethereum_TxReceipt","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"contractAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"contractAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"root","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"root","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"logsBloom","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"logsBloom","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":34,"array":{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"byzantium","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"byzantium","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"status","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"status","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxReceipt"},{"type":"Ethereum_Log","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"removed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"removed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"topics","required":true,"kind":34,"array":{"type":"[String]","name":"topics","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"topics","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"topics","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"logIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"logIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Log"},{"type":"Ethereum_EventNotification","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Log","name":"log","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"log","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"EventNotification"},{"type":"Ethereum_Network","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"name","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"name","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"ensAddress","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"ensAddress","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Network"},{"type":"Ethereum_TxResponse","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"hash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"hash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timestamp","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timestamp","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"raw","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"raw","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"r","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"r","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"s","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"s","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"v","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"v","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":34,"array":{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxResponse"},{"type":"Ethereum_Access","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"storageKeys","required":true,"kind":34,"array":{"type":"[String]","name":"storageKeys","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"storageKeys","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"storageKeys","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Access"}],"importedModuleTypes":[{"type":"UriResolver_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"Module","isInterface":false},{"type":"Ethereum_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"callContractView","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"callContractView","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"callContractView","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractStatic","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getBalance","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeParams","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeParams","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeParams","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeFunction","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeFunction","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeFunction","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityPack","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityPack","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityPack","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityKeccak256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityKeccak256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityKeccak256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"soliditySha256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"soliditySha256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"soliditySha256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerAddress","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"getSignerAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"getSignerAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerBalance","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerTransactionCount","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getGasPrice","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateTransactionGas","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateContractCallGas","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"checkAddress","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Boolean","name":"checkAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"checkAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toWei","required":true,"kind":64,"arguments":[{"type":"String","name":"eth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"eth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"toWei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"toWei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toEth","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"wei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"wei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"toEth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"toEth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"awaitTransaction","required":true,"kind":64,"arguments":[{"type":"String","name":"txHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"txHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"waitForEvent","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"event","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"event","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getNetwork","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethod","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethodAndWait","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransaction","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransactionAndWait","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"deployContract","required":true,"kind":64,"arguments":[{"type":"String","name":"abi","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"abi","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"bytecode","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"bytecode","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"deployContract","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"deployContract","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"signMessage","required":true,"kind":64,"arguments":[{"type":"String","name":"message","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"message","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"signMessage","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"signMessage","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendRPC","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"params","required":true,"kind":34,"array":{"type":"[String]","name":"params","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"params","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"params","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"sendRPC","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"sendRPC","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Module","isInterface":false}],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[{"type":"UriResolver_Module"},{"type":"UriResolver_MaybeUriOrManifest"},{"type":"Ethereum_Module"},{"type":"Ethereum_Connection"},{"type":"Ethereum_TxOverrides"},{"type":"Ethereum_StaticTxResult"},{"type":"Ethereum_TxRequest"},{"type":"Ethereum_TxReceipt"},{"type":"Ethereum_Log"},{"type":"Ethereum_EventNotification"},{"type":"Ethereum_Network"},{"type":"Ethereum_TxResponse"},{"type":"Ethereum_Access"}],"interfaces":[{"type":"UriResolver_Module","name":null,"required":null,"kind":2048,"array":null,"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}]}} \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts new file mode 100644 index 0000000000..d3fe4b280c --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts @@ -0,0 +1 @@ +export const abi = {"objectTypes":[],"enumTypes":[],"interfaceTypes":[],"importedObjectTypes":[{"type":"UriResolver_MaybeUriOrManifest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"uri","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"uri","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Bytes","name":"manifest","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"manifest","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"MaybeUriOrManifest"},{"type":"Ethereum_Connection","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"node","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"node","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"networkNameOrChainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"networkNameOrChainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Connection"},{"type":"Ethereum_TxOverrides","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxOverrides"},{"type":"Ethereum_StaticTxResult","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"result","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"result","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"error","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"error","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"StaticTxResult"},{"type":"Ethereum_TxRequest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxRequest"},{"type":"Ethereum_TxReceipt","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"contractAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"contractAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"root","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"root","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"logsBloom","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"logsBloom","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":34,"array":{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"byzantium","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"byzantium","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"status","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"status","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxReceipt"},{"type":"Ethereum_Log","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"removed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"removed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"topics","required":true,"kind":34,"array":{"type":"[String]","name":"topics","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"topics","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"topics","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"logIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"logIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Log"},{"type":"Ethereum_EventNotification","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Log","name":"log","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"log","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"EventNotification"},{"type":"Ethereum_Network","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"name","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"name","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"ensAddress","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"ensAddress","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Network"},{"type":"Ethereum_TxResponse","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"hash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"hash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timestamp","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timestamp","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"raw","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"raw","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"r","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"r","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"s","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"s","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"v","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"v","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":34,"array":{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxResponse"},{"type":"Ethereum_Access","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"storageKeys","required":true,"kind":34,"array":{"type":"[String]","name":"storageKeys","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"storageKeys","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"storageKeys","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Access"}],"importedModuleTypes":[{"type":"UriResolver_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"Module","isInterface":false},{"type":"Ethereum_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"callContractView","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"callContractView","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"callContractView","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractStatic","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getBalance","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeParams","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeParams","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeParams","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeFunction","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeFunction","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeFunction","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityPack","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityPack","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityPack","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityKeccak256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityKeccak256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityKeccak256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"soliditySha256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"soliditySha256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"soliditySha256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerAddress","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"getSignerAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"getSignerAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerBalance","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerTransactionCount","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getGasPrice","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateTransactionGas","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateContractCallGas","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"checkAddress","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Boolean","name":"checkAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"checkAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toWei","required":true,"kind":64,"arguments":[{"type":"String","name":"eth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"eth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"toWei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"toWei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toEth","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"wei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"wei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"toEth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"toEth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"awaitTransaction","required":true,"kind":64,"arguments":[{"type":"String","name":"txHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"txHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"waitForEvent","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"event","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"event","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getNetwork","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethod","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethodAndWait","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransaction","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransactionAndWait","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"deployContract","required":true,"kind":64,"arguments":[{"type":"String","name":"abi","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"abi","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"bytecode","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"bytecode","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"deployContract","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"deployContract","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"signMessage","required":true,"kind":64,"arguments":[{"type":"String","name":"message","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"message","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"signMessage","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"signMessage","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendRPC","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"params","required":true,"kind":34,"array":{"type":"[String]","name":"params","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"params","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"params","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"sendRPC","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"sendRPC","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Module","isInterface":false}],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[{"type":"UriResolver_Module"},{"type":"UriResolver_MaybeUriOrManifest"},{"type":"Ethereum_Module"},{"type":"Ethereum_Connection"},{"type":"Ethereum_TxOverrides"},{"type":"Ethereum_StaticTxResult"},{"type":"Ethereum_TxRequest"},{"type":"Ethereum_TxReceipt"},{"type":"Ethereum_Log"},{"type":"Ethereum_EventNotification"},{"type":"Ethereum_Network"},{"type":"Ethereum_TxResponse"},{"type":"Ethereum_Access"}],"interfaces":[{"type":"UriResolver_Module","name":null,"required":null,"kind":2048,"array":null,"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}]}} \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..4cf8732013 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/uri-resolver.core.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/module.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/module.ts new file mode 100644 index 0000000000..a92a0a5277 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/module.ts @@ -0,0 +1,36 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Args_getFile extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract tryResolveUri( + args: Args_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + args: Args_getFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts new file mode 100644 index 0000000000..86a39cfcb5 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts @@ -0,0 +1,402 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const schema: string = `### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module implements UriResolver_Module @imports( + types: [ + "UriResolver_Module", + "UriResolver_MaybeUriOrManifest", + "Ethereum_Module", + "Ethereum_Connection", + "Ethereum_TxOverrides", + "Ethereum_StaticTxResult", + "Ethereum_TxRequest", + "Ethereum_TxReceipt", + "Ethereum_Log", + "Ethereum_EventNotification", + "Ethereum_Network", + "Ethereum_TxResponse", + "Ethereum_Access" + ] +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +### Imported Modules START ### + +type UriResolver_Module @imported( + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "Module" +) { + tryResolveUri( + authority: String! + path: String! + ): UriResolver_MaybeUriOrManifest + + getFile( + path: String! + ): Bytes +} + +type Ethereum_Module @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Module" +) { + callContractView( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Ethereum_Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getGasPrice( + connection: Ethereum_Connection + ): BigInt! + + estimateTransactionGas( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Ethereum_Connection + ): Ethereum_EventNotification! + + getNetwork( + connection: Ethereum_Connection + ): Ethereum_Network! + + callContractMethod( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxResponse! + + callContractMethodAndWait( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxReceipt! + + sendTransaction( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxResponse! + + sendTransactionAndWait( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + deployContract( + abi: String! + bytecode: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + signMessage( + message: String! + connection: Ethereum_Connection + ): String! + + sendRPC( + method: String! + params: [String!]! + connection: Ethereum_Connection + ): String +} + +### Imported Modules END ### + +### Imported Objects START ### + +type UriResolver_MaybeUriOrManifest @imported( + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest" +) { + uri: String + manifest: Bytes +} + +type Ethereum_Connection @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Connection" +) { + node: String + networkNameOrChainId: String +} + +type Ethereum_TxOverrides @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxOverrides" +) { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type Ethereum_StaticTxResult @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "StaticTxResult" +) { + result: String! + error: Boolean! +} + +type Ethereum_TxRequest @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxRequest" +) { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type Ethereum_TxReceipt @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxReceipt" +) { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Ethereum_Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Ethereum_Log @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Log" +) { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type Ethereum_EventNotification @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "EventNotification" +) { + data: String! + address: String! + log: Ethereum_Log! +} + +type Ethereum_Network @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Network" +) { + name: String! + chainId: BigInt! + ensAddress: String +} + +type Ethereum_TxResponse @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxResponse" +) { + hash: String! + to: String + from: String! + nonce: UInt32! + gasLimit: BigInt! + gasPrice: BigInt + data: String! + value: BigInt! + chainId: BigInt! + blockNumber: BigInt + blockHash: String + timestamp: UInt32 + confirmations: UInt32! + raw: String + r: String + s: String + v: UInt32 + type: UInt32 + accessList: [Ethereum_Access!] +} + +type Ethereum_Access @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Access" +) { + address: String! + storageKeys: [String!]! +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### +`; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/types.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/types.ts new file mode 100644 index 0000000000..50df6a8ff6 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/types.ts @@ -0,0 +1,673 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.Bytes | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_Connection { + node?: Types.String | null; + networkNameOrChainId?: Types.String | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_TxOverrides { + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + value?: Types.BigInt | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_StaticTxResult { + result: Types.String; + error: Types.Boolean; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_TxRequest { + to?: Types.String | null; + from?: Types.String | null; + nonce?: Types.UInt32 | null; + gasLimit?: Types.BigInt | null; + gasPrice?: Types.BigInt | null; + data?: Types.String | null; + value?: Types.BigInt | null; + chainId?: Types.BigInt | null; + type?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_TxReceipt { + to: Types.String; + from: Types.String; + contractAddress: Types.String; + transactionIndex: Types.UInt32; + root?: Types.String | null; + gasUsed: Types.BigInt; + logsBloom: Types.String; + transactionHash: Types.String; + logs: Array; + blockNumber: Types.BigInt; + blockHash: Types.String; + confirmations: Types.UInt32; + cumulativeGasUsed: Types.BigInt; + effectiveGasPrice: Types.BigInt; + byzantium: Types.Boolean; + type: Types.UInt32; + status?: Types.UInt32 | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_Log { + blockNumber: Types.BigInt; + blockHash: Types.String; + transactionIndex: Types.UInt32; + removed: Types.Boolean; + address: Types.String; + data: Types.String; + topics: Array; + transactionHash: Types.String; + logIndex: Types.UInt32; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_EventNotification { + data: Types.String; + address: Types.String; + log: Types.Ethereum_Log; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_Network { + name: Types.String; + chainId: Types.BigInt; + ensAddress?: Types.String | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_TxResponse { + hash: Types.String; + to?: Types.String | null; + from: Types.String; + nonce: Types.UInt32; + gasLimit: Types.BigInt; + gasPrice?: Types.BigInt | null; + data: Types.String; + value: Types.BigInt; + chainId: Types.BigInt; + blockNumber?: Types.BigInt | null; + blockHash?: Types.String | null; + timestamp?: Types.UInt32 | null; + confirmations: Types.UInt32; + raw?: Types.String | null; + r?: Types.String | null; + s?: Types.String | null; + v?: Types.UInt32 | null; + type?: Types.UInt32 | null; + accessList?: Array | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export interface Ethereum_Access { + address: Types.String; + storageKeys: Array; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + args: UriResolver_Module_Args_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "tryResolveUri", + args + }); + }, + + getFile: async ( + args: UriResolver_Module_Args_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "getFile", + args + }); + } +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_callContractView extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_callContractStatic extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getBalance extends Record { + address: Types.String; + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_encodeParams extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_encodeFunction extends Record { + method: Types.String; + args?: Array | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_solidityPack extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_solidityKeccak256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_soliditySha256 extends Record { + types: Array; + values: Array; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getSignerAddress extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getSignerBalance extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getSignerTransactionCount extends Record { + blockTag?: Types.BigInt | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getGasPrice extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_estimateTransactionGas extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_estimateContractCallGas extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_checkAddress extends Record { + address: Types.String; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_toWei extends Record { + eth: Types.String; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_toEth extends Record { + wei: Types.BigInt; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_awaitTransaction extends Record { + txHash: Types.String; + confirmations: Types.UInt32; + timeout: Types.UInt32; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_waitForEvent extends Record { + address: Types.String; + event: Types.String; + args?: Array | null; + timeout?: Types.UInt32 | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_getNetwork extends Record { + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_callContractMethod extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_callContractMethodAndWait extends Record { + address: Types.String; + method: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; + txOverrides?: Types.Ethereum_TxOverrides | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_sendTransaction extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_sendTransactionAndWait extends Record { + tx: Types.Ethereum_TxRequest; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_deployContract extends Record { + abi: Types.String; + bytecode: Types.String; + args?: Array | null; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_signMessage extends Record { + message: Types.String; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +interface Ethereum_Module_Args_sendRPC extends Record { + method: Types.String; + params: Array; + connection?: Types.Ethereum_Connection | null; +} + +/* URI: "ens/ethereum.polywrap.eth" */ +export const Ethereum_Module = { + callContractView: async ( + args: Ethereum_Module_Args_callContractView, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "callContractView", + args + }); + }, + + callContractStatic: async ( + args: Ethereum_Module_Args_callContractStatic, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "callContractStatic", + args + }); + }, + + getBalance: async ( + args: Ethereum_Module_Args_getBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getBalance", + args + }); + }, + + encodeParams: async ( + args: Ethereum_Module_Args_encodeParams, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "encodeParams", + args + }); + }, + + encodeFunction: async ( + args: Ethereum_Module_Args_encodeFunction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "encodeFunction", + args + }); + }, + + solidityPack: async ( + args: Ethereum_Module_Args_solidityPack, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "solidityPack", + args + }); + }, + + solidityKeccak256: async ( + args: Ethereum_Module_Args_solidityKeccak256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "solidityKeccak256", + args + }); + }, + + soliditySha256: async ( + args: Ethereum_Module_Args_soliditySha256, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "soliditySha256", + args + }); + }, + + getSignerAddress: async ( + args: Ethereum_Module_Args_getSignerAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getSignerAddress", + args + }); + }, + + getSignerBalance: async ( + args: Ethereum_Module_Args_getSignerBalance, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getSignerBalance", + args + }); + }, + + getSignerTransactionCount: async ( + args: Ethereum_Module_Args_getSignerTransactionCount, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getSignerTransactionCount", + args + }); + }, + + getGasPrice: async ( + args: Ethereum_Module_Args_getGasPrice, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getGasPrice", + args + }); + }, + + estimateTransactionGas: async ( + args: Ethereum_Module_Args_estimateTransactionGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "estimateTransactionGas", + args + }); + }, + + estimateContractCallGas: async ( + args: Ethereum_Module_Args_estimateContractCallGas, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "estimateContractCallGas", + args + }); + }, + + checkAddress: async ( + args: Ethereum_Module_Args_checkAddress, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "checkAddress", + args + }); + }, + + toWei: async ( + args: Ethereum_Module_Args_toWei, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "toWei", + args + }); + }, + + toEth: async ( + args: Ethereum_Module_Args_toEth, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "toEth", + args + }); + }, + + awaitTransaction: async ( + args: Ethereum_Module_Args_awaitTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "awaitTransaction", + args + }); + }, + + waitForEvent: async ( + args: Ethereum_Module_Args_waitForEvent, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "waitForEvent", + args + }); + }, + + getNetwork: async ( + args: Ethereum_Module_Args_getNetwork, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "getNetwork", + args + }); + }, + + callContractMethod: async ( + args: Ethereum_Module_Args_callContractMethod, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "callContractMethod", + args + }); + }, + + callContractMethodAndWait: async ( + args: Ethereum_Module_Args_callContractMethodAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "callContractMethodAndWait", + args + }); + }, + + sendTransaction: async ( + args: Ethereum_Module_Args_sendTransaction, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "sendTransaction", + args + }); + }, + + sendTransactionAndWait: async ( + args: Ethereum_Module_Args_sendTransactionAndWait, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "sendTransactionAndWait", + args + }); + }, + + deployContract: async ( + args: Ethereum_Module_Args_deployContract, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "deployContract", + args + }); + }, + + signMessage: async ( + args: Ethereum_Module_Args_signMessage, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "signMessage", + args + }); + }, + + sendRPC: async ( + args: Ethereum_Module_Args_sendRPC, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ethereum.polywrap.eth", + method: "sendRPC", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/package.json b/packages/js/plugins/uri-resolvers/file-system-resolver/package.json index 3c058be364..3041a3bbee 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/index.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/index.ts index 6596b6b0ff..891f4bab69 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/index.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/index.ts @@ -8,7 +8,7 @@ import { Module, UriResolver_MaybeUriOrManifest, manifest, -} from "./wrap"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; import path from "path"; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts new file mode 100644 index 0000000000..c1f6669e8c --- /dev/null +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts @@ -0,0 +1,616 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "UriResolver_MaybeUriOrManifest", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "uri", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "uri", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "manifest", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest", + }, + ], + importedModuleTypes: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "Module", + isInterface: false, + }, + { + type: "FileSystem_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "readFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "readFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "readFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "readFileAsString", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "readFileAsString", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "readFileAsString", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "exists", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "exists", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "exists", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "writeFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "mkdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "mkdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rm", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "force", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "force", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rm", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rmdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rmdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "FileSystem_Encoding", + name: null, + required: null, + kind: 520, + constants: [ + "ASCII", + "UTF8", + "UTF16LE", + "UCS2", + "BASE64", + "BASE64URL", + "LATIN1", + "BINARY", + "HEX", + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Encoding", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [ + { type: "UriResolver_Module" }, + { type: "UriResolver_MaybeUriOrManifest" }, + { type: "FileSystem_Module" }, + { type: "FileSystem_Encoding" }, + ], + interfaces: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 2048, + array: null, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + }, +}; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..4cf8732013 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/uri-resolver.core.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/module.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/module.ts new file mode 100644 index 0000000000..a92a0a5277 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/module.ts @@ -0,0 +1,36 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Args_getFile extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract tryResolveUri( + args: Args_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + args: Args_getFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/types.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/types.ts new file mode 100644 index 0000000000..b7044625a6 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/types.ts @@ -0,0 +1,231 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.Bytes | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +export enum FileSystem_EncodingEnum { + ASCII, + UTF8, + UTF16LE, + UCS2, + BASE64, + BASE64URL, + LATIN1, + BINARY, + HEX, +} + +export type FileSystem_EncodingString = + | "ASCII" + | "UTF8" + | "UTF16LE" + | "UCS2" + | "BASE64" + | "BASE64URL" + | "LATIN1" + | "BINARY" + | "HEX" + +export type FileSystem_Encoding = FileSystem_EncodingEnum | FileSystem_EncodingString; + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + args: UriResolver_Module_Args_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "tryResolveUri", + args + }); + }, + + getFile: async ( + args: UriResolver_Module_Args_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "getFile", + args + }); + } +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_readFile extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_readFileAsString extends Record { + path: Types.String; + encoding?: Types.FileSystem_Encoding | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_exists extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_writeFile extends Record { + path: Types.String; + data: Types.Bytes; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_mkdir extends Record { + path: Types.String; + recursive?: Types.Boolean | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_rm extends Record { + path: Types.String; + recursive?: Types.Boolean | null; + force?: Types.Boolean | null; +} + +/* URI: "ens/fs.polywrap.eth" */ +interface FileSystem_Module_Args_rmdir extends Record { + path: Types.String; +} + +/* URI: "ens/fs.polywrap.eth" */ +export const FileSystem_Module = { + readFile: async ( + args: FileSystem_Module_Args_readFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "readFile", + args + }); + }, + + readFileAsString: async ( + args: FileSystem_Module_Args_readFileAsString, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "readFileAsString", + args + }); + }, + + exists: async ( + args: FileSystem_Module_Args_exists, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "exists", + args + }); + }, + + writeFile: async ( + args: FileSystem_Module_Args_writeFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "writeFile", + args + }); + }, + + mkdir: async ( + args: FileSystem_Module_Args_mkdir, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "mkdir", + args + }); + }, + + rm: async ( + args: FileSystem_Module_Args_rm, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "rm", + args + }); + }, + + rmdir: async ( + args: FileSystem_Module_Args_rmdir, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/fs.polywrap.eth", + method: "rmdir", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json b/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json index a351d8cf53..c273306398 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "codegen:patch": "node ../../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts index 0a1d7a2ec1..6d65a59f0d 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/index.ts @@ -7,7 +7,7 @@ import { manifest, Module, UriResolver_MaybeUriOrManifest, -} from "./wrap"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts new file mode 100644 index 0000000000..8f15fc1798 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts @@ -0,0 +1,505 @@ +export const abi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "UriResolver_MaybeUriOrManifest", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "uri", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "uri", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "manifest", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest", + }, + { + type: "Ipfs_Options", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Options", + }, + { + type: "Ipfs_ResolveResult", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "ResolveResult", + }, + ], + importedModuleTypes: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "Module", + isInterface: false, + }, + { + type: "Ipfs_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "addFile", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "addFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [ + { type: "UriResolver_Module" }, + { type: "UriResolver_MaybeUriOrManifest" }, + { type: "Ipfs_Module" }, + { type: "Ipfs_Options" }, + { type: "Ipfs_ResolveResult" }, + ], + interfaces: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 2048, + array: null, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + }, +}; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..4cf8732013 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts @@ -0,0 +1,16 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + new Uri("ens/uri-resolver.core.polywrap.eth"), + ], +}; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/module.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/module.ts new file mode 100644 index 0000000000..a92a0a5277 --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/module.ts @@ -0,0 +1,36 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +export interface Args_getFile extends Record { + path: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract tryResolveUri( + args: Args_tryResolveUri, + client: Client + ): MaybeAsync; + + abstract getFile( + args: Args_getFile, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/types.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/types.ts new file mode 100644 index 0000000000..7db907e0af --- /dev/null +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/types.ts @@ -0,0 +1,151 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export interface UriResolver_MaybeUriOrManifest { + uri?: Types.String | null; + manifest?: Types.Bytes | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +export interface Ipfs_Options { + timeout?: Types.UInt32 | null; + provider?: Types.String | null; + disableParallelRequests?: Types.Boolean | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +export interface Ipfs_ResolveResult { + cid: Types.String; + provider: Types.String; +} + +/// Imported Objects END /// + +/// Imported Modules START /// + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_tryResolveUri extends Record { + authority: Types.String; + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +interface UriResolver_Module_Args_getFile extends Record { + path: Types.String; +} + +/* URI: "ens/uri-resolver.core.polywrap.eth" */ +export const UriResolver_Module = { + tryResolveUri: async ( + args: UriResolver_Module_Args_tryResolveUri, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "tryResolveUri", + args + }); + }, + + getFile: async ( + args: UriResolver_Module_Args_getFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/uri-resolver.core.polywrap.eth", + method: "getFile", + args + }); + } +} + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_cat extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_resolve extends Record { + cid: Types.String; + options?: Types.Ipfs_Options | null; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +interface Ipfs_Module_Args_addFile extends Record { + data: Types.Bytes; +} + +/* URI: "ens/ipfs.polywrap.eth" */ +export const Ipfs_Module = { + cat: async ( + args: Ipfs_Module_Args_cat, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "cat", + args + }); + }, + + resolve: async ( + args: Ipfs_Module_Args_resolve, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "resolve", + args + }); + }, + + addFile: async ( + args: Ipfs_Module_Args_addFile, + client: Client + ): Promise> => { + return client.invoke({ + uri: "ens/ipfs.polywrap.eth", + method: "addFile", + args + }); + } +} + +/// Imported Modules END /// diff --git a/packages/js/plugins/uts46/package.json b/packages/js/plugins/uts46/package.json index fc1b36232a..404b1ba119 100644 --- a/packages/js/plugins/uts46/package.json +++ b/packages/js/plugins/uts46/package.json @@ -12,7 +12,7 @@ "build" ], "scripts": { - "build": "rimraf ./build && yarn codegen && tsc --project tsconfig.build.json", + "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uts46/src/index.ts b/packages/js/plugins/uts46/src/index.ts index bd751e4a66..58f56a830d 100644 --- a/packages/js/plugins/uts46/src/index.ts +++ b/packages/js/plugins/uts46/src/index.ts @@ -5,7 +5,7 @@ import { Args_convert, ConvertResult, manifest, -} from "./wrap"; +} from "./wrap-man"; import { PluginFactory } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/wrap-man/index.ts b/packages/js/plugins/uts46/src/wrap-man/index.ts new file mode 100644 index 0000000000..27baf319a8 --- /dev/null +++ b/packages/js/plugins/uts46/src/wrap-man/index.ts @@ -0,0 +1,9 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export * from "./info"; +export * from "./manifest"; +export * from "./module"; +export * from "./types"; + +export { Client } from "@polywrap/core-js"; diff --git a/packages/js/plugins/uts46/src/wrap-man/info.ts b/packages/js/plugins/uts46/src/wrap-man/info.ts new file mode 100644 index 0000000000..35962e1768 --- /dev/null +++ b/packages/js/plugins/uts46/src/wrap-man/info.ts @@ -0,0 +1,159 @@ +export const abi = { + objectTypes: [ + { + type: "ConvertResult", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "IDN", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "IDN", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "PC", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "PC", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "toAscii", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "toAscii", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "toAscii", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "toUnicode", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "toUnicode", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "toUnicode", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "convert", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "ConvertResult", + name: "convert", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "ConvertResult", + name: "convert", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/js/plugins/uts46/src/wrap-man/manifest.ts b/packages/js/plugins/uts46/src/wrap-man/manifest.ts new file mode 100644 index 0000000000..96b656fffd --- /dev/null +++ b/packages/js/plugins/uts46/src/wrap-man/manifest.ts @@ -0,0 +1,15 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { abi } from "./"; + +// @ts-ignore +import { PluginPackageManifest, Uri } from "@polywrap/core-js"; + +export const manifest: PluginPackageManifest = { + abi, + implements: [ + ], +}; diff --git a/packages/js/plugins/uts46/src/wrap-man/module.ts b/packages/js/plugins/uts46/src/wrap-man/module.ts new file mode 100644 index 0000000000..14991e1225 --- /dev/null +++ b/packages/js/plugins/uts46/src/wrap-man/module.ts @@ -0,0 +1,44 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +import * as Types from "./types"; + +import { + Client, + PluginModule, + MaybeAsync +} from "@polywrap/core-js"; + +export interface Args_toAscii extends Record { + value: Types.String; +} + +export interface Args_toUnicode extends Record { + value: Types.String; +} + +export interface Args_convert extends Record { + value: Types.String; +} + +export abstract class Module< + TConfig +> extends PluginModule< + TConfig +> { + + abstract toAscii( + args: Args_toAscii, + client: Client + ): MaybeAsync; + + abstract toUnicode( + args: Args_toUnicode, + client: Client + ): MaybeAsync; + + abstract convert( + args: Args_convert, + client: Client + ): MaybeAsync; +} diff --git a/packages/js/plugins/uts46/src/wrap-man/types.ts b/packages/js/plugins/uts46/src/wrap-man/types.ts new file mode 100644 index 0000000000..ac826940e7 --- /dev/null +++ b/packages/js/plugins/uts46/src/wrap-man/types.ts @@ -0,0 +1,48 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +// @ts-ignore +import * as Types from "./"; + +// @ts-ignore +import { + Client, + InvokeResult +} from "@polywrap/core-js"; + +export type UInt = number; +export type UInt8 = number; +export type UInt16 = number; +export type UInt32 = number; +export type Int = number; +export type Int8 = number; +export type Int16 = number; +export type Int32 = number; +export type Bytes = Uint8Array; +export type BigInt = string; +export type BigNumber = string; +export type Json = string; +export type String = string; +export type Boolean = boolean; + +/// Env START /// +/// Env END /// + +/// Objects START /// +export interface ConvertResult { + IDN: Types.String; + PC: Types.String; +} + +/// Objects END /// + +/// Enums START /// +/// Enums END /// + +/// Imported Objects START /// + +/// Imported Objects END /// + +/// Imported Modules START /// + +/// Imported Modules END /// From d1deacf53719634b965054dd2142c647ef28c3ee Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 19 Jul 2022 16:38:54 +0200 Subject: [PATCH 07/56] test(schema/compose): started tests structure updates --- .../schema/compose/src/__tests__/index.ts | 28 ++++++++----------- .../compose/src/__tests__/test-cases.spec.ts | 4 +-- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 921d6f8c6b..304ae16641 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -3,7 +3,7 @@ import { ComposerOptions } from ".."; import path from "path"; import { readdirSync, Dirent } from "fs"; -import { Abi } from "@polywrap/schema-parse"; +import { Abi, createAbi } from "@polywrap/schema-parse"; import { GetPathToComposeTestFiles, readFileIfExists, @@ -72,12 +72,16 @@ async function importCase( // Fetch the input schemas const moduleInput = readFileIfExists("input/module.graphql", directory); - // Fetch the output schemas - const moduleSchema = readFileIfExists("output/module.graphql", directory); + // Fetch the output abi const moduleAbi = await readNamedExportIfExists("abi", "output/module.ts", directory); - const resolveExternal = (uri: string): Promise => { - return Promise.resolve(readFileIfExists(`imports-ext/${uri}/schema.graphql`, directory) || ""); + const resolveExternal = async (uri: string): Promise => { + let abi = createAbi() + const generatedAbi = await readNamedExportIfExists("abi", `imports-ext/${uri}/module.ts`, directory) + if (generatedAbi) { + abi = generatedAbi + } + return Promise.resolve(abi); }; const resolveLocal = (path: string): Promise => { @@ -86,7 +90,7 @@ async function importCase( const input: ComposerOptions = { schemaFile: { - schema: moduleInput!, + schema: moduleInput as string, absolutePath: path.join( directory, "input/module.graphql" @@ -96,7 +100,6 @@ async function importCase( external: resolveExternal, local: resolveLocal, }, - output: ComposerFilter.All }; if (moduleInput) { @@ -109,18 +112,9 @@ async function importCase( }; } - let output: ComposerOutput = { }; - - if (moduleSchema && moduleAbi) { - output = { - schema: moduleSchema, - abi: moduleAbi - }; - } - return { name, input, - output, + abi: moduleAbi, }; } diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index a2b3e4ce33..0edb37b473 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -35,8 +35,8 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); - if (testCase.output) { - expect(result).toMatchObject(testCase.output); + if (testCase.abi) { + expect(result).toMatchObject(testCase.abi); } }); } From 13a40bbfadf59c89862b9f5d294c8635a7d455bb Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 19 Jul 2022 20:18:08 +0200 Subject: [PATCH 08/56] feat: wrap manifest supports plugins & wrap.info is generated on plugin built folder --- package.json | 2 +- packages/cli/src/commands/plugin.ts | 8 + packages/cli/src/lib/Compiler.ts | 23 +- packages/cli/src/lib/SchemaComposer.ts | 28 +- packages/cli/src/lib/helpers/index.ts | 1 + packages/cli/src/lib/helpers/wrap.ts | 23 ++ packages/cli/src/lib/project/Project.ts | 2 +- .../file-system/build-man/wrap.info | Bin 0 -> 3435 bytes packages/interfaces/ipfs/build-man/info.ts | 242 ++++++++++++++++++ packages/interfaces/logger/build-man/info.ts | 81 ++++++ .../interfaces/logger/build-man/wrap.info | Bin 0 -> 788 bytes .../interfaces/uri-resolver/build-man/info.ts | 139 ++++++++++ .../uri-resolver/build-man/wrap.info | Bin 0 -> 1452 bytes .../wrap/src/formats/wrap.info/0.1.0.ts | 2 +- .../plugins/file-system/polywrap.plugin.yaml | 2 +- packages/js/plugins/ipfs/polywrap.plugin.yaml | 2 +- .../file-system-resolver/polywrap.plugin.yaml | 4 +- .../ipfs-resolver/polywrap.plugin.yaml | 4 +- .../wrap/formats/wrap.info/0.1.0.json | 2 +- .../plugin-ts/templates/index-ts.mustache | 2 +- .../plugin-ts/templates/manifest-ts.mustache | 4 +- ...hema-ts.mustache => wrap-info-ts.mustache} | 2 +- .../plugin-ts/templates/wrap.info.mustache | 0 packages/schema/compose/src/resolve.ts | 35 +-- packages/schema/compose/src/types.ts | 3 +- 25 files changed, 534 insertions(+), 77 deletions(-) create mode 100644 packages/cli/src/lib/helpers/wrap.ts create mode 100644 packages/interfaces/file-system/build-man/wrap.info create mode 100644 packages/interfaces/ipfs/build-man/info.ts create mode 100644 packages/interfaces/logger/build-man/info.ts create mode 100644 packages/interfaces/logger/build-man/wrap.info create mode 100644 packages/interfaces/uri-resolver/build-man/info.ts create mode 100644 packages/interfaces/uri-resolver/build-man/wrap.info rename packages/schema/bind/src/bindings/typescript/plugin-ts/templates/{schema-ts.mustache => wrap-info-ts.mustache} (67%) delete mode 100644 packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info.mustache diff --git a/package.json b/package.json index b48613e64f..c218688ca3 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:interfaces && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli", + "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 40dc09073d..3bd3f1cc77 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -10,6 +10,7 @@ import { parsePluginManifestFileOption, parsePluginPublishDirOption, parseClientConfigOption, + generateWrapFile, } from "../lib"; import path from "path"; @@ -124,5 +125,12 @@ async function run(options: PluginCommandOptions) { fs.mkdirSync(publishDir); } + generateWrapFile( + await schemaComposer.getComposedAbis(), + manifest.name, + "plugin", + publishDir + ); + await outputManifest(manifest, publishManifestPath); } diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 913ae23a61..97a08bb818 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -15,19 +15,14 @@ import { SchemaComposer, withSpinner, } from "./"; +import { generateWrapFile } from "./helpers/wrap"; import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; -import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; -import { msgpackEncode } from "@polywrap/msgpack-js"; import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { Abi } from "@polywrap/schema-parse"; -import { - normalizePath, - writeDirectorySync, - writeFileSync, -} from "@polywrap/os-js"; +import { normalizePath, writeDirectorySync } from "@polywrap/os-js"; import * as gluegun from "gluegun"; import fs from "fs"; import path from "path"; @@ -349,18 +344,8 @@ export class Compiler { } }); - const info: WrapManifest = { - abi: filteredAbi, - name: manifest.name, - type: (await this._isInterface()) ? "interface" : "wasm", - version: "0.1.0", - }; - - const s = JSON.stringify(info); - const encodedInfo = msgpackEncode(JSON.parse(s)); - writeFileSync(manifestPath, encodedInfo, { - encoding: "binary", - }); + const type = (await this._isInterface()) ? "interface" : "wasm"; + generateWrapFile(filteredAbi, manifest.name, type, manifestPath); }; if (quiet) { diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index b1d8665a79..dd89e883f9 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -41,7 +41,7 @@ export class SchemaComposer { const getSchemaFile = (schemaPath?: string): SchemaFile | undefined => schemaPath ? { - schema: this._fetchLocalSchema(schemaPath), + schema: fs.readFileSync(schemaPath, "utf-8"), absolutePath: schemaPath, } : undefined; @@ -51,15 +51,15 @@ export class SchemaComposer { } const options: ComposerOptions = { - manifest: schemaFile, + schemaFile, resolvers: { external: (uri: string) => - this._fetchExternalSchema(uri, import_redirects), - local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), + this._fetchExternalAbi(uri, import_redirects), + local: (path: string) => Promise.resolve(this._fetchLocalAbi(path)), }, }; - this._abi = await composeSchema(options); + this._abi = (await composeSchema(options)) as Abi; return this._abi; } @@ -67,7 +67,7 @@ export class SchemaComposer { this._abi = undefined; } - private async _fetchExternalSchema( + private async _fetchExternalAbi( uri: string, import_redirects?: { uri: string; @@ -92,19 +92,19 @@ export class SchemaComposer { try { const manifest = await this._client.getManifest(new Uri(uri)); - return manifest.abi; + return (manifest.abi as unknown) as Abi; } catch (e) { gluegun.print.error(e); throw e; } } - private _fetchLocalSchema(schemaPath: string) { - return fs.readFileSync( - path.isAbsolute(schemaPath) - ? schemaPath - : path.join(this._config.project.getManifestDir(), schemaPath), - "utf-8" - ); + private _fetchLocalAbi(abiPath: string) { + const currentPath = path.isAbsolute(abiPath) + ? abiPath + : path.join(this._config.project.getManifestDir(), abiPath); + + const manifest = fs.readFileSync(currentPath); + return (deserializeWrapManifest(manifest).abi as unknown) as Abi; } } diff --git a/packages/cli/src/lib/helpers/index.ts b/packages/cli/src/lib/helpers/index.ts index 6b07ba8337..5503aeaed5 100644 --- a/packages/cli/src/lib/helpers/index.ts +++ b/packages/cli/src/lib/helpers/index.ts @@ -5,3 +5,4 @@ export * from "./spinner"; export * from "./uuid"; export * from "./validate-client-config"; export * from "./workflow-validator"; +export * from "./wrap"; diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts new file mode 100644 index 0000000000..498741cd45 --- /dev/null +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -0,0 +1,23 @@ +import { msgpackEncode } from "@polywrap/msgpack-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { writeFileSync } from "@polywrap/os-js"; + +export const generateWrapFile = ( + abi: unknown, + name: string, + type: "interface" | "wasm" | "plugin", + path: string +): void => { + const info: WrapManifest = { + abi: abi as never, + name, + type, + version: "0.1.0", + }; + + const s = JSON.stringify(info); + const encodedInfo = msgpackEncode(JSON.parse(s)); + writeFileSync(path, encodedInfo, { + encoding: "binary", + }); +}; diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index 11c37d95b3..cb3b00ca39 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -7,7 +7,7 @@ import { } from "../"; import { BindOutput } from "@polywrap/schema-bind"; -import {Abi} from "@polywrap/schema-parse"; +import { Abi } from "@polywrap/schema-parse"; export interface ProjectConfig { rootDir: string; diff --git a/packages/interfaces/file-system/build-man/wrap.info b/packages/interfaces/file-system/build-man/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..c6c06fa1ba3f7897e996e538c821db2e0c68b407 GIT binary patch literal 3435 zcmdUy%We}f6oy%_;5m4JszIn?*`!KEq|i#8M1rL|bK085cCbBx>{yhGSf#K)Y{^_Q zK|)1HtVd!C??f`rOf$E{$!gf-V)xCaS` z-w}uX0P%C1z>LH72Nh*V9#eDrNM2+j?z@O{Gz`ZC^+QjXsE7EKR^(kz85TNoufkt8 zyVkWo!REc!h-&3AX>Eo%{x4JwP;S zsNxjLxoQM&jWc-3v4qtFs#<-tG+Z1DNtCICa*S&NH4&z!WXhQWl;u6GIz}&EQ(1mi zy5!QrJOik*12PSRgK2Yt2e%jJW-!a*HDQ+9oPoNLs=`=JMR|L_a#HT?r%GLZmGV}R zNl9|g7&o^pwZd3UQ_IV2+1!n4EFY+;C0}4JCoAViC7)c=zNRzS2xKOE6|2e8SFaRe lG)-Pq#3;J_r}Mkk7zzm_dUy|#4gLUT1CLR6cc-?q`wwp<8esqc literal 0 HcmV?d00001 diff --git a/packages/interfaces/ipfs/build-man/info.ts b/packages/interfaces/ipfs/build-man/info.ts new file mode 100644 index 0000000000..82a9058c1b --- /dev/null +++ b/packages/interfaces/ipfs/build-man/info.ts @@ -0,0 +1,242 @@ +export const abi = { + objectTypes: [ + { + type: "ResolveResult", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Options", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + "Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "ResolveResult", + name: "resolve", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "ResolveResult", + name: "resolve", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "addFile", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "addFile", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; \ No newline at end of file diff --git a/packages/interfaces/logger/build-man/info.ts b/packages/interfaces/logger/build-man/info.ts new file mode 100644 index 0000000000..ca124ebb2a --- /dev/null +++ b/packages/interfaces/logger/build-man/info.ts @@ -0,0 +1,81 @@ +export const abi = { + objectTypes: [], + enumTypes: [ + { + type: "LogLevel", + name: null, + required: null, + kind: 8, + constants: ["DEBUG", "INFO", "WARN", "ERROR"], + }, + ], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "log", + required: true, + kind: 64, + arguments: [ + { + type: "LogLevel", + name: "level", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "LogLevel", + name: "level", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/interfaces/logger/build-man/wrap.info b/packages/interfaces/logger/build-man/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..076cc6faa6dc44d2575669791a00014e67c6d671 GIT binary patch literal 788 zcma))O-{ow5QSN=;2a#FDmN$<1tFD23Lw^QGK4^4m$4J6I~L_ftWv}cnxCdf2!zDi z5?i)t)F?m1ZEsNVw~<{nGfQO*?f326RWEdk38m- z(|xGv8aY8H@S&LQ;a(XQ(@4B&Fn>&&2|*-%Ir2$QrraVPL7D1|Wju{{P_@-pW9>bl z2%LH0JTL>NaY&7m9tw1+qxg%_I42HNz|jB|%aurO9AOfVCDQhz30imlxU6zjq n`p;RBCeus8qe;1XJW@1ivC9siia#$Ovk;KGj3)KkR;~UG+s$M4 literal 0 HcmV?d00001 diff --git a/packages/interfaces/uri-resolver/build-man/info.ts b/packages/interfaces/uri-resolver/build-man/info.ts new file mode 100644 index 0000000000..741d8252fa --- /dev/null +++ b/packages/interfaces/uri-resolver/build-man/info.ts @@ -0,0 +1,139 @@ +export const abi = { + objectTypes: [ + { + type: "MaybeUriOrManifest", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "uri", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "uri", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "manifest", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + imports: [], + interfaces: [], + }, +}; diff --git a/packages/interfaces/uri-resolver/build-man/wrap.info b/packages/interfaces/uri-resolver/build-man/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..9c8e4b8286502d181769d7a192d173ef097810a5 GIT binary patch literal 1452 zcmd5+OHRWu5Cw^YAP!K$4G1&CGKD>O}-Rvqusv%yVx<8uWhVH7=nk&I2F#;5HQ5`D&4%0T)Q?Xc0zRz(vT2 z3+V*mT2cf%4X-G(x2HaOKA@n$hYyMxoe89@t;$CdX@RjfCWs_RM=tTxh&PEtuxCQt ziL}f#1SZ||T`~mjIbE>pN`4)W=eQOzJ_-bIrD5VO8ZZ`OKsFRJrAz>}NE3KJnafrl z_n&fD-`}X~dnlHj6hO { for (const importToResolve of importsToResolve) { const { importedTypes, path } = importToResolve; - // Resolve the schema - let schema = await resolveSchema(path); - - if (!schema) { - throw Error(`Unable to resolve schema at "${path}"`); - } + // Parse the schema into Abi + const localAbi = await resolveAbi(path); - // Make sure the schema has the Polywrap header - if (schema.indexOf("### Polywrap Header START ###") === -1) { - schema = addHeader(schema); + if (!localAbi) { + throw Error(`Unable to resolve Abi at "${path}"`); } - // Parse the schema into Abi - const localAbi = await resolveImportsAndParseSchemas( - schema, - path, - resolvers, - true - ); - let extTypesToImport = importedTypes; // If the importedTypes array contains the catch-all "*" diff --git a/packages/schema/compose/src/types.ts b/packages/schema/compose/src/types.ts index a24e15a5b7..59e071aa78 100644 --- a/packages/schema/compose/src/types.ts +++ b/packages/schema/compose/src/types.ts @@ -6,11 +6,10 @@ export interface SchemaFile { } export type AbiResolver = (uri: string) => Promise; -export type SchemaResolver = (path: string) => Promise; export interface AbiResolvers { external: AbiResolver; - local: SchemaResolver; + local: AbiResolver; } export interface ExternalImport { From f2598a60718f4931a0ed024068ed12d70f155683 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 19 Jul 2022 23:09:09 +0200 Subject: [PATCH 09/56] feat(bind/codegen): creates wrap.info for plugins --- packages/cli/src/commands/plugin.ts | 4 +- packages/js/plugins/ethereum/package.json | 1 + .../js/plugins/ethereum/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../plugins/file-system/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../plugins/graph-node/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../js/plugins/http/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../js/plugins/ipfs/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../js/plugins/logger/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../js/plugins/sha3/src/wrap-man/index.ts | 2 +- packages/js/plugins/sha3/src/wrap-man/info.ts | 532 ---------------- .../js/plugins/sha3/src/wrap-man/wrap.info.ts | 560 +++++++++++++++++ .../ens-resolver/src/wrap-man/index.ts | 2 +- .../ens-resolver/src/wrap-man/schema.ts | 402 ------------ .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../ipfs-resolver/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../js/plugins/uts46/src/wrap-man/index.ts | 2 +- .../src/wrap-man/{info.ts => wrap.info.ts} | 0 .../bindings/typescript/plugin-ts/index.ts | 6 +- ...info-ts.mustache => wrap.info-ts.mustache} | 0 yarn.lock | 589 +++++++++--------- 29 files changed, 876 insertions(+), 1240 deletions(-) rename packages/js/plugins/ethereum/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/file-system/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/graph-node/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/http/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/ipfs/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/logger/src/wrap-man/{info.ts => wrap.info.ts} (100%) delete mode 100644 packages/js/plugins/sha3/src/wrap-man/info.ts create mode 100644 packages/js/plugins/sha3/src/wrap-man/wrap.info.ts delete mode 100644 packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts rename packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/js/plugins/uts46/src/wrap-man/{info.ts => wrap.info.ts} (100%) rename packages/schema/bind/src/bindings/typescript/plugin-ts/templates/{wrap-info-ts.mustache => wrap.info-ts.mustache} (100%) diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 3bd3f1cc77..81395d5a8b 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -96,7 +96,6 @@ async function run(options: PluginCommandOptions) { }); await project.validate(); const manifest = await project.getManifest(); - const schemaComposer = new SchemaComposer({ project, client, @@ -120,6 +119,7 @@ async function run(options: PluginCommandOptions) { // Output the built manifest const publishManifestPath = path.join(publishDir, "polywrap.plugin.json"); + const publishAbiPath = path.join(publishDir, "wrap.info"); if (!fs.existsSync(publishDir)) { fs.mkdirSync(publishDir); @@ -129,7 +129,7 @@ async function run(options: PluginCommandOptions) { await schemaComposer.getComposedAbis(), manifest.name, "plugin", - publishDir + publishAbiPath ); await outputManifest(manifest, publishManifestPath); diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index cd7aa46551..437a1c623a 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --detectOpenHandles --verbose", diff --git a/packages/js/plugins/ethereum/src/wrap-man/index.ts b/packages/js/plugins/ethereum/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/index.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/ethereum/src/wrap-man/info.ts b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/ethereum/src/wrap-man/info.ts rename to packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/file-system/src/wrap-man/index.ts b/packages/js/plugins/file-system/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/file-system/src/wrap-man/index.ts +++ b/packages/js/plugins/file-system/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/file-system/src/wrap-man/info.ts b/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/file-system/src/wrap-man/info.ts rename to packages/js/plugins/file-system/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/graph-node/src/wrap-man/index.ts b/packages/js/plugins/graph-node/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/index.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/graph-node/src/wrap-man/info.ts b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/graph-node/src/wrap-man/info.ts rename to packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/http/src/wrap-man/index.ts b/packages/js/plugins/http/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/http/src/wrap-man/index.ts +++ b/packages/js/plugins/http/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/http/src/wrap-man/info.ts b/packages/js/plugins/http/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/http/src/wrap-man/info.ts rename to packages/js/plugins/http/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/ipfs/src/wrap-man/index.ts b/packages/js/plugins/ipfs/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/index.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/ipfs/src/wrap-man/info.ts b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/ipfs/src/wrap-man/info.ts rename to packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/logger/src/wrap-man/index.ts b/packages/js/plugins/logger/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/logger/src/wrap-man/index.ts +++ b/packages/js/plugins/logger/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/logger/src/wrap-man/info.ts b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/logger/src/wrap-man/info.ts rename to packages/js/plugins/logger/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/sha3/src/wrap-man/index.ts b/packages/js/plugins/sha3/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/sha3/src/wrap-man/index.ts +++ b/packages/js/plugins/sha3/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/sha3/src/wrap-man/info.ts b/packages/js/plugins/sha3/src/wrap-man/info.ts deleted file mode 100644 index be4a9c59f2..0000000000 --- a/packages/js/plugins/sha3/src/wrap-man/info.ts +++ /dev/null @@ -1,532 +0,0 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "sha3_512", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "sha3_512", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "sha3_512", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sha3_384", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "sha3_384", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "sha3_384", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sha3_256", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "sha3_256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "sha3_256", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sha3_224", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "sha3_224", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "sha3_224", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "keccak_512", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "keccak_512", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "keccak_512", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "keccak_384", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "keccak_384", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "keccak_384", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "keccak_256", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "keccak_256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "keccak_256", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "keccak_224", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "keccak_224", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "keccak_224", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "hex_keccak_256", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "hex_keccak_256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "hex_keccak_256", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "buffer_keccak_256", - required: true, - kind: 64, - arguments: [ - { - type: "Bytes", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "message", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "buffer_keccak_256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "buffer_keccak_256", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "shake_128", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Int", - name: "outputBits", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "Int", - name: "outputBits", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "shake_128", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "shake_128", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "shake_256", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Int", - name: "outputBits", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "Int", - name: "outputBits", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "shake_256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "shake_256", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - ], - imports: [], - interfaces: [], - }, -}; diff --git a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts new file mode 100644 index 0000000000..2c07a3dcda --- /dev/null +++ b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts @@ -0,0 +1,560 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. + +export const abi = { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "sha3_512", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sha3_512", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sha3_512", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sha3_384", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sha3_384", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sha3_384", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sha3_256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sha3_256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sha3_256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sha3_224", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sha3_224", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sha3_224", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "keccak_512", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "keccak_512", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "keccak_512", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "keccak_384", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "keccak_384", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "keccak_384", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "keccak_256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "keccak_256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "keccak_256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "keccak_224", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "keccak_224", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "keccak_224", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "hex_keccak_256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "hex_keccak_256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "hex_keccak_256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "buffer_keccak_256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Bytes", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "buffer_keccak_256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "buffer_keccak_256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "shake_128", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int", + "name": "outputBits", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "outputBits", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "shake_128", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "shake_128", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "shake_256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int", + "name": "outputBits", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "outputBits", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "shake_256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "shake_256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } +}; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts deleted file mode 100644 index 86a39cfcb5..0000000000 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/schema.ts +++ /dev/null @@ -1,402 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module implements UriResolver_Module @imports( - types: [ - "UriResolver_Module", - "UriResolver_MaybeUriOrManifest", - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -### Imported Modules START ### - -type UriResolver_Module @imported( - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "Module" -) { - tryResolveUri( - authority: String! - path: String! - ): UriResolver_MaybeUriOrManifest - - getFile( - path: String! - ): Bytes -} - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type UriResolver_MaybeUriOrManifest @imported( - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest" -) { - uri: String - manifest: Bytes -} - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/info.ts rename to packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/info.ts rename to packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/info.ts rename to packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts diff --git a/packages/js/plugins/uts46/src/wrap-man/index.ts b/packages/js/plugins/uts46/src/wrap-man/index.ts index 27baf319a8..c1b75d806b 100644 --- a/packages/js/plugins/uts46/src/wrap-man/index.ts +++ b/packages/js/plugins/uts46/src/wrap-man/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./info"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/js/plugins/uts46/src/wrap-man/info.ts b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts similarity index 100% rename from packages/js/plugins/uts46/src/wrap-man/info.ts rename to packages/js/plugins/uts46/src/wrap-man/wrap.info.ts diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts index d7083b71f9..5843edbbb8 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts @@ -35,7 +35,11 @@ export const generateBinding: GenerateBindingFn = ( }; const output = result.output; - output.entries = renderTemplates(templatePath(""), { ...abi }, {}); + output.entries = renderTemplates( + templatePath(""), + { ...abi, abi: JSON.stringify(options.abi, null, 2) }, + {} + ); return result; }; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap-info-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache similarity index 100% rename from packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap-info-ts.mustache rename to packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache diff --git a/yarn.lock b/yarn.lock index 612ec0464c..b1b7640bdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -115,7 +115,7 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.6", "@babel/compat-data@^7.9.0": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.8", "@babel/compat-data@^7.9.0": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== @@ -143,32 +143,32 @@ source-map "^0.5.0" "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.4.5", "@babel/core@^7.7.5": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" - integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59" + integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helpers" "^7.18.6" - "@babel/parser" "^7.18.6" + "@babel/generator" "^7.18.9" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helpers" "^7.18.9" + "@babel/parser" "^7.18.9" "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.18.6", "@babel/generator@^7.18.7", "@babel/generator@^7.4.0", "@babel/generator@^7.9.0": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" - integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== +"@babel/generator@^7.18.9", "@babel/generator@^7.4.0", "@babel/generator@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" + integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug== dependencies: - "@babel/types" "^7.18.7" + "@babel/types" "^7.18.9" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" @@ -180,34 +180,34 @@ "@babel/types" "^7.18.6" "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz#f14d640ed1ee9246fb33b8255f08353acfe70e6a" - integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" + integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== dependencies: "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/types" "^7.18.9" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.18.6", "@babel/helper-compilation-targets@^7.8.7": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" - integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.8.7": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" + integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== dependencies: - "@babel/compat-data" "^7.18.6" + "@babel/compat-data" "^7.18.8" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.20.2" semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" - integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" + integrity sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.9" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-create-regexp-features-plugin@^7.18.6": @@ -232,10 +232,10 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" - integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== +"@babel/helper-environment-visitor@^7.18.6", "@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== "@babel/helper-explode-assignable-expression@^7.18.6": version "7.18.6" @@ -244,13 +244,13 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-function-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" - integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== +"@babel/helper-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" + integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== dependencies: "@babel/template" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/types" "^7.18.9" "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" @@ -259,12 +259,12 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-member-expression-to-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" - integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== +"@babel/helper-member-expression-to-functions@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" + integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== dependencies: - "@babel/types" "^7.18.6" + "@babel/types" "^7.18.9" "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.18.6", "@babel/helper-module-imports@^7.8.3": version "7.18.6" @@ -273,19 +273,19 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.9.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" - integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.18.9", "@babel/helper-module-transforms@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" + integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== dependencies: - "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-simple-access" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.18.6" "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.8" - "@babel/types" "^7.18.8" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -294,31 +294,31 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" - integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" + integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== "@babel/helper-remap-async-to-generator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz#fa1f81acd19daee9d73de297c0308783cd3cfc23" - integrity sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" + integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-wrap-function" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-wrap-function" "^7.18.9" + "@babel/types" "^7.18.9" -"@babel/helper-replace-supers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" - integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== +"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.9.tgz#1092e002feca980fbbb0bd4d51b74a65c6a500e6" + integrity sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ== dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" "@babel/helper-simple-access@^7.18.6": version "7.18.6" @@ -327,12 +327,12 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-skip-transparent-expression-wrappers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz#7dff00a5320ca4cf63270e5a0eca4b268b7380d9" - integrity sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw== +"@babel/helper-skip-transparent-expression-wrappers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818" + integrity sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw== dependencies: - "@babel/types" "^7.18.6" + "@babel/types" "^7.18.9" "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" @@ -351,24 +351,24 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helper-wrap-function@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz#ec44ea4ad9d8988b90c3e465ba2382f4de81a073" - integrity sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw== +"@babel/helper-wrap-function@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.9.tgz#ae1feddc6ebbaa2fd79346b77821c3bd73a39646" + integrity sha512-cG2ru3TRAL6a60tfQflpEfs4ldiPwF6YW3zfJiRgmoFVIaC1vGnBBgatfec+ZUziPHkHSaXAuEck3Cdkf3eRpQ== dependencies: - "@babel/helper-function-name" "^7.18.6" + "@babel/helper-function-name" "^7.18.9" "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" -"@babel/helpers@^7.18.6", "@babel/helpers@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" - integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== +"@babel/helpers@^7.18.9", "@babel/helpers@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" + integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== dependencies: "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" "@babel/highlight@^7.18.6", "@babel/highlight@^7.8.3": version "7.18.6" @@ -379,10 +379,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6", "@babel/parser@^7.18.8", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" - integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6", "@babel/parser@^7.18.9", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" + integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -391,14 +391,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz#b4e4dbc2cd1acd0133479918f7c6412961c9adb8" - integrity sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz#a11af19aa373d68d561f08e0a57242350ed0ec50" + integrity sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/plugin-proposal-optional-chaining" "^7.18.9" "@babel/plugin-proposal-async-generator-functions@^7.18.6", "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.18.6" @@ -452,12 +452,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz#1016f0aa5ab383bbf8b3a85a2dcaedf6c8ee7491" - integrity sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw== +"@babel/plugin-proposal-export-namespace-from@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" + integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" "@babel/plugin-proposal-json-strings@^7.18.6", "@babel/plugin-proposal-json-strings@^7.8.3": @@ -468,12 +468,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz#3b9cac6f1ffc2aa459d111df80c12020dfc6b665" - integrity sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q== +"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz#8148cbb350483bf6220af06fa6db3690e14b2e23" + integrity sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-proposal-nullish-coalescing-operator@7.8.3": @@ -508,16 +508,16 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.18.6", "@babel/plugin-proposal-object-rest-spread@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz#ec93bba06bfb3e15ebd7da73e953d84b094d5daf" - integrity sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw== +"@babel/plugin-proposal-object-rest-spread@^7.18.9", "@babel/plugin-proposal-object-rest-spread@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz#f9434f6beb2c8cae9dfcf97d2a5941bbbf9ad4e7" + integrity sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q== dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/compat-data" "^7.18.8" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.18.6" + "@babel/plugin-transform-parameters" "^7.18.8" "@babel/plugin-proposal-optional-catch-binding@^7.18.6", "@babel/plugin-proposal-optional-catch-binding@^7.8.3": version "7.18.6" @@ -535,13 +535,13 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.18.6", "@babel/plugin-proposal-optional-chaining@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz#46d4f2ffc20e87fad1d98bc4fa5d466366f6aa0b" - integrity sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA== +"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" + integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-proposal-private-methods@^7.18.6": @@ -740,40 +740,40 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-block-scoping@^7.18.6", "@babel/plugin-transform-block-scoping@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz#b5f78318914615397d86a731ef2cc668796a726c" - integrity sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ== +"@babel/plugin-transform-block-scoping@^7.18.9", "@babel/plugin-transform-block-scoping@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz#f9b7e018ac3f373c81452d6ada8bd5a18928926d" + integrity sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-classes@^7.18.6", "@babel/plugin-transform-classes@^7.9.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" - integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== +"@babel/plugin-transform-classes@^7.18.9", "@babel/plugin-transform-classes@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz#90818efc5b9746879b869d5ce83eb2aa48bbc3da" + integrity sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-replace-supers" "^7.18.9" "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.18.6", "@babel/plugin-transform-computed-properties@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz#5d15eb90e22e69604f3348344c91165c5395d032" - integrity sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A== +"@babel/plugin-transform-computed-properties@^7.18.9", "@babel/plugin-transform-computed-properties@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz#2357a8224d402dad623caf6259b611e56aec746e" + integrity sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-destructuring@^7.18.6", "@babel/plugin-transform-destructuring@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz#a98b0e42c7ffbf5eefcbcf33280430f230895c6f" - integrity sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ== +"@babel/plugin-transform-destructuring@^7.18.9", "@babel/plugin-transform-destructuring@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz#68906549c021cb231bee1db21d3b5b095f8ee292" + integrity sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3": version "7.18.6" @@ -783,12 +783,12 @@ "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-duplicate-keys@^7.18.6", "@babel/plugin-transform-duplicate-keys@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz#e6c94e8cd3c9dd8a88144f7b78ae22975a7ff473" - integrity sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg== +"@babel/plugin-transform-duplicate-keys@^7.18.9", "@babel/plugin-transform-duplicate-keys@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" + integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-exponentiation-operator@^7.18.6", "@babel/plugin-transform-exponentiation-operator@^7.8.3": version "7.18.6" @@ -806,28 +806,28 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-flow" "^7.8.3" -"@babel/plugin-transform-for-of@^7.18.6", "@babel/plugin-transform-for-of@^7.9.0": +"@babel/plugin-transform-for-of@^7.18.8", "@babel/plugin-transform-for-of@^7.9.0": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-function-name@^7.18.6", "@babel/plugin-transform-function-name@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz#6a7e4ae2893d336fd1b8f64c9f92276391d0f1b4" - integrity sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA== +"@babel/plugin-transform-function-name@^7.18.9", "@babel/plugin-transform-function-name@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" + integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== dependencies: - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-literals@^7.18.6", "@babel/plugin-transform-literals@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz#9d6af353b5209df72960baf4492722d56f39a205" - integrity sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q== +"@babel/plugin-transform-literals@^7.18.9", "@babel/plugin-transform-literals@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" + integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-member-expression-literals@^7.18.6", "@babel/plugin-transform-member-expression-literals@^7.8.3": version "7.18.6" @@ -855,14 +855,14 @@ "@babel/helper-simple-access" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.18.6", "@babel/plugin-transform-modules-systemjs@^7.9.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz#026511b7657d63bf5d4cf2fd4aeb963139914a54" - integrity sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g== +"@babel/plugin-transform-modules-systemjs@^7.18.9", "@babel/plugin-transform-modules-systemjs@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz#545df284a7ac6a05125e3e405e536c5853099a06" + integrity sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A== dependencies: "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/helper-validator-identifier" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" @@ -897,7 +897,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" -"@babel/plugin-transform-parameters@^7.18.6", "@babel/plugin-transform-parameters@^7.8.7": +"@babel/plugin-transform-parameters@^7.18.8", "@babel/plugin-transform-parameters@^7.8.7": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== @@ -912,11 +912,11 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-constant-elements@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.18.6.tgz#e477693aad3e2aafe86b6db03748a30aef417a5e" - integrity sha512-4g5H1bonF1dqgMe+wQ2fvDlRZ/mN/KwArk13teDv+xxn+pUDEiiDluQd6D2B30MJcL1u3qr0WZpfq0mw9/zSqA== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.18.9.tgz#ff6aeedd38f57ba6b41dcf824fcc8bcedb3e783f" + integrity sha512-IrTYh1I3YCEL1trjknnlLKTp5JggjzhKl/d3ibzPc97JhpFcDTr38Jdek/oX4cFbS6By0bXJcOkpRvJ5ZHK2wQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-react-display-name@7.8.3": version "7.8.3" @@ -1004,13 +1004,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-spread@^7.18.6", "@babel/plugin-transform-spread@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz#82b080241965f1689f0a60ecc6f1f6575dbdb9d6" - integrity sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw== +"@babel/plugin-transform-spread@^7.18.9", "@babel/plugin-transform-spread@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz#6ea7a6297740f381c540ac56caf75b05b74fb664" + integrity sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" "@babel/plugin-transform-sticky-regex@^7.18.6", "@babel/plugin-transform-sticky-regex@^7.8.3": version "7.18.6" @@ -1019,19 +1019,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-template-literals@^7.18.6", "@babel/plugin-transform-template-literals@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz#b763f4dc9d11a7cce58cf9a490d82e80547db9c2" - integrity sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw== +"@babel/plugin-transform-template-literals@^7.18.9", "@babel/plugin-transform-template-literals@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" + integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-typeof-symbol@^7.18.6", "@babel/plugin-transform-typeof-symbol@^7.8.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz#486bb39d5a18047358e0d04dc0d2f322f0b92e92" - integrity sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g== +"@babel/plugin-transform-typeof-symbol@^7.18.9", "@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" + integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typescript@^7.9.0": version "7.18.8" @@ -1124,28 +1124,28 @@ semver "^5.5.0" "@babel/preset-env@^7.4.5": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.6.tgz#953422e98a5f66bc56cd0b9074eaea127ec86ace" - integrity sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.9.tgz#9b3425140d724fbe590322017466580844c7eaff" + integrity sha512-75pt/q95cMIHWssYtyfjVlvI+QEZQThQbKvR9xH+F/Agtw/s4Wfc2V9Bwd/P39VtixB7oWxGdH4GteTTwYJWMg== dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/compat-data" "^7.18.8" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" "@babel/helper-validator-option" "^7.18.6" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.6" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" "@babel/plugin-proposal-async-generator-functions" "^7.18.6" "@babel/plugin-proposal-class-properties" "^7.18.6" "@babel/plugin-proposal-class-static-block" "^7.18.6" "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.6" + "@babel/plugin-proposal-export-namespace-from" "^7.18.9" "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.6" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.18.6" + "@babel/plugin-proposal-object-rest-spread" "^7.18.9" "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.9" "@babel/plugin-proposal-private-methods" "^7.18.6" "@babel/plugin-proposal-private-property-in-object" "^7.18.6" "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" @@ -1167,37 +1167,37 @@ "@babel/plugin-transform-arrow-functions" "^7.18.6" "@babel/plugin-transform-async-to-generator" "^7.18.6" "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.18.6" - "@babel/plugin-transform-classes" "^7.18.6" - "@babel/plugin-transform-computed-properties" "^7.18.6" - "@babel/plugin-transform-destructuring" "^7.18.6" + "@babel/plugin-transform-block-scoping" "^7.18.9" + "@babel/plugin-transform-classes" "^7.18.9" + "@babel/plugin-transform-computed-properties" "^7.18.9" + "@babel/plugin-transform-destructuring" "^7.18.9" "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.6" + "@babel/plugin-transform-duplicate-keys" "^7.18.9" "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.6" - "@babel/plugin-transform-function-name" "^7.18.6" - "@babel/plugin-transform-literals" "^7.18.6" + "@babel/plugin-transform-for-of" "^7.18.8" + "@babel/plugin-transform-function-name" "^7.18.9" + "@babel/plugin-transform-literals" "^7.18.9" "@babel/plugin-transform-member-expression-literals" "^7.18.6" "@babel/plugin-transform-modules-amd" "^7.18.6" "@babel/plugin-transform-modules-commonjs" "^7.18.6" - "@babel/plugin-transform-modules-systemjs" "^7.18.6" + "@babel/plugin-transform-modules-systemjs" "^7.18.9" "@babel/plugin-transform-modules-umd" "^7.18.6" "@babel/plugin-transform-named-capturing-groups-regex" "^7.18.6" "@babel/plugin-transform-new-target" "^7.18.6" "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.18.6" + "@babel/plugin-transform-parameters" "^7.18.8" "@babel/plugin-transform-property-literals" "^7.18.6" "@babel/plugin-transform-regenerator" "^7.18.6" "@babel/plugin-transform-reserved-words" "^7.18.6" "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.18.6" + "@babel/plugin-transform-spread" "^7.18.9" "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.6" - "@babel/plugin-transform-typeof-symbol" "^7.18.6" + "@babel/plugin-transform-template-literals" "^7.18.9" + "@babel/plugin-transform-typeof-symbol" "^7.18.9" "@babel/plugin-transform-unicode-escapes" "^7.18.6" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.6" + "@babel/types" "^7.18.9" babel-plugin-polyfill-corejs2 "^0.3.1" babel-plugin-polyfill-corejs3 "^0.5.2" babel-plugin-polyfill-regenerator "^0.3.1" @@ -1248,9 +1248,9 @@ "@babel/plugin-transform-typescript" "^7.9.0" "@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.12.1": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz#6f02c5536911f4b445946a2179554b95c8838635" - integrity sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz#7bacecd1cb2dd694eacd32a91fcf7021c20770ae" + integrity sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A== dependencies: core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" @@ -1263,9 +1263,9 @@ regenerator-runtime "^0.13.4" "@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" - integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" @@ -1278,26 +1278,26 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" - integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.9", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" + integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.7" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" + "@babel/generator" "^7.18.9" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.8" - "@babel/types" "^7.18.8" + "@babel/parser" "^7.18.9" + "@babel/types" "^7.18.9" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.9.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" - integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.9.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" + integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg== dependencies: "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" @@ -3083,10 +3083,10 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^12.7.0": - version "12.8.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.8.0.tgz#f4708cf948724d6e8f7d878cfd91584c1c5c0523" - integrity sha512-ydcKLs2KKcxlhpdWLzJxEBDEk/U5MUeqtqkXlrtAUXXFPs6vLl1PEGghFC/BbpleosB7iXs0Z4P2DGe7ZT5ZNg== +"@octokit/openapi-types@^12.10.0": + version "12.10.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.10.1.tgz#57b5cc6c7b4e55d8642c93d06401fb1af4839899" + integrity sha512-P+SukKanjFY0ZhsK6wSVnQmxTP2eVPPE8OPSNuxaMYtgVzwJZgfGdwlYjf4RlRU4vLEw4ts2fsE2icG4nZ5ddQ== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -3145,11 +3145,11 @@ "@octokit/plugin-rest-endpoint-methods" "^5.12.0" "@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0": - version "6.39.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.39.0.tgz#46ce28ca59a3d4bac0e487015949008302e78eee" - integrity sha512-Mq4N9sOAYCitTsBtDdRVrBE80lIrMBhL9Jbrw0d+j96BAzlq4V+GLHFJbHokEsVvO/9tQupQdoFdgVYhD2C8UQ== + version "6.40.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.40.0.tgz#f2e665196d419e19bb4265603cf904a820505d0e" + integrity sha512-MFZOU5r8SwgJWDMhrLUSvyJPtVsqA6VnbVI3TNbsmw+Jnvrktzvq2fYES/6RiJA/5Ykdwq4mJmtlYUfW7CGjmw== dependencies: - "@octokit/openapi-types" "^12.7.0" + "@octokit/openapi-types" "^12.10.0" "@opentelemetry/api-metrics@0.20.0": version "0.20.0" @@ -3657,9 +3657,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "18.0.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.3.tgz#463fc47f13ec0688a33aec75d078a0541a447199" - integrity sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ== + version "18.0.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7" + integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw== "@types/node@12.12.26": version "12.12.26" @@ -5324,14 +5324,14 @@ browserslist@4.10.0: node-releases "^1.1.52" pkg-up "^3.1.0" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.20.2, browserslist@^4.21.1, browserslist@^4.6.2, browserslist@^4.6.4, browserslist@^4.9.1: - version "4.21.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.1.tgz#c9b9b0a54c7607e8dc3e01a0d311727188011a00" - integrity sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.20.2, browserslist@^4.21.2, browserslist@^4.6.2, browserslist@^4.6.4, browserslist@^4.9.1: + version "4.21.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" + integrity sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA== dependencies: - caniuse-lite "^1.0.30001359" - electron-to-chromium "^1.4.172" - node-releases "^2.0.5" + caniuse-lite "^1.0.30001366" + electron-to-chromium "^1.4.188" + node-releases "^2.0.6" update-browserslist-db "^1.0.4" bs-logger@0.x: @@ -5601,10 +5601,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001359: - version "1.0.30001366" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001366.tgz#c73352c83830a9eaf2dea0ff71fb4b9a4bbaa89c" - integrity sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001366: + version "1.0.30001367" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz#2b97fe472e8fa29c78c5970615d7cd2ee414108a" + integrity sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw== capture-exit@^2.0.0: version "2.0.0" @@ -6322,17 +6322,17 @@ copyfiles@2.4.1: yargs "^16.1.0" core-js-compat@^3.21.0, core-js-compat@^3.22.1, core-js-compat@^3.6.2: - version "3.23.4" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.4.tgz#56ad4a352884317a15f6b04548ff7139d23b917f" - integrity sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q== + version "3.23.5" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.5.tgz#11edce2f1c4f69a96d30ce77c805ce118909cd5b" + integrity sha512-fHYozIFIxd+91IIbXJgWd/igXIc8Mf9is0fusswjnGIWVG96y2cwyUdlCkGOw6rMLHKAxg7xtCIVaHsyOUnJIg== dependencies: - browserslist "^4.21.1" + browserslist "^4.21.2" semver "7.0.0" core-js-pure@^3.20.2: - version "3.23.4" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.4.tgz#aba5c7fb297063444f6bf93afb0362151679a012" - integrity sha512-lizxkcgj3XDmi7TUBFe+bQ1vNpD5E4t76BrBWI3HdUxdw/Mq1VF4CkiHzIKyieECKtcODK2asJttoofEeUKICQ== + version "3.23.5" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.5.tgz#23daaa9af9230e50f10b0fa4b8e6b87402be4c33" + integrity sha512-8t78LdpKSuCq4pJYCYk8hl7XEkAX+BP16yRIwL3AanTksxuEf7CM83vRyctmiEL8NDZ3jpUcv56fk9/zG3aIuw== core-js@^2.4.0: version "2.6.12" @@ -6340,9 +6340,9 @@ core-js@^2.4.0: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.5.0: - version "3.23.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.4.tgz#92d640faa7f48b90bbd5da239986602cfc402aa6" - integrity sha512-vjsKqRc1RyAJC3Ye2kYqgfdThb3zYnx9CrqoCcjMOENMtQPC7ZViBvlDxwYU/2z2NI/IPuiXw5mT4hWhddqjzQ== + version "3.23.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.5.tgz#1f82b0de5eece800827a2f59d597509c67650475" + integrity sha512-7Vh11tujtAZy82da4duVreQysIoO2EvVrur7y6IzZkH1IHPSekuDi8Vuw1+YKjkbfWLRD7Nc9ICQ/sIUDutcyg== core-util-is@1.0.2: version "1.0.2" @@ -7271,10 +7271,10 @@ electron-fetch@^1.7.2: dependencies: encoding "^0.1.13" -electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.172: - version "1.4.187" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.187.tgz#b884493df00816dc2ce928958c4f6a51a93fe1a8" - integrity sha512-t3iFLHVIMhB8jGZ+8ui951nz6Bna5qKfhxezG3wzXdBJ79qFKPsE2chjjVFNqC1ewhfrPQrw9pmVeo4FFpZeQA== +electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.188: + version "1.4.194" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.194.tgz#2f83fcec5067907044a3d502ac7c3efb1fe6430b" + integrity sha512-ola5UH0xAP1oYY0FFUsPvwtucEzCQHucXnT7PQ1zjHJMccZhCDktEugI++JUR3YuIs7Ff7afz+OVEhVAIMhLAQ== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -9659,6 +9659,11 @@ ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== +ip@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" + integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + ipaddr.js@1.9.1, ipaddr.js@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -10393,9 +10398,9 @@ istanbul-reports@^2.2.6: html-escaper "^2.0.0" istanbul-reports@^3.0.2: - version "3.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" - integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== + version "3.1.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" + integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -13000,7 +13005,7 @@ node-releases@^1.1.52: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== -node-releases@^2.0.5: +node-releases@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== @@ -16259,11 +16264,11 @@ socks-proxy-agent@^6.0.0: socks "^2.6.2" socks@^2.3.3, socks@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" - integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== + version "2.7.0" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.0.tgz#f9225acdb841e874dca25f870e9130990f3913d0" + integrity sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA== dependencies: - ip "^1.1.5" + ip "^2.0.0" smart-buffer "^4.2.0" sort-keys@^1.0.0: @@ -16955,9 +16960,9 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + version "4.8.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" + integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -17573,9 +17578,9 @@ upath@^2.0.1: integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== update-browserslist-db@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" - integrity sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA== + version "1.0.5" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" + integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -17802,9 +17807,9 @@ vscode-languageserver-textdocument@^1.0.3: integrity sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg== vscode-languageserver-types@^3.16.0: - version "3.17.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.1.tgz#c2d87fa7784f8cac389deb3ff1e2d9a7bef07e16" - integrity sha512-K3HqVRPElLZVVPtMeKlsyL9aK0GxGQpvtAUTfX4k7+iJ4mc1M+JM+zQwkgGy2LzY0f0IAafe8MKqIkJrxfGGjQ== + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2" + integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== vscode-nls@^5.0.0: version "5.0.1" @@ -18424,9 +18429,9 @@ ws@^6.1.2, ws@^6.2.1: async-limiter "~1.0.0" ws@^7.4.6: - version "7.5.8" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" - integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== xml-name-validator@^3.0.0: version "3.0.0" From 7c62a1809574bf61b6b04a5fa6867c85dba49b93 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 20 Jul 2022 00:08:15 +0200 Subject: [PATCH 10/56] chore: started bind tests refactor --- packages/schema/bind/src/__tests__/index.ts | 1 - .../bind/sanity/output/plugin-ts/index.ts | 2 +- .../bind/sanity/output/plugin-ts/manifest.ts | 4 +- .../bind/sanity/output/plugin-ts/schema.ts | 218 ------------------ .../bind/sanity/output/plugin-ts/wrap.info.ts | 3 + 5 files changed, 6 insertions(+), 222 deletions(-) delete mode 100644 packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts create mode 100644 packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts diff --git a/packages/schema/bind/src/__tests__/index.ts b/packages/schema/bind/src/__tests__/index.ts index b30c0411ad..1fd3557924 100644 --- a/packages/schema/bind/src/__tests__/index.ts +++ b/packages/schema/bind/src/__tests__/index.ts @@ -78,7 +78,6 @@ export function fetchTestCases(): TestCases { projectName: "Test", bindLanguage: "TBD" as BindLanguage, abi, - schema, outputDirAbs: path.join(root, "combined") }; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts index f367d143d9..c1b75d806b 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts index 730cf8326f..96b656fffd 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { schema } from "./"; +import { abi } from "./"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - schema, + abi, implements: [ ], }; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts deleted file mode 100644 index dd7840e988..0000000000 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts +++ /dev/null @@ -1,218 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Polywrap Header END ### - -type Module @imports( - types: [ - "TestImport_Module", - "TestImport_Object", - "TestImport_AnotherObject", - "TestImport_Enum" - ] -) @capability( - type: "getImplementations", - uri: "testimport.uri.eth", - namespace: "TestImport" -) { - moduleMethod( - str: String! - optStr: String - en: CustomEnum! - optEnum: CustomEnum - enumArray: [CustomEnum!]! - optEnumArray: [CustomEnum] - map: Map! @annotate(type: "Map!") - mapOfArr: Map! @annotate(type: "Map!") - mapOfObj: Map! @annotate(type: "Map!") - mapOfArrOfObj: Map! @annotate(type: "Map!") - ): Int! - - objectMethod( - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - ): AnotherType @env(required: true) - - optionalEnvMethod( - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - ): AnotherType @env(required: false) -} - -type Env { - prop: String! - optProp: String - optMap: Map @annotate(type: "Map") -} - -type CustomType { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - u16: UInt16! - u32: UInt32! - i: Int! - i8: Int8! - i16: Int16! - i32: Int32! - bigint: BigInt! - optBigint: BigInt - bignumber: BigNumber! - optBignumber: BigNumber - json: JSON! - optJson: JSON - bytes: Bytes! - optBytes: Bytes - boolean: Boolean! - optBoolean: Boolean - uArray: [UInt!]! - uOptArray: [UInt!] - optUOptArray: [UInt] - optStrOptArray: [String] - uArrayArray: [[UInt!]!]! - uOptArrayOptArray: [[UInt32]]! - uArrayOptArrayArray: [[[UInt32!]!]]! - crazyArray: [[[[UInt32!]]!]] - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - en: CustomEnum! - optEnum: CustomEnum - enumArray: [CustomEnum!]! - optEnumArray: [CustomEnum] - map: Map! @annotate(type: "Map!") - mapOfArr: Map! @annotate(type: "Map!") - mapOfObj: Map! @annotate(type: "Map!") - mapOfArrOfObj: Map! @annotate(type: "Map!") -} - -type AnotherType { - prop: String - circular: CustomType - const: String -} - -enum CustomEnum { - STRING - BYTES -} - -### Imported Modules START ### - -type TestImport_Module @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Module" -) @enabled_interface { - importedMethod( - str: String! - optStr: String - u: UInt! - optU: UInt - uArrayArray: [[UInt]]! - object: TestImport_Object! - optObject: TestImport_Object - objectArray: [TestImport_Object!]! - optObjectArray: [TestImport_Object] - en: TestImport_Enum! - optEnum: TestImport_Enum - enumArray: [TestImport_Enum!]! - optEnumArray: [TestImport_Enum] - ): TestImport_Object @env(required: true) - - anotherMethod( - arg: [String!]! - ): Int32! -} - -### Imported Modules END ### - -### Imported Objects START ### - -type TestImport_Object @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Object" -) { - object: TestImport_AnotherObject! - optObject: TestImport_AnotherObject - objectArray: [TestImport_AnotherObject!]! - optObjectArray: [TestImport_AnotherObject] - en: TestImport_Enum! - optEnum: TestImport_Enum - enumArray: [TestImport_Enum!]! - optEnumArray: [TestImport_Enum] -} - -type TestImport_AnotherObject @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "AnotherObject" -) { - prop: String! -} - -enum TestImport_Enum @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Enum" -) { - STRING - BYTES -} - -### Imported Objects END ### - -### Imported Envs START ### - -type TestImport_Env @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Env" -) { - enviroProp: String! -} - -### Imported Envs END ###`; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts new file mode 100644 index 0000000000..453f55fad3 --- /dev/null +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -0,0 +1,3 @@ +export const abi = { + +} \ No newline at end of file From 9f22b86e83097f6efda6e2866ba2df7c486a23c6 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 20 Jul 2022 00:08:15 +0200 Subject: [PATCH 11/56] chore: started bind tests refactor --- packages/schema/bind/src/__tests__/index.ts | 1 - .../bind/sanity/output/plugin-ts/index.ts | 2 +- .../bind/sanity/output/plugin-ts/manifest.ts | 4 +- .../bind/sanity/output/plugin-ts/schema.ts | 218 -- .../bind/sanity/output/plugin-ts/wrap.info.ts | 3059 +++++++++++++++++ 5 files changed, 3062 insertions(+), 222 deletions(-) delete mode 100644 packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts create mode 100644 packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts diff --git a/packages/schema/bind/src/__tests__/index.ts b/packages/schema/bind/src/__tests__/index.ts index b30c0411ad..1fd3557924 100644 --- a/packages/schema/bind/src/__tests__/index.ts +++ b/packages/schema/bind/src/__tests__/index.ts @@ -78,7 +78,6 @@ export function fetchTestCases(): TestCases { projectName: "Test", bindLanguage: "TBD" as BindLanguage, abi, - schema, outputDirAbs: path.join(root, "combined") }; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts index f367d143d9..c1b75d806b 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts @@ -1,7 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; +export * from "./wrap.info"; export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts index 730cf8326f..96b656fffd 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { schema } from "./"; +import { abi } from "./"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - schema, + abi, implements: [ ], }; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts deleted file mode 100644 index dd7840e988..0000000000 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/schema.ts +++ /dev/null @@ -1,218 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -### Polywrap Header END ### - -type Module @imports( - types: [ - "TestImport_Module", - "TestImport_Object", - "TestImport_AnotherObject", - "TestImport_Enum" - ] -) @capability( - type: "getImplementations", - uri: "testimport.uri.eth", - namespace: "TestImport" -) { - moduleMethod( - str: String! - optStr: String - en: CustomEnum! - optEnum: CustomEnum - enumArray: [CustomEnum!]! - optEnumArray: [CustomEnum] - map: Map! @annotate(type: "Map!") - mapOfArr: Map! @annotate(type: "Map!") - mapOfObj: Map! @annotate(type: "Map!") - mapOfArrOfObj: Map! @annotate(type: "Map!") - ): Int! - - objectMethod( - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - ): AnotherType @env(required: true) - - optionalEnvMethod( - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - ): AnotherType @env(required: false) -} - -type Env { - prop: String! - optProp: String - optMap: Map @annotate(type: "Map") -} - -type CustomType { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - u16: UInt16! - u32: UInt32! - i: Int! - i8: Int8! - i16: Int16! - i32: Int32! - bigint: BigInt! - optBigint: BigInt - bignumber: BigNumber! - optBignumber: BigNumber - json: JSON! - optJson: JSON - bytes: Bytes! - optBytes: Bytes - boolean: Boolean! - optBoolean: Boolean - uArray: [UInt!]! - uOptArray: [UInt!] - optUOptArray: [UInt] - optStrOptArray: [String] - uArrayArray: [[UInt!]!]! - uOptArrayOptArray: [[UInt32]]! - uArrayOptArrayArray: [[[UInt32!]!]]! - crazyArray: [[[[UInt32!]]!]] - object: AnotherType! - optObject: AnotherType - objectArray: [AnotherType!]! - optObjectArray: [AnotherType] - en: CustomEnum! - optEnum: CustomEnum - enumArray: [CustomEnum!]! - optEnumArray: [CustomEnum] - map: Map! @annotate(type: "Map!") - mapOfArr: Map! @annotate(type: "Map!") - mapOfObj: Map! @annotate(type: "Map!") - mapOfArrOfObj: Map! @annotate(type: "Map!") -} - -type AnotherType { - prop: String - circular: CustomType - const: String -} - -enum CustomEnum { - STRING - BYTES -} - -### Imported Modules START ### - -type TestImport_Module @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Module" -) @enabled_interface { - importedMethod( - str: String! - optStr: String - u: UInt! - optU: UInt - uArrayArray: [[UInt]]! - object: TestImport_Object! - optObject: TestImport_Object - objectArray: [TestImport_Object!]! - optObjectArray: [TestImport_Object] - en: TestImport_Enum! - optEnum: TestImport_Enum - enumArray: [TestImport_Enum!]! - optEnumArray: [TestImport_Enum] - ): TestImport_Object @env(required: true) - - anotherMethod( - arg: [String!]! - ): Int32! -} - -### Imported Modules END ### - -### Imported Objects START ### - -type TestImport_Object @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Object" -) { - object: TestImport_AnotherObject! - optObject: TestImport_AnotherObject - objectArray: [TestImport_AnotherObject!]! - optObjectArray: [TestImport_AnotherObject] - en: TestImport_Enum! - optEnum: TestImport_Enum - enumArray: [TestImport_Enum!]! - optEnumArray: [TestImport_Enum] -} - -type TestImport_AnotherObject @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "AnotherObject" -) { - prop: String! -} - -enum TestImport_Enum @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Enum" -) { - STRING - BYTES -} - -### Imported Objects END ### - -### Imported Envs START ### - -type TestImport_Env @imported( - uri: "testimport.uri.eth", - namespace: "TestImport", - nativeType: "Env" -) { - enviroProp: String! -} - -### Imported Envs END ###`; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts new file mode 100644 index 0000000000..933078b483 --- /dev/null +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -0,0 +1,3059 @@ +export const abi = { + "objectTypes": [ + { + "type": "CustomType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt8", + "name": "u8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "u8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt16", + "name": "u16", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt16", + "name": "u16", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "u32", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "u32", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int", + "name": "i", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "i", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int8", + "name": "i8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int8", + "name": "i8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int16", + "name": "i16", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int16", + "name": "i16", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int32", + "name": "i32", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int32", + "name": "i32", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "bigint", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "bigint", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "optBigint", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "optBigint", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigNumber", + "name": "bignumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigNumber", + "name": "bignumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigNumber", + "name": "optBignumber", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigNumber", + "name": "optBignumber", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "JSON", + "name": "json", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "JSON", + "name": "json", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "JSON", + "name": "optJson", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "JSON", + "name": "optJson", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "bytes", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "bytes", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "optBytes", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "optBytes", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "boolean", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "boolean", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "optBoolean", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "optBoolean", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "uArray", + "required": true, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "uArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "uOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "uOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uOptArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uOptArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "optUOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "optUOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optUOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "optUOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "optStrOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "optStrOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStrOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "optStrOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt32]]", + "name": "uOptArrayOptArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt32]]", + "name": "uOptArrayOptArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uOptArrayOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uOptArrayOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[[UInt32]]]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[[UInt32]]]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "uArrayOptArrayArray", + "required": null, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "uArrayOptArrayArray", + "required": null, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[[[UInt32]]]]", + "name": "crazyArray", + "required": null, + "kind": 34, + "array": { + "type": "[[[[UInt32]]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[[UInt32]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[[UInt32]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[CustomEnum]", + "name": "optEnumArray", + "required": null, + "kind": 34, + "array": { + "type": "[CustomEnum]", + "name": "optEnumArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "CustomEnum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "map", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "map", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "map", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "map", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "map", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfArr", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfArr", + "required": true, + "kind": 262146, + "array": { + "type": "[Int]", + "name": "mapOfArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "value": { + "type": "[Int]", + "name": "mapOfArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfObj", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfObj", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfObj", + "required": true, + "kind": 4 + }, + "value": { + "type": "AnotherType", + "name": "mapOfObj", + "required": true, + "kind": 8192 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfArrOfObj", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfArrOfObj", + "required": true, + "kind": 262146, + "array": { + "type": "[AnotherType]", + "name": "mapOfArrOfObj", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfArrOfObj", + "required": true, + "kind": 4 + }, + "value": { + "type": "[AnotherType]", + "name": "mapOfArrOfObj", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + { + "type": "AnotherType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "prop", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "prop", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomType", + "name": "circular", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "CustomType", + "name": "circular", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "const", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "const", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [ + { + "type": "CustomEnum", + "name": null, + "required": null, + "kind": 8, + "constants": [ + "STRING", + "BYTES" + ] + } + ], + "interfaceTypes": [ + { + "type": "TestImport", + "name": null, + "required": null, + "kind": 32768, + "namespace": "TestImport", + "uri": "testimport.uri.eth", + "nativeType": "Interface", + "capabilities": { + "getImplementations": { + "enabled": true + } + } + } + ], + "importedObjectTypes": [ + { + "type": "TestImport_Object", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "TestImport_AnotherObject", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_AnotherObject", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_AnotherObject", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_AnotherObject", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_AnotherObject]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_AnotherObject]", + "name": "objectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_AnotherObject", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_AnotherObject", + "name": "objectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_AnotherObject]", + "name": "optObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[TestImport_AnotherObject]", + "name": "optObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_AnotherObject", + "name": "optObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_AnotherObject", + "name": "optObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Enum", + "name": "optEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "optEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "required": null, + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Object" + }, + { + "type": "TestImport_AnotherObject", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "prop", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "AnotherObject" + } + ], + "importedModuleTypes": [ + { + "type": "TestImport_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "importedMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt]", + "name": "uArrayArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt]", + "name": "uArrayArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Object", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_Object", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Object", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_Object", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Object]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_Object]", + "name": "objectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_Object", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Object", + "name": "objectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Object]", + "name": "optObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[TestImport_Object]", + "name": "optObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_Object", + "name": "optObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Object", + "name": "optObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "TestImport_Enum", + "name": "optEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "optEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "required": null, + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "TestImport_Object", + "name": "importedMethod", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "TestImport_Object", + "name": "importedMethod", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "anotherMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Int32", + "name": "anotherMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int32", + "name": "anotherMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Module", + "isInterface": true + } + ], + "importedEnumTypes": [ + { + "type": "TestImport_Enum", + "name": null, + "required": null, + "kind": 520, + "constants": [ + "STRING", + "BYTES" + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Enum" + } + ], + "importedEnvTypes": [ + { + "type": "TestImport_Env", + "name": null, + "required": null, + "kind": 524288, + "properties": [ + { + "type": "String", + "name": "enviroProp", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "enviroProp", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Env" + } + ], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "moduleMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[CustomEnum]", + "name": "optEnumArray", + "required": null, + "kind": 34, + "array": { + "type": "[CustomEnum]", + "name": "optEnumArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "item": { + "type": "CustomEnum", + "name": "optEnumArray", + "required": null, + "kind": 16384 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "map", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "map", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "map", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "map", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "map", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfArr", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfArr", + "required": true, + "kind": 262146, + "array": { + "type": "[Int]", + "name": "mapOfArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "value": { + "type": "[Int]", + "name": "mapOfArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfObj", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfObj", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfObj", + "required": true, + "kind": 4 + }, + "value": { + "type": "AnotherType", + "name": "mapOfObj", + "required": true, + "kind": 8192 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "mapOfArrOfObj", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfArrOfObj", + "required": true, + "kind": 262146, + "array": { + "type": "[AnotherType]", + "name": "mapOfArrOfObj", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfArrOfObj", + "required": true, + "kind": 4 + }, + "value": { + "type": "[AnotherType]", + "name": "mapOfArrOfObj", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Int", + "name": "moduleMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "moduleMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "objectMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "AnotherType", + "name": "objectMethod", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "objectMethod", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "optionalEnvMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "optObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "AnotherType", + "name": "optObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "AnotherType", + "name": "optionalEnvMethod", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "AnotherType", + "name": "optionalEnvMethod", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": false + } + } + ], + "imports": [ + { + "type": "TestImport_Module" + }, + { + "type": "TestImport_Object" + }, + { + "type": "TestImport_AnotherObject" + }, + { + "type": "TestImport_Enum" + } + ], + "interfaces": [] + }, + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "prop", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optProp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optProp", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "optMap", + "required": null, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "optMap", + "required": null, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "optMap", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "optMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "optMap", + "required": null, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } +} \ No newline at end of file From 9905b70df0d11d5f21250949465467243cb57e9f Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 20 Jul 2022 19:20:55 +0200 Subject: [PATCH 12/56] tests(schema/compose): green tests except for one --- .../schema/compose/src/__tests__/index.ts | 2 +- .../compose/src/__tests__/test-cases.spec.ts | 1 - packages/schema/compose/src/resolve.ts | 41 +- packages/schema/compose/src/types.ts | 3 +- .../00-sanity/output/module.graphql | 103 - .../imports-ext/external.eth/module.ts | 162 ++ .../imports-ext/external.eth/schema.graphql | 46 - .../imports-ext/external.eth/module.ts | 36 + .../imports-ext/external.eth/schema.graphql | 32 - .../imports-ext/external.eth/module.ts | 188 ++ .../imports-ext/external.eth/schema.graphql | 44 - .../imports-ext/external.eth/module.ts | 18 + .../imports-ext/external.eth/schema.graphql | 30 - .../imports-ext/base.eth/module.ts | 39 + .../imports-ext/base.eth/schema.graphql | 32 - .../imports-ext/derived.eth/module.ts | 39 + .../imports-ext/derived.eth/schema.graphql | 32 - .../imports-ext/external.eth/module.ts | 154 ++ .../imports-ext/external.eth/schema.graphql | 45 - .../imports-ext/base.eth/module.ts | 195 ++ .../imports-ext/base.eth/schema.graphql | 37 - .../imports-ext/derived.eth/module.ts | 195 ++ .../imports-ext/derived.eth/schema.graphql | 37 - .../imports-ext/just.module.eth/module.ts | 95 + .../just.module.eth/schema.graphql | 44 - .../imports-ext/test-interface.eth/module.ts | 306 +++ .../test-interface.eth/schema.graphql | 107 -- .../sanity/imports-ext/test.eth/module.ts | 1673 +++++++++++++++++ .../imports-ext/test.eth/schema.graphql | 160 -- .../compose/sanity/output/module.graphql | 461 ----- .../cases/compose/sanity/output/module.ts | 2 +- 31 files changed, 3134 insertions(+), 1225 deletions(-) delete mode 100644 packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql create mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts delete mode 100644 packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql delete mode 100644 packages/test-cases/cases/compose/sanity/output/module.graphql diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 304ae16641..853b36ef16 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -115,6 +115,6 @@ async function importCase( return { name, input, - abi: moduleAbi, + abi: moduleAbi as Abi, }; } diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index 0edb37b473..f11c51f223 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -23,7 +23,6 @@ function removeFunctionProps(obj: unknown) { describe("Polywrap Schema Composer Test Cases", () => { let cases = fetchTestCases(); - for (const test of cases) { it(`Case: ${test.name}`, async () => { const testCase = await test.promise; diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index cbada758a3..c9c0be3dc8 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -8,10 +8,12 @@ import { AbiResolvers, SYNTAX_REFERENCE, AbiResolver, + SchemaResolver, } from "./types"; import { parseExternalImports, parseLocalImports, parseUse } from "./parse"; import { renderSchema } from "./render"; import { checkDuplicateEnvProperties } from "./env"; +import { addHeader } from "./templates/header.mustache"; import { Abi, @@ -132,9 +134,9 @@ export async function resolveImportsAndParseSchemas( const keywords = [...schema.matchAll(importKeywordCapture)]; const externalImportStatements = [...schema.matchAll(externalImportCapture)]; - const localImportStatments = [...schema.matchAll(localImportCapture)]; + const localImportStatements = [...schema.matchAll(localImportCapture)]; const totalStatements = - externalImportStatements.length + localImportStatments.length; + externalImportStatements.length + localImportStatements.length; if (keywords.length !== totalStatements) { throw Error( @@ -157,7 +159,7 @@ export async function resolveImportsAndParseSchemas( ); const localImportsToResolve: LocalImport[] = parseLocalImports( - localImportStatments, + localImportStatements, schemaPath ); @@ -177,8 +179,12 @@ export async function resolveImportsAndParseSchemas( subAbi ); - await resolveLocalImports(localImportsToResolve, resolvers.local, subAbi); - + await resolveLocalImports( + localImportsToResolve, + resolvers.local, + subAbi, + resolvers + ); const capabilitiesByModule = await resolveUseStatements( schema, schemaPath, @@ -920,19 +926,32 @@ async function resolveExternalImports( async function resolveLocalImports( importsToResolve: LocalImport[], - resolveAbi: AbiResolver, - abi: Abi + resolveSchema: SchemaResolver, + abi: Abi, + resolvers: AbiResolvers ): Promise { for (const importToResolve of importsToResolve) { const { importedTypes, path } = importToResolve; - // Parse the schema into Abi - const localAbi = await resolveAbi(path); + // Resolve the schema + let schema = await resolveSchema(path); + + if (!schema) { + throw Error(`Unable to resolve schema at "${path}"`); + } - if (!localAbi) { - throw Error(`Unable to resolve Abi at "${path}"`); + // Make sure the schema has the Polywrap header + if (schema.indexOf("### Polywrap Header START ###") === -1) { + schema = addHeader(schema); } + // Parse the schema into Abi + const localAbi = await resolveImportsAndParseSchemas( + schema, + path, + resolvers, + true + ); let extTypesToImport = importedTypes; // If the importedTypes array contains the catch-all "*" diff --git a/packages/schema/compose/src/types.ts b/packages/schema/compose/src/types.ts index 59e071aa78..a24e15a5b7 100644 --- a/packages/schema/compose/src/types.ts +++ b/packages/schema/compose/src/types.ts @@ -6,10 +6,11 @@ export interface SchemaFile { } export type AbiResolver = (uri: string) => Promise; +export type SchemaResolver = (path: string) => Promise; export interface AbiResolvers { external: AbiResolver; - local: AbiResolver; + local: SchemaResolver; } export interface ExternalImport { diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql deleted file mode 100644 index 48da4a8361..0000000000 --- a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql +++ /dev/null @@ -1,103 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method1( - str: String! - optStr: String - u: UInt! - uArrayArray: [[UInt]]! - ): String! - - method2( - arg: [String!]! - ): [Int32!]! -} - -type CustomModuleType { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - i: Int! - i8: Int8! - bytes: Bytes! - uArray: [UInt!]! - uOptArray: [UInt!] - optStrOptArray: [String] - crazyArray: [[[[UInt32!]]!]] - commonType: CommonType! -} - -type AnotherModuleType { - prop: String -} - -type CommonType { - prop: UInt8! - nestedObject: NestedType! - objectArray: [[ArrayObject]]! - enum: CommonEnum! -} - -type NestedType { - prop: String! -} - -type ArrayObject { - prop: String! -} - -enum CommonEnum { - STRING - BYTES -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..16ee56680d --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts @@ -0,0 +1,162 @@ +export const abi = { + "objectTypes": [ + { + "type": "ExternalType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "ExternalType", + "name": "externalProp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ExternalType", + "name": "externalProp", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "envMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "envMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "envMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "optEnvMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "optEnvMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optEnvMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": false + } + } + ], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql deleted file mode 100644 index 7c634dea11..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/schema.graphql +++ /dev/null @@ -1,46 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ExternalType { - str: String -} - -type Env { - externalProp: ExternalType -} - -type Module { - envMethod( - arg: String! - ): String! @env(required: true) - - optEnvMethod( - arg: String! - ): String! @env(required: false) -} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..f05fcdf107 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts @@ -0,0 +1,36 @@ +export const abi = { + "objectTypes": [ + { + "type": "ExternalType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [] +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql deleted file mode 100644 index ec7d0a26d7..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/schema.graphql +++ /dev/null @@ -1,32 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ExternalType { - str: String -} diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..39616e5e50 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts @@ -0,0 +1,188 @@ +export const abi = { + "objectTypes": [ + { + "type": "ExternalType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + { + "type": "ExternalType2", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt32", + "name": "foo", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "foo", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "ExternalType", + "name": "externalProp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ExternalType", + "name": "externalProp", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "envMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "envMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "envMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "optEnvMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "optEnvMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optEnvMethod", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "env": { + "required": false + } + } + ], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql deleted file mode 100644 index 2733f7ee2f..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/schema.graphql +++ /dev/null @@ -1,44 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ExternalType { - str: String -} - -type ExternalType2 { - foo: UInt32 -} - -type Env { - externalProp: ExternalType -} - -type Module { - envMethod(arg: String!): String! @env(required: true) - optEnvMethod(arg: String!): String! @env(required: false) -} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..5a06c5abeb --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts @@ -0,0 +1,18 @@ +export const abi = { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql deleted file mode 100644 index 38deeb5b7e..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/schema.graphql +++ /dev/null @@ -1,30 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts new file mode 100644 index 0000000000..7b0f1cc51c --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -0,0 +1,39 @@ +export const abi = { + "objectTypes": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 1, + "properties": [], + "interfaces": [] + }, + { + "type": "ImportedDerivedType", + "name": null, + "required": null, + "kind": 1, + "properties": [], + "interfaces": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [] +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql deleted file mode 100644 index f9df7fec1d..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql +++ /dev/null @@ -1,32 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ImportedBaseType - -type ImportedDerivedType implements ImportedBaseType \ No newline at end of file diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts new file mode 100644 index 0000000000..7b0f1cc51c --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -0,0 +1,39 @@ +export const abi = { + "objectTypes": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 1, + "properties": [], + "interfaces": [] + }, + { + "type": "ImportedDerivedType", + "name": null, + "required": null, + "kind": 1, + "properties": [], + "interfaces": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [] +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql deleted file mode 100644 index f9df7fec1d..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql +++ /dev/null @@ -1,32 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ImportedBaseType - -type ImportedDerivedType implements ImportedBaseType \ No newline at end of file diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..ef7eab4659 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts @@ -0,0 +1,154 @@ +export const abi = { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getMap", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Map", + "name": "getMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "getMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getMap", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "getMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "getMap", + "required": null, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "updateMap", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Map", + "name": "map", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "map", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "map", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "map", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "map", + "required": null, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Map", + "name": "updateMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "updateMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "updateMap", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "updateMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "updateMap", + "required": null, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql deleted file mode 100644 index 87f7f07153..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/schema.graphql +++ /dev/null @@ -1,45 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - getMap: Map! @annotate(type: "Map!") - updateMap( - map: Map! @annotate(type: "Map!") - ): Map! @annotate(type: "Map!") -} diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts new file mode 100644 index 0000000000..179849726b --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -0,0 +1,195 @@ +export const abi = { + "objectTypes": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + { + "type": "ImportedDerivedType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "Map", + "name": "mapOfValueArr", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfValueArr", + "required": true, + "kind": 262146, + "array": { + "type": "[Int]", + "name": "mapOfValueArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "value": { + "type": "[Int]", + "name": "mapOfValueArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [] +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql deleted file mode 100644 index 45ba692294..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/schema.graphql +++ /dev/null @@ -1,37 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ImportedBaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -type ImportedDerivedType implements ImportedBaseType { - mapOfValueArr: Map! @annotate(type: "Map!>!") - requiredMap: Map! @annotate(type: "Map!") -} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts new file mode 100644 index 0000000000..179849726b --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -0,0 +1,195 @@ +export const abi = { + "objectTypes": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + { + "type": "ImportedDerivedType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "Map", + "name": "mapOfValueArr", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "mapOfValueArr", + "required": true, + "kind": 262146, + "array": { + "type": "[Int]", + "name": "mapOfValueArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "value": { + "type": "[Int]", + "name": "mapOfValueArr", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int", + "name": "mapOfValueArr", + "required": true, + "kind": 4 + } + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 34, + "array": null, + "map": { + "type": "Map", + "name": "requiredMap", + "required": true, + "kind": 262146, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "key": { + "type": "String", + "name": "requiredMap", + "required": true, + "kind": 4 + }, + "value": { + "type": "Int", + "name": "requiredMap", + "required": true, + "kind": 4 + } + }, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [ + { + "type": "ImportedBaseType", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [] +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql deleted file mode 100644 index 45ba692294..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/schema.graphql +++ /dev/null @@ -1,37 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type ImportedBaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -type ImportedDerivedType implements ImportedBaseType { - mapOfValueArr: Map! @annotate(type: "Map!>!") - requiredMap: Map! @annotate(type: "Map!") -} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts new file mode 100644 index 0000000000..b1077b961d --- /dev/null +++ b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts @@ -0,0 +1,95 @@ +export const abi = { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "method", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "[Int32]", + "name": "method", + "required": true, + "kind": 34, + "array": { + "type": "[Int32]", + "name": "method", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int32", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int32", + "name": "method", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql deleted file mode 100644 index 0027b34bd2..0000000000 --- a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/schema.graphql +++ /dev/null @@ -1,44 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - arg: [String!]! - ): [Int32!]! -} diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts new file mode 100644 index 0000000000..fcc8b4ee8c --- /dev/null +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts @@ -0,0 +1,306 @@ +export const abi = { + "objectTypes": [ + { + "type": "ModuleInterfaceArgument", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [ + { + "type": "NestedModuleInterfaceArgument", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "comment": "ModuleInterfaceArgument comment" + }, + { + "type": "NestedModuleInterfaceArgument", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "comment": "NestedModuleInterfaceArgument comment" + }, + { + "type": "InterfaceObject1", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "comment": "InterfaceObject1_uint8 comment" + } + ], + "interfaces": [], + "comment": "InterfaceObject1 comment" + }, + { + "type": "InterfaceObject2", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str2", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str2", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Object", + "name": "object", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Object", + "name": "object", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [ + { + "type": "NestedInterfaceObject", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "comment": "InterfaceObject2 comment" + }, + { + "type": "NestedInterfaceObject", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "Object", + "name": "object", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Object", + "name": "object", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "comment": "object comment" + } + ], + "interfaces": [], + "comment": "NestedInterfaceObject comment" + }, + { + "type": "Object", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "uint8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "comment": "Object comment" + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "abstractModuleMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "ModuleInterfaceArgument", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ModuleInterfaceArgument", + "name": "arg", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "comment": "arg comment" + } + ], + "return": { + "type": "InterfaceObject2", + "name": "abstractModuleMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "InterfaceObject2", + "name": "abstractModuleMethod", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "comment": "abstractModuleMethod comment" + } + ], + "imports": [], + "interfaces": [], + "comment": "Module comment" + } +} diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql deleted file mode 100644 index 9af03354e6..0000000000 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/schema.graphql +++ /dev/null @@ -1,107 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -""" -Module comment -""" -type Module { -""" -abstractModuleMethod comment -""" - abstractModuleMethod( -""" -arg comment -""" - arg: ModuleInterfaceArgument! - ): InterfaceObject2! -} - -""" -ModuleInterfaceArgument comment -""" -type ModuleInterfaceArgument implements NestedModuleInterfaceArgument { - str: String! -""" -uint8 comment -""" - uint8: UInt8! -} - -""" -NestedModuleInterfaceArgument comment -""" -type NestedModuleInterfaceArgument { - uint8: UInt8! -} - -""" -InterfaceObject1 comment -""" -type InterfaceObject1 { - str: String! -""" -InterfaceObject1_uint8 comment -""" - uint8: UInt8! -} - -""" -InterfaceObject2 comment -""" -type InterfaceObject2 implements NestedInterfaceObject { - str2: String! - object: Object -} - -""" -NestedInterfaceObject comment -""" -type NestedInterfaceObject { -""" -object comment -""" - object: Object -} - -""" -Object comment -""" -type Object { - uint8: UInt8! -} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts new file mode 100644 index 0000000000..7f231f5c4b --- /dev/null +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts @@ -0,0 +1,1673 @@ +export const abi = { + "objectTypes": [ + { + "type": "CustomType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt8", + "name": "u8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt8", + "name": "u8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt16", + "name": "u16", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt16", + "name": "u16", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "u32", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "u32", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int", + "name": "i", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "i", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int8", + "name": "i8", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int8", + "name": "i8", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int16", + "name": "i16", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int16", + "name": "i16", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Int32", + "name": "i32", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int32", + "name": "i32", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "bytes", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "bytes", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "uArray", + "required": true, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "uArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "uOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "uOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uOptArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uOptArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[UInt]", + "name": "optUOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[UInt]", + "name": "optUOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optUOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "optUOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "optStrOptArray", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "optStrOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStrOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "optStrOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt32]]", + "name": "uOptArrayOptArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt32]]", + "name": "uOptArrayOptArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uOptArrayOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uOptArrayOptArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uOptArrayOptArray", + "required": null, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[[UInt32]]]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[[UInt32]]]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "uArrayOptArrayArray", + "required": null, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "uArrayOptArrayArray", + "required": null, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 4 + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[[[UInt32]]]]", + "name": "crazyArray", + "required": null, + "kind": 34, + "array": { + "type": "[[[[UInt32]]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[[UInt32]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[[UInt32]]]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[[UInt32]]", + "name": "crazyArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt32]", + "name": "crazyArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt32", + "name": "crazyArray", + "required": true, + "kind": 4 + } + } + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "ObjectType", + "name": "object", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ObjectType", + "name": "object", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "ObjectType", + "name": "optObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ObjectType", + "name": "optObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "NestedObjectType", + "name": "nestedObject", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "nestedObject", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "NestedObjectType", + "name": "optNestedObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "optNestedObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[NestedObjectType]", + "name": "optNestedObjectArray", + "required": true, + "kind": 34, + "array": { + "type": "[NestedObjectType]", + "name": "optNestedObjectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "optNestedObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "NestedObjectType", + "name": "optNestedObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Imported_NestedObjectType", + "name": "importedNestedObject", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_NestedObjectType", + "name": "importedNestedObject", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Imported_NestedObjectType]", + "name": "optImportedNestedObjectArray", + "required": true, + "kind": 34, + "array": { + "type": "[Imported_NestedObjectType]", + "name": "optImportedNestedObjectArray", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_NestedObjectType", + "name": "optImportedNestedObjectArray", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Imported_NestedObjectType", + "name": "optImportedNestedObjectArray", + "required": null, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "enum", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "enum", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "CustomEnum", + "name": "optEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "Imported_Enum", + "name": "importedEnum", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "Imported_Enum", + "name": "importedEnum", + "required": true, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null + }, + { + "type": "Imported_Enum", + "name": "optImportedEnum", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": { + "type": "Imported_Enum", + "name": "optImportedEnum", + "required": null, + "kind": 16384 + }, + "unresolvedObjectOrEnum": null, + "comment": "optImportedEnum comment" + } + ], + "interfaces": [], + "comment": "CustomType comment" + }, + { + "type": "NestedObjectType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "ObjectType", + "name": "nestedObject", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "ObjectType", + "name": "nestedObject", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + { + "type": "ObjectType", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "prop", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [ + { + "type": "CustomEnum", + "name": null, + "required": null, + "kind": 8, + "constants": [ + "STRING", + "BYTES" + ] + } + ], + "interfaceTypes": [], + "importedObjectTypes": [ + { + "type": "Imported_NestedObjectType", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "Imported_ObjectType", + "name": "nestedObject", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_ObjectType", + "name": "nestedObject", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "comment": "Imported_NestedObjectType comment", + "uri": "imported.eth", + "namespace": "Imported", + "nativeType": "NestedObjectType" + }, + { + "type": "Imported_ObjectType", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "prop", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "imported.eth", + "namespace": "Imported", + "nativeType": "ObjectType" + } + ], + "importedModuleTypes": [], + "importedEnumTypes": [ + { + "type": "Imported_Enum", + "name": null, + "required": null, + "kind": 520, + "constants": [ + "STRING", + "BYTES" + ], + "comment": "Imported_Enum comment", + "uri": "imported.eth", + "namespace": "Imported", + "nativeType": "ImportedEnum" + } + ], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "method1", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "optU", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 18, + "array": { + "type": "[UInt]", + "name": "uArrayArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "[UInt]", + "name": "uArrayArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "UInt", + "name": "uArrayArray", + "required": null, + "kind": 4 + } + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "method1", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method1", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "method2", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "comment": "arg comment" + } + ], + "return": { + "type": "[Int32]", + "name": "method2", + "required": true, + "kind": 34, + "array": { + "type": "[Int32]", + "name": "method2", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Int32", + "name": "method2", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Int32", + "name": "method2", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + "comment": "method2 comment" + }, + { + "type": "Method", + "name": "localObjects", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "NestedObjectType", + "name": "nestedLocalObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "nestedLocalObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[NestedObjectType]", + "name": "localObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[NestedObjectType]", + "name": "localObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "localObjectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "NestedObjectType", + "name": "localObjectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "NestedObjectType", + "name": "localObjects", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "NestedObjectType", + "name": "localObjects", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "importedObjects", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Imported_NestedObjectType", + "name": "nestedLocalObject", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_NestedObjectType", + "name": "nestedLocalObject", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Imported_NestedObjectType]", + "name": "localObjectArray", + "required": null, + "kind": 34, + "array": { + "type": "[Imported_NestedObjectType]", + "name": "localObjectArray", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_NestedObjectType", + "name": "localObjectArray", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Imported_NestedObjectType", + "name": "localObjectArray", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Imported_NestedObjectType", + "name": "importedObjects", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Imported_NestedObjectType", + "name": "importedObjects", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [ + { + "type": "Imported_NestedObjectType" + }, + { + "type": "Imported_ObjectType" + } + ], + "interfaces": [], + "comment": "Module comment" + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql deleted file mode 100644 index 1227024452..0000000000 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/schema.graphql +++ /dev/null @@ -1,160 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -enum CustomEnum { - STRING - BYTES -} - -""" -Module comment -""" -type Module @imports( - types: [ - "Imported_NestedObjectType", - "Imported_ObjectType" - ] -) { - method1( - str: String! - optStr: String - u: UInt! - optU: UInt - uArrayArray: [[UInt]]! - ): String! - -""" -method2 comment -""" - method2( -""" -arg comment -""" - arg: [String!]! - ): [Int32!]! - - localObjects( - nestedLocalObject: NestedObjectType - localObjectArray: [NestedObjectType!] - ): NestedObjectType - - importedObjects( - nestedLocalObject: Imported_NestedObjectType - localObjectArray: [Imported_NestedObjectType!] - ): Imported_NestedObjectType -} - -""" -CustomType comment -""" -type CustomType { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - u16: UInt16! - u32: UInt32! - i: Int! - i8: Int8! - i16: Int16! - i32: Int32! - bytes: Bytes! - uArray: [UInt!]! - uOptArray: [UInt!] - optUOptArray: [UInt] - optStrOptArray: [String] - uArrayArray: [[UInt!]!]! - uOptArrayOptArray: [[UInt32]]! - uArrayOptArrayArray: [[[UInt32!]!]]! - crazyArray: [[[[UInt32!]]!]] - object: ObjectType! - optObject: ObjectType - nestedObject: NestedObjectType! - optNestedObject: NestedObjectType - optNestedObjectArray: [NestedObjectType]! - importedNestedObject: Imported_NestedObjectType! - optImportedNestedObjectArray: [Imported_NestedObjectType]! - enum: CustomEnum! - optEnum: CustomEnum - importedEnum: Imported_Enum! -""" -optImportedEnum comment -""" - optImportedEnum: Imported_Enum -} - -type NestedObjectType { - nestedObject: ObjectType! -} - -type ObjectType { - prop: String! -} - -""" -Imported_NestedObjectType comment -""" -type Imported_NestedObjectType @imported( - uri: "imported.eth", - namespace: "Imported", - nativeType: "NestedObjectType" -) { - nestedObject: Imported_ObjectType! -} - -type Imported_ObjectType @imported( - uri: "imported.eth", - namespace: "Imported", - nativeType: "ObjectType" -) { - prop: String! -} - -""" -Imported_Enum comment -""" -enum Imported_Enum @imported( - namespace: "Imported", - uri: "imported.eth", - nativeType: "ImportedEnum" -) { - STRING - BYTES -} diff --git a/packages/test-cases/cases/compose/sanity/output/module.graphql b/packages/test-cases/cases/compose/sanity/output/module.graphql deleted file mode 100644 index 92196a669d..0000000000 --- a/packages/test-cases/cases/compose/sanity/output/module.graphql +++ /dev/null @@ -1,461 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -""" -Module comment -""" -type Module implements Interface_Module @imports( - types: [ - "Namespace_Module", - "Namespace_NestedObjectType", - "Namespace_ObjectType", - "Namespace_Imported_NestedObjectType", - "Namespace_Imported_ObjectType", - "Namespace_CustomType", - "Namespace_CustomEnum", - "Namespace_Imported_Enum", - "JustModule_Module", - "Interface_InterfaceObject1", - "Interface_InterfaceObject2", - "Interface_Object", - "Interface_NestedInterfaceObject", - "Interface_Module", - "Interface_ModuleInterfaceArgument", - "Interface_NestedModuleInterfaceArgument" - ] -) @capability( - type: "getImplementations", - uri: "test.eth", - namespace: "Namespace" -) { - """ - method1 comment - """ - method1( - """ - str comment - """ - str: String! - """ - optStr comment - """ - optStr: String - u: UInt! - """ - uArrayArray comment - """ - uArrayArray: [[UInt]]! - """ - implObject comment - """ - implObject: LocalImplementationObject! - """ - Map comment - """ - map: Map! @annotate(type: "Map!") - ): String! - - """ - method2 comment - """ - method2( - arg: [String!]! - ): [Int32!]! - - abstractModuleMethod( - arg: Interface_ModuleInterfaceArgument! - ): Interface_InterfaceObject2! -} - -type Env { - foo: String! -} - -""" -CustomModuleType multi-line comment -line 2 -""" -type CustomModuleType { - """ - str comment - """ - str: String! - """ - optStr comment - """ - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - i: Int! - i8: Int8! - bytes: Bytes! - uArray: [UInt!]! - uOptArray: [UInt!] - optStrOptArray: [String] - """ - crazyArray comment - """ - crazyArray: [[[[UInt32!]]!]] - commonType: CommonType! - optMap: Map @annotate(type: "Map") - """ - customType comment - """ - customType: Namespace_CustomType! -} - -type AnotherModuleType { - prop: String -} - -type TypeFromInterface implements AnotherModuleType { - prop2: UInt32! - prop: String -} - -""" -ImplementationObject comment -""" -type ImplementationObject implements Interface_InterfaceObject1 & Interface_InterfaceObject2 { - """ - anotherProp comment - """ - anotherProp: String - str: String! - uint8: UInt8! - str2: String! - object: Interface_Object -} - -type LocalImplementationObject implements LocalInterfaceObject { - uint8: UInt8! - str: String! -} - -type LocalInterfaceObject { - str: String! -} - -""" -CommonType comment -""" -type CommonType { - prop: UInt8! - nestedObject: NestedType! - """ - objectArray comment - """ - objectArray: [[ArrayObject]]! - anotherLocal: AnotherLocal! -} - -""" -NestedType comment -""" -type NestedType { - prop: String! -} - -""" -ArrayObject comment -""" -type ArrayObject { - prop: String! -} - -type AnotherLocal { - prop: String! -} - -### Imported Modules START ### - -""" -Module comment -""" -type Namespace_Module @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "Module" -) @enabled_interface { - method1( - str: String! - optStr: String - u: UInt! - optU: UInt - uArrayArray: [[UInt]]! - ): String! - - """ - method2 comment - """ - method2( - """ - arg comment - """ - arg: [String!]! - ): [Int32!]! - - localObjects( - nestedLocalObject: Namespace_NestedObjectType - localObjectArray: [Namespace_NestedObjectType!] - ): Namespace_NestedObjectType - - importedObjects( - nestedLocalObject: Namespace_Imported_NestedObjectType - localObjectArray: [Namespace_Imported_NestedObjectType!] - ): Namespace_Imported_NestedObjectType -} - -type JustModule_Module @imported( - uri: "just.module.eth", - namespace: "JustModule", - nativeType: "Module" -) { - method( - arg: [String!]! - ): [Int32!]! -} - -""" -Module comment -""" -type Interface_Module @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "Module" -) { - """ - abstractModuleMethod comment - """ - abstractModuleMethod( - """ - arg comment - """ - arg: Interface_ModuleInterfaceArgument! - ): Interface_InterfaceObject2! -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Namespace_NestedObjectType @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "NestedObjectType" -) { - nestedObject: Namespace_ObjectType! -} - -type Namespace_ObjectType @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "ObjectType" -) { - prop: String! -} - -""" -Imported_NestedObjectType comment -""" -type Namespace_Imported_NestedObjectType @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_NestedObjectType" -) { - nestedObject: Namespace_Imported_ObjectType! -} - -type Namespace_Imported_ObjectType @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_ObjectType" -) { - prop: String! -} - -""" -CustomType comment -""" -type Namespace_CustomType @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "CustomType" -) { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - u16: UInt16! - u32: UInt32! - i: Int! - i8: Int8! - i16: Int16! - i32: Int32! - bytes: Bytes! - uArray: [UInt!]! - uOptArray: [UInt!] - optUOptArray: [UInt] - optStrOptArray: [String] - uArrayArray: [[UInt!]!]! - uOptArrayOptArray: [[UInt32]]! - uArrayOptArrayArray: [[[UInt32!]!]]! - crazyArray: [[[[UInt32!]]!]] - object: Namespace_ObjectType! - optObject: Namespace_ObjectType - nestedObject: Namespace_NestedObjectType! - optNestedObject: Namespace_NestedObjectType - optNestedObjectArray: [Namespace_NestedObjectType]! - importedNestedObject: Namespace_Imported_NestedObjectType! - optImportedNestedObjectArray: [Namespace_Imported_NestedObjectType]! - enum: Namespace_CustomEnum! - optEnum: Namespace_CustomEnum - importedEnum: Namespace_Imported_Enum! - """ - optImportedEnum comment - """ - optImportedEnum: Namespace_Imported_Enum -} - -""" -InterfaceObject1 comment -""" -type Interface_InterfaceObject1 @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "InterfaceObject1" -) { - str: String! - """ - InterfaceObject1_uint8 comment - """ - uint8: UInt8! -} - -""" -InterfaceObject2 comment -""" -type Interface_InterfaceObject2 implements Interface_NestedInterfaceObject @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "InterfaceObject2" -) { - str2: String! - object: Interface_Object -} - -""" -Object comment -""" -type Interface_Object @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "Object" -) { - uint8: UInt8! -} - -""" -NestedInterfaceObject comment -""" -type Interface_NestedInterfaceObject @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "NestedInterfaceObject" -) { - """ - object comment - """ - object: Interface_Object -} - -""" -ModuleInterfaceArgument comment -""" -type Interface_ModuleInterfaceArgument implements Interface_NestedModuleInterfaceArgument @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "ModuleInterfaceArgument" -) { - str: String! - """ - uint8 comment - """ - uint8: UInt8! -} - -""" -NestedModuleInterfaceArgument comment -""" -type Interface_NestedModuleInterfaceArgument @imported( - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "NestedModuleInterfaceArgument" -) { - uint8: UInt8! -} - -enum Namespace_CustomEnum @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "CustomEnum" -) { - STRING - BYTES -} - -""" -Imported_Enum comment -""" -enum Namespace_Imported_Enum @imported( - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_Enum" -) { - STRING - BYTES -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/sanity/output/module.ts b/packages/test-cases/cases/compose/sanity/output/module.ts index 5641d40213..77bef95a03 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.ts +++ b/packages/test-cases/cases/compose/sanity/output/module.ts @@ -579,7 +579,7 @@ export const abi: Abi = { uri: "test.eth", namespace: "Namespace", nativeType: "NestedObjectType", - type: "Namespace_NestedObjectType" + type: "Namespace_NestedObjectType", }), properties: [createObjectPropertyDefinition({ name: "nestedObject", type: "Namespace_ObjectType", required: true })], }, From 7bd56a031562a2f068a557968f42bb1275dbcd69 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Wed, 20 Jul 2022 21:51:45 +0200 Subject: [PATCH 13/56] chore(codegen-patch): plugins manifest builds && get manifest implemented --- package.json | 3 +- packages/cli/src/lib/SchemaComposer.ts | 16 +++---- packages/interfaces/file-system/package.json | 1 + packages/interfaces/ipfs/build-man/wrap.info | Bin 0 -> 2596 bytes packages/interfaces/ipfs/package.json | 1 + packages/interfaces/logger/package.json | 1 + packages/interfaces/uri-resolver/package.json | 1 + .../src/__tests__/core/plugin-wrapper.spec.ts | 36 +++------------- .../client/src/__tests__/core/sanity.spec.ts | 1 - .../src/__tests__/core/wasm-wrapper.spec.ts | 2 +- .../js/client/src/plugin/PluginWrapper.ts | 39 +++++++++++++++--- .../js/core/src/__tests__/resolveUri.spec.ts | 6 +-- packages/js/plugins/ethereum/package.json | 2 +- .../ethereum/src/__tests__/e2e.spec.ts | 2 +- packages/js/plugins/file-system/package.json | 1 + packages/js/plugins/graph-node/package.json | 1 + .../plugins/graph-node/polywrap.plugin.yaml | 3 ++ packages/js/plugins/http/package.json | 1 + packages/js/plugins/ipfs/package.json | 1 + packages/js/plugins/logger/package.json | 1 + .../js/plugins/logger/polywrap.plugin.yaml | 2 +- packages/js/plugins/sha3/package.json | 1 + .../uri-resolvers/ens-resolver/package.json | 1 + .../ens-resolver/polywrap.plugin.yaml | 4 +- .../uri-resolvers/ens-resolver/src/index.ts | 3 -- .../file-system-resolver/package.json | 1 + packages/js/plugins/uts46/package.json | 1 + .../wasm-as/simple-storage/polywrap.yaml | 3 ++ yarn.lock | 6 +-- 29 files changed, 80 insertions(+), 61 deletions(-) create mode 100644 packages/interfaces/ipfs/build-man/wrap.info diff --git a/package.json b/package.json index c218688ca3..4195243857 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,11 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli", + "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", + "build:plugins:patch": "cd packages/js/plugins/ethereum && yarn codegen:patch && cd ../http && yarn codegen:patch && lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", "build:cli": "lerna run build --scope polywrap", diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index dd89e883f9..2dcd43c2d3 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -55,7 +55,7 @@ export class SchemaComposer { resolvers: { external: (uri: string) => this._fetchExternalAbi(uri, import_redirects), - local: (path: string) => Promise.resolve(this._fetchLocalAbi(path)), + local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), }, }; @@ -99,12 +99,12 @@ export class SchemaComposer { } } - private _fetchLocalAbi(abiPath: string) { - const currentPath = path.isAbsolute(abiPath) - ? abiPath - : path.join(this._config.project.getManifestDir(), abiPath); - - const manifest = fs.readFileSync(currentPath); - return (deserializeWrapManifest(manifest).abi as unknown) as Abi; + private _fetchLocalSchema(schemaPath: string) { + return fs.readFileSync( + path.isAbsolute(schemaPath) + ? schemaPath + : path.join(this._config.project.getManifestDir(), schemaPath), + "utf-8" + ); } } diff --git a/packages/interfaces/file-system/package.json b/packages/interfaces/file-system/package.json index fe633fd27b..14dc27e197 100644 --- a/packages/interfaces/file-system/package.json +++ b/packages/interfaces/file-system/package.json @@ -4,6 +4,7 @@ "version": "0.2.0", "scripts": { "build": "node ../../../dependencies/node_modules/polywrap/bin/polywrap build", + "build:patch": "node ../../cli/bin/polywrap build", "lint": "eslint --color -c ../../../.eslintrc.js .", "test:env:up": "npx polywrap infra up --modules=eth-ens-ipfs", "test:env:down": "npx polywrap infra down --modules=eth-ens-ipfs", diff --git a/packages/interfaces/ipfs/build-man/wrap.info b/packages/interfaces/ipfs/build-man/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..af4cbeb25808b7c67f890a17fb7835e2de604af3 GIT binary patch literal 2596 zcmeHJL2eT<6a|SDr?6PTCMvLFg(`@YMU^T|4&aP`8q*njusuQ9v8VvSCeR~fGSdW6 z6(PZf#Yk-70KE+!dpb>;N#bktMe%5>czyF-$G49fLpLzEMc&a@NL4JA@EB*VW z1(N#%&_9u{Vul0AP6fP-r~s11N0gDzsF% z8^2Mk1A0rfKigVZW50e-DnW{)u9adrr@Nf{fSDQ44?-pG`mm3MZUOi$y)7V>bRO7E zZrf7R#gk{2B+}f(Q15CfP9ia-ei-p*o8~>%%?d# z_VCs6*g$$Z#o{o^t^H3W*g{OC+-8P@jj|#pZKk^1@(0~oAE}7|6$xgOb+S8DV8g4T znX8j%J%L7e|N1*J?|Dl>^cDtcgy!1GN~;B|=Hmc%nusFPsV1X&L0{0EE { map: new Map().set("a", 1).set("b", 2) }), manifest: { - schema: ``, + abi: {}, implements: [], }, }; @@ -71,7 +71,7 @@ describe("plugin-wrapper", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -84,32 +84,6 @@ describe("plugin-wrapper", () => { expect(pluginUris).toEqual([implementationUri].concat(defaultPlugins)); }); - test("getSchema -- plugin schema", async () => { - const testPluginUri = "ens/test-plugin.eth"; - const pluginSchema = "type Module { someMethod(arg: String): String }"; - - const pluginPackage = { - factory: () => ({} as PluginModule<{}>), - manifest: { - schema: pluginSchema, - implements: [], - }, - }; - - const client = new PolywrapClient({ - plugins: [ - { - uri: testPluginUri, - plugin: pluginPackage, - }, - ], - }); - - const schema: string = await client.getSchema(testPluginUri); - - expect(schema).toStrictEqual(pluginSchema); - }); - it("plugin map types", async () => { const implementationUri = "wrap://ens/some-implementation.eth"; const mockPlugin = mockMapPlugin(); @@ -162,7 +136,7 @@ describe("plugin-wrapper", () => { const pluginPackage = { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }; @@ -193,7 +167,7 @@ describe("plugin-wrapper", () => { const pluginPackage1 = { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }; @@ -201,7 +175,7 @@ describe("plugin-wrapper", () => { const pluginPackage2 = { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }; diff --git a/packages/js/client/src/__tests__/core/sanity.spec.ts b/packages/js/client/src/__tests__/core/sanity.spec.ts index 238ed5fade..d227bbe614 100644 --- a/packages/js/client/src/__tests__/core/sanity.spec.ts +++ b/packages/js/client/src/__tests__/core/sanity.spec.ts @@ -1,6 +1,5 @@ import { coreInterfaceUris, - PluginModule } from "@polywrap/core-js"; import { Uri, diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index 25e4c57c00..4acf982790 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -73,7 +73,7 @@ describe("wasm-wrapper", () => { return { factory: () => new MockPlugin({}), manifest: { - schema: ``, + abi: ``, implements: [], }, }; diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index fb2f099f0c..8456976f8c 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -10,12 +10,17 @@ import { Env, isBuffer, } from "@polywrap/core-js"; -import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { + deserializeWrapManifest, + WrapManifest, +} from "@polywrap/wrap-manifest-types-js"; import { msgpackDecode } from "@polywrap/msgpack-js"; import { Tracer } from "@polywrap/tracing-js"; +import fs from "fs"; export class PluginWrapper extends Wrapper { private _instance: PluginModule | undefined; + private _info: WrapManifest | undefined = undefined; constructor( private _uri: Uri, @@ -35,15 +40,37 @@ export class PluginWrapper extends Wrapper { public async getFile( _options: GetFileOptions, - _client: Client + _: Client ): Promise { - throw Error("client.getFile(...) is not implemented for Plugins."); + const file = await fs.promises.readFile(_options.path); + if (!file) { + throw Error( + `PluginWrapper: File was not found. \n Path: ${_options.path}` + ); + } + return file; } - public async getManifest(_client: Client): Promise { - throw Error("client.getManifest(...) is not implemented for Plugins."); - } + @Tracer.traceMethod("WasmWrapper: getManifest") + public async getManifest(_: Client): Promise { + if (this._info !== undefined) { + return this._info; + } + + const moduleManifest = "./wrap.info"; + const data = (await this.getFile( + { path: moduleManifest }, + _ + )) as Uint8Array; + + if (!data) { + throw Error(`Package manifest does not contain information`); + } + + this._info = deserializeWrapManifest(data); + return this._info; + } @Tracer.traceMethod("PluginWrapper: invoke") public async invoke( options: InvokeOptions, diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index 746f1c2c2d..0a497761d2 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -70,7 +70,7 @@ describe("resolveUri", () => { subscribe: < TData extends Record = Record >( - _options: SubscribeOptions, string | Uri> + _options: SubscribeOptions ): Subscription => { return { frequency: 0, @@ -182,7 +182,7 @@ describe("resolveUri", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [coreInterfaceUris.uriResolver], }, }, @@ -382,7 +382,7 @@ describe("resolveUri", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [coreInterfaceUris.uriResolver], }, }, diff --git a/packages/js/plugins/ethereum/package.json b/packages/js/plugins/ethereum/package.json index 437a1c623a..7e8beb825c 100644 --- a/packages/js/plugins/ethereum/package.json +++ b/packages/js/plugins/ethereum/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", - "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --detectOpenHandles --verbose", diff --git a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts index b7f534c117..6f406dfde9 100644 --- a/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ethereum/src/__tests__/e2e.spec.ts @@ -1,5 +1,5 @@ import { ethereumPlugin } from ".."; -import * as Schema from "../wrap"; +import * as Schema from "../wrap-man"; import { PolywrapClient, defaultIpfsProviders } from "@polywrap/client-js"; import { ensResolverPlugin } from "@polywrap/ens-resolver-plugin-js"; diff --git a/packages/js/plugins/file-system/package.json b/packages/js/plugins/file-system/package.json index e0c6f9c0a5..d224a0284c 100644 --- a/packages/js/plugins/file-system/package.json +++ b/packages/js/plugins/file-system/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/graph-node/package.json b/packages/js/plugins/graph-node/package.json index 1c9b4196df..b690523d2f 100644 --- a/packages/js/plugins/graph-node/package.json +++ b/packages/js/plugins/graph-node/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/graph-node/polywrap.plugin.yaml b/packages/js/plugins/graph-node/polywrap.plugin.yaml index 9a9c373675..62ac6f755c 100644 --- a/packages/js/plugins/graph-node/polywrap.plugin.yaml +++ b/packages/js/plugins/graph-node/polywrap.plugin.yaml @@ -3,3 +3,6 @@ language: plugin/typescript name: GraphNode module: ./src/index.ts schema: ./src/schema.graphql +import_redirects: + - uri: "ens/http.polywrap.eth" + schema: ../http/build/wrap.info diff --git a/packages/js/plugins/http/package.json b/packages/js/plugins/http/package.json index 733d9e81af..23422d8b58 100644 --- a/packages/js/plugins/http/package.json +++ b/packages/js/plugins/http/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/ipfs/package.json b/packages/js/plugins/ipfs/package.json index 5de7a94fe2..fe2c43f0d5 100644 --- a/packages/js/plugins/ipfs/package.json +++ b/packages/js/plugins/ipfs/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/logger/package.json b/packages/js/plugins/logger/package.json index ee9a8af794..d59d00e3c8 100644 --- a/packages/js/plugins/logger/package.json +++ b/packages/js/plugins/logger/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/logger/polywrap.plugin.yaml b/packages/js/plugins/logger/polywrap.plugin.yaml index fda8c966e5..78a68ffce6 100644 --- a/packages/js/plugins/logger/polywrap.plugin.yaml +++ b/packages/js/plugins/logger/polywrap.plugin.yaml @@ -5,4 +5,4 @@ module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/logger.core.polywrap.eth" - schema: ../../../interfaces/logger/src/schema.graphql + schema: ../../../interfaces/logger/build-man/wrap.info diff --git a/packages/js/plugins/sha3/package.json b/packages/js/plugins/sha3/package.json index 8c7cd5f113..eb45f1e15c 100644 --- a/packages/js/plugins/sha3/package.json +++ b/packages/js/plugins/sha3/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/package.json b/packages/js/plugins/uri-resolvers/ens-resolver/package.json index 5095dc0e8d..6b00f312ab 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/ens-resolver/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml index 53f1288e7a..a692071d00 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml @@ -5,4 +5,6 @@ module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/uri-resolver.core.polywrap.eth" - schema: ../../../../interfaces/uri-resolver/src/schema.graphql + schema: ../../../../interfaces/uri-resolver/build-man/wrap.info + - uri: "ens/ethereum.polywrap.eth" + schema: ../../ethereum/build/wrap.info diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts index f65dc7a7f9..e0c5448d65 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/index.ts @@ -209,6 +209,3 @@ export const ensResolverPlugin: PluginFactory = ( }; export const plugin = ensResolverPlugin; - - -export const abi = {"objectTypes":[],"enumTypes":[],"interfaceTypes":[],"importedObjectTypes":[{"type":"UriResolver_MaybeUriOrManifest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"uri","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"uri","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Bytes","name":"manifest","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"manifest","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"MaybeUriOrManifest"},{"type":"Ethereum_Connection","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"node","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"node","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"networkNameOrChainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"networkNameOrChainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Connection"},{"type":"Ethereum_TxOverrides","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxOverrides"},{"type":"Ethereum_StaticTxResult","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"result","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"result","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"error","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"error","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"StaticTxResult"},{"type":"Ethereum_TxRequest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxRequest"},{"type":"Ethereum_TxReceipt","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"contractAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"contractAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"root","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"root","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"logsBloom","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"logsBloom","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":34,"array":{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"byzantium","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"byzantium","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"status","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"status","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxReceipt"},{"type":"Ethereum_Log","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"removed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"removed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"topics","required":true,"kind":34,"array":{"type":"[String]","name":"topics","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"topics","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"topics","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"logIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"logIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Log"},{"type":"Ethereum_EventNotification","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Log","name":"log","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"log","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"EventNotification"},{"type":"Ethereum_Network","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"name","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"name","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"ensAddress","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"ensAddress","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Network"},{"type":"Ethereum_TxResponse","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"hash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"hash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timestamp","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timestamp","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"raw","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"raw","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"r","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"r","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"s","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"s","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"v","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"v","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":34,"array":{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxResponse"},{"type":"Ethereum_Access","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"storageKeys","required":true,"kind":34,"array":{"type":"[String]","name":"storageKeys","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"storageKeys","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"storageKeys","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Access"}],"importedModuleTypes":[{"type":"UriResolver_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"Module","isInterface":false},{"type":"Ethereum_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"callContractView","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"callContractView","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"callContractView","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractStatic","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getBalance","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeParams","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeParams","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeParams","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeFunction","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeFunction","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeFunction","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityPack","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityPack","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityPack","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityKeccak256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityKeccak256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityKeccak256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"soliditySha256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"soliditySha256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"soliditySha256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerAddress","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"getSignerAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"getSignerAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerBalance","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerTransactionCount","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getGasPrice","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateTransactionGas","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateContractCallGas","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"checkAddress","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Boolean","name":"checkAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"checkAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toWei","required":true,"kind":64,"arguments":[{"type":"String","name":"eth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"eth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"toWei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"toWei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toEth","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"wei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"wei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"toEth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"toEth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"awaitTransaction","required":true,"kind":64,"arguments":[{"type":"String","name":"txHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"txHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"waitForEvent","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"event","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"event","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getNetwork","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethod","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethodAndWait","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransaction","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransactionAndWait","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"deployContract","required":true,"kind":64,"arguments":[{"type":"String","name":"abi","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"abi","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"bytecode","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"bytecode","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"deployContract","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"deployContract","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"signMessage","required":true,"kind":64,"arguments":[{"type":"String","name":"message","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"message","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"signMessage","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"signMessage","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendRPC","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"params","required":true,"kind":34,"array":{"type":"[String]","name":"params","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"params","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"params","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"sendRPC","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"sendRPC","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Module","isInterface":false}],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[{"type":"UriResolver_Module"},{"type":"UriResolver_MaybeUriOrManifest"},{"type":"Ethereum_Module"},{"type":"Ethereum_Connection"},{"type":"Ethereum_TxOverrides"},{"type":"Ethereum_StaticTxResult"},{"type":"Ethereum_TxRequest"},{"type":"Ethereum_TxReceipt"},{"type":"Ethereum_Log"},{"type":"Ethereum_EventNotification"},{"type":"Ethereum_Network"},{"type":"Ethereum_TxResponse"},{"type":"Ethereum_Access"}],"interfaces":[{"type":"UriResolver_Module","name":null,"required":null,"kind":2048,"array":null,"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}]}} \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/package.json b/packages/js/plugins/uri-resolvers/file-system-resolver/package.json index 3041a3bbee..233c86b6d3 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/js/plugins/uts46/package.json b/packages/js/plugins/uts46/package.json index 404b1ba119..8a4c3d4d85 100644 --- a/packages/js/plugins/uts46/package.json +++ b/packages/js/plugins/uts46/package.json @@ -14,6 +14,7 @@ "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", "codegen": "node ../../../../dependencies/node_modules/polywrap/bin/polywrap plugin codegen", + "codegen:patch": "node ../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index ba44448b32..3262ed4726 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -5,3 +5,6 @@ build: ./polywrap.build.yaml meta: ./polywrap.meta.yaml schema: ./schema.graphql module: ./src/index.ts +import_redirects: + - uri: "wrap://ens/ethereum.polywrap.eth" + schema: ../../../../../js/plugins/ethereum/build-man/wrap.info diff --git a/yarn.lock b/yarn.lock index b1b7640bdd..1c5fb0c4e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7272,9 +7272,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.188: - version "1.4.194" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.194.tgz#2f83fcec5067907044a3d502ac7c3efb1fe6430b" - integrity sha512-ola5UH0xAP1oYY0FFUsPvwtucEzCQHucXnT7PQ1zjHJMccZhCDktEugI++JUR3YuIs7Ff7afz+OVEhVAIMhLAQ== + version "1.4.195" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.195.tgz#139b2d95a42a3f17df217589723a1deac71d1473" + integrity sha512-vefjEh0sk871xNmR5whJf9TEngX+KTKS3hOHpjoMpauKkwlGwtMz1H8IaIjAT/GNnX0TbGwAdmVoXCAzXf+PPg== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" From d5b5462eeb7f25379c80b5160411d55b4b5db0fe Mon Sep 17 00:00:00 2001 From: cbrzn Date: Thu, 21 Jul 2022 15:40:04 +0200 Subject: [PATCH 14/56] feat(polywrap-manifests): support wrap manifiest instead of schema.graphql in imported redirects --- packages/cli/src/lib/SchemaComposer.ts | 9 +- packages/cli/src/lib/project/AppProject.ts | 9 +- packages/cli/src/lib/project/PluginProject.ts | 9 +- .../cli/src/lib/project/PolywrapProject.ts | 9 +- packages/cli/src/lib/project/Project.ts | 14 ++- .../src/formats/polywrap.app/0.1.1.ts | 40 ++++++ .../src/formats/polywrap.app/index.ts | 10 +- .../src/formats/polywrap.app/migrate.ts | 13 +- .../polywrap.app/migrators/0.1.0_to_0.1.1.ts | 10 ++ .../src/formats/polywrap.app/validate.ts | 2 + .../src/formats/polywrap.plugin/0.1.1.ts | 44 +++++++ .../src/formats/polywrap.plugin/index.ts | 10 +- .../src/formats/polywrap.plugin/migrate.ts | 13 +- .../migrators/0.1.0_to_0.1.1.ts | 10 ++ .../src/formats/polywrap.plugin/validate.ts | 2 + .../polywrap/src/formats/polywrap/0.1.1.ts | 56 +++++++++ .../polywrap/src/formats/polywrap/index.ts | 10 +- .../polywrap/src/formats/polywrap/migrate.ts | 13 +- .../polywrap/migrators/0.1.0_to_0.1.1.ts | 10 ++ .../polywrap/src/formats/polywrap/validate.ts | 2 + .../polywrap/formats/polywrap.app/0.1.1.json | 57 +++++++++ .../formats/polywrap.plugin/0.1.1.json | 62 ++++++++++ .../polywrap/formats/polywrap/0.1.1.json | 77 ++++++++++++ .../compose/src/__tests__/test-cases.spec.ts | 4 + .../build-cmd/010-custom-config/config.ts | 114 +++++++++++++++++- .../wasm-as/simple-storage/package.json | 5 +- .../wasm-as/simple-storage/polywrap.yaml | 4 +- 27 files changed, 567 insertions(+), 51 deletions(-) create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1.0_to_0.1.1.ts create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1.0_to_0.1.1.ts create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts create mode 100644 packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1.0_to_0.1.1.ts create mode 100644 packages/manifests/polywrap/formats/polywrap.app/0.1.1.json create mode 100644 packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json create mode 100644 packages/manifests/polywrap/formats/polywrap/0.1.1.json diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 2dcd43c2d3..8017975841 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { Project, AnyProjectManifest } from "./"; +import { Project, AnyProjectManifest, ImportRedirects } from "./"; import { Uri, PolywrapClient } from "@polywrap/client-js"; import { @@ -69,10 +69,7 @@ export class SchemaComposer { private async _fetchExternalAbi( uri: string, - import_redirects?: { - uri: string; - schema: string; - }[] + import_redirects?: ImportRedirects ): Promise { // Check to see if we have any import redirects that match if (import_redirects) { @@ -82,7 +79,7 @@ export class SchemaComposer { if (Uri.equals(redirectUri, uriParsed)) { const manifest = fs.readFileSync( - path.join(this._config.project.getManifestDir(), redirect.schema) + path.join(this._config.project.getManifestDir(), redirect.info) ); // TODO: Remove this once ABI JSON Schema has been implemented return (deserializeWrapManifest(manifest).abi as unknown) as Abi; diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index 13002c3a25..ef7471fae5 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -1,4 +1,4 @@ -import { Project, ProjectConfig } from "."; +import { ImportRedirects, Project, ProjectConfig } from "."; import { AppManifestLanguage, appManifestLanguages, @@ -94,12 +94,7 @@ export class AppProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise< - { - uri: string; - schema: string; - }[] - > { + public async getImportRedirects(): Promise { const manifest = await this.getManifest(); return manifest.import_redirects || []; } diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index 117b580d7a..a56db9d46c 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -1,4 +1,4 @@ -import { ProjectConfig, Project } from "."; +import { ProjectConfig, Project, ImportRedirects } from "."; import { loadPluginManifest, PluginManifestLanguage, @@ -94,12 +94,7 @@ export class PluginProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise< - { - uri: string; - schema: string; - }[] - > { + public async getImportRedirects(): Promise { const manifest = await this.getManifest(); return manifest.import_redirects || []; } diff --git a/packages/cli/src/lib/project/PolywrapProject.ts b/packages/cli/src/lib/project/PolywrapProject.ts index a29539a2cb..3db94a9730 100644 --- a/packages/cli/src/lib/project/PolywrapProject.ts +++ b/packages/cli/src/lib/project/PolywrapProject.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/naming-convention */ -import { Project, ProjectConfig } from "."; +import { ImportRedirects, Project, ProjectConfig } from "."; import { isPolywrapManifestLanguage, loadBuildManifest, @@ -135,12 +135,7 @@ export class PolywrapProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise< - { - uri: string; - schema: string; - }[] - > { + public async getImportRedirects(): Promise { const manifest = await this.getManifest(); return manifest.import_redirects || []; } diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index cb3b00ca39..3565a1f8c8 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -14,6 +14,13 @@ export interface ProjectConfig { quiet?: boolean; } +export interface ImportRedirect { + uri: string; + info: string; +} + +export type ImportRedirects = Array; + export abstract class Project { protected _cache: CacheDirectory; @@ -60,12 +67,7 @@ export abstract class Project { public abstract getSchemaNamedPath(): Promise; - public abstract getImportRedirects(): Promise< - { - uri: string; - schema: string; - }[] - >; + public abstract getImportRedirects(): Promise; public abstract generateSchemaBindings( abi: Abi, diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts new file mode 100644 index 0000000000..2bcf4f5987 --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts @@ -0,0 +1,40 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface AppManifest { + /** + * Polywrap app manifest format version. + */ + format: "0.1.0"; + /** + * Name of this wrapper package. + */ + name: string; + /** + * Language in which the source code is written. + */ + language: string; + /** + * Path to graphql schema. + */ + schema: string; + /** + * Redirects for the manifest's imports. + */ + import_redirects?: { + /** + * Import URI to be redirected. + */ + uri: string; + /** + * Path to a WRAP Manifest to be used for the import. + */ + info: string; + }[]; + __type: "AppManifest"; +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/index.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/index.ts index a63e100cb7..f7667ee5cb 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/index.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/index.ts @@ -8,21 +8,27 @@ import { AppManifest as AppManifest0_1_0 } from "./0.1.0"; +import { + AppManifest as AppManifest0_1_1 +} from "./0.1.1"; export { AppManifest0_1_0, + AppManifest0_1_1, }; export enum AppManifestFormats { "0.1.0" = "0.1.0", + "0.1.1" = "0.1.1", } export type AnyAppManifest = | AppManifest0_1_0 + | AppManifest0_1_1 -export type AppManifest = AppManifest0_1_0; +export type AppManifest = AppManifest0_1_1; -export const latestAppManifestFormat = AppManifestFormats["0.1.0"] +export const latestAppManifestFormat = AppManifestFormats["0.1.1"] export { migrateAppManifest } from "./migrate"; diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/migrate.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrate.ts index 8098e613ec..0437e749d5 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/migrate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrate.ts @@ -11,12 +11,16 @@ import { latestAppManifestFormat } from "."; +import { + migrate as migrate_0_1_0_to_0_1_1 +} from "./migrators/0.1.0_to_0.1.1"; type Migrator = { [key in AppManifestFormats]?: (m: AnyAppManifest) => AppManifest; }; export const migrators: Migrator = { + "0.1.0": migrate_0_1_0_to_0_1_1, }; export function migrateAppManifest( @@ -33,5 +37,12 @@ export function migrateAppManifest( throw new Error(`Unrecognized AppManifestFormat "${manifest.format}"`); } - throw new Error(`This should never happen, AppManifest migrators is empty. from: ${from}, to: ${to}`); + const migrator = migrators[from]; + if (!migrator) { + throw new Error( + `Migrator from AppManifestFormat "${from}" to "${to}" is not available` + ); + } + + return migrator(manifest); } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1.0_to_0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1.0_to_0.1.1.ts new file mode 100644 index 0000000000..2e5de22ced --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1.0_to_0.1.1.ts @@ -0,0 +1,10 @@ +/* eslint-disable @typescript-eslint/naming-convention */ + +import { AppManifest as OldManifest } from "../0.1.0"; +import { AppManifest as NewManifest } from "../0.1.1"; + +export function migrate(_: OldManifest): NewManifest { + throw new Error( + "Polywrap App Manifest file is deprecated. Please update to 0.1.1" + ); +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/validate.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/validate.ts index 0b6c336798..65bdd08033 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/validate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/validate.ts @@ -10,6 +10,7 @@ import { } from "."; import schema_0_1_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.app/0.1.0.json"; +import schema_0_1_1 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.app/0.1.1.json"; import { Schema, @@ -24,6 +25,7 @@ type AppManifestSchemas = { const schemas: AppManifestSchemas = { "0.1.0": schema_0_1_0, + "0.1.1": schema_0_1_1, }; const validator = new Validator(); diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts new file mode 100644 index 0000000000..687b1d6cc5 --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts @@ -0,0 +1,44 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface PluginManifest { + /** + * Polywrap plugin manifest format version. + */ + format: "0.1.0"; + /** + * Plugin name. + */ + name: string; + /** + * Plugin language. + */ + language: string; + /** + * Path to Polywrap implementation. + */ + module?: string; + /** + * Path to graphql schema. + */ + schema: string; + /** + * Redirects source URI to local wrapper or plugin. + */ + import_redirects?: { + /** + * Source URI that needs to be redirected. + */ + uri: string; + /** + * Path to Wrap Manifest of the module to which URI will be redirected. + */ + info: string; + }[]; + __type: "PluginManifest"; +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/index.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/index.ts index 3975798bed..4f3f5853c5 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/index.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/index.ts @@ -8,21 +8,27 @@ import { PluginManifest as PluginManifest0_1_0 } from "./0.1.0"; +import { + PluginManifest as PluginManifest0_1_1 +} from "./0.1.1"; export { PluginManifest0_1_0, + PluginManifest0_1_1, }; export enum PluginManifestFormats { "0.1.0" = "0.1.0", + "0.1.1" = "0.1.1", } export type AnyPluginManifest = | PluginManifest0_1_0 + | PluginManifest0_1_1 -export type PluginManifest = PluginManifest0_1_0; +export type PluginManifest = PluginManifest0_1_1; -export const latestPluginManifestFormat = PluginManifestFormats["0.1.0"] +export const latestPluginManifestFormat = PluginManifestFormats["0.1.1"] export { migratePluginManifest } from "./migrate"; diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrate.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrate.ts index f66819b7b7..d3ae51bb9a 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrate.ts @@ -11,12 +11,16 @@ import { latestPluginManifestFormat } from "."; +import { + migrate as migrate_0_1_0_to_0_1_1 +} from "./migrators/0.1.0_to_0.1.1"; type Migrator = { [key in PluginManifestFormats]?: (m: AnyPluginManifest) => PluginManifest; }; export const migrators: Migrator = { + "0.1.0": migrate_0_1_0_to_0_1_1, }; export function migratePluginManifest( @@ -33,5 +37,12 @@ export function migratePluginManifest( throw new Error(`Unrecognized PluginManifestFormat "${manifest.format}"`); } - throw new Error(`This should never happen, PluginManifest migrators is empty. from: ${from}, to: ${to}`); + const migrator = migrators[from]; + if (!migrator) { + throw new Error( + `Migrator from PluginManifestFormat "${from}" to "${to}" is not available` + ); + } + + return migrator(manifest); } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1.0_to_0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1.0_to_0.1.1.ts new file mode 100644 index 0000000000..f2bac55f9f --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1.0_to_0.1.1.ts @@ -0,0 +1,10 @@ +/* eslint-disable @typescript-eslint/naming-convention */ + +import { PluginManifest as OldManifest } from "../0.1.0"; +import { PluginManifest as NewManifest } from "../0.1.1"; + +export function migrate(_: OldManifest): NewManifest { + throw new Error( + "Plugin Polywrap manifest file is deprecated. Please update to 0.1.1" + ); +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/validate.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/validate.ts index f27ccb50cb..94ea30240a 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/validate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/validate.ts @@ -10,6 +10,7 @@ import { } from "."; import schema_0_1_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.plugin/0.1.0.json"; +import schema_0_1_1 from "@polywrap/polywrap-manifest-schemas/formats/polywrap.plugin/0.1.1.json"; import { Schema, @@ -24,6 +25,7 @@ type PluginManifestSchemas = { const schemas: PluginManifestSchemas = { "0.1.0": schema_0_1_0, + "0.1.1": schema_0_1_1, }; const validator = new Validator(); diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts new file mode 100644 index 0000000000..d5aa766969 --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts @@ -0,0 +1,56 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface PolywrapManifest { + /** + * Polywrap manifest format version. + */ + format: "0.1.0"; + /** + * Name of this wrapper package. + */ + name: string; + /** + * Path to the wrapper build manifest file. + */ + build?: string; + /** + * Path to wrapper metadata manifest file. + */ + meta?: string; + /** + * Path to wrapper deploy manifest file. + */ + deploy?: string; + /** + * Language in which the source code is written. + */ + language: string; + /** + * Path to the module's entry point. + */ + module?: string; + /** + * Path to the module's graphql schema. + */ + schema: string; + /** + * Redirects for the schema's imports. + */ + import_redirects?: { + /** + * Import URI to be redirected. + */ + uri: string; + /** + * Path to a WRAP manifest to be used for the import. + */ + info: string; + }[]; + __type: "PolywrapManifest"; +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/index.ts b/packages/js/manifests/polywrap/src/formats/polywrap/index.ts index 5a203b3833..2743c19e38 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/index.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/index.ts @@ -8,21 +8,27 @@ import { PolywrapManifest as PolywrapManifest0_1_0 } from "./0.1.0"; +import { + PolywrapManifest as PolywrapManifest0_1_1 +} from "./0.1.1"; export { PolywrapManifest0_1_0, + PolywrapManifest0_1_1, }; export enum PolywrapManifestFormats { "0.1.0" = "0.1.0", + "0.1.1" = "0.1.1", } export type AnyPolywrapManifest = | PolywrapManifest0_1_0 + | PolywrapManifest0_1_1 -export type PolywrapManifest = PolywrapManifest0_1_0; +export type PolywrapManifest = PolywrapManifest0_1_1; -export const latestPolywrapManifestFormat = PolywrapManifestFormats["0.1.0"] +export const latestPolywrapManifestFormat = PolywrapManifestFormats["0.1.1"] export { migratePolywrapManifest } from "./migrate"; diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/migrate.ts b/packages/js/manifests/polywrap/src/formats/polywrap/migrate.ts index fe25c1417f..840b3f1a9c 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/migrate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/migrate.ts @@ -11,12 +11,16 @@ import { latestPolywrapManifestFormat } from "."; +import { + migrate as migrate_0_1_0_to_0_1_1 +} from "./migrators/0.1.0_to_0.1.1"; type Migrator = { [key in PolywrapManifestFormats]?: (m: AnyPolywrapManifest) => PolywrapManifest; }; export const migrators: Migrator = { + "0.1.0": migrate_0_1_0_to_0_1_1, }; export function migratePolywrapManifest( @@ -33,5 +37,12 @@ export function migratePolywrapManifest( throw new Error(`Unrecognized PolywrapManifestFormat "${manifest.format}"`); } - throw new Error(`This should never happen, PolywrapManifest migrators is empty. from: ${from}, to: ${to}`); + const migrator = migrators[from]; + if (!migrator) { + throw new Error( + `Migrator from PolywrapManifestFormat "${from}" to "${to}" is not available` + ); + } + + return migrator(manifest); } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1.0_to_0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1.0_to_0.1.1.ts new file mode 100644 index 0000000000..a3b946ba68 --- /dev/null +++ b/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1.0_to_0.1.1.ts @@ -0,0 +1,10 @@ +/* eslint-disable @typescript-eslint/naming-convention */ + +import { PolywrapManifest as OldManifest } from "../0.1.0"; +import { PolywrapManifest as NewManifest } from "../0.1.1"; + +export function migrate(_: OldManifest): NewManifest { + throw new Error( + "Polywrap manifest file is deprecated. Please update to 0.1.1" + ); +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/validate.ts b/packages/js/manifests/polywrap/src/formats/polywrap/validate.ts index 77f253cdc5..d5eed54553 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/validate.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/validate.ts @@ -10,6 +10,7 @@ import { } from "."; import schema_0_1_0 from "@polywrap/polywrap-manifest-schemas/formats/polywrap/0.1.0.json"; +import schema_0_1_1 from "@polywrap/polywrap-manifest-schemas/formats/polywrap/0.1.1.json"; import { Schema, @@ -24,6 +25,7 @@ type PolywrapManifestSchemas = { const schemas: PolywrapManifestSchemas = { "0.1.0": schema_0_1_0, + "0.1.1": schema_0_1_1, }; const validator = new Validator(); diff --git a/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json b/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json new file mode 100644 index 0000000000..912b5ec1ae --- /dev/null +++ b/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json @@ -0,0 +1,57 @@ +{ + "id": "AppManifest", + "type": "object", + "additionalProperties": false, + "required": [ + "format", + "name", + "language", + "schema" + ], + "properties": { + "format": { + "description": "Polywrap app manifest format version.", + "type": "string", + "const": "0.1.0" + }, + "name": { + "description": "Name of this wrapper package.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\-\\_]+$" + }, + "language": { + "description": "Language in which the source code is written.", + "type": "string", + "pattern": "^app\\/[a-z0-9]+$" + }, + "schema": { + "description": "Path to graphql schema.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*$" + }, + "import_redirects": { + "description": "Redirects for the manifest's imports.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Import URI to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to a WRAP Manifest to be used for the import.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } + } + } +} diff --git a/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json b/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json new file mode 100644 index 0000000000..d327b171e4 --- /dev/null +++ b/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json @@ -0,0 +1,62 @@ +{ + "id": "PluginManifest", + "type": "object", + "additionalProperties": false, + "required": [ + "format", + "name", + "language", + "schema" + ], + "properties": { + "format": { + "description": "Polywrap plugin manifest format version.", + "type": "string", + "const": "0.1.0" + }, + "name": { + "description": "Plugin name.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\-\\_]+$" + }, + "language": { + "description" : "Plugin language.", + "type": "string", + "pattern": "^plugin\\/[a-z0-9]+$" + }, + "module": { + "description": "Path to Polywrap implementation.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*$" + }, + "schema": { + "description": "Path to graphql schema.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.graphql$" + }, + "import_redirects": { + "description": "Redirects source URI to local wrapper or plugin.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Source URI that needs to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } + } + } +} diff --git a/packages/manifests/polywrap/formats/polywrap/0.1.1.json b/packages/manifests/polywrap/formats/polywrap/0.1.1.json new file mode 100644 index 0000000000..431255241e --- /dev/null +++ b/packages/manifests/polywrap/formats/polywrap/0.1.1.json @@ -0,0 +1,77 @@ +{ + "id": "PolywrapManifest", + "type": "object", + "additionalProperties": false, + "required": [ + "format", + "name", + "schema", + "language" + ], + "properties": { + "format": { + "description": "Polywrap manifest format version.", + "type": "string", + "const": "0.1.0" + }, + "name": { + "description": "Name of this wrapper package.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\-\\_]+$" + }, + "build": { + "description": "Path to the wrapper build manifest file.", + "type": "string", + "pattern": "^\\.?\\.?(\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)*\\/[\\w\\-\\.]+\\.(yaml|json)$" + }, + "meta": { + "description": "Path to wrapper metadata manifest file.", + "type": "string", + "pattern": "^\\.?\\.?(\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)*\\/[\\w\\-\\.]+\\.(yaml|json)$" + }, + "deploy": { + "description": "Path to wrapper deploy manifest file.", + "type": "string", + "pattern": "^\\.?\\.?(\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)*\\/[\\w\\-\\.]+\\.(yaml|json)$" + }, + "language": { + "description": "Language in which the source code is written.", + "type": "string", + "pattern": "^interface|wasm\\/[a-z0-9]+$" + }, + "module": { + "description": "Path to the module's entry point.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*$" + }, + "schema": { + "description": "Path to the module's graphql schema.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.graphql$" + }, + "import_redirects": { + "description": "Redirects for the schema's imports.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Import URI to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to a WRAP manifest to be used for the import.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } + } + } +} diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index f11c51f223..69e871c73f 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,6 +34,10 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); + if (test.name === "001-local-imports 00-sanity") { + console.log(JSON.stringify(result, null, 2)) + } + if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/config.ts b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/config.ts index a51cd93907..bf5ec3d50d 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/config.ts +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/config.ts @@ -21,13 +21,115 @@ const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), manifest: { - schema: ` - type Module { - getData: Int! - setData(value: Int!): Boolean! - deployContract: String! + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getData", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "setData", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] } - `, + }, implements: [], }, }; diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json index c15ad4c071..78c2922f0e 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json @@ -1,8 +1,11 @@ { "name": "test-case-simple-storage", "private": true, + "scripts": { + "build": "../../../../../cli/bin/polywrap build" + }, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.2.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index 3262ed4726..04511d392f 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: SimpleStorage language: wasm/assemblyscript build: ./polywrap.build.yaml @@ -7,4 +7,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: "wrap://ens/ethereum.polywrap.eth" - schema: ../../../../../js/plugins/ethereum/build-man/wrap.info + info: ../../../../../js/plugins/ethereum/build-man/wrap.info From 267a3b6c8d8d7f94737fcd5aef1ffdfbb363a20a Mon Sep 17 00:00:00 2001 From: cbrzn Date: Thu, 21 Jul 2022 17:59:18 +0200 Subject: [PATCH 15/56] tests(plugins): green tests! --- .../src/formats/polywrap.app/0.1.1.ts | 2 +- .../src/formats/polywrap.plugin/0.1.1.ts | 2 +- .../polywrap/src/formats/polywrap/0.1.1.ts | 2 +- .../js/plugins/ethereum/polywrap.plugin.yaml | 2 +- .../src/__tests__/integration/polywrap.yaml | 5 +++- .../plugins/file-system/polywrap.plugin.yaml | 4 ++-- .../file-system/src/__tests__/e2e.spec.ts | 2 +- .../plugins/graph-node/polywrap.plugin.yaml | 4 ++-- packages/js/plugins/http/polywrap.plugin.yaml | 2 +- .../http/src/__tests__/e2e/e2e.spec.ts | 2 +- .../src/__tests__/e2e/integration.spec.ts | 2 +- .../__tests__/e2e/integration/polywrap.yaml | 5 +++- .../http/src/__tests__/unit/index.test.ts | 2 +- .../http/src/__tests__/unit/util.test.ts | 2 +- packages/js/plugins/ipfs/polywrap.plugin.yaml | 4 ++-- .../js/plugins/ipfs/src/__tests__/e2e.spec.ts | 2 +- .../js/plugins/logger/polywrap.plugin.yaml | 4 ++-- packages/js/plugins/sha3/polywrap.plugin.yaml | 2 +- .../ens-resolver/polywrap.plugin.yaml | 6 ++--- .../ens-resolver/src/__tests__/e2e.spec.ts | 13 ---------- .../file-system-resolver/polywrap.plugin.yaml | 6 ++--- .../src/__tests__/e2e.spec.ts | 11 +-------- .../uri-resolvers/ipfs-resolver/package.json | 2 +- .../ipfs-resolver/polywrap.plugin.yaml | 6 ++--- .../ipfs-resolver/src/__tests__/e2e.spec.ts | 15 +----------- .../js/plugins/uts46/polywrap.plugin.yaml | 2 +- .../polywrap/formats/polywrap.app/0.1.1.json | 2 +- .../formats/polywrap.plugin/0.1.1.json | 2 +- .../polywrap/formats/polywrap/0.1.1.json | 2 +- .../wasm/build-cmd/001-sanity/polywrap.yaml | 2 +- .../002-invalid-manifest-1/polywrap.yaml | 2 +- .../003-invalid-manifest-2/polywrap.yaml | 2 +- .../build-cmd/004-default-build/polywrap.yaml | 2 +- .../005-default-dockerfile/polywrap.yaml | 2 +- .../006-custom-dockerfile/polywrap.yaml | 2 +- .../007-linked-packages/polywrap.yaml | 2 +- .../wasm/build-cmd/008-metadata/polywrap.yaml | 2 +- .../build-cmd/009-docker-buildx/polywrap.yaml | 2 +- .../build-cmd/010-custom-config/package.json | 2 +- .../010-custom-config/polywrap.build.yaml | 2 +- .../build-cmd/010-custom-config/polywrap.yaml | 2 +- .../011-custom-config/polywrap.custom.yaml | 2 +- .../wasm-as/simple-storage/polywrap.yaml | 2 +- yarn.lock | 24 +++++++++---------- 44 files changed, 70 insertions(+), 99 deletions(-) diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts index 2bcf4f5987..2501f4e921 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.1.1.ts @@ -10,7 +10,7 @@ export interface AppManifest { /** * Polywrap app manifest format version. */ - format: "0.1.0"; + format: "0.1.1"; /** * Name of this wrapper package. */ diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts index 687b1d6cc5..efda671da2 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.1.1.ts @@ -10,7 +10,7 @@ export interface PluginManifest { /** * Polywrap plugin manifest format version. */ - format: "0.1.0"; + format: "0.1.1"; /** * Plugin name. */ diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts b/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts index d5aa766969..317fbda126 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/0.1.1.ts @@ -10,7 +10,7 @@ export interface PolywrapManifest { /** * Polywrap manifest format version. */ - format: "0.1.0"; + format: "0.1.1"; /** * Name of this wrapper package. */ diff --git a/packages/js/plugins/ethereum/polywrap.plugin.yaml b/packages/js/plugins/ethereum/polywrap.plugin.yaml index 0e33040206..f6decccb96 100644 --- a/packages/js/plugins/ethereum/polywrap.plugin.yaml +++ b/packages/js/plugins/ethereum/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 language: plugin/typescript name: Ethereum module: ./src/index.ts diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml index d9531cd03f..59f3455fba 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml @@ -1,7 +1,10 @@ -format: 0.1.0 +format: 0.1.1 name: EthereumIntegration build: ./polywrap.build.yaml language: wasm/assemblyscript module: ./src/index.ts schema: ./src/schema.graphql +import_redirects: + - uri: "wrap://ens/ethereum.polywrap.eth" + info: ../../../build/wrap.info diff --git a/packages/js/plugins/file-system/polywrap.plugin.yaml b/packages/js/plugins/file-system/polywrap.plugin.yaml index 4963c36df7..b03a1f9fbd 100644 --- a/packages/js/plugins/file-system/polywrap.plugin.yaml +++ b/packages/js/plugins/file-system/polywrap.plugin.yaml @@ -1,8 +1,8 @@ -format: 0.1.0 +format: 0.1.1 language: plugin/typescript name: FileSystem module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/fs.polywrap.eth" - schema: ../../../interfaces/file-system/build-man/wrap.info + info: ../../../interfaces/file-system/build-man/wrap.info diff --git a/packages/js/plugins/file-system/src/__tests__/e2e.spec.ts b/packages/js/plugins/file-system/src/__tests__/e2e.spec.ts index f11cf30524..071972bcb2 100644 --- a/packages/js/plugins/file-system/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/file-system/src/__tests__/e2e.spec.ts @@ -1,6 +1,6 @@ import { fileSystemPlugin } from "../index"; import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; -import { FileSystem_Module, FileSystem_EncodingEnum } from "../wrap"; +import { FileSystem_Module, FileSystem_EncodingEnum } from "../wrap-man"; import fs from "fs"; import path from "path"; import fileSystemEncodingToBufferEncoding from "../utils/fileSystemEncodingToBufferEncoding"; diff --git a/packages/js/plugins/graph-node/polywrap.plugin.yaml b/packages/js/plugins/graph-node/polywrap.plugin.yaml index 62ac6f755c..4b6ceded40 100644 --- a/packages/js/plugins/graph-node/polywrap.plugin.yaml +++ b/packages/js/plugins/graph-node/polywrap.plugin.yaml @@ -1,8 +1,8 @@ -format: 0.1.0 +format: 0.1.1 language: plugin/typescript name: GraphNode module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/http.polywrap.eth" - schema: ../http/build/wrap.info + info: ../http/build/wrap.info diff --git a/packages/js/plugins/http/polywrap.plugin.yaml b/packages/js/plugins/http/polywrap.plugin.yaml index e0ee16c4d5..e5fab6a97c 100644 --- a/packages/js/plugins/http/polywrap.plugin.yaml +++ b/packages/js/plugins/http/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 language: plugin/typescript name: Http module: ./src/index.ts diff --git a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts index 13b0a0cdc6..45ff5f6a45 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/e2e.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../wrap"; +import { Response } from "../../wrap-man"; import { PolywrapClient } from "@polywrap/client-js" import nock from "nock"; diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts index a611f67a21..ef2329c01b 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts +++ b/packages/js/plugins/http/src/__tests__/e2e/integration.spec.ts @@ -1,5 +1,5 @@ import { httpPlugin } from "../.."; -import { Response } from "../../wrap"; +import { Response } from "../../wrap-man"; import { PolywrapClient } from "@polywrap/client-js" import { diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml index cdaf999037..28a362752f 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml @@ -1,6 +1,9 @@ -format: 0.1.0 +format: 0.1.1 name: HTTP-Integration build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts +import_redirects: + - uri: "wrap://ens/http.polywrap.eth" + info: ../../../../build/wrap.info \ No newline at end of file diff --git a/packages/js/plugins/http/src/__tests__/unit/index.test.ts b/packages/js/plugins/http/src/__tests__/unit/index.test.ts index 1bdbcbe243..92408db302 100644 --- a/packages/js/plugins/http/src/__tests__/unit/index.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/index.test.ts @@ -1,5 +1,5 @@ import { HttpPlugin } from "../.."; -import { ResponseTypeEnum, Client } from "../../wrap"; +import { ResponseTypeEnum, Client } from "../../wrap-man"; import axios, { AxiosResponse, AxiosRequestConfig } from "axios"; diff --git a/packages/js/plugins/http/src/__tests__/unit/util.test.ts b/packages/js/plugins/http/src/__tests__/unit/util.test.ts index 5e32775cb8..010aaa3440 100644 --- a/packages/js/plugins/http/src/__tests__/unit/util.test.ts +++ b/packages/js/plugins/http/src/__tests__/unit/util.test.ts @@ -1,5 +1,5 @@ import { fromAxiosResponse, toAxiosRequestConfig } from "../../util"; -import { ResponseTypeEnum } from "../../wrap"; +import { ResponseTypeEnum } from "../../wrap-man"; describe("converting axios response", () => { test("response type: text", () => { diff --git a/packages/js/plugins/ipfs/polywrap.plugin.yaml b/packages/js/plugins/ipfs/polywrap.plugin.yaml index 1bcb25d735..059744c77e 100644 --- a/packages/js/plugins/ipfs/polywrap.plugin.yaml +++ b/packages/js/plugins/ipfs/polywrap.plugin.yaml @@ -1,8 +1,8 @@ -format: 0.1.0 +format: 0.1.1 name: Ipfs language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/ipfs.polywrap.eth" - schema: ../../../interfaces/ipfs/build-man/wrap.info + info: ../../../interfaces/ipfs/build-man/wrap.info diff --git a/packages/js/plugins/ipfs/src/__tests__/e2e.spec.ts b/packages/js/plugins/ipfs/src/__tests__/e2e.spec.ts index f732bc6955..3c25d04a37 100644 --- a/packages/js/plugins/ipfs/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/ipfs/src/__tests__/e2e.spec.ts @@ -7,7 +7,7 @@ import { import { ipfsPlugin } from ".."; import { IpfsClient, IpfsFileInfo } from "../utils/IpfsClient"; -import { Ipfs_Module } from "../wrap"; +import { Ipfs_Module } from "../wrap-man"; const createIpfsClient = require("@dorgjelli-test/ipfs-http-client-lite"); diff --git a/packages/js/plugins/logger/polywrap.plugin.yaml b/packages/js/plugins/logger/polywrap.plugin.yaml index 78a68ffce6..97e927e71a 100644 --- a/packages/js/plugins/logger/polywrap.plugin.yaml +++ b/packages/js/plugins/logger/polywrap.plugin.yaml @@ -1,8 +1,8 @@ -format: 0.1.0 +format: 0.1.1 name: Logger language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/logger.core.polywrap.eth" - schema: ../../../interfaces/logger/build-man/wrap.info + info: ../../../interfaces/logger/build-man/wrap.info diff --git a/packages/js/plugins/sha3/polywrap.plugin.yaml b/packages/js/plugins/sha3/polywrap.plugin.yaml index aeaec3569e..5511f9acaa 100644 --- a/packages/js/plugins/sha3/polywrap.plugin.yaml +++ b/packages/js/plugins/sha3/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: Sha3 language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml index a692071d00..9834e37bae 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml @@ -1,10 +1,10 @@ -format: 0.1.0 +format: 0.1.1 language: plugin/typescript name: EnsUriResolver module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/uri-resolver.core.polywrap.eth" - schema: ../../../../interfaces/uri-resolver/build-man/wrap.info + info: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/ethereum.polywrap.eth" - schema: ../../ethereum/build/wrap.info + info: ../../ethereum/build/wrap.info diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts index 910ed05684..b0e927da79 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts @@ -12,9 +12,6 @@ import { ensResolverPlugin } from ".."; import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; import { ethereumPlugin } from "@polywrap/ethereum-plugin-js"; -import fs from "fs"; -import path from "path"; - jest.setTimeout(300000); describe("ENS Resolver Plugin", () => { @@ -78,17 +75,7 @@ describe("ENS Resolver Plugin", () => { expect(resolution.error).toBeFalsy(); expect(resolution.wrapper).toBeTruthy(); - const expectedSchema = await fs.promises.readFile( - path.resolve(wrapperAbsPath, "build/schema.graphql"), - { encoding: "utf-8" } - ); - - const schema = await resolution.wrapper?.getSchema(client); - - expect(schema).toEqual(expectedSchema); - const manifest = await resolution.wrapper?.getManifest( - {}, client ); diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml index cc235d18aa..36488e8527 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml @@ -1,10 +1,10 @@ -format: 0.1.0 +format: 0.1.1 name: FileSystemResolver language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/uri-resolver.core.polywrap.eth" - schema: ../../../../interfaces/uri-resolver/build-man/wrap.info + info: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/fs.polywrap.eth" - schema: ../../../../interfaces/file-system/build-man/wrap.info \ No newline at end of file + info: ../../../../interfaces/file-system/build-man/wrap.info \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/__tests__/e2e.spec.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/__tests__/e2e.spec.ts index e6f7c7f636..2161c7a3d9 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/__tests__/e2e.spec.ts @@ -91,17 +91,8 @@ describe("Filesystem plugin", () => { expect(deploy.data).toBeTruthy(); expect(deploy.data?.indexOf("0x")).toBeGreaterThan(-1); - // get the schema - const schema = await client.getSchema(fsUri); - const expectedSchema = await fs.promises.readFile( - `${fsPath}/schema.graphql`, - "utf-8" - ); - - expect(schema).toBe(expectedSchema); - // get the manifest - const manifest = await client.getManifest(fsUri, {}); + const manifest = await client.getManifest(fsUri); expect(manifest).toBeTruthy(); expect(manifest.version).toBe("0.1.0"); diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json b/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json index c273306398..2b4645b014 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/package.json @@ -17,7 +17,7 @@ "codegen:patch": "node ../../../../cli/bin/polywrap plugin codegen && rimraf ./src/wrap", "lint": "eslint --color -c ../../../../../.eslintrc.js src/", "test": "jest --passWithNoTests --runInBand --verbose", - "test:ci": "yarn codegen && yarn test", + "test:ci": "yarn test", "test:watch": "jest --watch --passWithNoTests --verbose" }, "dependencies": { diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml index da19e5ed52..e2ae403d96 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml @@ -1,10 +1,10 @@ -format: 0.1.0 +format: 0.1.1 name: IpfsResolver language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql import_redirects: - uri: "ens/uri-resolver.core.polywrap.eth" - schema: ../../../../interfaces/uri-resolver/build-man/wrap.info + info: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/ipfs.polywrap.eth" - schema: ../../../../interfaces/ipfs/build-man/wrap.info \ No newline at end of file + info: ../../ipfs/build/wrap.info diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts index 708eaf4534..d93fd49875 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts @@ -4,22 +4,17 @@ import { buildAndDeployWrapper, initTestEnvironment, providers, stopTestEnvironm import { ipfsResolverPlugin } from ".."; import { ipfsPlugin } from "@polywrap/ipfs-plugin-js"; -import { IpfsClient } from "./helpers/IpfsClient"; -import { createIpfsClient } from "./helpers/createIpfsClient"; jest.setTimeout(300000); describe("IPFS Plugin", () => { let client: PolywrapClient; - let ipfs: IpfsClient; let wrapperIpfsCid: string; beforeAll(async () => { await initTestEnvironment(); - ipfs = createIpfsClient(providers.ipfs); - let { ipfsCid } = await buildAndDeployWrapper({ wrapperAbsPath: `${GetPathToTestWrappers()}/wasm-as/simple-storage`, ipfsProvider: providers.ipfs, @@ -56,15 +51,7 @@ describe("IPFS Plugin", () => { expect(resolution.wrapper).toBeTruthy(); - const expectedSchema = ( - await ipfs.cat(`${wrapperIpfsCid}/schema.graphql`) - ).toString("utf-8"); - - const schema = await resolution.wrapper?.getSchema(client); - - expect(schema).toEqual(expectedSchema); - - const info = await resolution.wrapper?.getManifest({}, client); + const info = await resolution.wrapper?.getManifest(client); expect(info?.name).toBe("SimpleStorage"); }); }); diff --git a/packages/js/plugins/uts46/polywrap.plugin.yaml b/packages/js/plugins/uts46/polywrap.plugin.yaml index b1c442ada0..0671ad879e 100644 --- a/packages/js/plugins/uts46/polywrap.plugin.yaml +++ b/packages/js/plugins/uts46/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: Uts46 language: plugin/typescript module: ./src/index.ts diff --git a/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json b/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json index 912b5ec1ae..591294232c 100644 --- a/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json +++ b/packages/manifests/polywrap/formats/polywrap.app/0.1.1.json @@ -12,7 +12,7 @@ "format": { "description": "Polywrap app manifest format version.", "type": "string", - "const": "0.1.0" + "const": "0.1.1" }, "name": { "description": "Name of this wrapper package.", diff --git a/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json b/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json index d327b171e4..1c745878e6 100644 --- a/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json +++ b/packages/manifests/polywrap/formats/polywrap.plugin/0.1.1.json @@ -12,7 +12,7 @@ "format": { "description": "Polywrap plugin manifest format version.", "type": "string", - "const": "0.1.0" + "const": "0.1.1" }, "name": { "description": "Plugin name.", diff --git a/packages/manifests/polywrap/formats/polywrap/0.1.1.json b/packages/manifests/polywrap/formats/polywrap/0.1.1.json index 431255241e..69fb73a443 100644 --- a/packages/manifests/polywrap/formats/polywrap/0.1.1.json +++ b/packages/manifests/polywrap/formats/polywrap/0.1.1.json @@ -12,7 +12,7 @@ "format": { "description": "Polywrap manifest format version.", "type": "string", - "const": "0.1.0" + "const": "0.1.1" }, "name": { "description": "Name of this wrapper package.", diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml index f592ca6e23..a8afe5c370 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml index db3654bc09..bd4033063b 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: invalid-manifest language: wasm/assemblyscript schema: ./src/wrong/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml index 7031610bc6..86bd4050c7 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: invalid-manifest-2 language: wasm/assemblyscript wrong: foo diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml index b55c7431a8..58dabda89d 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml index 2b9c714c82..f78885709b 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: default-dockerfile language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml index f65b294e8d..e18c9d824e 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: custom-dockerfile language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml index b3305629d3..4d0a540388 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: linked-packages language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml index acba98475d..bc07e7c0a8 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project language: wasm/assemblyscript meta: ./polywrap.meta.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml index 8668808a7f..ed29686717 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json index 52c8a2560f..50cccdf499 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.2.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.build.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.build.yaml index 3edf63339a..5b7b10a7c5 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.build.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.build.yaml @@ -1,6 +1,6 @@ format: 0.1.0 config: - node_version: "14.16.0" + node_version: "16.13.0" linked_packages: - name: "@polywrap/wasm-as" path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml index f592ca6e23..a8afe5c370 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml index 13216cba67..fe89449ab0 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: 0.1.1 name: test-project build: ./polywrap.custom.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index 04511d392f..074768d846 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -7,4 +7,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: "wrap://ens/ethereum.polywrap.eth" - info: ../../../../../js/plugins/ethereum/build-man/wrap.info + info: ../../../../../js/plugins/ethereum/build/wrap.info diff --git a/yarn.lock b/yarn.lock index 1c5fb0c4e5..24cb88fcd9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4176,9 +4176,9 @@ acorn@^7.1.1, acorn@^7.4.0: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4, acorn@^8.4.1: - version "8.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" - integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== add-stream@^1.0.0: version "1.0.0" @@ -5602,9 +5602,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001366: - version "1.0.30001367" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001367.tgz#2b97fe472e8fa29c78c5970615d7cd2ee414108a" - integrity sha512-XDgbeOHfifWV3GEES2B8rtsrADx4Jf+juKX2SICJcaUhjYBO3bR96kvEIHa15VU6ohtOhBZuPGGYGbXMRn0NCw== + version "1.0.30001368" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001368.tgz#c5c06381c6051cd863c45021475434e81936f713" + integrity sha512-wgfRYa9DenEomLG/SdWgQxpIyvdtH3NW8Vq+tB6AwR9e56iOIcu1im5F/wNdDf04XlKHXqIx4N8Jo0PemeBenQ== capture-exit@^2.0.0: version "2.0.0" @@ -7272,9 +7272,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.188: - version "1.4.195" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.195.tgz#139b2d95a42a3f17df217589723a1deac71d1473" - integrity sha512-vefjEh0sk871xNmR5whJf9TEngX+KTKS3hOHpjoMpauKkwlGwtMz1H8IaIjAT/GNnX0TbGwAdmVoXCAzXf+PPg== + version "1.4.196" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.196.tgz#e18cdc5c1c2c2ebf78da237d0c374cc3b244d4cb" + integrity sha512-uxMa/Dt7PQsLBVXwH+t6JvpHJnrsYBaxWKi/J6HE+/nBtoHENhwBoNkgkm226/Kfxeg0z1eMQLBRPPKcDH8xWA== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -18610,8 +18610,8 @@ zen-observable@^0.8.0: integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== zone.js@^0.11.0: - version "0.11.6" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.6.tgz#c7cacfc298fe24bb585329ca04a44d9e2e840e74" - integrity sha512-umJqFtKyZlPli669gB1gOrRE9hxUUGkZr7mo878z+NEBJZZixJkKeVYfnoLa7g25SseUDc92OZrMKKHySyJrFg== + version "0.11.7" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.7.tgz#262194267c7b964e8da77ce16b9fba9bea23cfdc" + integrity sha512-e39K2EdK5JfA3FDuUTVRvPlYV4aBfnOOcGuILhQAT7nzeV12uSrLBzImUM9CDVoncDSX4brR/gwqu0heQ3BQ0g== dependencies: tslib "^2.3.0" From 30cc9111fd1d77f358fc71fce4a15c812f48ad9a Mon Sep 17 00:00:00 2001 From: cbrzn Date: Thu, 28 Jul 2022 14:09:23 +0200 Subject: [PATCH 16/56] chore: create wrap.info.ts instead of binary file & remove schema from documentation --- packages/cli/src/commands/plugin.ts | 17 ++----- packages/cli/src/lib/helpers/wrap.ts | 21 ++++++--- .../bindings/documentation/schema/index.ts | 45 ------------------- .../schema/templates/schema.mustache | 1 - packages/schema/bind/src/types.ts | 4 +- 5 files changed, 20 insertions(+), 68 deletions(-) delete mode 100644 packages/schema/bind/src/bindings/documentation/schema/index.ts delete mode 100644 packages/schema/bind/src/bindings/documentation/schema/templates/schema.mustache diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index 81395d5a8b..c57e5cfd67 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -4,7 +4,6 @@ import { PluginProject, SchemaComposer, defaultPluginManifest, - outputManifest, intlMsg, parsePluginCodegenDirOption, parsePluginManifestFileOption, @@ -101,25 +100,17 @@ async function run(options: PluginCommandOptions) { client, }); - let result = false; - const codeGenerator = new CodeGenerator({ project, schemaComposer, codegenDirAbs: codegenDir, }); - result = await codeGenerator.generate(); - - if (result) { - process.exitCode = 0; - } else { - process.exitCode = 1; - } + const result = await codeGenerator.generate(); + process.exitCode = result ? 0 : 1; // Output the built manifest - const publishManifestPath = path.join(publishDir, "polywrap.plugin.json"); - const publishAbiPath = path.join(publishDir, "wrap.info"); + const publishAbiPath = path.join(publishDir, "wrap.info.ts"); if (!fs.existsSync(publishDir)) { fs.mkdirSync(publishDir); @@ -131,6 +122,4 @@ async function run(options: PluginCommandOptions) { "plugin", publishAbiPath ); - - await outputManifest(manifest, publishManifestPath); } diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 498741cd45..f4028a2fdc 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -6,18 +6,27 @@ export const generateWrapFile = ( abi: unknown, name: string, type: "interface" | "wasm" | "plugin", - path: string + path: string, + encoded = true ): void => { - const info: WrapManifest = { + const manifest: WrapManifest = { abi: abi as never, name, type, version: "0.1.0", }; + const stringifyInfo = JSON.stringify(manifest); + let info = JSON.parse(stringifyInfo); - const s = JSON.stringify(info); - const encodedInfo = msgpackEncode(JSON.parse(s)); - writeFileSync(path, encodedInfo, { - encoding: "binary", + let encoding = "utf-8"; + if (encoded) { + info = msgpackEncode(info); + encoding = "binary"; + } else { + info = `export const manifest = ${info}`; + } + + writeFileSync(path, info, { + encoding, }); }; diff --git a/packages/schema/bind/src/bindings/documentation/schema/index.ts b/packages/schema/bind/src/bindings/documentation/schema/index.ts deleted file mode 100644 index afa8db6d3e..0000000000 --- a/packages/schema/bind/src/bindings/documentation/schema/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { GenerateBindingFn } from "../.."; -import { BindOptions, BindOutput } from "../../.."; - -import Mustache from "mustache"; -import path from "path"; -import { readFileSync } from "fs"; - -export const generateBinding: GenerateBindingFn = ( - options: BindOptions -): BindOutput => { - const result: BindOutput = { - output: { - entries: [], - }, - outputDirAbs: options.outputDirAbs, - }; - const output = result.output; - - const renderTemplate = ( - subPath: string, - context: unknown, - fileName: string - ) => { - const absPath = path.join(__dirname, subPath); - const template = readFileSync(absPath, { encoding: "utf-8" }); - - output.entries.push({ - type: "File", - name: fileName, - data: Mustache.render(template, context), - }); - }; - - // generate schema - const schemaContext = { - schema: options.schema, - }; - renderTemplate( - "./templates/schema.mustache", - schemaContext, - "generated-schema.graphql" - ); - - return result; -}; diff --git a/packages/schema/bind/src/bindings/documentation/schema/templates/schema.mustache b/packages/schema/bind/src/bindings/documentation/schema/templates/schema.mustache deleted file mode 100644 index 45b42444e3..0000000000 --- a/packages/schema/bind/src/bindings/documentation/schema/templates/schema.mustache +++ /dev/null @@ -1 +0,0 @@ -{{schema}} diff --git a/packages/schema/bind/src/types.ts b/packages/schema/bind/src/types.ts index 503f85db9d..6e7801cb8d 100644 --- a/packages/schema/bind/src/types.ts +++ b/packages/schema/bind/src/types.ts @@ -1,5 +1,5 @@ import { OutputDirectory } from "@polywrap/os-js"; -import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; +import { Abi } from "@polywrap/schema-parse"; export type BindLanguage = "wasm-as" | "wasm-rs" | "plugin-ts" | "app-ts"; @@ -11,7 +11,7 @@ export interface BindOutput { export interface BindOptions { projectName: string; bindLanguage: BindLanguage; - abi: WrapAbi; + abi: Abi; config?: Record; outputDirAbs: string; } From 062d9df2164d6fb3481dab172aaa2f33994a24ec Mon Sep 17 00:00:00 2001 From: cbrzn Date: Fri, 29 Jul 2022 15:42:30 +0200 Subject: [PATCH 17/56] feat(wrap-info): plugins final structure implemented, tests are not green yet --- package.json | 3 +- packages/cli/src/commands/plugin.ts | 8 +- packages/cli/src/lib/Compiler.ts | 27 +- packages/cli/src/lib/SchemaComposer.ts | 15 +- packages/cli/src/lib/helpers/wrap.ts | 30 +- .../__tests__/core/interface-impls.spec.ts | 12 +- .../src/__tests__/core/resolveUri.spec.ts | 3 +- .../js/client/src/createPolywrapClient.ts | 5 +- .../js/client/src/plugin/PluginWrapper.ts | 25 +- .../src/__tests__/PolywrapManifest.spec.ts | 7 + .../manifest/polywrap/sanity/polywrap.yaml | 5 + .../plugins/ethereum/src/wrap-man/manifest.ts | 4 +- .../plugins/ethereum/src/wrap-man/module.ts | 9 + .../ethereum/src/wrap-man/wrap.info.ts | 5177 +++++++++-------- .../file-system/src/wrap-man/wrap.info.ts | 794 +-- .../graph-node/src/wrap-man/wrap.info.ts | 826 +-- .../bindings/typescript/plugin-ts/index.ts | 8 +- .../plugin-ts/templates/manifest-ts.mustache | 4 +- .../plugin-ts/templates/wrap.info-ts.mustache | 2 +- .../compose/src/__tests__/test-cases.spec.ts | 4 - .../test-implementation/polywrap.yaml | 4 +- .../test-interface/polywrap.yaml | 2 +- .../test-wrapper/polywrap.yaml | 4 +- 23 files changed, 3786 insertions(+), 3192 deletions(-) create mode 100644 packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/sanity/polywrap.yaml diff --git a/package.json b/package.json index 4195243857..c218688ca3 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,10 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", + "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", - "build:plugins:patch": "cd packages/js/plugins/ethereum && yarn codegen:patch && cd ../http && yarn codegen:patch && lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", "build:cli": "lerna run build --scope polywrap", diff --git a/packages/cli/src/commands/plugin.ts b/packages/cli/src/commands/plugin.ts index c57e5cfd67..980f0413d2 100644 --- a/packages/cli/src/commands/plugin.ts +++ b/packages/cli/src/commands/plugin.ts @@ -13,8 +13,8 @@ import { } from "../lib"; import path from "path"; -import fs from "fs"; import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; +import fs from "fs"; const defaultPublishDir = "./build"; const defaultCodegenDir = "./wrap"; @@ -110,16 +110,16 @@ async function run(options: PluginCommandOptions) { process.exitCode = result ? 0 : 1; // Output the built manifest - const publishAbiPath = path.join(publishDir, "wrap.info.ts"); + const manifestPath = path.join(publishDir, "wrap.info"); if (!fs.existsSync(publishDir)) { fs.mkdirSync(publishDir); } - generateWrapFile( + await generateWrapFile( await schemaComposer.getComposedAbis(), manifest.name, "plugin", - publishAbiPath + manifestPath ); } diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 064720ad17..db25b99b92 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -7,6 +7,7 @@ import { displayPath, generateDockerfile, generateDockerImageName, + generateWrapFile, intlMsg, outputManifest, outputMetadata, @@ -15,24 +16,25 @@ import { SchemaComposer, withSpinner, } from "./"; -import { generateWrapFile } from "./helpers/wrap"; import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { WrapManifest, + validateWrapManifest, WrapAbi, - validateWrapManifest } from "@polywrap/wrap-manifest-types-js"; import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { normalizePath, writeDirectorySync } from "@polywrap/os-js"; import * as gluegun from "gluegun"; -import fs from "fs"; +import fs, { writeFileSync } from "fs"; import path from "path"; +import { Abi } from "@polywrap/schema-parse"; +import { msgpackEncode } from "@polywrap/msgpack-js"; interface CompilerState { - abi: WrapAbi; + abi: Abi; compilerOverrides?: CompilerOverrides; } @@ -156,7 +158,7 @@ export class Compiler { // Get the PolywrapManifest const polywrapManifest = await project.getManifest(); - // Compose the schema + // Compose the ABI const abi = await this._composeAbi(); // Allow the build-image to validate the manifest & override functionality @@ -197,7 +199,7 @@ export class Compiler { return manifest.language === "interface"; } - private async _composeAbi(): Promise { + private async _composeAbi(): Promise { const { schemaComposer } = this._config; // Get the fully composed schema @@ -334,7 +336,7 @@ export class Compiler { const manifest = await project.getManifest(); - const abi: WrapAbi = { + const abi: Abi = { ...state.abi, }; @@ -348,17 +350,8 @@ export class Compiler { } }); - const info: WrapManifest = { - abi: (filteredAbi as unknown) as WrapAbi, - name: manifest.name, - type: (await this._isInterface()) ? "interface" : "wasm", - version: "0.1", - }; - - // One last sanity check - await validateWrapManifest(info); const type = (await this._isInterface()) ? "interface" : "wasm"; - generateWrapFile(filteredAbi, manifest.name, type, manifestPath); + await generateWrapFile(filteredAbi, manifest.name, type, manifestPath); }; if (quiet) { diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index ed55d47813..253bc685a5 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -13,7 +13,7 @@ import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; import { deserializeWrapManifest } from "@polywrap/wrap-manifest-types-js"; -import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; +import { Abi } from "@polywrap/schema-parse"; export interface SchemaComposerConfig { project: Project; @@ -22,13 +22,13 @@ export interface SchemaComposerConfig { export class SchemaComposer { private _client: PolywrapClient; - private _abi: WrapAbi | undefined; + private _abi: Abi | undefined; constructor(private _config: SchemaComposerConfig) { this._client = this._config.client; } - public async getComposedAbis(): Promise { + public async getComposedAbis(): Promise { if (this._abi) { return Promise.resolve(this._abi); } @@ -59,7 +59,7 @@ export class SchemaComposer { }, }; - this._abi = (await composeSchema(options)) as WrapAbi; + this._abi = (await composeSchema(options)) as Abi; return this._abi; } @@ -70,7 +70,7 @@ export class SchemaComposer { private async _fetchExternalAbi( uri: string, import_redirects?: ImportRedirects - ): Promise { + ): Promise { // Check to see if we have any import redirects that match if (import_redirects) { for (const redirect of import_redirects) { @@ -81,14 +81,15 @@ export class SchemaComposer { const manifest = fs.readFileSync( path.join(this._config.project.getManifestDir(), redirect.info) ); - return deserializeWrapManifest(manifest).abi; + return ((await deserializeWrapManifest(manifest)) + .abi as unknown) as Abi; } } } try { const manifest = await this._client.getManifest(new Uri(uri)); - return (manifest.abi as unknown) as WrapAbi; + return (manifest.abi as unknown) as Abi; } catch (e) { gluegun.print.error(e); throw e; diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index f4028a2fdc..9811bebf7c 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -1,32 +1,26 @@ import { msgpackEncode } from "@polywrap/msgpack-js"; -import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { validateWrapManifest, WrapManifest } from "@polywrap/wrap-manifest-types-js"; import { writeFileSync } from "@polywrap/os-js"; -export const generateWrapFile = ( +export const generateWrapFile = async ( abi: unknown, name: string, type: "interface" | "wasm" | "plugin", - path: string, - encoded = true -): void => { - const manifest: WrapManifest = { + path: string +): Promise => { + const info: WrapManifest = { abi: abi as never, name, type, version: "0.1.0", }; - const stringifyInfo = JSON.stringify(manifest); - let info = JSON.parse(stringifyInfo); - let encoding = "utf-8"; - if (encoded) { - info = msgpackEncode(info); - encoding = "binary"; - } else { - info = `export const manifest = ${info}`; - } + // One last sanity check + await validateWrapManifest(info); - writeFileSync(path, info, { - encoding, + const s = JSON.stringify(info); + const encodedInfo = msgpackEncode(JSON.parse(s)); + writeFileSync(path, encodedInfo, { + encoding: "binary", }); -}; +}; \ No newline at end of file diff --git a/packages/js/client/src/__tests__/core/interface-impls.spec.ts b/packages/js/client/src/__tests__/core/interface-impls.spec.ts index 732026e0f2..85c4d88125 100644 --- a/packages/js/client/src/__tests__/core/interface-impls.spec.ts +++ b/packages/js/client/src/__tests__/core/interface-impls.spec.ts @@ -85,7 +85,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -147,7 +147,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -157,7 +157,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -199,7 +199,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -297,7 +297,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [new Uri(interfaceUri)], }, }, @@ -332,7 +332,7 @@ describe("interface-impls", () => { plugin: { factory: () => ({} as PluginModule<{}>), manifest: { - schema: "", + abi: {}, implements: [], }, }, diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index 006325602d..da4fe13a83 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -193,7 +193,7 @@ describe("resolveUri", () => { return ({} as unknown) as PluginModule<{}>; }, manifest: { - schema: "", + abi: {}, implements: [], }, }, @@ -244,7 +244,6 @@ describe("resolveUri", () => { args: ["build"], cwd: `${GetPathToTestWrappers()}/wasm-as/interface-invoke/test-interface`, }); - const client = await getClient(); const deployResult = await buildAndDeployWrapper({ diff --git a/packages/js/client/src/createPolywrapClient.ts b/packages/js/client/src/createPolywrapClient.ts index 36b4768c79..197a243aed 100644 --- a/packages/js/client/src/createPolywrapClient.ts +++ b/packages/js/client/src/createPolywrapClient.ts @@ -52,15 +52,14 @@ export const createPolywrapClient = Tracer.traceFunc( const pluginPackage = pluginFactory( (pluginConfigs as Record)[plugin] ); - if ( !pluginPackage || typeof pluginPackage !== "object" || !pluginPackage.factory || - !pluginPackage.abi + !pluginPackage.manifest ) { throw Error( - `Plugin package is malformed. Expected object with keys "factory" and "abi". Got: ${pluginPackage}` + `Plugin package is malformed. Expected object with keys "factory" and "manifest". Got: ${pluginPackage}` ); } diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 0840c31023..75f5630408 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -10,10 +10,7 @@ import { Env, isBuffer, } from "@polywrap/core-js"; -import { - deserializeWrapManifest, - WrapManifest, -} from "@polywrap/wrap-manifest-types-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; import { msgpackDecode } from "@polywrap/msgpack-js"; import { Tracer } from "@polywrap/tracing-js"; import fs from "fs"; @@ -57,22 +54,12 @@ export class PluginWrapper extends Wrapper { return this._info; } - const moduleManifest = "./wrap.info"; - - const data = (await this.getFile( - { path: moduleManifest }, - _ - )) as Uint8Array; - - if (!data) { - throw Error(`Package manifest does not contain information`); - } - - this._info = ((await deserializeWrapManifest( - data - )) as unknown) as WrapManifest; - return this._info as WrapManifest; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + this._info = (await import("./wrap-man/wrap.info")) as WrapManifest; + return this._info; } + @Tracer.traceMethod("PluginWrapper: invoke") public async invoke( options: InvokeOptions, diff --git a/packages/js/manifests/polywrap/src/__tests__/PolywrapManifest.spec.ts b/packages/js/manifests/polywrap/src/__tests__/PolywrapManifest.spec.ts index 232a17d7f8..092fc2fa27 100644 --- a/packages/js/manifests/polywrap/src/__tests__/PolywrapManifest.spec.ts +++ b/packages/js/manifests/polywrap/src/__tests__/PolywrapManifest.spec.ts @@ -32,4 +32,11 @@ describe("Polywrap Manifest Validation", () => { expect(() => deserializePolywrapManifest(manifest)).toThrowError(/instance.module is not of a type\(s\) string/); }); + it("Should deserialize manifest as expected", async () => { + const manifestPath = __dirname + "/manifest/polywrap/sanity/polywrap.yaml"; + const manifest = fs.readFileSync(manifestPath, "utf-8"); + + const info = deserializePolywrapManifest(manifest) + expect(info.name).toEqual("package-name") + }); }); diff --git a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/sanity/polywrap.yaml b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/sanity/polywrap.yaml new file mode 100644 index 0000000000..4b64bb7185 --- /dev/null +++ b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/sanity/polywrap.yaml @@ -0,0 +1,5 @@ +format: "0.2" +name: package-name +language: wasm/assemblyscript +module: ../index.ts +schema: ../schema.graphql diff --git a/packages/js/plugins/ethereum/src/wrap-man/manifest.ts b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts index 96b656fffd..a423181704 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/manifest.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ ], }; diff --git a/packages/js/plugins/ethereum/src/wrap-man/module.ts b/packages/js/plugins/ethereum/src/wrap-man/module.ts index 71b726160a..a37c433540 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/module.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/module.ts @@ -117,6 +117,10 @@ export interface Args_getNetwork extends Record { connection?: Types.Connection | null; } +export interface Args_requestAccounts extends Record { + connection?: Types.Connection | null; +} + export interface Args_callContractMethod extends Record { address: Types.String; method: Types.String; @@ -268,6 +272,11 @@ export abstract class Module< client: Client ): MaybeAsync; + abstract requestAccounts( + args: Args_requestAccounts, + client: Client + ): MaybeAsync>; + abstract callContractMethod( args: Args_callContractMethod, client: Client diff --git a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts index 3a9f3a0fad..6a21c269ea 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts @@ -1,1136 +1,1012 @@ -export const abi = { - objectTypes: [ - { - type: "TxReceipt", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "to", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "to", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "from", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "from", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "contractAddress", - required: true, - kind: 34, - array: null, - map: null, - scalar: { +export const wrapManifest = { + name: "Ethereum", + type: "plugin", + version: "0.0.1", + abi: { + objectTypes: [ + { + type: "TxReceipt", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "to", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "from", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "String", name: "contractAddress", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "contractAddress", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "transactionIndex", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "UInt32", name: "transactionIndex", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "root", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "root", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasUsed", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasUsed", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "logsBloom", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { + type: "String", + name: "root", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "root", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasUsed", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasUsed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "String", name: "logsBloom", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "logsBloom", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "transactionHash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "String", name: "transactionHash", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "transactionHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[Log]", - name: "logs", - required: true, - kind: 34, - array: { + { type: "[Log]", name: "logs", required: true, - kind: 18, - array: null, + kind: 34, + array: { + type: "[Log]", + name: "logs", + required: true, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Log", + name: "logs", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Log", + name: "logs", + required: true, + kind: 8192, + }, + }, map: null, scalar: null, - object: { type: "Log", name: "logs", required: true, kind: 8192 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "Log", name: "logs", required: true, kind: 8192 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "blockNumber", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "BigInt", name: "blockNumber", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockNumber", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "blockHash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "String", name: "blockHash", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "blockHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "confirmations", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "UInt32", name: "confirmations", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "cumulativeGasUsed", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "BigInt", name: "cumulativeGasUsed", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "cumulativeGasUsed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "effectiveGasPrice", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "BigInt", name: "effectiveGasPrice", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "effectiveGasPrice", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "byzantium", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "Boolean", name: "byzantium", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "type", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "type", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "status", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "status", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "TxResponse", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "hash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "hash", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "to", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "to", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "from", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "from", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "nonce", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "nonce", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasLimit", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasLimit", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "data", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "value", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "chainId", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "chainId", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "blockNumber", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "BigInt", - name: "blockNumber", - required: null, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "byzantium", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "blockHash", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "blockHash", - required: null, - kind: 4, + { + type: "UInt32", + name: "type", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "timestamp", - required: null, - kind: 34, - array: null, - map: null, - scalar: { + { type: "UInt32", - name: "timestamp", + name: "status", required: null, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "status", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "confirmations", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "UInt32", - name: "confirmations", + ], + interfaces: [], + }, + { + type: "TxResponse", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "hash", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "hash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "raw", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "raw", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "r", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "r", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "s", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "s", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "v", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "v", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "type", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "type", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[Access]", - name: "accessList", - required: null, - kind: 34, - array: { + { + type: "String", + name: "to", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "from", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "nonce", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "nonce", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasLimit", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasLimit", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "chainId", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "chainId", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "blockNumber", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockNumber", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "blockHash", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "blockHash", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "timestamp", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timestamp", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "confirmations", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "raw", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "raw", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "r", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "r", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "s", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "s", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "v", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "v", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "UInt32", + name: "type", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[Access]", name: "accessList", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[Access]", + name: "accessList", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Access", + name: "accessList", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Access", + name: "accessList", + required: true, + kind: 8192, + }, + }, map: null, scalar: null, - object: { - type: "Access", - name: "accessList", - required: true, - kind: 8192, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "TxRequest", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "to", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "to", + required: null, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "Access", - name: "accessList", - required: true, - kind: 8192, + }, + { + type: "String", + name: "from", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "from", + required: null, + kind: 4, }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "TxRequest", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "to", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "to", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "from", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "from", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "nonce", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "nonce", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasLimit", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasLimit", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "data", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "data", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "value", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "value", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "chainId", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "chainId", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "type", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "type", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "TxOverrides", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "BigInt", - name: "gasLimit", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasLimit", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "gasPrice", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "gasPrice", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "value", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "value", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "StaticTxResult", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "result", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "result", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "error", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "error", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Log", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "BigInt", - name: "blockNumber", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { + type: "UInt32", + name: "nonce", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "nonce", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "data", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "BigInt", - name: "blockNumber", - required: true, - kind: 4, + name: "value", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "blockHash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "blockHash", - required: true, - kind: 4, + { + type: "BigInt", + name: "chainId", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "chainId", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "transactionIndex", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "UInt32", - name: "transactionIndex", - required: true, - kind: 4, + name: "type", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "type", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "removed", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "removed", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "address", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "address", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "data", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "topics", - required: true, - kind: 34, - array: { - type: "[String]", - name: "topics", - required: true, - kind: 18, + ], + interfaces: [], + }, + { + type: "TxOverrides", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 34, array: null, map: null, - scalar: { type: "String", name: "topics", required: true, kind: 4 }, + scalar: { + type: "BigInt", + name: "gasLimit", + required: null, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "topics", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "transactionHash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "gasPrice", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "value", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "value", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "StaticTxResult", + name: null, + required: null, + kind: 1, + properties: [ + { type: "String", - name: "transactionHash", + name: "result", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "result", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "logIndex", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "logIndex", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "EventNotification", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "data", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "address", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "address", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Log", - name: "log", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { type: "Log", name: "log", required: true, kind: 8192 }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Access", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "address", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "address", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "storageKeys", - required: true, - kind: 34, - array: { - type: "[String]", - name: "storageKeys", + { + type: "Boolean", + name: "error", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "error", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Log", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "BigInt", + name: "blockNumber", required: true, - kind: 18, + kind: 34, array: null, map: null, scalar: { - type: "String", - name: "storageKeys", + type: "BigInt", + name: "blockNumber", required: true, kind: 4, }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { + }, + { + type: "String", + name: "blockHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", - name: "storageKeys", + name: "blockHash", required: true, kind: 4, }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Connection", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "node", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "node", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "networkNameOrChainId", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "networkNameOrChainId", - required: null, - kind: 4, + { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "transactionIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Network", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "name", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "name", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "BigInt", - name: "chainId", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "chainId", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "ensAddress", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "ensAddress", - required: null, - kind: 4, + { + type: "Boolean", + name: "removed", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "removed", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - ], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], - envType: { - type: "Env", - name: null, - required: null, - kind: 65536, - properties: [ - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "callContractView", - required: true, - kind: 64, - arguments: [ { type: "String", name: "address", @@ -1150,33 +1026,48 @@ export const abi = { }, { type: "String", - name: "method", + name: "data", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, { type: "[String]", - name: "args", - required: null, + name: "topics", + required: true, kind: 34, array: { type: "[String]", - name: "args", - required: null, + name: "topics", + required: true, kind: 18, array: null, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: { + type: "String", + name: "topics", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, + item: { + type: "String", + name: "topics", + required: true, + kind: 4, + }, }, map: null, scalar: null, @@ -1185,47 +1076,65 @@ export const abi = { unresolvedObjectOrEnum: null, }, { - type: "Connection", - name: "connection", - required: null, + type: "String", + name: "transactionHash", + required: true, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", - required: null, - kind: 8192, + scalar: { + type: "String", + name: "transactionHash", + required: true, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "callContractView", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "callContractView", + { + type: "UInt32", + name: "logIndex", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "logIndex", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, + ], + interfaces: [], }, { - type: "Method", - name: "callContractStatic", - required: true, - kind: 64, - arguments: [ + type: "EventNotification", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, { type: "String", name: "address", @@ -1243,35 +1152,76 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, + { + type: "Log", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Log", + name: "log", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + { + type: "Access", + name: null, + required: null, + kind: 1, + properties: [ { type: "String", - name: "method", + name: "address", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, { type: "[String]", - name: "args", - required: null, + name: "storageKeys", + required: true, kind: 34, array: { type: "[String]", - name: "args", - required: null, + name: "storageKeys", + required: true, kind: 18, array: null, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: { + type: "String", + name: "storageKeys", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, + item: { + type: "String", + name: "storageKeys", + required: true, + kind: 4, + }, }, map: null, scalar: null, @@ -1279,75 +1229,68 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, + ], + interfaces: [], + }, + { + type: "Connection", + name: null, + required: null, + kind: 1, + properties: [ { - type: "Connection", - name: "connection", + type: "String", + name: "node", required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", + scalar: { + type: "String", + name: "node", required: null, - kind: 8192, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, { - type: "TxOverrides", - name: "txOverrides", + type: "String", + name: "networkNameOrChainId", required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "TxOverrides", - name: "txOverrides", + scalar: { + type: "String", + name: "networkNameOrChainId", required: null, - kind: 8192, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, ], - return: { - type: "StaticTxResult", - name: "callContractStatic", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "StaticTxResult", - name: "callContractStatic", - required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, + interfaces: [], }, { - type: "Method", - name: "getBalance", - required: true, - kind: 64, - arguments: [ + type: "Network", + name: null, + required: null, + kind: 1, + properties: [ { type: "String", - name: "address", + name: "name", required: true, kind: 34, array: null, map: null, scalar: { type: "String", - name: "address", + name: "name", required: true, kind: 4, }, @@ -1357,15 +1300,15 @@ export const abi = { }, { type: "BigInt", - name: "blockTag", - required: null, + name: "chainId", + required: true, kind: 34, array: null, map: null, scalar: { type: "BigInt", - name: "blockTag", - required: null, + name: "chainId", + required: true, kind: 4, }, object: null, @@ -1373,823 +1316,1179 @@ export const abi = { unresolvedObjectOrEnum: null, }, { - type: "Connection", - name: "connection", + type: "String", + name: "ensAddress", required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", + scalar: { + type: "String", + name: "ensAddress", required: null, - kind: 8192, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, ], - return: { - type: "BigInt", - name: "getBalance", + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "callContractView", required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "BigInt", - name: "getBalance", + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "callContractView", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "callContractView", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "encodeParams", - required: true, - kind: 64, - arguments: [ - { - type: "[String]", - name: "types", - required: true, - kind: 34, - array: { - type: "[String]", - name: "types", + { + type: "Method", + name: "callContractStatic", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", required: true, - kind: 18, + kind: 34, array: null, map: null, scalar: { type: "String", - name: "types", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", required: true, kind: 4, }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "types", required: true, kind: 4 }, }, + { + type: "[String]", + name: "args", + required: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "StaticTxResult", + name: "callContractStatic", + required: true, + kind: 34, + array: null, map: null, scalar: null, - object: null, + object: { + type: "StaticTxResult", + name: "callContractStatic", + required: true, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "values", + }, + { + type: "Method", + name: "getBalance", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "BigInt", + name: "getBalance", required: true, kind: 34, - array: { + array: null, + map: null, + scalar: { + type: "BigInt", + name: "getBalance", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "encodeParams", + required: true, + kind: 64, + arguments: [ + { + type: "[String]", + name: "types", + required: true, + kind: 34, + array: { + type: "[String]", + name: "types", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[String]", name: "values", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "values", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "values", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "encodeParams", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "String", name: "encodeParams", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "encodeFunction", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "method", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, + scalar: { + type: "String", + name: "encodeParams", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + }, + { + type: "Method", + name: "encodeFunction", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, + ], + return: { + type: "String", + name: "encodeFunction", + required: true, + kind: 34, + array: null, map: null, - scalar: null, + scalar: { + type: "String", + name: "encodeFunction", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "encodeFunction", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "encodeFunction", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "solidityPack", - required: true, - kind: 64, - arguments: [ - { - type: "[String]", - name: "types", - required: true, - kind: 34, - array: { + { + type: "Method", + name: "solidityPack", + required: true, + kind: 64, + arguments: [ + { type: "[String]", name: "types", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "types", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "types", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "values", - required: true, - kind: 34, - array: { + { type: "[String]", name: "values", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "values", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "values", required: true, kind: 4 }, }, + ], + return: { + type: "String", + name: "solidityPack", + required: true, + kind: 34, + array: null, map: null, - scalar: null, + scalar: { + type: "String", + name: "solidityPack", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "solidityPack", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "solidityPack", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "solidityKeccak256", - required: true, - kind: 64, - arguments: [ - { - type: "[String]", - name: "types", - required: true, - kind: 34, - array: { + { + type: "Method", + name: "solidityKeccak256", + required: true, + kind: 64, + arguments: [ + { type: "[String]", name: "types", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "types", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "types", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "values", - required: true, - kind: 34, - array: { + { type: "[String]", name: "values", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "values", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "values", required: true, kind: 4 }, }, + ], + return: { + type: "String", + name: "solidityKeccak256", + required: true, + kind: 34, + array: null, map: null, - scalar: null, + scalar: { + type: "String", + name: "solidityKeccak256", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "solidityKeccak256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "solidityKeccak256", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "soliditySha256", - required: true, - kind: 64, - arguments: [ - { - type: "[String]", - name: "types", - required: true, - kind: 34, - array: { + { + type: "Method", + name: "soliditySha256", + required: true, + kind: 64, + arguments: [ + { type: "[String]", name: "types", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "types", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "types", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "types", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "types", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "values", - required: true, - kind: 34, - array: { + { type: "[String]", name: "values", required: true, - kind: 18, - array: null, - map: null, - scalar: { - type: "String", + kind: 34, + array: { + type: "[String]", name: "values", required: true, - kind: 4, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "values", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "values", + required: true, + kind: 4, + }, }, + map: null, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "values", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "soliditySha256", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "String", name: "soliditySha256", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getSignerAddress", - required: true, - kind: 64, - arguments: [ - { - type: "Connection", - name: "connection", - required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", - required: null, - kind: 8192, + scalar: { + type: "String", + name: "soliditySha256", + required: true, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", + }, + { + type: "Method", name: "getSignerAddress", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "String", name: "getSignerAddress", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getSignerBalance", - required: true, - kind: 64, - arguments: [ - { - type: "BigInt", - name: "blockTag", - required: null, kind: 34, array: null, map: null, scalar: { - type: "BigInt", - name: "blockTag", - required: null, + type: "String", + name: "getSignerAddress", + required: true, kind: 4, }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "getSignerBalance", + required: true, + kind: 64, + arguments: [ + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "BigInt", - name: "getSignerBalance", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "BigInt", name: "getSignerBalance", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getSignerTransactionCount", - required: true, - kind: 64, - arguments: [ - { - type: "BigInt", - name: "blockTag", - required: null, kind: 34, array: null, map: null, scalar: { type: "BigInt", - name: "blockTag", - required: null, + name: "getSignerBalance", + required: true, kind: 4, }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "getSignerTransactionCount", + required: true, + kind: 64, + arguments: [ + { + type: "BigInt", + name: "blockTag", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "blockTag", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "BigInt", - name: "getSignerTransactionCount", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "BigInt", name: "getSignerTransactionCount", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getGasPrice", - required: true, - kind: 64, - arguments: [ - { - type: "Connection", - name: "connection", - required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", - required: null, - kind: 8192, + scalar: { + type: "BigInt", + name: "getSignerTransactionCount", + required: true, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "BigInt", + }, + { + type: "Method", name: "getGasPrice", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "BigInt", name: "getGasPrice", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "estimateTransactionGas", - required: true, - kind: 64, - arguments: [ - { - type: "TxRequest", - name: "tx", - required: true, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "TxRequest", - name: "tx", + scalar: { + type: "BigInt", + name: "getGasPrice", required: true, - kind: 8192, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "estimateTransactionGas", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "BigInt", - name: "estimateTransactionGas", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "BigInt", name: "estimateTransactionGas", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "estimateContractCallGas", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "address", - required: true, kind: 34, array: null, map: null, scalar: { + type: "BigInt", + name: "estimateTransactionGas", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "estimateContractCallGas", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "String", - name: "address", + name: "method", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "method", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "TxOverrides", - name: "txOverrides", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "TxOverrides", name: "txOverrides", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "BigInt", - name: "estimateContractCallGas", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "BigInt", name: "estimateContractCallGas", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "checkAddress", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "address", - required: true, kind: 34, array: null, map: null, scalar: { - type: "String", - name: "address", + type: "BigInt", + name: "estimateContractCallGas", required: true, kind: 4, }, @@ -2197,117 +2496,125 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Boolean", + }, + { + type: "Method", name: "checkAddress", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Boolean", name: "checkAddress", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "toWei", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "eth", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "eth", required: true, kind: 4 }, + scalar: { + type: "Boolean", + name: "checkAddress", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "BigInt", + }, + { + type: "Method", name: "toWei", required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "BigInt", name: "toWei", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "toEth", - required: true, - kind: 64, - arguments: [ - { + kind: 64, + arguments: [ + { + type: "String", + name: "eth", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "eth", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "BigInt", - name: "wei", + name: "toWei", required: true, kind: 34, array: null, map: null, - scalar: { type: "BigInt", name: "wei", required: true, kind: 4 }, + scalar: { + type: "BigInt", + name: "toWei", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", + }, + { + type: "Method", name: "toEth", required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "toEth", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "awaitTransaction", - required: true, - kind: 64, - arguments: [ - { + kind: 64, + arguments: [ + { + type: "BigInt", + name: "wei", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "BigInt", + name: "wei", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "String", - name: "txHash", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "txHash", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "confirmations", + name: "toEth", required: true, kind: 34, array: null, map: null, scalar: { - type: "UInt32", - name: "confirmations", + type: "String", + name: "toEth", required: true, kind: 4, }, @@ -2315,666 +2622,802 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, - { - type: "UInt32", - name: "timeout", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + }, + { + type: "Method", + name: "awaitTransaction", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "txHash", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "txHash", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "UInt32", - name: "timeout", + name: "confirmations", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "confirmations", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { + type: "UInt32", + name: "timeout", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timeout", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "TxReceipt", - name: "awaitTransaction", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "TxReceipt", name: "awaitTransaction", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "waitForEvent", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "address", - required: true, kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", + scalar: null, + object: { + type: "TxReceipt", + name: "awaitTransaction", required: true, - kind: 4, + kind: 8192, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "event", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "event", required: true, kind: 4 }, - object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + }, + { + type: "Method", + name: "waitForEvent", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "event", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "event", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "UInt32", - name: "timeout", - required: null, - kind: 34, - array: null, - map: null, - scalar: { + { type: "UInt32", name: "timeout", required: null, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timeout", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "EventNotification", - name: "waitForEvent", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "EventNotification", name: "waitForEvent", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getNetwork", - required: true, - kind: 64, - arguments: [ - { - type: "Connection", - name: "connection", - required: null, kind: 34, array: null, map: null, scalar: null, object: { - type: "Connection", - name: "connection", - required: null, + type: "EventNotification", + name: "waitForEvent", + required: true, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Network", + }, + { + type: "Method", name: "getNetwork", required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Network", name: "getNetwork", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "callContractMethod", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "address", - required: true, kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", + scalar: null, + object: { + type: "Network", + name: "getNetwork", required: true, - kind: 4, + kind: 8192, }, - object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "String", - name: "method", + }, + { + type: "Method", + name: "requestAccounts", + required: true, + kind: 64, + arguments: [ + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "[String]", + name: "requestAccounts", required: true, kind: 34, - array: null, + array: { + type: "[String]", + name: "requestAccounts", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "requestAccounts", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "requestAccounts", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + }, + { + type: "Method", + name: "callContractMethod", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "TxOverrides", - name: "txOverrides", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "TxOverrides", name: "txOverrides", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "TxResponse", - name: "callContractMethod", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "TxResponse", name: "callContractMethod", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "callContractMethodAndWait", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "address", - required: true, kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "address", + scalar: null, + object: { + type: "TxResponse", + name: "callContractMethod", required: true, - kind: 4, + kind: 8192, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "method", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, - object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + }, + { + type: "Method", + name: "callContractMethodAndWait", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "address", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "address", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "method", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "method", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "TxOverrides", - name: "txOverrides", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "TxOverrides", name: "txOverrides", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxOverrides", + name: "txOverrides", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "TxReceipt", - name: "callContractMethodAndWait", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "TxReceipt", name: "callContractMethodAndWait", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sendTransaction", - required: true, - kind: 64, - arguments: [ - { - type: "TxRequest", - name: "tx", - required: true, kind: 34, array: null, map: null, scalar: null, object: { - type: "TxRequest", - name: "tx", + type: "TxReceipt", + name: "callContractMethodAndWait", required: true, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "sendTransaction", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "TxResponse", - name: "sendTransaction", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "TxResponse", name: "sendTransaction", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sendTransactionAndWait", - required: true, - kind: 64, - arguments: [ - { - type: "TxRequest", - name: "tx", - required: true, kind: 34, array: null, map: null, scalar: null, object: { - type: "TxRequest", - name: "tx", + type: "TxResponse", + name: "sendTransaction", required: true, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "sendTransactionAndWait", + required: true, + kind: 64, + arguments: [ + { + type: "TxRequest", + name: "tx", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "TxRequest", + name: "tx", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "TxReceipt", - name: "sendTransactionAndWait", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + ], + return: { type: "TxReceipt", name: "sendTransactionAndWait", required: true, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "deployContract", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "abi", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "abi", required: true, kind: 4 }, - object: null, + scalar: null, + object: { + type: "TxReceipt", + name: "sendTransactionAndWait", + required: true, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "String", - name: "bytecode", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + }, + { + type: "Method", + name: "deployContract", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "abi", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "abi", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "String", name: "bytecode", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "bytecode", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[String]", - name: "args", - required: null, - kind: 34, - array: { + { type: "[String]", name: "args", required: null, - kind: 18, - array: null, + kind: 34, + array: { + type: "[String]", + name: "args", + required: null, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "args", + required: true, + kind: 4, + }, + }, map: null, - scalar: { type: "String", name: "args", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "args", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "deployContract", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "String", name: "deployContract", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "signMessage", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "message", - required: true, kind: 34, array: null, map: null, scalar: { type: "String", - name: "message", + name: "deployContract", required: true, kind: 4, }, @@ -2982,122 +3425,188 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Connection", - name: "connection", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "signMessage", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Connection", name: "connection", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "signMessage", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + return: { type: "String", name: "signMessage", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "sendRPC", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "method", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "method", required: true, kind: 4 }, + scalar: { + type: "String", + name: "signMessage", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "[String]", - name: "params", - required: true, - kind: 34, - array: { - type: "[String]", - name: "params", + }, + { + type: "Method", + name: "sendRPC", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "method", required: true, - kind: 18, + kind: 34, array: null, map: null, scalar: { type: "String", - name: "params", + name: "method", required: true, kind: 4, }, object: null, enum: null, unresolvedObjectOrEnum: null, - item: { type: "String", name: "params", required: true, kind: 4 }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Connection", - name: "connection", + { + type: "[String]", + name: "params", + required: true, + kind: 34, + array: { + type: "[String]", + name: "params", + required: true, + kind: 18, + array: null, + map: null, + scalar: { + type: "String", + name: "params", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "String", + name: "params", + required: true, + kind: 4, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Connection", + name: "connection", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sendRPC", required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Connection", - name: "connection", + scalar: { + type: "String", + name: "sendRPC", required: null, - kind: 8192, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "sendRPC", + }, + ], + imports: [], + interfaces: [], + }, + envType: { + type: "Env", + name: null, + required: null, + kind: 65536, + properties: [ + { + type: "Connection", + name: "connection", required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "sendRPC", required: null, kind: 4 }, - object: null, + scalar: null, + object: { + type: "Connection", + name: "connection", + required: null, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [], - interfaces: [], + ], + interfaces: [], + }, }, }; diff --git a/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts b/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts index 93f819a33f..e06eeac62a 100644 --- a/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts @@ -1,14 +1,428 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [ - { - type: "FileSystem_Module", +export const wrapManifest = { + name: "FileSystem", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [ + { + type: "FileSystem_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "readFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "readFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "readFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "readFileAsString", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "readFileAsString", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "readFileAsString", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "exists", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "exists", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "exists", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "writeFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "mkdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "mkdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "mkdir", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rm", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "force", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "force", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rm", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "rmdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "path", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rmdir", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "rmdir", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "FileSystem_Encoding", + name: null, + required: null, + kind: 520, + constants: [ + "ASCII", + "UTF8", + "UTF16LE", + "UCS2", + "BASE64", + "BASE64URL", + "LATIN1", + "BINARY", + "HEX", + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Encoding", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", name: null, required: null, - kind: 256, + kind: 128, methods: [ { type: "Method", @@ -335,365 +749,21 @@ export const abi = { }, }, ], - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [ - { - type: "FileSystem_Encoding", - name: null, - required: null, - kind: 520, - constants: [ - "ASCII", - "UTF8", - "UTF16LE", - "UCS2", - "BASE64", - "BASE64URL", - "LATIN1", - "BINARY", - "HEX", - ], - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Encoding", - }, - ], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "readFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Bytes", - name: "readFile", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "readFile", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "readFileAsString", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "FileSystem_Encoding", - name: "encoding", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: null, - enum: { - type: "FileSystem_Encoding", - name: "encoding", - required: null, - kind: 16384, - }, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "readFileAsString", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "readFileAsString", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "exists", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "exists", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "exists", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "writeFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Bytes", - name: "data", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "writeFile", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "Boolean", - name: "writeFile", - required: null, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "mkdir", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "recursive", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "Boolean", - name: "recursive", - required: null, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "mkdir", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "rm", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "recursive", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "Boolean", - name: "recursive", - required: null, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "force", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "force", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "rm", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "rmdir", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "rmdir", + imports: [{ type: "FileSystem_Module" }, { type: "FileSystem_Encoding" }], + interfaces: [ + { + type: "FileSystem_Module", + name: null, required: null, - kind: 34, + kind: 2048, array: null, map: null, - scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [{ type: "FileSystem_Module" }, { type: "FileSystem_Encoding" }], - interfaces: [ - { - type: "FileSystem_Module", - name: null, - required: null, - kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], + ], + }, }, }; diff --git a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts index d7f72463ed..1226f81899 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts @@ -1,451 +1,500 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [ - { - type: "HTTP_Request", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "[HTTP_Header]", - name: "headers", - required: null, - kind: 34, - array: { +export const wrapManifest = { + name: "GraphNode", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "HTTP_Request", + name: null, + required: null, + kind: 1025, + properties: [ + { type: "[HTTP_Header]", name: "headers", required: null, - kind: 18, - array: null, - map: null, - scalar: null, - object: { - type: "HTTP_Header", + kind: 34, + array: { + type: "[HTTP_Header]", name: "headers", - required: true, - kind: 8192, + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, }, + map: null, + scalar: null, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "HTTP_Header", - name: "headers", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[HTTP_UrlParam]", - name: "urlParams", - required: null, - kind: 34, - array: { + { type: "[HTTP_UrlParam]", name: "urlParams", required: null, - kind: 18, + kind: 34, + array: { + type: "[HTTP_UrlParam]", + name: "urlParams", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "HTTP_UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_ResponseType", + name: "responseType", + required: true, + kind: 34, array: null, map: null, scalar: null, - object: { - type: "HTTP_UrlParam", - name: "urlParams", + object: null, + enum: { + type: "HTTP_ResponseType", + name: "responseType", required: true, - kind: 8192, + kind: 16384, }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "HTTP_UrlParam", - name: "urlParams", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "HTTP_ResponseType", - name: "responseType", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: null, - enum: { - type: "HTTP_ResponseType", - name: "responseType", + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Request", + }, + { + type: "HTTP_Header", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "key", required: true, - kind: 16384, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "body", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "Request", - }, - { - type: "HTTP_Header", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "Header", - }, - { - type: "HTTP_UrlParam", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "UrlParam", - }, - { - type: "HTTP_Response", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "Int", - name: "status", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Int", name: "status", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "statusText", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "String", - name: "statusText", + name: "value", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[HTTP_Header]", - name: "headers", - required: null, - kind: 34, - array: { - type: "[HTTP_Header]", - name: "headers", - required: null, - kind: 18, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Header", + }, + { + type: "HTTP_UrlParam", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, array: null, map: null, - scalar: null, - object: { - type: "HTTP_Header", - name: "headers", - required: true, - kind: 8192, - }, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "HTTP_Header", - name: "headers", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "body", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "Response", - }, - ], - importedModuleTypes: [ - { - type: "HTTP_Module", - name: null, - required: null, - kind: 256, - methods: [ - { - type: "Method", - name: "get", - required: true, - kind: 64, - arguments: [ - { + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "UrlParam", + }, + { + type: "HTTP_Response", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "Int", + name: "status", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Int", name: "status", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "statusText", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", - name: "url", + name: "statusText", required: true, - kind: 34, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[HTTP_Header]", + name: "headers", + required: null, + kind: 18, array: null, map: null, - scalar: { type: "String", name: "url", required: true, kind: 4 }, - object: null, + scalar: null, + object: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, + item: { + type: "HTTP_Header", + name: "headers", + required: true, + kind: 8192, + }, }, - { - type: "HTTP_Request", - name: "request", + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Response", + }, + ], + importedModuleTypes: [ + { + type: "HTTP_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "get", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "url", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "HTTP_Response", + name: "get", required: null, kind: 34, array: null, map: null, scalar: null, object: { - type: "HTTP_Request", - name: "request", + type: "HTTP_Response", + name: "get", required: null, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "HTTP_Response", - name: "get", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + }, + { + type: "Method", + name: "post", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "url", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "HTTP_Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "HTTP_Response", - name: "get", + name: "post", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "HTTP_Response", + name: "post", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, }, - }, + ], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "HTTP_ResponseType", + name: null, + required: null, + kind: 520, + constants: ["TEXT", "BINARY"], + uri: "ens/http.polywrap.eth", + namespace: "HTTP", + nativeType: "ResponseType", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ { type: "Method", - name: "post", + name: "querySubgraph", required: true, kind: 64, arguments: [ { type: "String", - name: "url", + name: "subgraphAuthor", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "url", required: true, kind: 4 }, + scalar: { + type: "String", + name: "subgraphAuthor", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, { - type: "HTTP_Request", - name: "request", - required: null, + type: "String", + name: "subgraphName", + required: true, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "HTTP_Request", - name: "request", - required: null, - kind: 8192, + scalar: { + type: "String", + name: "subgraphName", + required: true, + kind: 4, }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "HTTP_Response", - name: "post", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "HTTP_Response", - name: "post", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - ], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [ - { - type: "HTTP_ResponseType", - name: null, - required: null, - kind: 520, - constants: ["TEXT", "BINARY"], - uri: "ens/http.polywrap.eth", - namespace: "HTTP", - nativeType: "ResponseType", - }, - ], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "querySubgraph", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "subgraphAuthor", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + { type: "String", - name: "subgraphAuthor", + name: "query", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "query", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { + ], + return: { type: "String", - name: "subgraphName", + name: "querySubgraph", required: true, kind: 34, array: null, map: null, scalar: { type: "String", - name: "subgraphName", + name: "querySubgraph", required: true, kind: 4, }, @@ -453,46 +502,17 @@ export const abi = { enum: null, unresolvedObjectOrEnum: null, }, - { - type: "String", - name: "query", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "query", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "querySubgraph", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "querySubgraph", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - ], - imports: [ - { type: "HTTP_Module" }, - { type: "HTTP_Request" }, - { type: "HTTP_Header" }, - { type: "HTTP_UrlParam" }, - { type: "HTTP_ResponseType" }, - { type: "HTTP_Response" }, - ], - interfaces: [], + ], + imports: [ + { type: "HTTP_Module" }, + { type: "HTTP_Request" }, + { type: "HTTP_Header" }, + { type: "HTTP_UrlParam" }, + { type: "HTTP_ResponseType" }, + { type: "HTTP_Response" }, + ], + interfaces: [], + }, }, }; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts index 5843edbbb8..204dd9f55f 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts @@ -35,9 +35,15 @@ export const generateBinding: GenerateBindingFn = ( }; const output = result.output; + const wrapManifest = { + name: options.projectName, + type: "plugin", + version: "0.1", + abi: JSON.stringify(options.abi, null, 2), + }; output.entries = renderTemplates( templatePath(""), - { ...abi, abi: JSON.stringify(options.abi, null, 2) }, + { ...abi, wrapManifest }, {} ); diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache index c4f7dca8f6..9669334120 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ {{#interfaceUris}} new Uri("{{.}}"), diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache index 8fce5bdef3..5365a90d03 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache @@ -1,4 +1,4 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const abi = {{abi}}; +export const wrapManifest = {{wrapManifest}}; diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index 69e871c73f..f11c51f223 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,10 +34,6 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); - if (test.name === "001-local-imports 00-sanity") { - console.log(JSON.stringify(result, null, 2)) - } - if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml index fb4262b68e..41b9a3e106 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestImplementation build: ./polywrap.build.yaml language: wasm/assemblyscript @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql \ No newline at end of file + info: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml index d6f5b8a82d..00a7c96f03 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-interface/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestInterface language: interface schema: ./schema.graphql diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml index 11269c20f8..9b7756742a 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestWrapper build: ./polywrap.build.yaml language: wasm/assemblyscript @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql \ No newline at end of file + info: ../test-interface/build/wrap.info \ No newline at end of file From 7ab51d6c90a84aededc04bb2914475d5a21ebf28 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Sat, 30 Jul 2022 12:10:16 +0200 Subject: [PATCH 18/56] chore(plugins): generates wrap.info & wrap.info.ts, support both getManifest and import_redirects --- package.json | 3 +- packages/cli/src/lib/Compiler.ts | 8 +- .../js/client/src/plugin/PluginWrapper.ts | 1 + .../js/plugins/ethereum/polywrap.plugin.yaml | 2 +- .../ethereum/src/wrap-man/wrap.info.ts | 2 +- .../plugins/file-system/polywrap.plugin.yaml | 2 +- .../plugins/graph-node/polywrap.plugin.yaml | 2 +- packages/js/plugins/http/polywrap.plugin.yaml | 2 +- .../js/plugins/http/src/wrap-man/wrap.info.ts | 644 +-- packages/js/plugins/ipfs/polywrap.plugin.yaml | 2 +- .../js/plugins/ipfs/src/wrap-man/wrap.info.ts | 575 +-- .../js/plugins/logger/polywrap.plugin.yaml | 2 +- .../plugins/logger/src/wrap-man/wrap.info.ts | 203 +- packages/js/plugins/sha3/polywrap.plugin.yaml | 2 +- .../js/plugins/sha3/src/wrap-man/wrap.info.ts | 1066 ++--- .../ens-resolver/polywrap.plugin.yaml | 2 +- .../ens-resolver/src/wrap-man/wrap.info.ts | 3884 ++++++++++++++++- .../file-system-resolver/polywrap.plugin.yaml | 2 +- .../src/wrap-man/wrap.info.ts | 909 ++-- .../ipfs-resolver/polywrap.plugin.yaml | 2 +- .../ipfs-resolver/src/wrap-man/wrap.info.ts | 783 ++-- .../js/plugins/uts46/polywrap.plugin.yaml | 2 +- .../plugins/uts46/src/wrap-man/wrap.info.ts | 235 +- .../compose/src/__tests__/test-cases.spec.ts | 4 + .../wasm-as/asyncify/plugin.wrap.info | 1 + .../wrappers/wasm-as/asyncify/polywrap.yaml | 4 +- .../wasm-as/simple-storage/polywrap.yaml | 2 +- 27 files changed, 6151 insertions(+), 2195 deletions(-) create mode 100644 packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info diff --git a/package.json b/package.json index c218688ca3..f7071aa00b 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,14 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli", + "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && plugins:codegen:patch", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", "build:cli": "lerna run build --scope polywrap", + "build:plugins:patch": "cd packages/js/plugins/ethereum && yarn codegen:patch && cd ../http && yarn codegen:patch && lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "link:interface:deps": "yarn link:manifests && yarn link:schema", "link:manifests": "yarn link:manifests:polywrap && yarn link:manifests:wrap", "link:manifests:polywrap": "cd packages/js/manifests/polywrap && (yarn unlink || true) && yarn link && cd ../../../../dependencies && yarn link @polywrap/polywrap-manifest-types-js && cd ../", diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index db25b99b92..7c93f3e989 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -18,20 +18,14 @@ import { } from "./"; import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; -import { - WrapManifest, - validateWrapManifest, - WrapAbi, -} from "@polywrap/wrap-manifest-types-js"; import { WasmWrapper } from "@polywrap/client-js"; import { WrapImports } from "@polywrap/client-js/build/wasm/types"; import { AsyncWasmInstance } from "@polywrap/asyncify-js"; import { normalizePath, writeDirectorySync } from "@polywrap/os-js"; import * as gluegun from "gluegun"; -import fs, { writeFileSync } from "fs"; +import fs from "fs"; import path from "path"; import { Abi } from "@polywrap/schema-parse"; -import { msgpackEncode } from "@polywrap/msgpack-js"; interface CompilerState { abi: Abi; diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 75f5630408..94af41807f 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -54,6 +54,7 @@ export class PluginWrapper extends Wrapper { return this._info; } + // TODO(cbrzn): Remove this once wrap-man has been removed // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore this._info = (await import("./wrap-man/wrap.info")) as WrapManifest; diff --git a/packages/js/plugins/ethereum/polywrap.plugin.yaml b/packages/js/plugins/ethereum/polywrap.plugin.yaml index f6decccb96..53cbec7ac9 100644 --- a/packages/js/plugins/ethereum/polywrap.plugin.yaml +++ b/packages/js/plugins/ethereum/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" language: plugin/typescript name: Ethereum module: ./src/index.ts diff --git a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts index 6a21c269ea..411b32f2c3 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts @@ -1,7 +1,7 @@ export const wrapManifest = { name: "Ethereum", type: "plugin", - version: "0.0.1", + version: "0.1", abi: { objectTypes: [ { diff --git a/packages/js/plugins/file-system/polywrap.plugin.yaml b/packages/js/plugins/file-system/polywrap.plugin.yaml index b03a1f9fbd..664f2722cd 100644 --- a/packages/js/plugins/file-system/polywrap.plugin.yaml +++ b/packages/js/plugins/file-system/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" language: plugin/typescript name: FileSystem module: ./src/index.ts diff --git a/packages/js/plugins/graph-node/polywrap.plugin.yaml b/packages/js/plugins/graph-node/polywrap.plugin.yaml index 4b6ceded40..b0f97d4799 100644 --- a/packages/js/plugins/graph-node/polywrap.plugin.yaml +++ b/packages/js/plugins/graph-node/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" language: plugin/typescript name: GraphNode module: ./src/index.ts diff --git a/packages/js/plugins/http/polywrap.plugin.yaml b/packages/js/plugins/http/polywrap.plugin.yaml index e5fab6a97c..dbaeffed62 100644 --- a/packages/js/plugins/http/polywrap.plugin.yaml +++ b/packages/js/plugins/http/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" language: plugin/typescript name: Http module: ./src/index.ts diff --git a/packages/js/plugins/http/src/wrap-man/wrap.info.ts b/packages/js/plugins/http/src/wrap-man/wrap.info.ts index 3014e00ced..2b552ebfd2 100644 --- a/packages/js/plugins/http/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/http/src/wrap-man/wrap.info.ts @@ -1,387 +1,397 @@ -export const abi = { - objectTypes: [ - { - type: "Header", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "UrlParam", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Response", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "Int", - name: "status", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Int", name: "status", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "statusText", - required: true, - kind: 34, - array: null, - map: null, - scalar: { +export const wrapManifest = { + name: "Http", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [ + { + type: "Header", + name: null, + required: null, + kind: 1, + properties: [ + { type: "String", - name: "statusText", + name: "key", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[Header]", - name: "headers", - required: null, - kind: 34, - array: { - type: "[Header]", - name: "headers", - required: null, - kind: 18, + kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Header", - name: "headers", - required: true, - kind: 8192, - }, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "Header", - name: "headers", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "body", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - { - type: "Request", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "[Header]", - name: "headers", - required: null, - kind: 34, - array: { - type: "[Header]", - name: "headers", - required: null, - kind: 18, + { + type: "String", + name: "value", + required: true, + kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Header", - name: "headers", - required: true, - kind: 8192, - }, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "Header", - name: "headers", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "[UrlParam]", - name: "urlParams", - required: null, - kind: 34, - array: { - type: "[UrlParam]", - name: "urlParams", - required: null, - kind: 18, + ], + interfaces: [], + }, + { + type: "UrlParam", + name: null, + required: null, + kind: 1, + properties: [ + { + type: "String", + name: "key", + required: true, + kind: 34, array: null, map: null, - scalar: null, - object: { - type: "UrlParam", - name: "urlParams", - required: true, - kind: 8192, - }, + scalar: { type: "String", name: "key", required: true, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, - item: { - type: "UrlParam", - name: "urlParams", - required: true, - kind: 8192, - }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "ResponseType", - name: "responseType", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: null, - enum: { - type: "ResponseType", - name: "responseType", + { + type: "String", + name: "value", required: true, - kind: 16384, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "body", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - ], - enumTypes: [ - { - type: "ResponseType", - name: null, - required: null, - kind: 8, - constants: ["TEXT", "BINARY"], - }, - ], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ + ], + interfaces: [], + }, { - type: "Method", - name: "get", - required: true, - kind: 64, - arguments: [ + type: "Response", + name: null, + required: null, + kind: 1, + properties: [ { - type: "String", - name: "url", + type: "Int", + name: "status", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "url", required: true, kind: 4 }, + scalar: { type: "Int", name: "status", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, { - type: "Request", - name: "request", - required: null, + type: "String", + name: "statusText", + required: true, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Request", - name: "request", + scalar: { + type: "String", + name: "statusText", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "[Header]", + name: "headers", + required: null, + kind: 34, + array: { + type: "[Header]", + name: "headers", required: null, - kind: 8192, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, ], - return: { - type: "Response", - name: "get", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { type: "Response", name: "get", required: null, kind: 8192 }, - enum: null, - unresolvedObjectOrEnum: null, - }, + interfaces: [], }, { - type: "Method", - name: "post", - required: true, - kind: 64, - arguments: [ + type: "Request", + name: null, + required: null, + kind: 1, + properties: [ { - type: "String", - name: "url", - required: true, + type: "[Header]", + name: "headers", + required: null, kind: 34, - array: null, + array: { + type: "[Header]", + name: "headers", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "Header", + name: "headers", + required: true, + kind: 8192, + }, + }, map: null, - scalar: { type: "String", name: "url", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, }, { - type: "Request", - name: "request", + type: "[UrlParam]", + name: "urlParams", required: null, kind: 34, + array: { + type: "[UrlParam]", + name: "urlParams", + required: null, + kind: 18, + array: null, + map: null, + scalar: null, + object: { + type: "UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + item: { + type: "UrlParam", + name: "urlParams", + required: true, + kind: 8192, + }, + }, + map: null, + scalar: null, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "ResponseType", + name: "responseType", + required: true, + kind: 34, array: null, map: null, scalar: null, - object: { + object: null, + enum: { + type: "ResponseType", + name: "responseType", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "body", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "body", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + }, + ], + enumTypes: [ + { + type: "ResponseType", + name: null, + required: null, + kind: 8, + constants: ["TEXT", "BINARY"], + }, + ], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "get", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { type: "Request", name: "request", required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Response", + name: "get", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Response", + name: "get", + required: null, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Response", + }, + { + type: "Method", name: "post", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "url", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "url", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Request", + name: "request", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Request", + name: "request", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Response", name: "post", required: null, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Response", + name: "post", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - ], - imports: [], - interfaces: [], + ], + imports: [], + interfaces: [], + }, }, }; diff --git a/packages/js/plugins/ipfs/polywrap.plugin.yaml b/packages/js/plugins/ipfs/polywrap.plugin.yaml index 059744c77e..b7946e763d 100644 --- a/packages/js/plugins/ipfs/polywrap.plugin.yaml +++ b/packages/js/plugins/ipfs/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: Ipfs language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts index a1b183e2a9..150a3b0ce4 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts @@ -1,41 +1,299 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [ - { - type: "Ipfs_Options", +export const wrapManifest = { + name: "Ipfs", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "Ipfs_Options", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "UInt32", + name: "timeout", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "provider", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Options", + }, + { + type: "Ipfs_ResolveResult", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "provider", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "ResolveResult", + }, + ], + importedModuleTypes: [ + { + type: "Ipfs_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "cid", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "cid", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_ResolveResult", + name: "resolve", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + { + type: "Method", + name: "addFile", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "data", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "addFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [], + importedEnvTypes: [], + envType: { + type: "Env", name: null, required: null, - kind: 1025, + kind: 65536, properties: [ - { - type: "UInt32", - name: "timeout", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: - " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", - }, - { - type: "String", - name: "provider", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "provider", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: "The IPFS provider to be used", - }, { type: "Boolean", name: "disableParallelRequests", @@ -56,53 +314,12 @@ export const abi = { }, ], interfaces: [], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "Options", - }, - { - type: "Ipfs_ResolveResult", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "cid", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "provider", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "provider", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "ResolveResult", }, - ], - importedModuleTypes: [ - { - type: "Ipfs_Module", + moduleType: { + type: "Module", name: null, required: null, - kind: 256, + kind: 128, methods: [ { type: "Method", @@ -245,201 +462,25 @@ export const abi = { }, }, ], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [], - importedEnvTypes: [], - envType: { - type: "Env", - name: null, - required: null, - kind: 65536, - properties: [ - { - type: "Boolean", - name: "disableParallelRequests", - required: null, - kind: 34, - array: null, - map: null, - scalar: { - type: "Boolean", - name: "disableParallelRequests", - required: null, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: "Disable querying providers in parallel when resolving URIs", - }, - ], - interfaces: [], - }, - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "cat", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "cid", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Ipfs_Options", - name: "options", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "Ipfs_Options", - name: "options", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Bytes", - name: "cat", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "resolve", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "cid", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Ipfs_Options", - name: "options", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "Ipfs_Options", - name: "options", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Ipfs_ResolveResult", - name: "resolve", + imports: [ + { type: "Ipfs_Module" }, + { type: "Ipfs_Options" }, + { type: "Ipfs_ResolveResult" }, + ], + interfaces: [ + { + type: "Ipfs_Module", + name: null, required: null, - kind: 34, + kind: 2048, array: null, map: null, scalar: null, - object: { - type: "Ipfs_ResolveResult", - name: "resolve", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "addFile", - required: true, - kind: 64, - arguments: [ - { - type: "Bytes", - name: "data", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "String", - name: "addFile", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "addFile", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [ - { type: "Ipfs_Module" }, - { type: "Ipfs_Options" }, - { type: "Ipfs_ResolveResult" }, - ], - interfaces: [ - { - type: "Ipfs_Module", - name: null, - required: null, - kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], + ], + }, }, }; diff --git a/packages/js/plugins/logger/polywrap.plugin.yaml b/packages/js/plugins/logger/polywrap.plugin.yaml index 97e927e71a..1142300bf0 100644 --- a/packages/js/plugins/logger/polywrap.plugin.yaml +++ b/packages/js/plugins/logger/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: Logger language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts index f819a7458c..8c365ebe8e 100644 --- a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts @@ -1,14 +1,98 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [ - { - type: "Logger_Module", +export const wrapManifest = { + name: "Logger", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [ + { + type: "Logger_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "log", + required: true, + kind: 64, + arguments: [ + { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "Logger_LogLevel", + name: "level", + required: true, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "log", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + }, + ], + uri: "ens/logger.core.polywrap.eth", + namespace: "Logger", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "Logger_LogLevel", + name: null, + required: null, + kind: 520, + constants: ["DEBUG", "INFO", "WARN", "ERROR"], + uri: "ens/logger.core.polywrap.eth", + namespace: "Logger", + nativeType: "LogLevel", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", name: null, required: null, - kind: 256, + kind: 128, methods: [ { type: "Method", @@ -65,100 +149,21 @@ export const abi = { }, }, ], - uri: "ens/logger.core.polywrap.eth", - namespace: "Logger", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [ - { - type: "Logger_LogLevel", - name: null, - required: null, - kind: 520, - constants: ["DEBUG", "INFO", "WARN", "ERROR"], - uri: "ens/logger.core.polywrap.eth", - namespace: "Logger", - nativeType: "LogLevel", - }, - ], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "log", - required: true, - kind: 64, - arguments: [ - { - type: "Logger_LogLevel", - name: "level", - required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: null, - enum: { - type: "Logger_LogLevel", - name: "level", - required: true, - kind: 16384, - }, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "message", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "message", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Boolean", - name: "log", - required: true, - kind: 34, + imports: [{ type: "Logger_Module" }, { type: "Logger_LogLevel" }], + interfaces: [ + { + type: "Logger_Module", + name: null, + required: null, + kind: 2048, array: null, map: null, - scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, + scalar: null, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [{ type: "Logger_Module" }, { type: "Logger_LogLevel" }], - interfaces: [ - { - type: "Logger_Module", - name: null, - required: null, - kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - }, + ], + } + } }; diff --git a/packages/js/plugins/sha3/polywrap.plugin.yaml b/packages/js/plugins/sha3/polywrap.plugin.yaml index 5511f9acaa..b0468c424f 100644 --- a/packages/js/plugins/sha3/polywrap.plugin.yaml +++ b/packages/js/plugins/sha3/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: Sha3 language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts index 2c07a3dcda..a60ac044a1 100644 --- a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts @@ -1,560 +1,562 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const abi = { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ - { - "type": "Method", - "name": "sha3_512", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 +export const wrapManifest = { + name: "Sha3", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "sha3_512", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "sha3_512", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "sha3_512", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "sha3_384", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "sha3_512", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "sha3_512", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "sha3_384", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "sha3_384", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "sha3_256", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "sha3_384", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "sha3_256", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "sha3_256", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "sha3_224", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "sha3_384", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "sha3_384", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "sha3_224", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "sha3_224", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "keccak_512", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "sha3_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "keccak_512", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "keccak_512", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "sha3_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "sha3_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "keccak_384", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "sha3_224", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "sha3_224", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "sha3_224", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "keccak_384", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "keccak_384", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "keccak_256", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "keccak_512", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "keccak_256", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "keccak_256", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "keccak_512", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_512", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "keccak_224", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "keccak_384", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_384", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_384", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "keccak_224", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "keccak_224", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "hex_keccak_256", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_256", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "hex_keccak_256", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "hex_keccak_256", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "buffer_keccak_256", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Bytes", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Bytes", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "keccak_224", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "buffer_keccak_256", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "buffer_keccak_256", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "keccak_224", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "keccak_224", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "shake_128", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "hex_keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "hex_keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "hex_keccak_256", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - { - "type": "Int", - "name": "outputBits", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "outputBits", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "buffer_keccak_256", + required: true, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Bytes", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "shake_128", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "shake_128", - "required": true, - "kind": 4 + ], + return: { + type: "String", + name: "buffer_keccak_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "buffer_keccak_256", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "shake_256", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "shake_128", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Int", + name: "outputBits", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Int", + name: "outputBits", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + ], + return: { + type: "String", + name: "shake_128", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "shake_128", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - { - "type": "Int", - "name": "outputBits", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "outputBits", - "required": true, - "kind": 4 + }, + { + type: "Method", + name: "shake_256", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "message", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "message", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Int", + name: "outputBits", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "Int", + name: "outputBits", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "shake_256", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "shake_256", + required: true, + kind: 4, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "String", - "name": "shake_256", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "shake_256", - "required": true, - "kind": 4 + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - } - ], - "imports": [], - "interfaces": [] + }, + ], + imports: [], + interfaces: [], + } } }; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml index 9834e37bae..e198498f1b 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" language: plugin/typescript name: EnsUriResolver module: ./src/index.ts diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts index d3fe4b280c..a76b20645e 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts @@ -1 +1,3883 @@ -export const abi = {"objectTypes":[],"enumTypes":[],"interfaceTypes":[],"importedObjectTypes":[{"type":"UriResolver_MaybeUriOrManifest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"uri","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"uri","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Bytes","name":"manifest","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"manifest","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"MaybeUriOrManifest"},{"type":"Ethereum_Connection","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"node","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"node","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"networkNameOrChainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"networkNameOrChainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Connection"},{"type":"Ethereum_TxOverrides","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxOverrides"},{"type":"Ethereum_StaticTxResult","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"result","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"result","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"error","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"error","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"StaticTxResult"},{"type":"Ethereum_TxRequest","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxRequest"},{"type":"Ethereum_TxReceipt","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"to","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"contractAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"contractAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"root","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"root","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"logsBloom","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"logsBloom","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":34,"array":{"type":"[Ethereum_Log]","name":"logs","required":true,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Log","name":"logs","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"cumulativeGasUsed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"effectiveGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"byzantium","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"byzantium","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"status","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"status","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxReceipt"},{"type":"Ethereum_Log","name":null,"required":null,"kind":1025,"properties":[{"type":"BigInt","name":"blockNumber","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"transactionIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"transactionIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Boolean","name":"removed","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"removed","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"topics","required":true,"kind":34,"array":{"type":"[String]","name":"topics","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"topics","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"topics","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"transactionHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"transactionHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"logIndex","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"logIndex","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Log"},{"type":"Ethereum_EventNotification","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Log","name":"log","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Log","name":"log","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"EventNotification"},{"type":"Ethereum_Network","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"name","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"name","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"ensAddress","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"ensAddress","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Network"},{"type":"Ethereum_TxResponse","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"hash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"hash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"to","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"to","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"from","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"from","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"nonce","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"nonce","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasLimit","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasLimit","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"gasPrice","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"gasPrice","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"data","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"data","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"value","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"value","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"chainId","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"chainId","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockNumber","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockNumber","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"blockHash","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"blockHash","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timestamp","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timestamp","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"raw","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"raw","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"r","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"r","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"s","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"s","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"v","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"v","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"type","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"type","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":34,"array":{"type":"[Ethereum_Access]","name":"accessList","required":null,"kind":18,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"Ethereum_Access","name":"accessList","required":true,"kind":8192}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"TxResponse"},{"type":"Ethereum_Access","name":null,"required":null,"kind":1025,"properties":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"storageKeys","required":true,"kind":34,"array":{"type":"[String]","name":"storageKeys","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"storageKeys","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"storageKeys","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"interfaces":[],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Access"}],"importedModuleTypes":[{"type":"UriResolver_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/uri-resolver.core.polywrap.eth","namespace":"UriResolver","nativeType":"Module","isInterface":false},{"type":"Ethereum_Module","name":null,"required":null,"kind":256,"methods":[{"type":"Method","name":"callContractView","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"callContractView","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"callContractView","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractStatic","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_StaticTxResult","name":"callContractStatic","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getBalance","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeParams","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeParams","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeParams","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"encodeFunction","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"encodeFunction","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"encodeFunction","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityPack","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityPack","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityPack","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"solidityKeccak256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"solidityKeccak256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"solidityKeccak256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"soliditySha256","required":true,"kind":64,"arguments":[{"type":"[String]","name":"types","required":true,"kind":34,"array":{"type":"[String]","name":"types","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"types","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"types","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"values","required":true,"kind":34,"array":{"type":"[String]","name":"values","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"values","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"values","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"soliditySha256","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"soliditySha256","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerAddress","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"getSignerAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"getSignerAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerBalance","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerBalance","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getSignerTransactionCount","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"blockTag","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"blockTag","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getSignerTransactionCount","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getGasPrice","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"getGasPrice","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"getGasPrice","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateTransactionGas","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateTransactionGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"estimateContractCallGas","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"estimateContractCallGas","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"checkAddress","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Boolean","name":"checkAddress","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"Boolean","name":"checkAddress","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toWei","required":true,"kind":64,"arguments":[{"type":"String","name":"eth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"eth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"BigInt","name":"toWei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"toWei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"toEth","required":true,"kind":64,"arguments":[{"type":"BigInt","name":"wei","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"BigInt","name":"wei","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"toEth","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"toEth","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"awaitTransaction","required":true,"kind":64,"arguments":[{"type":"String","name":"txHash","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"txHash","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"confirmations","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"confirmations","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"awaitTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"waitForEvent","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"event","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"event","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"UInt32","name":"timeout","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"UInt32","name":"timeout","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_EventNotification","name":"waitForEvent","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getNetwork","required":true,"kind":64,"arguments":[{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Network","name":"getNetwork","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethod","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"callContractMethod","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"callContractMethodAndWait","required":true,"kind":64,"arguments":[{"type":"String","name":"address","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"address","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxOverrides","name":"txOverrides","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"callContractMethodAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransaction","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxResponse","name":"sendTransaction","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendTransactionAndWait","required":true,"kind":64,"arguments":[{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxRequest","name":"tx","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_TxReceipt","name":"sendTransactionAndWait","required":true,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"deployContract","required":true,"kind":64,"arguments":[{"type":"String","name":"abi","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"abi","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"bytecode","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"bytecode","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"args","required":null,"kind":34,"array":{"type":"[String]","name":"args","required":null,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"args","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"args","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"deployContract","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"deployContract","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"signMessage","required":true,"kind":64,"arguments":[{"type":"String","name":"message","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"message","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"signMessage","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"signMessage","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"sendRPC","required":true,"kind":64,"arguments":[{"type":"String","name":"method","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"method","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"[String]","name":"params","required":true,"kind":34,"array":{"type":"[String]","name":"params","required":true,"kind":18,"array":null,"map":null,"scalar":{"type":"String","name":"params","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null,"item":{"type":"String","name":"params","required":true,"kind":4}},"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"Ethereum_Connection","name":"connection","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"Ethereum_Connection","name":"connection","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"String","name":"sendRPC","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"sendRPC","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"uri":"ens/ethereum.polywrap.eth","namespace":"Ethereum","nativeType":"Module","isInterface":false}],"importedEnumTypes":[],"importedEnvTypes":[],"moduleType":{"type":"Module","name":null,"required":null,"kind":128,"methods":[{"type":"Method","name":"tryResolveUri","required":true,"kind":64,"arguments":[{"type":"String","name":"authority","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"authority","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null},{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":34,"array":null,"map":null,"scalar":null,"object":{"type":"UriResolver_MaybeUriOrManifest","name":"tryResolveUri","required":null,"kind":8192},"enum":null,"unresolvedObjectOrEnum":null}},{"type":"Method","name":"getFile","required":true,"kind":64,"arguments":[{"type":"String","name":"path","required":true,"kind":34,"array":null,"map":null,"scalar":{"type":"String","name":"path","required":true,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}],"return":{"type":"Bytes","name":"getFile","required":null,"kind":34,"array":null,"map":null,"scalar":{"type":"Bytes","name":"getFile","required":null,"kind":4},"object":null,"enum":null,"unresolvedObjectOrEnum":null}}],"imports":[{"type":"UriResolver_Module"},{"type":"UriResolver_MaybeUriOrManifest"},{"type":"Ethereum_Module"},{"type":"Ethereum_Connection"},{"type":"Ethereum_TxOverrides"},{"type":"Ethereum_StaticTxResult"},{"type":"Ethereum_TxRequest"},{"type":"Ethereum_TxReceipt"},{"type":"Ethereum_Log"},{"type":"Ethereum_EventNotification"},{"type":"Ethereum_Network"},{"type":"Ethereum_TxResponse"},{"type":"Ethereum_Access"}],"interfaces":[{"type":"UriResolver_Module","name":null,"required":null,"kind":2048,"array":null,"map":null,"scalar":null,"object":null,"enum":null,"unresolvedObjectOrEnum":null}]}} \ No newline at end of file +export const wrapManifest = { + name: "EnsResolver", + type: "plugin", + version: "0.1", + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [ + { + "type": "UriResolver_MaybeUriOrManifest", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "uri", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "uri", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "manifest", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "manifest", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/uri-resolver.core.polywrap.eth", + "namespace": "UriResolver", + "nativeType": "MaybeUriOrManifest" + }, + { + "type": "Ethereum_Connection", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "node", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "node", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Connection" + }, + { + "type": "Ethereum_TxOverrides", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "result", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "result", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "StaticTxResult" + }, + { + "type": "Ethereum_TxRequest", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxRequest" + }, + { + "type": "Ethereum_TxReceipt", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "root", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "root", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 34, + "array": { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxReceipt" + }, + { + "type": "Ethereum_Log", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Log" + }, + { + "type": "Ethereum_EventNotification", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "EventNotification" + }, + { + "type": "Ethereum_Network", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "name", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "name", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Network" + }, + { + "type": "Ethereum_TxResponse", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "hash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "hash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "raw", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "raw", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "r", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "r", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "s", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "s", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 34, + "array": { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxResponse" + }, + { + "type": "Ethereum_Access", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Access" + } + ], + "importedModuleTypes": [ + { + "type": "UriResolver_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "tryResolveUri", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "authority", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "authority", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "path", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "path", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "UriResolver_MaybeUriOrManifest", + "name": "tryResolveUri", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "UriResolver_MaybeUriOrManifest", + "name": "tryResolveUri", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getFile", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "path", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "path", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Bytes", + "name": "getFile", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "getFile", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "ens/uri-resolver.core.polywrap.eth", + "namespace": "UriResolver", + "nativeType": "Module", + "isInterface": false + }, + { + "type": "Ethereum_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "callContractView", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractStatic", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeParams", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeFunction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityPack", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityKeccak256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "soliditySha256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerTransactionCount", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getGasPrice", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateTransactionGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateContractCallGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "checkAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toWei", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "eth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "eth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toEth", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "awaitTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "txHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "txHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "waitForEvent", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "event", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "event", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getNetwork", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethodAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransactionAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "abi", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "abi", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "signMessage", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendRPC", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "params", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "params", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Module", + "isInterface": false + } + ], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "tryResolveUri", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "authority", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "authority", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "path", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "path", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "UriResolver_MaybeUriOrManifest", + "name": "tryResolveUri", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "UriResolver_MaybeUriOrManifest", + "name": "tryResolveUri", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getFile", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "path", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "path", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Bytes", + "name": "getFile", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "getFile", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [ + { + "type": "UriResolver_Module" + }, + { + "type": "UriResolver_MaybeUriOrManifest" + }, + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], + "interfaces": [ + { + "type": "UriResolver_Module", + "name": null, + "required": null, + "kind": 2048, + "array": null, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ] + } + } +} \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml index 36488e8527..022cae0919 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: FileSystemResolver language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts index c1f6669e8c..bccb3f3500 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts @@ -1,405 +1,531 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [ - { - type: "UriResolver_MaybeUriOrManifest", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "uri", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "uri", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Bytes", - name: "manifest", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest", - }, - ], - importedModuleTypes: [ - { - type: "UriResolver_Module", - name: null, - required: null, - kind: 256, - methods: [ - { - type: "Method", - name: "tryResolveUri", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "authority", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "authority", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", +export const wrapManifest = { + name: "FileSystemResolver", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "UriResolver_MaybeUriOrManifest", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "uri", required: null, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", - required: null, - kind: 8192, - }, + scalar: { type: "String", name: "uri", required: null, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "getFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { + { type: "Bytes", - name: "getFile", + name: "manifest", required: null, kind: 34, array: null, map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, + scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "Module", - isInterface: false, - }, - { - type: "FileSystem_Module", - name: null, - required: null, - kind: 256, - methods: [ - { - type: "Method", - name: "readFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, + ], + interfaces: [], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest", + }, + ], + importedModuleTypes: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "authority", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Bytes", - name: "readFile", + }, + { + type: "Method", + name: "getFile", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Bytes", - name: "readFile", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "readFileAsString", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, + name: "getFile", + required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "FileSystem_Encoding", - name: "encoding", - required: null, + }, + ], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "Module", + isInterface: false, + }, + { + type: "FileSystem_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "readFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "readFile", + required: true, kind: 34, array: null, map: null, - scalar: null, - object: null, - enum: { - type: "FileSystem_Encoding", - name: "encoding", - required: null, - kind: 16384, + scalar: { + type: "Bytes", + name: "readFile", + required: true, + kind: 4, }, + object: null, + enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", + }, + { + type: "Method", name: "readFileAsString", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: null, + enum: { + type: "FileSystem_Encoding", + name: "encoding", + required: null, + kind: 16384, + }, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "String", name: "readFileAsString", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "exists", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, + scalar: { + type: "String", + name: "readFileAsString", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Boolean", + }, + { + type: "Method", name: "exists", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Boolean", name: "exists", required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "writeFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, + scalar: { + type: "Boolean", + name: "exists", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Bytes", - name: "data", - required: true, + }, + { + type: "Method", + name: "writeFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "writeFile", + required: null, kind: 34, array: null, map: null, - scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + scalar: { + type: "Boolean", + name: "writeFile", + required: null, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Boolean", - name: "writeFile", - required: null, - kind: 34, - array: null, - map: null, - scalar: { + }, + { + type: "Method", + name: "mkdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Boolean", - name: "writeFile", + name: "mkdir", required: null, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "mkdir", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, + { + type: "Method", + name: "rm", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "recursive", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "recursive", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Boolean", + name: "force", + required: null, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "force", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Boolean", + name: "rm", + required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, + scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { + }, + { + type: "Method", + name: "rmdir", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "Boolean", - name: "recursive", + name: "rmdir", required: null, kind: 34, array: null, map: null, - scalar: { - type: "Boolean", - name: "recursive", - required: null, - kind: 4, - }, + scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Boolean", - name: "mkdir", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [ + { + type: "FileSystem_Encoding", + name: null, + required: null, + kind: 520, + constants: [ + "ASCII", + "UTF8", + "UTF16LE", + "UCS2", + "BASE64", + "BASE64URL", + "LATIN1", + "BINARY", + "HEX", + ], + uri: "ens/fs.polywrap.eth", + namespace: "FileSystem", + nativeType: "Encoding", + }, + ], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ { type: "Method", - name: "rm", + name: "tryResolveUri", required: true, kind: 64, arguments: [ { type: "String", - name: "path", + name: "authority", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Boolean", - name: "recursive", - required: null, - kind: 34, - array: null, - map: null, scalar: { - type: "Boolean", - name: "recursive", - required: null, + type: "String", + name: "authority", + required: true, kind: 4, }, object: null, @@ -407,39 +533,39 @@ export const abi = { unresolvedObjectOrEnum: null, }, { - type: "Boolean", - name: "force", - required: null, + type: "String", + name: "path", + required: true, kind: 34, array: null, map: null, - scalar: { - type: "Boolean", - name: "force", - required: null, - kind: 4, - }, + scalar: { type: "String", name: "path", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, ], return: { - type: "Boolean", - name: "rm", + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", required: null, kind: 34, array: null, map: null, - scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, - object: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, }, { type: "Method", - name: "rmdir", + name: "getFile", required: true, kind: 64, arguments: [ @@ -457,160 +583,39 @@ export const abi = { }, ], return: { - type: "Boolean", - name: "rmdir", + type: "Bytes", + name: "getFile", required: null, kind: 34, array: null, map: null, - scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, }, ], - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [ - { - type: "FileSystem_Encoding", - name: null, - required: null, - kind: 520, - constants: [ - "ASCII", - "UTF8", - "UTF16LE", - "UCS2", - "BASE64", - "BASE64URL", - "LATIN1", - "BINARY", - "HEX", + imports: [ + { type: "UriResolver_Module" }, + { type: "UriResolver_MaybeUriOrManifest" }, + { type: "FileSystem_Module" }, + { type: "FileSystem_Encoding" }, ], - uri: "ens/fs.polywrap.eth", - namespace: "FileSystem", - nativeType: "Encoding", - }, - ], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "tryResolveUri", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "authority", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "authority", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", + interfaces: [ + { + type: "UriResolver_Module", + name: null, required: null, - kind: 34, + kind: 2048, array: null, map: null, scalar: null, - object: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Bytes", - name: "getFile", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [ - { type: "UriResolver_Module" }, - { type: "UriResolver_MaybeUriOrManifest" }, - { type: "FileSystem_Module" }, - { type: "FileSystem_Encoding" }, - ], - interfaces: [ - { - type: "UriResolver_Module", - name: null, - required: null, - kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - }, + ], + } + } }; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml index e2ae403d96..7529597309 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: IpfsResolver language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts index 8f15fc1798..769433d268 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts @@ -1,339 +1,449 @@ -export const abi = { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [ - { - type: "UriResolver_MaybeUriOrManifest", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "uri", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "uri", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "Bytes", - name: "manifest", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "MaybeUriOrManifest", - }, - { - type: "Ipfs_Options", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "UInt32", - name: "timeout", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: - " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", - }, - { - type: "String", - name: "provider", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "provider", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: "The IPFS provider to be used", - }, - { - type: "Boolean", - name: "disableParallelRequests", - required: null, - kind: 34, - array: null, - map: null, - scalar: { +export const wrapManifest = { + name: "IpfsResolver", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "UriResolver_MaybeUriOrManifest", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "uri", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "uri", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Bytes", + name: "manifest", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "MaybeUriOrManifest", + }, + { + type: "Ipfs_Options", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + required: null, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: null, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "The IPFS provider to be used", + }, + { type: "Boolean", name: "disableParallelRequests", required: null, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + required: null, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + comment: "Disable querying providers in parallel when resolving URIs", }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - comment: "Disable querying providers in parallel when resolving URIs", - }, - ], - interfaces: [], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "Options", - }, - { - type: "Ipfs_ResolveResult", - name: null, - required: null, - kind: 1025, - properties: [ - { - type: "String", - name: "cid", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "provider", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "provider", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "ResolveResult", - }, - ], - importedModuleTypes: [ - { - type: "UriResolver_Module", - name: null, - required: null, - kind: 256, - methods: [ - { - type: "Method", - name: "tryResolveUri", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "authority", - required: true, - kind: 34, - array: null, - map: null, - scalar: { + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Options", + }, + { + type: "Ipfs_ResolveResult", + name: null, + required: null, + kind: 1025, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "provider", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "ResolveResult", + }, + ], + importedModuleTypes: [ + { + type: "UriResolver_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "tryResolveUri", + required: true, + kind: 64, + arguments: [ + { type: "String", name: "authority", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "path", - required: true, + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, + scalar: null, + object: { + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", + required: null, + kind: 8192, + }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", - required: null, - kind: 34, - array: null, - map: null, - scalar: null, - object: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "getFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, + { + type: "Method", + name: "getFile", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "path", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "getFile", + required: null, kind: 34, array: null, map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Bytes", - name: "getFile", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - ], - uri: "ens/uri-resolver.core.polywrap.eth", - namespace: "UriResolver", - nativeType: "Module", - isInterface: false, - }, - { - type: "Ipfs_Module", - name: null, - required: null, - kind: 256, - methods: [ - { - type: "Method", - name: "cat", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "cid", + ], + uri: "ens/uri-resolver.core.polywrap.eth", + namespace: "UriResolver", + nativeType: "Module", + isInterface: false, + }, + { + type: "Ipfs_Module", + name: null, + required: null, + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Bytes", + name: "cat", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - { - type: "Ipfs_Options", - name: "options", + }, + { + type: "Method", + name: "resolve", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "Ipfs_Options", + name: "options", + required: null, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "Ipfs_ResolveResult", + name: "resolve", required: null, kind: 34, array: null, map: null, scalar: null, object: { - type: "Ipfs_Options", - name: "options", + type: "Ipfs_ResolveResult", + name: "resolve", required: null, kind: 8192, }, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "Bytes", - name: "cat", + }, + { + type: "Method", + name: "addFile", required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + kind: 64, + arguments: [ + { + type: "Bytes", + name: "data", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { + type: "String", + name: "addFile", + required: true, + kind: 34, + array: null, + map: null, + scalar: { + type: "String", + name: "addFile", + required: true, + kind: 4, + }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, }, - }, + ], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ { type: "Method", - name: "resolve", + name: "tryResolveUri", required: true, kind: 64, arguments: [ { type: "String", - name: "cid", + name: "authority", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "cid", required: true, kind: 4 }, + scalar: { + type: "String", + name: "authority", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, { - type: "Ipfs_Options", - name: "options", - required: null, + type: "String", + name: "path", + required: true, kind: 34, array: null, map: null, - scalar: null, - object: { - type: "Ipfs_Options", - name: "options", - required: null, - kind: 8192, - }, + scalar: { type: "String", name: "path", required: true, kind: 4 }, + object: null, enum: null, unresolvedObjectOrEnum: null, }, ], return: { - type: "Ipfs_ResolveResult", - name: "resolve", + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", required: null, kind: 34, array: null, map: null, scalar: null, object: { - type: "Ipfs_ResolveResult", - name: "resolve", + type: "UriResolver_MaybeUriOrManifest", + name: "tryResolveUri", required: null, kind: 8192, }, @@ -343,163 +453,58 @@ export const abi = { }, { type: "Method", - name: "addFile", + name: "getFile", required: true, kind: 64, arguments: [ { - type: "Bytes", - name: "data", + type: "String", + name: "path", required: true, kind: 34, array: null, map: null, - scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, + scalar: { type: "String", name: "path", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, ], return: { - type: "String", - name: "addFile", - required: true, + type: "Bytes", + name: "getFile", + required: null, kind: 34, array: null, map: null, - scalar: { - type: "String", - name: "addFile", - required: true, - kind: 4, - }, + scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, }, ], - uri: "ens/ipfs.polywrap.eth", - namespace: "Ipfs", - nativeType: "Module", - isInterface: false, - }, - ], - importedEnumTypes: [], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ - { - type: "Method", - name: "tryResolveUri", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "authority", - required: true, - kind: 34, - array: null, - map: null, - scalar: { - type: "String", - name: "authority", - required: true, - kind: 4, - }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", + imports: [ + { type: "UriResolver_Module" }, + { type: "UriResolver_MaybeUriOrManifest" }, + { type: "Ipfs_Module" }, + { type: "Ipfs_Options" }, + { type: "Ipfs_ResolveResult" }, + ], + interfaces: [ + { + type: "UriResolver_Module", + name: null, required: null, - kind: 34, + kind: 2048, array: null, map: null, scalar: null, - object: { - type: "UriResolver_MaybeUriOrManifest", - name: "tryResolveUri", - required: null, - kind: 8192, - }, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "getFile", - required: true, - kind: 64, - arguments: [ - { - type: "String", - name: "path", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - return: { - type: "Bytes", - name: "getFile", - required: null, - kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - }, - ], - imports: [ - { type: "UriResolver_Module" }, - { type: "UriResolver_MaybeUriOrManifest" }, - { type: "Ipfs_Module" }, - { type: "Ipfs_Options" }, - { type: "Ipfs_ResolveResult" }, - ], - interfaces: [ - { - type: "UriResolver_Module", - name: null, - required: null, - kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - }, + ], + } + } }; diff --git a/packages/js/plugins/uts46/polywrap.plugin.yaml b/packages/js/plugins/uts46/polywrap.plugin.yaml index 0671ad879e..280cf5dd2f 100644 --- a/packages/js/plugins/uts46/polywrap.plugin.yaml +++ b/packages/js/plugins/uts46/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: Uts46 language: plugin/typescript module: ./src/index.ts diff --git a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts index 35962e1768..87c49d8792 100644 --- a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts @@ -1,159 +1,164 @@ -export const abi = { - objectTypes: [ - { - type: "ConvertResult", - name: null, - required: null, - kind: 1, - properties: [ - { - type: "String", - name: "IDN", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "IDN", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - { - type: "String", - name: "PC", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "PC", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - ], - interfaces: [], - }, - ], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], - moduleType: { - type: "Module", - name: null, - required: null, - kind: 128, - methods: [ +export const wrapManifest = { + name: "Uts46", + type: "plugin", + version: "0.1", + abi: { + objectTypes: [ { - type: "Method", - name: "toAscii", - required: true, - kind: 64, - arguments: [ + type: "ConvertResult", + name: null, + required: null, + kind: 1, + properties: [ { type: "String", - name: "value", + name: "IDN", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, + scalar: { type: "String", name: "IDN", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "String", - name: "toAscii", - required: true, - kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "toAscii", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, - }, - }, - { - type: "Method", - name: "toUnicode", - required: true, - kind: 64, - arguments: [ { type: "String", - name: "value", + name: "PC", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, + scalar: { type: "String", name: "PC", required: true, kind: 4 }, object: null, enum: null, unresolvedObjectOrEnum: null, }, ], - return: { - type: "String", - name: "toUnicode", + interfaces: [], + }, + ], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [], + importedModuleTypes: [], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + name: null, + required: null, + kind: 128, + methods: [ + { + type: "Method", + name: "toAscii", required: true, - kind: 34, - array: null, - map: null, - scalar: { + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "String", - name: "toUnicode", + name: "toAscii", required: true, - kind: 4, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "toAscii", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - { - type: "Method", - name: "convert", - required: true, - kind: 64, - arguments: [ - { + { + type: "Method", + name: "toUnicode", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "String", - name: "value", + name: "toUnicode", required: true, kind: 34, array: null, map: null, - scalar: { type: "String", name: "value", required: true, kind: 4 }, + scalar: { + type: "String", + name: "toUnicode", + required: true, + kind: 4, + }, object: null, enum: null, unresolvedObjectOrEnum: null, }, - ], - return: { - type: "ConvertResult", + }, + { + type: "Method", name: "convert", required: true, - kind: 34, - array: null, - map: null, - scalar: null, - object: { + kind: 64, + arguments: [ + { + type: "String", + name: "value", + required: true, + kind: 34, + array: null, + map: null, + scalar: { type: "String", name: "value", required: true, kind: 4 }, + object: null, + enum: null, + unresolvedObjectOrEnum: null, + }, + ], + return: { type: "ConvertResult", name: "convert", required: true, - kind: 8192, + kind: 34, + array: null, + map: null, + scalar: null, + object: { + type: "ConvertResult", + name: "convert", + required: true, + kind: 8192, + }, + enum: null, + unresolvedObjectOrEnum: null, }, - enum: null, - unresolvedObjectOrEnum: null, }, - }, - ], - imports: [], - interfaces: [], - }, + ], + imports: [], + interfaces: [], + } + } }; diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index f11c51f223..34a5d0d809 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,6 +34,10 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); + + if (test.name === "001-local-imports 00-sanity") { + console.log(JSON.stringify(result, null, 2)) + } if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info b/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info new file mode 100644 index 0000000000..ce20b6b055 --- /dev/null +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info @@ -0,0 +1 @@ +„¤name¦Plugin§version£0.1¤type¦plugin£abiˆ«objectTypes©enumTypes®interfaceTypes³importedObjectTypes³importedModuleTypes±importedEnumTypes°importedEnvTypesªmoduleType‡¤type¦Module¤nameÀ¨requiredÀ¤kindÌ€§methods’†¤type¦Method¤name§getData¨requiredäkind@©arguments¦returnŠ¤type£Int¤name§getData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name§getData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ†¤type¦Method¤name§setData¨requiredäkind@©arguments‘Š¤type£Int¤name¥value¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name¥value¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ¦returnŠ¤type§Boolean¤name§setData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type§Boolean¤name§setData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ§importsªinterfaces \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml index 460c83a152..08003a561d 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Asyncify build: ./polywrap.build.yaml language: wasm/assemblyscript @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: "ens/memory-storage.polywrap.eth" - schema: ./plugin.graphql \ No newline at end of file + info: ./plugin.wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index 074768d846..d0354535d5 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: SimpleStorage language: wasm/assemblyscript build: ./polywrap.build.yaml From ede32c8aeb9c2948cff8fc01065168c4ae68f228 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Sat, 30 Jul 2022 22:46:35 +0200 Subject: [PATCH 19/56] feat(plugins): update plugin package manifest to wrap info manifest & start making green client tests --- package.json | 2 +- packages/cli/src/lib/helpers/wrap.ts | 18 +++++++------ .../src/__tests__/core/plugin-wrapper.spec.ts | 6 +++++ .../src/__tests__/core/wasm-wrapper.spec.ts | 18 ++++++------- .../js/client/src/plugin/PluginWrapper.ts | 27 +++++-------------- .../js/core/src/__tests__/resolveUri.spec.ts | 14 +++------- packages/js/core/src/types/Plugin.ts | 16 +++-------- .../polywrap/src/formats/polywrap/0.2.ts | 2 +- .../plugins/ethereum/src/wrap-man/manifest.ts | 8 ++---- .../file-system/src/wrap-man/manifest.ts | 4 +-- .../graph-node/src/wrap-man/manifest.ts | 7 ++--- .../js/plugins/http/src/wrap-man/manifest.ts | 4 +-- .../js/plugins/ipfs/src/wrap-man/manifest.ts | 4 +-- .../plugins/logger/src/wrap-man/manifest.ts | 4 +-- .../js/plugins/sha3/src/wrap-man/manifest.ts | 4 +-- .../ens-resolver/src/wrap-man/manifest.ts | 4 +-- .../src/wrap-man/manifest.ts | 4 +-- .../ipfs-resolver/src/wrap-man/manifest.ts | 4 +-- .../js/plugins/uts46/src/wrap-man/manifest.ts | 4 +-- .../compose/src/__tests__/test-cases.spec.ts | 4 --- .../wasm-as/bigint-type/polywrap.yaml | 2 +- .../wasm-as/bignumber-type/polywrap.yaml | 2 +- .../wrappers/wasm-as/bytes-type/polywrap.yaml | 2 +- .../wrappers/wasm-as/enum-types/polywrap.yaml | 2 +- .../wasm-as/env-types/external/polywrap.yaml | 2 +- .../wasm-as/env-types/main/polywrap.yaml | 4 +-- .../test-interface/polywrap.yaml | 2 +- .../test-use-getImpl/polywrap.yaml | 4 +-- .../test-wrapper/polywrap.yaml | 4 +-- .../wasm-as/invalid-types/polywrap.yaml | 2 +- .../wrappers/wasm-as/json-type/polywrap.yaml | 2 +- .../wrappers/wasm-as/map-type/polywrap.yaml | 2 +- .../wasm-as/number-types/polywrap.yaml | 2 +- .../wasm-as/object-types/polywrap.yaml | 2 +- .../wasm-as/reserved-words/polywrap.yaml | 2 +- .../wasm-as/simple-env-types/polywrap.yaml | 2 +- 36 files changed, 84 insertions(+), 112 deletions(-) diff --git a/package.json b/package.json index f7071aa00b..6e32270031 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && plugins:codegen:patch", + "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 9811bebf7c..31d74cfcf4 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -1,5 +1,8 @@ import { msgpackEncode } from "@polywrap/msgpack-js"; -import { validateWrapManifest, WrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { + validateWrapManifest, + WrapManifest, +} from "@polywrap/wrap-manifest-types-js"; import { writeFileSync } from "@polywrap/os-js"; export const generateWrapFile = async ( @@ -9,18 +12,17 @@ export const generateWrapFile = async ( path: string ): Promise => { const info: WrapManifest = { - abi: abi as never, + version: "0.1", name, type, - version: "0.1.0", + /// TODO(cbrzn): Change this to WrapAbi + abi: abi as never, }; // One last sanity check await validateWrapManifest(info); - - const s = JSON.stringify(info); - const encodedInfo = msgpackEncode(JSON.parse(s)); - writeFileSync(path, encodedInfo, { + const parsedInfo = JSON.parse(JSON.stringify(info)); + writeFileSync(path, msgpackEncode(parsedInfo), { encoding: "binary", }); -}; \ No newline at end of file +}; diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index ba7bfc970f..ac9117dc87 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -203,4 +203,10 @@ describe("plugin-wrapper", () => { expect(registeredPlugin?.plugin).toEqual(pluginPackage1); }); + + test("get manifest should fetch wrap manifest from plugin", async () => { + const client = await getClient() + const manifest = await client.getManifest("ens/ipfs.polywrap.eth") + expect(manifest.type).toEqual("plugin") + }) }); diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index 4acf982790..66787ba6b0 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -230,25 +230,25 @@ describe("wasm-wrapper", () => { test("getFile -- simple-storage polywrap", async () => { const client = await getClient(); - const expectedSchema = await fs.promises.readFile( - `${wrapperPath}/build/schema.graphql`, + const expectedMeta = await fs.promises.readFile( + `${wrapperPath}/build/polywrap.meta.json`, "utf8" ); - const fileStr: string = (await client.getFile(wrapperUri, { - path: "./schema.graphql", + const metaStr: string = (await client.getFile(wrapperUri, { + path: "./polywrap.meta.json", encoding: "utf8", })) as string; - expect(fileStr).toEqual(expectedSchema); + expect(metaStr).toEqual(expectedMeta); - const fileBuffer: Uint8Array = (await client.getFile(wrapperUri, { - path: "./schema.graphql", + const metaBuffer: Uint8Array = (await client.getFile(wrapperUri, { + path: "./polywrap.meta.json", })) as Uint8Array; const decoder = new TextDecoder("utf8"); - const text = decoder.decode(fileBuffer); + const text = decoder.decode(metaBuffer); - expect(text).toEqual(expectedSchema); + expect(text).toEqual(expectedMeta); await expect(() => client.getFile(new Uri("wrap://ens/ipfs.polywrap.eth"), { diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 94af41807f..4e7a19ed6e 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -13,11 +13,9 @@ import { import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; import { msgpackDecode } from "@polywrap/msgpack-js"; import { Tracer } from "@polywrap/tracing-js"; -import fs from "fs"; export class PluginWrapper extends Wrapper { private _instance: PluginModule | undefined; - private _info: WrapManifest | undefined; constructor( private _uri: Uri, @@ -36,29 +34,16 @@ export class PluginWrapper extends Wrapper { } public async getFile( - _options: GetFileOptions, - _: Client + _: GetFileOptions, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + client: Client ): Promise { - const file = await fs.promises.readFile(_options.path); - if (!file) { - throw Error( - `PluginWrapper: File was not found. \n Path: ${_options.path}` - ); - } - return file; + throw Error("client.getFile(...) is not implemented for Plugins."); } - @Tracer.traceMethod("WasmWrapper: getManifest") + @Tracer.traceMethod("PluginWrapper: getManifest") public async getManifest(_: Client): Promise { - if (this._info) { - return this._info; - } - - // TODO(cbrzn): Remove this once wrap-man has been removed - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - this._info = (await import("./wrap-man/wrap.info")) as WrapManifest; - return this._info; + return this._plugin.manifest; } @Tracer.traceMethod("PluginWrapper: invoke") diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index 0a497761d2..987d1c0ff4 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -131,10 +131,10 @@ describe("resolveUri", () => { }; const testManifest: WrapManifest = { - version: "0.1.0", + version: "0.1", type: "wasm", name: "dog-cat", - abi: {} + abi: {} as never }; const ensWrapper = { @@ -181,10 +181,7 @@ describe("resolveUri", () => { uri: new Uri("ens/my-plugin"), plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [coreInterfaceUris.uriResolver], - }, + manifest: {} as WrapManifest, }, }, ]; @@ -381,10 +378,7 @@ describe("resolveUri", () => { uri: new Uri("some/wrapper"), plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [coreInterfaceUris.uriResolver], - }, + manifest: {} as WrapManifest, }, }, ]; diff --git a/packages/js/core/src/types/Plugin.ts b/packages/js/core/src/types/Plugin.ts index 73d8107d79..1251ffcd1d 100644 --- a/packages/js/core/src/types/Plugin.ts +++ b/packages/js/core/src/types/Plugin.ts @@ -1,5 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Client, MaybeAsync, executeMaybeAsyncFunction, Uri } from "."; +import { Client, MaybeAsync, executeMaybeAsyncFunction } from "."; + +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; /** * Invocable plugin method. @@ -71,19 +73,9 @@ export abstract class PluginModule< } } -/** The plugin package's manifest */ -export interface PluginPackageManifest { - // TODO (cbrzn): Change to ABI once JSON Schema has been merged - /** The Wrapper's ABI */ - abi: unknown; - - /** All interface schemas implemented by this plugin. */ - implements: Uri[]; -} - export type PluginPackage = { factory: () => PluginModule; - manifest: PluginPackageManifest; + manifest: WrapManifest; }; export type PluginFactory = ( diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts index ce4679e102..5b973d0be9 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts @@ -10,7 +10,7 @@ export interface PolywrapManifest { /** * Polywrap manifest format version. */ - format: "0.2"; + format: 0.2; /** * Name of this wrapper package. */ diff --git a/packages/js/plugins/ethereum/src/wrap-man/manifest.ts b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts index a423181704..1ab8bb709d 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/manifest.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/manifest.ts @@ -6,10 +6,6 @@ import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/file-system/src/wrap-man/manifest.ts b/packages/js/plugins/file-system/src/wrap-man/manifest.ts index 946e7ef7f8..adf3b758e9 100644 --- a/packages/js/plugins/file-system/src/wrap-man/manifest.ts +++ b/packages/js/plugins/file-system/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ new Uri("ens/fs.polywrap.eth"), ], diff --git a/packages/js/plugins/graph-node/src/wrap-man/manifest.ts b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts index 8de225b990..b475a930c5 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/manifest.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts @@ -3,12 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, - implements: [], + abi: wrapManifest.abi, + implements: [ + ], }; diff --git a/packages/js/plugins/http/src/wrap-man/manifest.ts b/packages/js/plugins/http/src/wrap-man/manifest.ts index 96b656fffd..b475a930c5 100644 --- a/packages/js/plugins/http/src/wrap-man/manifest.ts +++ b/packages/js/plugins/http/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ ], }; diff --git a/packages/js/plugins/ipfs/src/wrap-man/manifest.ts b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts index dbf3af414e..1e68485b42 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/manifest.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + manifest: wrapManifest, implements: [ new Uri("ens/ipfs.polywrap.eth"), ], diff --git a/packages/js/plugins/logger/src/wrap-man/manifest.ts b/packages/js/plugins/logger/src/wrap-man/manifest.ts index fb4620ef31..486bdef047 100644 --- a/packages/js/plugins/logger/src/wrap-man/manifest.ts +++ b/packages/js/plugins/logger/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ new Uri("ens/logger.core.polywrap.eth"), ], diff --git a/packages/js/plugins/sha3/src/wrap-man/manifest.ts b/packages/js/plugins/sha3/src/wrap-man/manifest.ts index 8de225b990..77e4bdd907 100644 --- a/packages/js/plugins/sha3/src/wrap-man/manifest.ts +++ b/packages/js/plugins/sha3/src/wrap-man/manifest.ts @@ -3,12 +3,12 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [], }; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts index 4cf8732013..b992e4caa6 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ new Uri("ens/uri-resolver.core.polywrap.eth"), ], diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts index 4cf8732013..b992e4caa6 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ new Uri("ens/uri-resolver.core.polywrap.eth"), ], diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts index 4cf8732013..b992e4caa6 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ new Uri("ens/uri-resolver.core.polywrap.eth"), ], diff --git a/packages/js/plugins/uts46/src/wrap-man/manifest.ts b/packages/js/plugins/uts46/src/wrap-man/manifest.ts index 96b656fffd..b475a930c5 100644 --- a/packages/js/plugins/uts46/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uts46/src/wrap-man/manifest.ts @@ -3,13 +3,13 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./wrap.info"; // @ts-ignore import { PluginPackageManifest, Uri } from "@polywrap/core-js"; export const manifest: PluginPackageManifest = { - abi, + abi: wrapManifest.abi, implements: [ ], }; diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index 34a5d0d809..f11c51f223 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,10 +34,6 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); - - if (test.name === "001-local-imports 00-sanity") { - console.log(JSON.stringify(result, null, 2)) - } if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } diff --git a/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml index 3fcb197664..4ce4f9f3bb 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BigInt build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml index 7dffbaa55b..07a79ea1f7 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BigNumber build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml index 3ab5b18f2a..d51988ad84 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BytesType build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml index b9168753f7..443b2c350e 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/enum-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnumTypes build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/external/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/external/polywrap.yaml index 611dea4d59..9120a20fd1 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/external/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/external/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnvTypeExternal language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml index 01d739bb96..562ba7fcc4 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnvType language: wasm/assemblyscript build: ./polywrap.build.yaml @@ -6,4 +6,4 @@ schema: ./src/schema.graphql module: ./src/index.ts import_redirects: - uri: "ens/externalenv.polywrap.eth" - schema: ../external/build/schema.graphql + schema: ../external/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml index d6f5b8a82d..00a7c96f03 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-interface/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestInterface language: interface schema: ./schema.graphql diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml index bf161c4dc2..862abfc30c 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestUseGetImpl build: ./polywrap.build.yaml language: wasm/assemblyscript @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql \ No newline at end of file + info: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml index 95bc6af117..cccb358160 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestWrapper build: ./polywrap.build.yaml language: wasm/assemblyscript @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./src/index.ts import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql + info: ../test-interface/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml index f7ece16902..d9351c0b87 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: InvalidTypes build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml index 33357797eb..fe4ab1d690 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/json-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: JsonType build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml index 3ab5b18f2a..d51988ad84 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/map-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BytesType build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml index 646f682ca5..e8e031d358 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/number-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: NumberTypes build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml index 5cac75d904..e62b8002ad 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/object-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: ObjectTypes build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml index 688bd0aa70..1194bec31d 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: ReservedWords build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml index 7487910b2f..1d6a5dd80c 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: SimpleEnvTypes language: wasm/assemblyscript build: ./polywrap.build.yaml From 23f4c92c80448b442063664c157497ca8f2b92a5 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 1 Aug 2022 02:00:30 +0200 Subject: [PATCH 20/56] tests: plugins & bind went green with update of PluginPackageManifest to WrapInfoManifest --- .../ethereum/src/__tests__/integration/polywrap.yaml | 2 +- .../js/plugins/file-system/src/wrap-man/manifest.ts | 11 +++-------- .../js/plugins/graph-node/src/wrap-man/manifest.ts | 10 +++------- .../http/src/__tests__/e2e/integration/polywrap.yaml | 2 +- packages/js/plugins/http/src/wrap-man/manifest.ts | 10 +++------- packages/js/plugins/ipfs/src/wrap-man/manifest.ts | 11 +++-------- packages/js/plugins/logger/src/wrap-man/manifest.ts | 11 +++-------- packages/js/plugins/sha3/src/wrap-man/manifest.ts | 9 +++------ .../ens-resolver/src/wrap-man/manifest.ts | 11 +++-------- .../file-system-resolver/src/wrap-man/manifest.ts | 11 +++-------- .../ipfs-resolver/src/wrap-man/manifest.ts | 11 +++-------- packages/js/plugins/uts46/src/wrap-man/manifest.ts | 10 +++------- .../bind/src/bindings/typescript/plugin-ts/index.ts | 4 ++-- .../plugin-ts/templates/manifest-ts.mustache | 11 ++--------- .../plugin-ts/templates/wrap.info-ts.mustache | 9 ++++++++- .../cases/bind/sanity/output/plugin-ts/manifest.ts | 10 +++------- .../cases/bind/sanity/output/plugin-ts/wrap.info.ts | 9 +++++++-- .../cases/wrappers/wasm-as/asyncify/plugin.graphql | 7 ------- .../cases/wrappers/wasm-rs/asyncify/plugin.graphql | 7 ------- .../cases/wrappers/wasm-rs/asyncify/plugin.wrap.info | 1 + .../cases/wrappers/wasm-rs/asyncify/polywrap.yaml | 4 ++-- .../wrappers/wasm-rs/benchmarks/polywrap-current.yaml | 2 +- .../cases/wrappers/wasm-rs/benchmarks/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/bigint-type/polywrap.yaml | 2 +- .../wrappers/wasm-rs/bignumber-type/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/bytes-type/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/enum-types/polywrap.yaml | 2 +- .../wrappers/wasm-rs/env-types/external/polywrap.yaml | 2 +- .../wrappers/wasm-rs/env-types/main/polywrap.yaml | 4 ++-- .../implementations/test-interface/polywrap.yaml | 2 +- .../implementations/test-use-getImpl/polywrap.yaml | 4 ++-- .../implementations/test-wrapper/polywrap.yaml | 4 ++-- .../wrappers/wasm-rs/invalid-types/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/json-type/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/large-types/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/map-type/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/number-types/polywrap.yaml | 2 +- .../cases/wrappers/wasm-rs/object-types/polywrap.yaml | 2 +- .../wrappers/wasm-rs/simple-env-types/polywrap.yaml | 2 +- .../wrappers/wasm-rs/simple-storage/polywrap.yaml | 2 +- 40 files changed, 79 insertions(+), 136 deletions(-) delete mode 100644 packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.graphql delete mode 100644 packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.graphql create mode 100644 packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.wrap.info diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml index 59f3455fba..e493d0e639 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: EthereumIntegration build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/js/plugins/file-system/src/wrap-man/manifest.ts b/packages/js/plugins/file-system/src/wrap-man/manifest.ts index adf3b758e9..1ab8bb709d 100644 --- a/packages/js/plugins/file-system/src/wrap-man/manifest.ts +++ b/packages/js/plugins/file-system/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - new Uri("ens/fs.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/graph-node/src/wrap-man/manifest.ts b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts index b475a930c5..1ab8bb709d 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/manifest.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/manifest.ts @@ -3,13 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml index 28a362752f..231afdd6ae 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: HTTP-Integration build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/js/plugins/http/src/wrap-man/manifest.ts b/packages/js/plugins/http/src/wrap-man/manifest.ts index b475a930c5..1ab8bb709d 100644 --- a/packages/js/plugins/http/src/wrap-man/manifest.ts +++ b/packages/js/plugins/http/src/wrap-man/manifest.ts @@ -3,13 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/ipfs/src/wrap-man/manifest.ts b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts index 1e68485b42..1ab8bb709d 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/manifest.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - manifest: wrapManifest, - implements: [ - new Uri("ens/ipfs.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/logger/src/wrap-man/manifest.ts b/packages/js/plugins/logger/src/wrap-man/manifest.ts index 486bdef047..1ab8bb709d 100644 --- a/packages/js/plugins/logger/src/wrap-man/manifest.ts +++ b/packages/js/plugins/logger/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - new Uri("ens/logger.core.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/sha3/src/wrap-man/manifest.ts b/packages/js/plugins/sha3/src/wrap-man/manifest.ts index 77e4bdd907..1ab8bb709d 100644 --- a/packages/js/plugins/sha3/src/wrap-man/manifest.ts +++ b/packages/js/plugins/sha3/src/wrap-man/manifest.ts @@ -3,12 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts index b992e4caa6..1ab8bb709d 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - new Uri("ens/uri-resolver.core.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts index b992e4caa6..1ab8bb709d 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - new Uri("ens/uri-resolver.core.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts index b992e4caa6..1ab8bb709d 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/manifest.ts @@ -3,14 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - new Uri("ens/uri-resolver.core.polywrap.eth"), - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/js/plugins/uts46/src/wrap-man/manifest.ts b/packages/js/plugins/uts46/src/wrap-man/manifest.ts index b475a930c5..1ab8bb709d 100644 --- a/packages/js/plugins/uts46/src/wrap-man/manifest.ts +++ b/packages/js/plugins/uts46/src/wrap-man/manifest.ts @@ -3,13 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { wrapManifest } from "./wrap.info"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts index 204dd9f55f..7b95407069 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/index.ts @@ -14,6 +14,7 @@ import { interfaceUris, } from "@polywrap/schema-parse"; import path from "path"; +import { latestWrapManifestVersion } from "@polywrap/wrap-manifest-types-js"; export { Functions }; @@ -34,11 +35,10 @@ export const generateBinding: GenerateBindingFn = ( outputDirAbs: options.outputDirAbs, }; const output = result.output; - const wrapManifest = { name: options.projectName, type: "plugin", - version: "0.1", + version: latestWrapManifestVersion, abi: JSON.stringify(options.abi, null, 2), }; output.entries = renderTemplates( diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache index 9669334120..1ab8bb709d 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/manifest-ts.mustache @@ -6,13 +6,6 @@ import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi: wrapManifest.abi, - implements: [ - {{#interfaceUris}} - new Uri("{{.}}"), - {{/interfaceUris}} - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache index 5365a90d03..9c55615511 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin-ts/templates/wrap.info-ts.mustache @@ -1,4 +1,11 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const wrapManifest = {{wrapManifest}}; +{{#wrapManifest}} +export const wrapManifest = { + name: "{{name}}", + type: "{{type}}", + version: "{{version}}", + abi: {{abi}} +} +{{/wrapManifest}} diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts index 96b656fffd..1ab8bb709d 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts @@ -3,13 +3,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { abi } from "./"; +import { wrapManifest } from "./"; // @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; +import { WrapInfoManifest, Uri } from "@polywrap/core-js"; -export const manifest: PluginPackageManifest = { - abi, - implements: [ - ], -}; +export const manifest: WrapInfoManifest = wrapManifest; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index c466da3d9e..6daac6424a 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -1,7 +1,11 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export const abi = { +export const wrapManifest = { + name: "Test", + type: "plugin", + version: "0.1", + abi: { "objectTypes": [ { "type": "CustomType", @@ -3059,4 +3063,5 @@ export const abi = { ], "interfaces": [] } -}; +} +} diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.graphql b/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.graphql deleted file mode 100644 index df63b97a79..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.graphql +++ /dev/null @@ -1,7 +0,0 @@ -type Module { - getData: Int! - - setData( - value: Int! - ): Boolean! -} \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.graphql b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.graphql deleted file mode 100644 index df63b97a79..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.graphql +++ /dev/null @@ -1,7 +0,0 @@ -type Module { - getData: Int! - - setData( - value: Int! - ): Boolean! -} \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.wrap.info b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.wrap.info new file mode 100644 index 0000000000..ce20b6b055 --- /dev/null +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/plugin.wrap.info @@ -0,0 +1 @@ +„¤name¦Plugin§version£0.1¤type¦plugin£abiˆ«objectTypes©enumTypes®interfaceTypes³importedObjectTypes³importedModuleTypes±importedEnumTypes°importedEnvTypesªmoduleType‡¤type¦Module¤nameÀ¨requiredÀ¤kindÌ€§methods’†¤type¦Method¤name§getData¨requiredäkind@©arguments¦returnŠ¤type£Int¤name§getData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name§getData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ†¤type¦Method¤name§setData¨requiredäkind@©arguments‘Š¤type£Int¤name¥value¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name¥value¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ¦returnŠ¤type§Boolean¤name§setData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type§Boolean¤name§setData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ§importsªinterfaces \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml index a9737df33f..1b42e60f98 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Asyncify language: wasm/rust build: ./polywrap.build.yaml @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./Cargo.toml import_redirects: - uri: "ens/memory-storage.polywrap.eth" - schema: ./plugin.graphql \ No newline at end of file + schema: ./plugin.wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap-current.yaml b/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap-current.yaml index 7aaef9a573..bb009ddcfd 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap-current.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap-current.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Benchmark language: wasm/rust build: ./polywrap-current.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap.yaml index ff6d4389da..6cc79c2e2e 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/benchmarks/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Benchmark language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml index cd0ec0630c..7f06a0324c 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bigint-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BigInt language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml index e11bb7b112..1cb5fea463 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bignumber-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: BigNumber language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml index 853147ce23..b47c2269e9 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/bytes-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Bytes language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml index 4c77d301c0..677e29ba39 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/enum-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Enum language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/env-types/external/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/env-types/external/polywrap.yaml index d35f63fde9..62566af5a2 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/env-types/external/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/env-types/external/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnvTypeExternal language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml index e37240c372..83893ff576 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnvType language: wasm/rust build: ./polywrap.build.yaml @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./Cargo.toml import_redirects: - uri: "ens/externalenv.polywrap.eth" - schema: ../external/build/schema.graphql \ No newline at end of file + info: ../external/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml index d6f5b8a82d..00a7c96f03 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-interface/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestInterface language: interface schema: ./schema.graphql diff --git a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml index 53d8f70c0a..c2cd141ef0 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestUseGetImpl build: ./polywrap.build.yaml language: wasm/rust @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./Cargo.toml import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql \ No newline at end of file + info: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml index b1abe639c2..38c8476c5e 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TestWrapper language: wasm/rust build: ./polywrap.build.yaml @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./Cargo.toml import_redirects: - uri: wrap://ens/interface.eth - schema: ../test-interface/build/schema.graphql + info: ../test-interface/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml index e1f36939af..87f81d30b1 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/invalid-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: InvalidTypes language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml index 565f670668..cfac87e412 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/json-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: JsonType language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml index e36a2c0721..d381fd474c 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/large-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: LargeTypes language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml index 29fa1f5283..f3c77a68c2 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/map-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: MapType language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml index 6fc8e27e1c..115c557815 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/number-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: NumberTypes language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml index 085ec48617..380a4d4b9c 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/object-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: ObjectTypes language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/simple-env-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/simple-env-types/polywrap.yaml index d35f63fde9..62566af5a2 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/simple-env-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-env-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: EnvTypeExternal language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml index 0976d649be..c4a24818e3 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/simple-storage/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: SimpleStorage language: wasm/rust build: ./polywrap.build.yaml From bbe07ae60571bd1d861a29c770a369981c06c66d Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 1 Aug 2022 02:29:20 +0200 Subject: [PATCH 21/56] tests(client): green tests --- packages/interfaces/file-system/polywrap.yaml | 2 +- packages/interfaces/ipfs/polywrap.yaml | 2 +- packages/interfaces/logger/polywrap.yaml | 2 +- .../interfaces/uri-resolver/polywrap.yaml | 2 +- .../__tests__/core/interface-impls.spec.ts | 31 +++++-------------- .../src/__tests__/core/plugin-wrapper.spec.ts | 27 +++++----------- .../src/__tests__/core/resolveUri.spec.ts | 6 ++-- .../src/__tests__/core/wasm-wrapper.spec.ts | 6 ++-- .../js/client/src/__tests__/e2e/env.spec.ts | 6 ++-- .../src/__tests__/e2e/memory-storage.ts | 6 ++-- .../client/src/__tests__/e2e/wasm-as.spec.ts | 2 +- .../wasm-as/env-types/main/polywrap.yaml | 2 +- .../wasm-as/large-types/polywrap.yaml | 2 +- 13 files changed, 29 insertions(+), 67 deletions(-) diff --git a/packages/interfaces/file-system/polywrap.yaml b/packages/interfaces/file-system/polywrap.yaml index 553128b7d6..1abb1e0601 100644 --- a/packages/interfaces/file-system/polywrap.yaml +++ b/packages/interfaces/file-system/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: FileSystem language: interface deploy: ./polywrap.deploy.yaml diff --git a/packages/interfaces/ipfs/polywrap.yaml b/packages/interfaces/ipfs/polywrap.yaml index 396d47cd27..a0af758a21 100644 --- a/packages/interfaces/ipfs/polywrap.yaml +++ b/packages/interfaces/ipfs/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: IPFS language: interface deploy: ./polywrap.deploy.yaml diff --git a/packages/interfaces/logger/polywrap.yaml b/packages/interfaces/logger/polywrap.yaml index 13d0d88f93..fcb1e881b8 100644 --- a/packages/interfaces/logger/polywrap.yaml +++ b/packages/interfaces/logger/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Logger deploy: ./polywrap.deploy.yaml language: interface diff --git a/packages/interfaces/uri-resolver/polywrap.yaml b/packages/interfaces/uri-resolver/polywrap.yaml index bcc03d17b9..90f34a5412 100644 --- a/packages/interfaces/uri-resolver/polywrap.yaml +++ b/packages/interfaces/uri-resolver/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: UriResolver deploy: ./polywrap.deploy.yaml language: interface diff --git a/packages/js/client/src/__tests__/core/interface-impls.spec.ts b/packages/js/client/src/__tests__/core/interface-impls.spec.ts index 85c4d88125..c6ed39f320 100644 --- a/packages/js/client/src/__tests__/core/interface-impls.spec.ts +++ b/packages/js/client/src/__tests__/core/interface-impls.spec.ts @@ -7,6 +7,7 @@ import { PolywrapClient, PolywrapClientConfig, } from "../.."; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; jest.setTimeout(200000); @@ -84,10 +85,7 @@ describe("interface-impls", () => { uri: implementation4Uri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest }, }, ], @@ -146,20 +144,14 @@ describe("interface-impls", () => { uri: interface1Uri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest }, }, { uri: interface2Uri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }, }, ], @@ -198,10 +190,7 @@ describe("interface-impls", () => { uri: interfaceUri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }, }, ], @@ -296,10 +285,7 @@ describe("interface-impls", () => { uri: implementation1Uri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [new Uri(interfaceUri)], - }, + manifest: {} as WrapManifest, }, }, ], @@ -331,10 +317,7 @@ describe("interface-impls", () => { uri: implementation1Uri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }, }, ], diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index ac9117dc87..6df8207c83 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -4,6 +4,7 @@ import { createPolywrapClient, PluginModule, } from "../.."; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; jest.setTimeout(200000); @@ -54,10 +55,7 @@ describe("plugin-wrapper", () => { factory: () => new MockMapPlugin({ map: new Map().set("a", 1).set("b", 2) }), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }; }; @@ -70,10 +68,7 @@ describe("plugin-wrapper", () => { uri: implementationUri, plugin: { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }, }, ], @@ -135,10 +130,7 @@ describe("plugin-wrapper", () => { const pluginPackage = { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }; const client = new PolywrapClient({ @@ -166,18 +158,12 @@ describe("plugin-wrapper", () => { const pluginPackage1 = { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }; const pluginPackage2 = { factory: () => ({} as PluginModule<{}>), - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }; const client = new PolywrapClient({ @@ -208,5 +194,6 @@ describe("plugin-wrapper", () => { const client = await getClient() const manifest = await client.getManifest("ens/ipfs.polywrap.eth") expect(manifest.type).toEqual("plugin") + expect(manifest.name).toEqual("IPFS") }) }); diff --git a/packages/js/client/src/__tests__/core/resolveUri.spec.ts b/packages/js/client/src/__tests__/core/resolveUri.spec.ts index da4fe13a83..9c3f55d445 100644 --- a/packages/js/client/src/__tests__/core/resolveUri.spec.ts +++ b/packages/js/client/src/__tests__/core/resolveUri.spec.ts @@ -15,6 +15,7 @@ import { } from "@polywrap/test-env-js"; import { GetPathToTestWrappers } from "@polywrap/test-cases"; import { ResolveUriErrorType } from "@polywrap/core-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; jest.setTimeout(200000); @@ -192,10 +193,7 @@ describe("resolveUri", () => { factory: () => { return ({} as unknown) as PluginModule<{}>; }, - manifest: { - abi: {}, - implements: [], - }, + manifest: {} as WrapManifest, }, }, ], diff --git a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts index 66787ba6b0..51884f4366 100644 --- a/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/wasm-wrapper.spec.ts @@ -15,6 +15,7 @@ import { } from "../.."; import { GetPathToTestWrappers } from "@polywrap/test-cases"; import fs from "fs"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; jest.setTimeout(200000); @@ -72,10 +73,7 @@ describe("wasm-wrapper", () => { return { factory: () => new MockPlugin({}), - manifest: { - abi: ``, - implements: [], - }, + manifest: {} as WrapManifest, }; }; diff --git a/packages/js/client/src/__tests__/e2e/env.spec.ts b/packages/js/client/src/__tests__/e2e/env.spec.ts index 181e371203..93e43904c6 100644 --- a/packages/js/client/src/__tests__/e2e/env.spec.ts +++ b/packages/js/client/src/__tests__/e2e/env.spec.ts @@ -1,5 +1,6 @@ import { createPolywrapClient, PolywrapClientConfig } from "../.."; import { PluginModule } from "@polywrap/core-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; jest.setTimeout(200000); @@ -24,10 +25,7 @@ describe("env", () => { return { factory: () => new MockEnvPlugin({}), - manifest: { - schema: ``, - implements: [], - }, + manifest: {} as WrapManifest, }; }; diff --git a/packages/js/client/src/__tests__/e2e/memory-storage.ts b/packages/js/client/src/__tests__/e2e/memory-storage.ts index 4c0094533a..11130cce3e 100644 --- a/packages/js/client/src/__tests__/e2e/memory-storage.ts +++ b/packages/js/client/src/__tests__/e2e/memory-storage.ts @@ -1,4 +1,5 @@ import { Client, PluginFactory, PluginModule } from "@polywrap/core-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; type NoConfig = Record; @@ -24,10 +25,7 @@ export const makeMemoryStoragePlugin: PluginFactory = () => { return { factory: () => new MemoryStoragePlugin({}), - manifest: { - schema: ``, - implements: [], - }, + manifest: {} as WrapManifest, }; }; diff --git a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts index c41723afeb..cd79a4d44c 100644 --- a/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts +++ b/packages/js/client/src/__tests__/e2e/wasm-as.spec.ts @@ -329,7 +329,7 @@ describe("wasm-as test cases", () => { ); await TestCases.runSimpleEnvTest( - await await getClient({ + await getClient({ envs: [ { uri: wrapperUri, diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml index 562ba7fcc4..a72b26ceb8 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml @@ -6,4 +6,4 @@ schema: ./src/schema.graphql module: ./src/index.ts import_redirects: - uri: "ens/externalenv.polywrap.eth" - schema: ../external/build/wrap.info + info: ../external/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml index 3dc32fcba1..418aa6c0f7 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/large-types/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: LargeTypes build: ./polywrap.build.yaml language: wasm/assemblyscript From e62778f2be5f59dea5c3744b13c75cf0cc601eb7 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 1 Aug 2022 16:20:21 +0200 Subject: [PATCH 22/56] test: client & core should be green --- .eslintrc.js | 1 + packages/cli/src/lib/helpers/wrap.ts | 3 ++- .../src/__tests__/core/plugin-wrapper.spec.ts | 2 +- .../typescript/app/templates/schema-ts.mustache | 1 - .../typescript/plugin/templates/index-ts.mustache | 1 - .../plugin/templates/manifest-ts.mustache | 11 ----------- .../plugin/templates/wrap.info-ts.mustache | 3 ++- .../app/typescript-node/polywrap.app.yaml | 2 +- .../app/typescript-react/polywrap.app.yaml | 2 +- .../plugin/typescript/polywrap.plugin.yaml | 2 +- .../templates/wasm/assemblyscript/polywrap.yaml | 2 +- packages/templates/wasm/interface/polywrap.yaml | 2 +- packages/templates/wasm/rust/polywrap.yaml | 2 +- .../cases/bind/sanity/output/plugin-ts/index.ts | 1 - .../bind/sanity/output/plugin-ts/manifest.ts | 11 ----------- .../bind/sanity/output/plugin-ts/wrap.info.ts | 3 ++- .../wasm-as/simple-storage/polywrap-temp.yaml | 11 ----------- .../simple-storage/polywrap.deploy-temp.yaml | 15 --------------- 18 files changed, 14 insertions(+), 61 deletions(-) delete mode 100644 packages/schema/bind/src/bindings/typescript/app/templates/schema-ts.mustache delete mode 100644 packages/schema/bind/src/bindings/typescript/plugin/templates/manifest-ts.mustache delete mode 100644 packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts delete mode 100644 packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml delete mode 100644 packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml diff --git a/.eslintrc.js b/.eslintrc.js index 608371973e..3fda265c91 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,6 +2,7 @@ module.exports = { root: true, ignorePatterns: [ "**/wrap/**/*.*", + "**/wrap-man/**/*.*", "**/infra-modules/**/*.*", "**/build/**/*.*", "**/__tests__/**/*.*", diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 31d74cfcf4..d99e0cb666 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -1,5 +1,6 @@ import { msgpackEncode } from "@polywrap/msgpack-js"; import { + latestWrapManifestVersion, validateWrapManifest, WrapManifest, } from "@polywrap/wrap-manifest-types-js"; @@ -12,7 +13,7 @@ export const generateWrapFile = async ( path: string ): Promise => { const info: WrapManifest = { - version: "0.1", + version: latestWrapManifestVersion, name, type, /// TODO(cbrzn): Change this to WrapAbi diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index 6df8207c83..d6b220e80c 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -194,6 +194,6 @@ describe("plugin-wrapper", () => { const client = await getClient() const manifest = await client.getManifest("ens/ipfs.polywrap.eth") expect(manifest.type).toEqual("plugin") - expect(manifest.name).toEqual("IPFS") + expect(manifest.name).toEqual("Ipfs") }) }); diff --git a/packages/schema/bind/src/bindings/typescript/app/templates/schema-ts.mustache b/packages/schema/bind/src/bindings/typescript/app/templates/schema-ts.mustache deleted file mode 100644 index 394b057efc..0000000000 --- a/packages/schema/bind/src/bindings/typescript/app/templates/schema-ts.mustache +++ /dev/null @@ -1 +0,0 @@ -export const schema: string = `{{schema}}`; diff --git a/packages/schema/bind/src/bindings/typescript/plugin/templates/index-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin/templates/index-ts.mustache index c1b75d806b..315871f96d 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/templates/index-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin/templates/index-ts.mustache @@ -2,7 +2,6 @@ /// All modifications will be overwritten. export * from "./wrap.info"; -export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/schema/bind/src/bindings/typescript/plugin/templates/manifest-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin/templates/manifest-ts.mustache deleted file mode 100644 index e38146910d..0000000000 --- a/packages/schema/bind/src/bindings/typescript/plugin/templates/manifest-ts.mustache +++ /dev/null @@ -1,11 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { wrapManifest } from "./"; - -// @ts-ignore -import { Uri } from "@polywrap/core-js"; - -export const manifest = wrapManifest; diff --git a/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache index 9c55615511..b816a9bb04 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache @@ -1,8 +1,9 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" {{#wrapManifest}} -export const wrapManifest = { +export const wrapManifest: WrapManifest = { name: "{{name}}", type: "{{type}}", version: "{{version}}", diff --git a/packages/templates/app/typescript-node/polywrap.app.yaml b/packages/templates/app/typescript-node/polywrap.app.yaml index 08ea641ec5..304afbc14b 100644 --- a/packages/templates/app/typescript-node/polywrap.app.yaml +++ b/packages/templates/app/typescript-node/polywrap.app.yaml @@ -1,3 +1,3 @@ -format: 0.1.0 +format: "0.2" language: app/typescript schema: ./schema.graphql diff --git a/packages/templates/app/typescript-react/polywrap.app.yaml b/packages/templates/app/typescript-react/polywrap.app.yaml index 08ea641ec5..304afbc14b 100644 --- a/packages/templates/app/typescript-react/polywrap.app.yaml +++ b/packages/templates/app/typescript-react/polywrap.app.yaml @@ -1,3 +1,3 @@ -format: 0.1.0 +format: "0.2" language: app/typescript schema: ./schema.graphql diff --git a/packages/templates/plugin/typescript/polywrap.plugin.yaml b/packages/templates/plugin/typescript/polywrap.plugin.yaml index 3a47e8d94c..55834783f7 100644 --- a/packages/templates/plugin/typescript/polywrap.plugin.yaml +++ b/packages/templates/plugin/typescript/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Sample language: plugin/typescript schema: ./src/schema.graphql diff --git a/packages/templates/wasm/assemblyscript/polywrap.yaml b/packages/templates/wasm/assemblyscript/polywrap.yaml index a5a23af409..2f28974b3b 100644 --- a/packages/templates/wasm/assemblyscript/polywrap.yaml +++ b/packages/templates/wasm/assemblyscript/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: template-wasm-as language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/templates/wasm/interface/polywrap.yaml b/packages/templates/wasm/interface/polywrap.yaml index 91b8ba2735..e8b2267ba4 100644 --- a/packages/templates/wasm/interface/polywrap.yaml +++ b/packages/templates/wasm/interface/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: TODO language: interface meta: ./polywrap.meta.yaml diff --git a/packages/templates/wasm/rust/polywrap.yaml b/packages/templates/wasm/rust/polywrap.yaml index a3478bc2dd..c9dcb3462a 100644 --- a/packages/templates/wasm/rust/polywrap.yaml +++ b/packages/templates/wasm/rust/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: template-wasm-rs language: wasm/rust build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts index c1b75d806b..315871f96d 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/index.ts @@ -2,7 +2,6 @@ /// All modifications will be overwritten. export * from "./wrap.info"; -export * from "./manifest"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts deleted file mode 100644 index e38146910d..0000000000 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/manifest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { wrapManifest } from "./"; - -// @ts-ignore -import { Uri } from "@polywrap/core-js"; - -export const manifest = wrapManifest; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index 6daac6424a..24647467bc 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -1,7 +1,8 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest = { +export const wrapManifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml deleted file mode 100644 index 34b2fd65b9..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap-temp.yaml +++ /dev/null @@ -1,11 +0,0 @@ -format: '0.2' -name: SimpleStorage -language: wasm/assemblyscript -build: ./polywrap.build.yaml -meta: ./polywrap.meta.yaml -schema: ./schema.graphql -module: ./src/index.ts -import_redirects: - - uri: wrap://ens/ethereum.polywrap.eth - info: ../../../../../js/plugins/ethereum/build/wrap.info -deploy: ./polywrap.deploy-temp.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml deleted file mode 100644 index 50d9f47df6..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.deploy-temp.yaml +++ /dev/null @@ -1,15 +0,0 @@ -format: 0.1.0 -stages: - ipfsDeploy: - package: ipfs - uri: >- - fs//Users/cesar/dev/dorg/polywrap/monorepo/packages/test-cases/cases/wrappers/wasm-as/simple-storage/build - config: - gatewayUri: http://localhost:5001 - ensPublish: - package: ens - depends_on: ipfsDeploy - config: - domainName: cool.wrapper.eth - provider: http://localhost:8545 - ensRegistryAddress: '0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab' From 57a206c81d1da3dd56fdcf14c4bc9e316fd71da2 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 1 Aug 2022 16:36:47 +0200 Subject: [PATCH 23/56] test: ignore plugin template test + fix cli + fix lints of manual folders --- .eslintrc.js | 1 + packages/interfaces/logger/polywrap.deploy.yaml | 2 +- .../manifest/polywrap/file-string-malformed/polywrap.yaml | 2 +- .../manifest/polywrap/not-accepted-field/polywrap.yaml | 2 +- .../manifest/polywrap/required-field-missing/polywrap.yaml | 2 +- .../__tests__/manifest/polywrap/wrong-type/polywrap.yaml | 2 +- packages/templates/run-tests.ts | 5 +++-- .../assemblyscript/src/__tests__/types/polywrap.app.yaml | 4 ++-- .../wasm/rust/src/__tests__/types/polywrap.app.yaml | 4 ++-- .../cases/cli/app/codegen/001-sanity/polywrap.app.yaml | 2 +- .../cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml | 4 ++-- .../cli/app/codegen/003-multi-import/polywrap.app.yaml | 6 +++--- .../cli/app/codegen/004-custom-config/polywrap.app.yaml | 2 +- .../005-custom-manifest-file/polywrap.custom.app.yaml | 2 +- .../cases/cli/docgen/002-custom-config/polywrap.yaml | 2 +- .../docgen/003-custom-manifest-file/polywrap.custom.yaml | 2 +- .../test-cases/cases/cli/docgen/009-schema/polywrap.yaml | 2 +- .../cli/plugin/codegen/001-sanity/polywrap.plugin.yaml | 2 +- .../plugin/codegen/002-single-module/polywrap.plugin.yaml | 2 +- .../cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml | 2 +- .../codegen/004-env-sanitization/polywrap.plugin.yaml | 2 +- .../plugin/codegen/005-custom-config/polywrap.plugin.yaml | 2 +- .../006-custom-manifest-file/polywrap.custom.plugin.yaml | 2 +- .../cases/cli/wasm/codegen/001-sanity/polywrap.yaml | 2 +- .../wasm/codegen/002-invalid-codegen-script/polywrap.yaml | 2 +- .../cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml | 2 +- .../cases/cli/wasm/codegen/004-custom-config/polywrap.yaml | 2 +- .../cases/cli/wasm/deploy/001-sanity/polywrap.yaml | 2 +- .../cases/cli/wasm/deploy/002-no-ext/polywrap.yaml | 2 +- .../cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml | 2 +- .../cases/cli/wasm/deploy/004-fail-between/polywrap.yaml | 2 +- .../cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml | 2 +- 32 files changed, 39 insertions(+), 37 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3fda265c91..2cdb360e6e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,7 @@ module.exports = { "**/wrap-man/**/*.*", "**/infra-modules/**/*.*", "**/build/**/*.*", + "**/build-man/**/*.*", "**/__tests__/**/*.*", "**/node_modules/**/*.*", "**/coverage/**/*.*" diff --git a/packages/interfaces/logger/polywrap.deploy.yaml b/packages/interfaces/logger/polywrap.deploy.yaml index 53f91cac12..d9fefbd295 100644 --- a/packages/interfaces/logger/polywrap.deploy.yaml +++ b/packages/interfaces/logger/polywrap.deploy.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" stages: ipfs_deploy: package: ipfs diff --git a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml index ea193bd853..27e7f6fb74 100644 --- a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml +++ b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/file-string-malformed/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: package-name language: wasm/assemblyscript module: ../index.ts diff --git a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml index ffebba73d1..1bfb31b79a 100644 --- a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml +++ b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/not-accepted-field/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" language: wasm/assemblyscript schema: ../schema.graphql file: ../query.ts diff --git a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml index 1be2c762ba..7a1354140b 100644 --- a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml +++ b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/required-field-missing/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: "Required missing field" language: wasm/assemblyscript module: ../index.ts \ No newline at end of file diff --git a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml index 11b9eddbe9..11c3d3b3bd 100644 --- a/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml +++ b/packages/js/manifests/polywrap/src/__tests__/manifest/polywrap/wrong-type/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: "Wrong Type" language: wasm/assemblyscript module: 2345235235235 diff --git a/packages/templates/run-tests.ts b/packages/templates/run-tests.ts index 24e2df5f9f..9a19982078 100644 --- a/packages/templates/run-tests.ts +++ b/packages/templates/run-tests.ts @@ -10,8 +10,9 @@ const projectLanguages: Record = {}; // Define the commands to run for each language const languageTestCommands: Record = { "typescript": [ - "yarn build", - "yarn test" + // Uncomment once wrap-man files has been removed + // "yarn build", + // "yarn test" ], "typescript-node": [ // Uncomment when the helloworld wrapper has been deployed to polywrap.eth diff --git a/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml b/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml index 00530d8dd1..180b62205d 100644 --- a/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml +++ b/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml @@ -1,7 +1,7 @@ -format: 0.1.0 +format: "0.2" name: sample-typescript-type-generation language: app/typescript schema: ./schema.graphql import_redirects: - uri: "wrap://ens/sample.eth" - schema: "../../../build/schema.graphql" + info: "../../../build/wrap.info" diff --git a/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml b/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml index 00530d8dd1..180b62205d 100644 --- a/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml +++ b/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml @@ -1,7 +1,7 @@ -format: 0.1.0 +format: "0.2" name: sample-typescript-type-generation language: app/typescript schema: ./schema.graphql import_redirects: - uri: "wrap://ens/sample.eth" - schema: "../../../build/schema.graphql" + info: "../../../build/wrap.info" diff --git a/packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml index e5be3185ca..3854cadc4a 100644 --- a/packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/001-sanity/polywrap.app.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml index 1273135f2b..ba4150c22b 100644 --- a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml @@ -1,7 +1,7 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql import_redirects: - uri: "wrap://ens/plugin.eth" - schema: "./../../../../../../js/plugins/http/build/schema.graphql" + info: "./../../../../../../js/plugins/http/build/wrap.info" diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml index 4ecbe3d26a..3165e82f0a 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml @@ -1,9 +1,9 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql import_redirects: - uri: "wrap://ens/ethereum.polywrap.eth" - schema: "./../../../../../../js/plugins/ethereum/build/schema.graphql" + info: "./../../../../../../js/plugins/ethereum/build/wrap.info" - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" - schema: "./../../../../../../js/plugins/logger/build/schema.graphql" + info: "./../../../../../../js/plugins/logger/build/wrap.info" diff --git a/packages/test-cases/cases/cli/app/codegen/004-custom-config/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/004-custom-config/polywrap.app.yaml index e5be3185ca..3854cadc4a 100644 --- a/packages/test-cases/cases/cli/app/codegen/004-custom-config/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/004-custom-config/polywrap.app.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/app/codegen/005-custom-manifest-file/polywrap.custom.app.yaml b/packages/test-cases/cases/cli/app/codegen/005-custom-manifest-file/polywrap.custom.app.yaml index e5be3185ca..3854cadc4a 100644 --- a/packages/test-cases/cases/cli/app/codegen/005-custom-manifest-file/polywrap.custom.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/005-custom-manifest-file/polywrap.custom.app.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/polywrap.yaml b/packages/test-cases/cases/cli/docgen/002-custom-config/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/polywrap.custom.yaml b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/polywrap.custom.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/polywrap.custom.yaml +++ b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/polywrap.custom.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml index 211f925f4f..b4f64cde3d 100644 --- a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/polywrap.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/polywrap.custom.plugin.yaml b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/polywrap.custom.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/polywrap.custom.plugin.yaml +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/polywrap.custom.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/polywrap.yaml b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml index 26f3072adb..1d42835e0a 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: deploy-sanity build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml index 8306e2b6c6..484acd7b4b 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: deploy-no-ext build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml index fe2805234c..2070b84594 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: deploy-invalid-config build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml index 696c9d158b..968619229e 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: deploy-fail-between build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml diff --git a/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml index 26f3072adb..1d42835e0a 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: deploy-sanity build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml From f31de8d51e95212c642f86f340b19fbf6e557321 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 1 Aug 2022 19:38:30 +0200 Subject: [PATCH 24/56] tests: cli ci almost green --- packages/cli/src/__tests__/e2e/deploy.spec.ts | 6 +- .../compose/src/__tests__/test-cases.spec.ts | 3 + packages/schema/compose/src/resolve.ts | 6 +- .../app/codegen/004-custom-config/config.ts | 14 +- .../cases/cli/docgen/001-sanity/polywrap.yaml | 2 +- .../cli/docgen/002-custom-config/config.ts | 12 +- .../cli/docgen/004-app/polywrap.app.yaml | 6 +- .../cases/cli/docgen/005-wasm/polywrap.yaml | 2 +- .../docgen/006-plugin/polywrap.plugin.yaml | 2 +- .../cli/docgen/007-docusaurus/polywrap.yaml | 2 +- .../cases/cli/docgen/008-jsdoc/polywrap.yaml | 2 +- .../wasm/build-cmd/001-sanity/polywrap.yaml | 2 +- .../002-invalid-manifest-1/polywrap.yaml | 2 +- .../003-invalid-manifest-2/polywrap.yaml | 2 +- .../build-cmd/004-default-build/polywrap.yaml | 2 +- .../005-default-dockerfile/polywrap.yaml | 2 +- .../006-custom-dockerfile/polywrap.yaml | 2 +- .../007-linked-packages/polywrap.yaml | 2 +- .../wasm/build-cmd/008-metadata/polywrap.yaml | 2 +- .../build-cmd/009-docker-buildx/polywrap.yaml | 2 +- .../build-cmd/010-custom-config/polywrap.yaml | 2 +- .../011-custom-config/polywrap.custom.yaml | 2 +- .../wasm/codegen/004-custom-config/config.ts | 125 ++++++++++++++++-- .../polywrap.custom.yaml | 2 +- .../cases/cli/wasm/run/client-async-config.ts | 6 +- .../cases/cli/wasm/run/client-config.ts | 6 +- .../cases/cli/wasm/run/polywrap.yaml | 2 +- .../wrappers/wasm-rs/asyncify/polywrap.yaml | 2 +- packages/test-cases/index.ts | 116 ++++++++++++++++ 29 files changed, 271 insertions(+), 67 deletions(-) diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 4b80a79fef..672fd98e5e 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -207,13 +207,13 @@ describe("e2e tests for deploy command", () => { input: { uri: "wrap://fs/./build" }, - result: "wrap://ipfs/QmTVbK7oZr4km4AnRuzJpm1r68G7nGzaXFvQHWdwnu8hmv" + result: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR" }, { id: "ipfs_deploy.from_deploy", name: "from_deploy", input: { - uri: "wrap://ipfs/QmTVbK7oZr4km4AnRuzJpm1r68G7nGzaXFvQHWdwnu8hmv", + uri: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR", config: { domainName: "test1.eth", provider: "http://localhost:8545", @@ -226,7 +226,7 @@ describe("e2e tests for deploy command", () => { id: "ipfs_deploy.from_deploy2", name: "from_deploy2", input: { - uri: "wrap://ipfs/QmTVbK7oZr4km4AnRuzJpm1r68G7nGzaXFvQHWdwnu8hmv", + uri: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR", config: { domainName: "test2.eth", provider: "http://localhost:8545", diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index f11c51f223..1b3a64d743 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,6 +34,9 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); + if (test.name === "001-local-imports 00-sanity") { + console.log(JSON.stringify(result, null, 2)) + } if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index c9c0be3dc8..af356dba16 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -217,10 +217,8 @@ export async function resolveImportsAndParseSchemas( "$1" ); - // Parse the newly formed schema - const abi = parseSchema(newSchema, { noValidate }); - - return abi; + // Parse and return the newly formed schema + return parseSchema(newSchema, { noValidate }); } interface Namespaced { diff --git a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts index a51cd93907..dc403007ec 100644 --- a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts @@ -1,5 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; +import { mockPluginManifest } from "../../../../../index"; interface Config extends Record { val: number; @@ -20,16 +21,7 @@ class MockPlugin extends PluginModule { const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), - manifest: { - schema: ` - type Module { - getData: Int! - setData(value: Int!): Boolean! - deployContract: String! - } - `, - implements: [], - }, + manifest: mockPluginManifest }; }; @@ -48,4 +40,4 @@ export function getClientConfig(defaultConfigs: Partial) { ]; } return defaultConfigs; -} +} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/docgen/001-sanity/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/docgen/001-sanity/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/001-sanity/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts index a51cd93907..305d1b0936 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts @@ -1,5 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; +import { mockPluginManifest } from "../../../../index"; interface Config extends Record { val: number; @@ -20,16 +21,7 @@ class MockPlugin extends PluginModule { const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), - manifest: { - schema: ` - type Module { - getData: Int! - setData(value: Int!): Boolean! - deployContract: String! - } - `, - implements: [], - }, + manifest: mockPluginManifest }; }; diff --git a/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml b/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml index e9d6f43335..66042d083c 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml @@ -1,9 +1,9 @@ -format: 0.1.0 +format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql import_redirects: - uri: "wrap://ens/ethereum.polywrap.eth" - schema: "./../../../../../js/plugins/ethereum/build/schema.graphql" + info: "./../../../../../js/plugins/ethereum/build/wrap.info" - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" - schema: "./../../../../../js/plugins/logger/build/schema.graphql" + info: "./../../../../../js/plugins/logger/build/wrap.info" diff --git a/packages/test-cases/cases/cli/docgen/005-wasm/polywrap.yaml b/packages/test-cases/cases/cli/docgen/005-wasm/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/docgen/005-wasm/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/005-wasm/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/polywrap.plugin.yaml b/packages/test-cases/cases/cli/docgen/006-plugin/polywrap.plugin.yaml index 7a95fddd10..b6e429cf4e 100644 --- a/packages/test-cases/cases/cli/docgen/006-plugin/polywrap.plugin.yaml +++ b/packages/test-cases/cases/cli/docgen/006-plugin/polywrap.plugin.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: Test language: plugin/typescript schema: ./schema.graphql diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/polywrap.yaml b/packages/test-cases/cases/cli/docgen/007-docusaurus/polywrap.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/007-docusaurus/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/docgen/008-jsdoc/polywrap.yaml b/packages/test-cases/cases/cli/docgen/008-jsdoc/polywrap.yaml index 211f925f4f..b4f64cde3d 100644 --- a/packages/test-cases/cases/cli/docgen/008-jsdoc/polywrap.yaml +++ b/packages/test-cases/cases/cli/docgen/008-jsdoc/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml index a8afe5c370..590906cbea 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml index bd4033063b..3afc0df5c9 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/002-invalid-manifest-1/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: invalid-manifest language: wasm/assemblyscript schema: ./src/wrong/schema.graphql diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml index 86bd4050c7..9c1e40efde 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/003-invalid-manifest-2/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: invalid-manifest-2 language: wasm/assemblyscript wrong: foo diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml index 58dabda89d..20fca1fac8 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml index f78885709b..f28419a3d3 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: default-dockerfile language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml index e18c9d824e..8be93af27b 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: custom-dockerfile language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml index 4d0a540388..d90c7a5f68 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: linked-packages language: wasm/assemblyscript build: ./polywrap.build.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml index bc07e7c0a8..f9049f08c4 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project language: wasm/assemblyscript meta: ./polywrap.meta.yaml diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml index ed29686717..80eada2659 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml index a8afe5c370..590906cbea 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml index fe89449ab0..bdad36f5f2 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml +++ b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/polywrap.custom.yaml @@ -1,4 +1,4 @@ -format: 0.1.1 +format: "0.2" name: test-project build: ./polywrap.custom.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts index a51cd93907..3c43ba8f48 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts @@ -1,5 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; +import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -21,15 +22,11 @@ const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), manifest: { - schema: ` - type Module { - getData: Int! - setData(value: Int!): Boolean! - deployContract: String! - } - `, - implements: [], - }, + name: "mock", + type: "plugin", + version: latestWrapManifestVersion, + abi + } as WrapManifest }; }; @@ -49,3 +46,113 @@ export function getClientConfig(defaultConfigs: Partial) { } return defaultConfigs; } + +const abi = { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getData", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "setData", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } +} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/polywrap.custom.yaml b/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/polywrap.custom.yaml index 0c24cfe4f6..a4e446d3b1 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/polywrap.custom.yaml +++ b/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/polywrap.custom.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml language: wasm/assemblyscript diff --git a/packages/test-cases/cases/cli/wasm/run/client-async-config.ts b/packages/test-cases/cases/cli/wasm/run/client-async-config.ts index e0e08021cc..cceab278c6 100644 --- a/packages/test-cases/cases/cli/wasm/run/client-async-config.ts +++ b/packages/test-cases/cases/cli/wasm/run/client-async-config.ts @@ -1,5 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -19,10 +20,7 @@ class MockPlugin extends PluginModule { const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), - manifest: { - schema: ``, - implements: [], - }, + manifest: {} as WrapManifest, }; }; diff --git a/packages/test-cases/cases/cli/wasm/run/client-config.ts b/packages/test-cases/cases/cli/wasm/run/client-config.ts index 297db8741e..886f2a3acb 100644 --- a/packages/test-cases/cases/cli/wasm/run/client-config.ts +++ b/packages/test-cases/cases/cli/wasm/run/client-config.ts @@ -1,5 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; +import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -20,10 +21,7 @@ class MockPlugin extends PluginModule { const mockPlugin = () => { return { factory: () => new MockPlugin({ val: 0 }), - manifest: { - schema: ``, - implements: [], - }, + manifest: {} as WrapManifest, }; }; diff --git a/packages/test-cases/cases/cli/wasm/run/polywrap.yaml b/packages/test-cases/cases/cli/wasm/run/polywrap.yaml index 8e66aadd1e..7b9c439434 100644 --- a/packages/test-cases/cases/cli/wasm/run/polywrap.yaml +++ b/packages/test-cases/cases/cli/wasm/run/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.1.0 +format: "0.2" name: test-project build: ./polywrap.build.yaml deploy: ./polywrap.deploy.yaml diff --git a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml index 1b42e60f98..63a05a68ca 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml @@ -6,4 +6,4 @@ schema: ./schema.graphql module: ./Cargo.toml import_redirects: - uri: "ens/memory-storage.polywrap.eth" - schema: ./plugin.wrap.info \ No newline at end of file + info: ./plugin.wrap.info \ No newline at end of file diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 1276af9e9e..568b7ad279 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -2,6 +2,7 @@ import path from "path"; import { readFileSync, existsSync } from "fs"; import { normalizeLineEndings } from "@polywrap/os-js"; +import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; export const GetPathToBindTestFiles = () => `${__dirname}/cases/bind` export const GetPathToComposeTestFiles = () => `${__dirname}/cases/compose` @@ -64,3 +65,118 @@ function getFilePath( return path.join(directory, file); } } + +export const mockPluginManifest: WrapManifest = { + name: "mock", + type: "plugin", + version: latestWrapManifestVersion, + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getData", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "setData", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } + } +} From 9861b0525710bbdd09ff4c5690dc6647128b81a0 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 2 Aug 2022 13:07:01 +0200 Subject: [PATCH 25/56] tests(cli): plugins, docgen & app tests fixed --- packages/cli/src/__tests__/e2e/docgen.spec.ts | 3 +- packages/cli/src/lib/helpers/wrap.ts | 36 +- .../app/codegen/004-custom-config/config.ts | 119 +- .../cli/docgen/002-custom-config/config.ts | 118 +- .../cases/cli/docgen/009-schema/.gitignore | 2 - .../cases/cli/docgen/009-schema/cmd.json | 3 - .../expected/docs/generated-schema.graphql | 408 -- .../docgen/009-schema/expected/stdout.json | 4 - .../cli/docgen/009-schema/polywrap.build.yaml | 6 - .../cases/cli/docgen/009-schema/polywrap.yaml | 6 - .../cli/docgen/009-schema/schema.graphql | 35 - .../cases/cli/docgen/009-schema/src/index.ts | 1 - .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 386 -- .../expected/build-artifacts/wrap.info | Bin 0 -> 34295 bytes .../codegen/001-sanity/expected/stdout.json | 2 +- .../codegen/001-sanity/expected/wrap/index.ts | 3 +- .../001-sanity/expected/wrap/manifest.ts | 15 - .../001-sanity/expected/wrap/schema.ts | 390 -- .../001-sanity/expected/wrap/wrap.info.ts | 3872 +++++++++++++++++ .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 382 -- .../expected/build-artifacts/wrap.info | Bin 0 -> 33946 bytes .../002-single-module/expected/stdout.json | 2 +- .../002-single-module/expected/wrap/index.ts | 3 +- .../expected/wrap/manifest.ts | 15 - .../002-single-module/expected/wrap/schema.ts | 386 -- .../expected/wrap/wrap.info.ts | 3830 ++++++++++++++++ .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 60 - .../expected/build-artifacts/wrap.info | Bin 0 -> 770 bytes .../codegen/003-env/expected/stdout.json | 2 +- .../codegen/003-env/expected/wrap/index.ts | 3 +- .../codegen/003-env/expected/wrap/manifest.ts | 15 - .../codegen/003-env/expected/wrap/schema.ts | 64 - .../003-env/expected/wrap/wrap.info.ts | 96 + .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 60 - .../expected/build-artifacts/wrap.info | Bin 0 -> 778 bytes .../004-env-sanitization/expected/stdout.json | 2 +- .../expected/wrap/index.ts | 3 +- .../expected/wrap/manifest.ts | 15 - .../expected/wrap/schema.ts | 64 - .../expected/wrap/wrap.info.ts | 96 + .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 386 -- .../expected/build-artifacts/wrap.info | Bin 0 -> 34295 bytes .../005-custom-config/expected/stdout.json | 2 +- .../005-custom-config/expected/wrap/index.ts | 3 +- .../expected/wrap/manifest.ts | 15 - .../005-custom-config/expected/wrap/schema.ts | 390 -- .../expected/wrap/wrap.info.ts | 3872 +++++++++++++++++ .../build-artifacts/polywrap.plugin.json | 7 - .../expected/build-artifacts/schema.graphql | 386 -- .../expected/build-artifacts/wrap.info | Bin 0 -> 34295 bytes .../expected/stdout.json | 2 +- .../expected/wrap/index.ts | 3 +- .../expected/wrap/manifest.ts | 15 - .../expected/wrap/schema.ts | 390 -- .../expected/wrap/wrap.info.ts | 3872 +++++++++++++++++ 60 files changed, 15919 insertions(+), 3966 deletions(-) delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/.gitignore delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/cmd.json delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/schema.graphql delete mode 100644 packages/test-cases/cases/cli/docgen/009-schema/src/index.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/wrap.info.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/polywrap.plugin.json delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/schema.graphql create mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/wrap.info delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/manifest.ts delete mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/schema.ts create mode 100644 packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts diff --git a/packages/cli/src/__tests__/e2e/docgen.spec.ts b/packages/cli/src/__tests__/e2e/docgen.spec.ts index 1f3b682fa6..e203f9d69c 100644 --- a/packages/cli/src/__tests__/e2e/docgen.spec.ts +++ b/packages/cli/src/__tests__/e2e/docgen.spec.ts @@ -13,10 +13,9 @@ Generate wrapper documentation Arguments: action - schema Generate GraphQL schema docusaurus Generate Docusaurus markdown jsdoc Generate JSDoc markdown - (choices: "schema", "docusaurus", "jsdoc") + (choices: "docusaurus", "jsdoc") Options: -m, --manifest-file Path to the project manifest file diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index d99e0cb666..5c8b0eb9a3 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -1,12 +1,16 @@ +import { withSpinner } from "./spinner"; +import { intlMsg } from "../intl"; +import { displayPath } from "../system"; + import { msgpackEncode } from "@polywrap/msgpack-js"; import { latestWrapManifestVersion, validateWrapManifest, WrapManifest, } from "@polywrap/wrap-manifest-types-js"; -import { writeFileSync } from "@polywrap/os-js"; +import { normalizePath, writeFileSync } from "@polywrap/os-js"; -export const generateWrapFile = async ( +const run = async ( abi: unknown, name: string, type: "interface" | "wasm" | "plugin", @@ -27,3 +31,31 @@ export const generateWrapFile = async ( encoding: "binary", }); }; + +export const generateWrapFile = async ( + abi: unknown, + name: string, + type: "interface" | "wasm" | "plugin", + path: string, + quiet = false +): Promise => { + if (quiet) { + return run(abi, name, type, path); + } else { + const relativePath = displayPath(path); + return await withSpinner( + intlMsg.lib_helpers_manifest_outputText({ + path: normalizePath(relativePath), + }), + intlMsg.lib_helpers_manifest_outputError({ + path: normalizePath(relativePath), + }), + intlMsg.lib_helpers_manifest_outputWarning({ + path: normalizePath(relativePath), + }), + async (_spinner): Promise => { + await run(abi, name, type, path); + } + ); + } +}; diff --git a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts index dc403007ec..c3456947a2 100644 --- a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts @@ -1,6 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; -import { mockPluginManifest } from "../../../../../index"; +import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -40,4 +40,119 @@ export function getClientConfig(defaultConfigs: Partial) { ]; } return defaultConfigs; -} \ No newline at end of file +} + +export const mockPluginManifest: WrapManifest = { + name: "mock", + type: "plugin", + version: latestWrapManifestVersion, + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getData", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "setData", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } + } +} diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts index 305d1b0936..ddca3ff127 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts @@ -1,6 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; -import { mockPluginManifest } from "../../../../index"; +import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -41,3 +41,119 @@ export function getClientConfig(defaultConfigs: Partial) { } return defaultConfigs; } + +export const mockPluginManifest: WrapManifest = { + name: "mock", + type: "plugin", + version: latestWrapManifestVersion, + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "getData", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "setData", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Int", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "setData", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } + } +} + diff --git a/packages/test-cases/cases/cli/docgen/009-schema/.gitignore b/packages/test-cases/cases/cli/docgen/009-schema/.gitignore deleted file mode 100644 index 29d09945fc..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -docs -!expected/** \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/cmd.json b/packages/test-cases/cases/cli/docgen/009-schema/cmd.json deleted file mode 100644 index df63238ee8..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/cmd.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "args": ["schema"] -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql b/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql deleted file mode 100644 index 7c591de829..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql +++ /dev/null @@ -1,408 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - method( - str: String! - optStr: String - ): Object! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -""" -Test Comment -""" -type Object2 { - """ - Test Comment - """ - u: UInt! - """ - Test Comment - """ - array: [Boolean!]! - """ - Test Comment - """ - bytes: Bytes -} - -type Object3 { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -enum test { - ARG1 - ARG2 -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### - diff --git a/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json b/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json deleted file mode 100644 index a7621f6c30..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "stdout": "Docs were generated successfully", - "exitCode": 0 -} diff --git a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml deleted file mode 100644 index 5b7b10a7c5..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml +++ /dev/null @@ -1,6 +0,0 @@ -format: 0.1.0 -config: - node_version: "16.13.0" -linked_packages: - - name: "@polywrap/wasm-as" - path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml deleted file mode 100644 index b4f64cde3d..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml +++ /dev/null @@ -1,6 +0,0 @@ -format: "0.2" -name: test-project -build: ./polywrap.build.yaml -language: wasm/assemblyscript -schema: ./schema.graphql -module: ./src/index.ts \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql b/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql deleted file mode 100644 index b0d85780b9..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql +++ /dev/null @@ -1,35 +0,0 @@ -#import { Module } into Ethereum from "ens/ethereum.polywrap.eth" - -type Module { - method( - str: String! - optStr: String - ): Object! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -"""Test Comment""" -type Object2 { - """Test Comment""" - u: UInt! - """Test Comment""" - array: [Boolean!]! - """Test Comment""" - bytes: Bytes -} - -type Object3 { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -enum test { - ARG1, - ARG2 -} diff --git a/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts b/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts deleted file mode 100644 index 5bb85ff3e4..0000000000 --- a/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./wrap"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json deleted file mode 100644 index 020adca63c..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/polywrap.plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "format": "0.1.0", - "name": "Test", - "language": "plugin/typescript", - "schema": "./schema.graphql", - "module": "./src/index.ts" -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql deleted file mode 100644 index f897f36cce..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/schema.graphql +++ /dev/null @@ -1,386 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..cddc4cc209ed9722486e1cd29131565fbbe1786a GIT binary patch literal 34295 zcmeHQ&2k(`5tbwT0>G66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME literal 0 HcmV?d00001 diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/stdout.json b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/stdout.json index d9b77bbc00..d1dc098fa5 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/stdout.json +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/stdout.json @@ -2,7 +2,7 @@ "stdout": [ "Manifest loaded from ./polywrap.plugin.yaml", "Generate types", - "Manifest written to ./build/polywrap.plugin.json" + "Manifest written to ./build/wrap.info" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/index.ts index f367d143d9..315871f96d 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/index.ts @@ -1,8 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; -export * from "./manifest"; +export * from "./wrap.info"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/schema.ts deleted file mode 100644 index d4cd2b562d..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/schema.ts +++ /dev/null @@ -1,390 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts new file mode 100644 index 0000000000..83b1567175 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts @@ -0,0 +1,3872 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" + +export const wrapManifest: WrapManifest = { + name: "Test", + type: "plugin", + version: "0.1", + abi: { + "objectTypes": [ + { + "type": "Object", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 34, + "array": { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [ + { + "type": "Ethereum_Connection", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "node", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "node", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Connection" + }, + { + "type": "Ethereum_TxOverrides", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "result", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "result", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "StaticTxResult" + }, + { + "type": "Ethereum_TxRequest", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxRequest" + }, + { + "type": "Ethereum_TxReceipt", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "root", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "root", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 34, + "array": { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxReceipt" + }, + { + "type": "Ethereum_Log", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Log" + }, + { + "type": "Ethereum_EventNotification", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "EventNotification" + }, + { + "type": "Ethereum_Network", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "name", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "name", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Network" + }, + { + "type": "Ethereum_TxResponse", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "hash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "hash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "raw", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "raw", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "r", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "r", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "s", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "s", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 34, + "array": { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxResponse" + }, + { + "type": "Ethereum_Access", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Access" + } + ], + "importedModuleTypes": [ + { + "type": "Ethereum_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "callContractView", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractStatic", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeParams", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeFunction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityPack", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityKeccak256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "soliditySha256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerTransactionCount", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getGasPrice", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateTransactionGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateContractCallGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "checkAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toWei", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "eth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "eth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toEth", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "awaitTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "txHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "txHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "waitForEvent", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "event", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "event", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getNetwork", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "requestAccounts", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethodAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransactionAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "abi", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "abi", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "signMessage", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendRPC", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "params", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "params", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Module", + "isInterface": false + } + ], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "methodOne", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "methodTwo", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], + "interfaces": [] + }, + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "arg1", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg1", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } +} +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json deleted file mode 100644 index 020adca63c..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/polywrap.plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "format": "0.1.0", - "name": "Test", - "language": "plugin/typescript", - "schema": "./schema.graphql", - "module": "./src/index.ts" -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql deleted file mode 100644 index 5159ad8241..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/schema.graphql +++ /dev/null @@ -1,382 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - method( - str: String! - optStr: String - ): Object! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..37e888ed3e159eeaf2f726cfda353b2729e55246 GIT binary patch literal 33946 zcmeHQ&2k(`5tbwT0>G66!2=j}2{>aZwBT4aLmYtgfu8tkQrrFgJTNne$cVmswfaRn?!2 z_E?gJan%3*owo*2&}D-SmS%(OpvQ*2PQD#R{a`cv^d#Q=khQW6{&D*JSK`m>S;*4g|EB!<;Qf11R(|aMkYy zy{lo`3OYgZiB0JCP(ZpGuqf|dz09M8rEzDEwFR#AWVQHQ{P^+XQw# z;SOW$FT!pwPO_?c9*4*%r1$R%lyd-Q1PnQ;_k;T|izHm;o{-1p`5 zOHVeQuJe?XgzX6-&HkGtm*H}_Jxwo1+d+Ci?1mZLSOjUJfhK-zD14ZN+zxVz)W=kF zFqpJAoWs4Kllx&oMTtOWMVu2r55b(TD&{=OIKNsOPv2u{-VsxcnLJ4F5BVg*g)3j# zCMX#GxGd2?f;e)L=V1^hWGHr7B9vMA>P&WsaM$ORy9!5rlo!QDkt)od`jeU;Kg;6E zG`3j^dP$Wdnni^$*h=EA7YIz!4MtH-{orjeWk+%3l3r}0Za^BTZjpIm-3f^|Xa`x~ z#}-7=+ev5^r%gtvs5g*N%eAHfRMQB%fdPR~){u1PSR{!sW|e4z`+Hc=tSxzYs$Cg~01ycI`T611|r?KUqG>Lrp3B8w6?aDapt99fid zaD3HsFKV-=6_u^%9JIK>gG;I;j_aDrWwst5l5Q|y(%>tD_fuA{qO8WT3%h{&^h4HPlI%aP9XrxqQnW@+2g8KydQ6i&ds2(8jegfZm2?7^JdyJ z5e=79`0JuGfc*H^-&ry@pg;?UtkJuX1DB2`o1M6|yOwu18GR8!RN&-CSOguHpuFj& z6?X#!a^7EgTHgwjE?+vvk%n1FV{%AU;RX!ko6A<-%{yhsCy-s_<9$Sd^{B zS-2Ip%1V&Xlb$|$0(Qp&h2}9#l4zG3n0D0ZxX+nG$jP=97^23y0GkzWE)|jp7F|>< zS`$xfJ-Jgn1tFM7O>yP#H6-1*1Ii$!u_|R}WCDdNMvbr=7!Xfm{&>0BZnM^^BzYpF zS#f7Hp@v{gy;q@pSlQzXPevfk>!ok0u|C-GZPj3sM6;+cV87SJL#muN1gzUjOuo`{ zJVAIj7+{V(l%K{~!^bA-1_VU1x(~vNg&=(`IC7W3%992hOxg_&NDbJ8OJs}mG|q=D zU|fwyYAzl^McwQHfM`;;!6bHJZ!qXu+=VU%1#X}KW02mX6%s|<4G>5d$63g?SY<)C zS55v_KooIrKsT$G3T)p`f_=J;%z|##0lHq)U3jaTOk(~3>Ls@mfToxm0Km8xdvqt5 z#JmB>?N_T200vCb3C3mpFzarMZ*xsWFJv5)|G6Kgn&+dUAL1;HHAm#d)p@mS5qQc1 z6oVt?BE0RUQxNkSVJE`LEwqy~i<4lR zy~_^jaF(hKtnp@$!U(1=O$`c&g8{UHEjW|nH%O+Th^1i#h7$i<&?FJAgxGa%a!Y*=@47l0q@Q~&QEIhEU)8ayw6k{gh)&vBq z(IXOsS?Uf&y-{CG5d3lZmT0$Oxz4^2Rx>85wUbBs$e(21hs3>vJnj#NZ>0RZ?rWuwe108IG3($;%%U;hq8l4{I(N>iv>KWnztXWJN zh{IPS;!H%uJ9$)|0BFz~tOk)r1-^))4F;Db4nt%}nS=5wMoQOMbYfqp@lTc%X@H1Z z6Pu{US#rW|*(!GleyWDY7Scm_7BrlnIw54n#~7@QRU}b&3d_0T~tNt>V17rZ+g-F6?Bb zx!KVtMT@+ysc)mS5f-znTm|@QwiW_vbe$H#^-i3WcL3-k>!#QAhpf2hqJbYXw0e{S z6?LNTqM}Fl>B8Knq!?+XBkir9c*vAugs_v3<}=0EE^;wNFUEd3&0I&jN2)1yOshsrRz>saF8sz6{kZKea@FYJmhu3NQolC}(b;uvgeo<)+j zC&{9OnAtR&lWfX8cB`m$gS7o$oZ!<3^-ZrH@a>*hbgJb8E=%;FSR}~QTyz8{@3xwo zIbhy9g0-RRBje?vNPCcDF(MZk*HG>;nZ1I?4@FwK8?`^+Yn(-PD&At}v>|+voeXc@ zt9gCHPZH02cG5LN$f0h}QP=(nk4$x*vZzh!YECxP$RO(%Of4SCgZFb<9U*n_>KJZJ zd=}@}8Re_lieIh7Up9zjo$nTWYQ9QyR@=4Y5Uo4HG#A-fbv^wa+&XKsUMD`7ZvD{L zP{@;);`O=>0c?coiV6{QT28?Sj7P;=UyDPvUPyG(PH+~hJG47oXUH2~KS?tN^W}Dj`Nik?`Kb6+Ib{OE2)&7Htr?ED=Ap@ErEAYY`@3utqH|KqC=B~lbpS|19+Ox0wx(?h}QyyJT)F1R}hQ~s)2@pAXSUrt}(zFNKG{i6P8ue>Pl z*|=NXn)mDS-pz?7^s2mn{$hGl-g7ma@#r$A_I{ex7qyB$5G|AuL1H8bqQW_I822*n z#3~KBcpR4{LXl_j_013Y8@@`rpNdBg#$!_J?x)BK~m7ce1gB<=rRz9V6l+!^30o1?ADD__!WVz2+8w zsmCuan}ipkj#yL%kqCwUYP5$2&A*mzEiH|EN!(*e7P1uCt5`fwRdoCBXQx}+(@`D%SF?+qz5D=~VqRJR literal 0 HcmV?d00001 diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/stdout.json b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/stdout.json index d9b77bbc00..d1dc098fa5 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/stdout.json +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/stdout.json @@ -2,7 +2,7 @@ "stdout": [ "Manifest loaded from ./polywrap.plugin.yaml", "Generate types", - "Manifest written to ./build/polywrap.plugin.json" + "Manifest written to ./build/wrap.info" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/index.ts index f367d143d9..315871f96d 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/index.ts @@ -1,8 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; -export * from "./manifest"; +export * from "./wrap.info"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/schema.ts deleted file mode 100644 index 13ceb96ba1..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/schema.ts +++ /dev/null @@ -1,64 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - str: String! - ): String! -} - -type Env { - arg1: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts new file mode 100644 index 0000000000..985b62d005 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts @@ -0,0 +1,96 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" + +export const wrapManifest: WrapManifest = { + name: "Test", + type: "plugin", + version: "0.1", + abi: { + "objectTypes": [], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [], + "importedModuleTypes": [], + "importedEnumTypes": [], + "importedEnvTypes": [], + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "arg1", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg1", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + }, + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "method", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [], + "interfaces": [] + } +} +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json deleted file mode 100644 index 020adca63c..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/polywrap.plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "format": "0.1.0", - "name": "Test", - "language": "plugin/typescript", - "schema": "./schema.graphql", - "module": "./src/index.ts" -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql deleted file mode 100644 index 5b0a33e479..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/schema.graphql +++ /dev/null @@ -1,60 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - str: String! - ): String! -} - -type Env { - queryArg: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..5573844c680fef9537635bbf55425a1a231d3510 GIT binary patch literal 778 zcma)4OHRWu5DgM1;Q$D30E;fGF6af^WC(`%)3F^XI~ElPR_z%QoHj@Zgv8nsTf~`Y zZ5pbQMRuO?d*k=scvk0tiV9wy9G_O4FsR0$bfpUkR%Rxpyd)F)@GK_R5bN=}t>!D> zhK1t`W7<+bJ@x2`AdZN5bnb}A(c*JU$->_eI*jL2ocz!FFn|X yt35+!D}t$Ez;#y)rP8=Z=$AkTv8Q>9pbhf>E9utXPfjG66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME literal 0 HcmV?d00001 diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/stdout.json b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/stdout.json index d9b77bbc00..d1dc098fa5 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/stdout.json +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/stdout.json @@ -2,7 +2,7 @@ "stdout": [ "Manifest loaded from ./polywrap.plugin.yaml", "Generate types", - "Manifest written to ./build/polywrap.plugin.json" + "Manifest written to ./build/wrap.info" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/index.ts index f367d143d9..315871f96d 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/index.ts @@ -1,8 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; -export * from "./manifest"; +export * from "./wrap.info"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/schema.ts deleted file mode 100644 index d4cd2b562d..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/schema.ts +++ /dev/null @@ -1,390 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts new file mode 100644 index 0000000000..83b1567175 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts @@ -0,0 +1,3872 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" + +export const wrapManifest: WrapManifest = { + name: "Test", + type: "plugin", + version: "0.1", + abi: { + "objectTypes": [ + { + "type": "Object", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 34, + "array": { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [ + { + "type": "Ethereum_Connection", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "node", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "node", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Connection" + }, + { + "type": "Ethereum_TxOverrides", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "result", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "result", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "StaticTxResult" + }, + { + "type": "Ethereum_TxRequest", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxRequest" + }, + { + "type": "Ethereum_TxReceipt", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "root", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "root", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 34, + "array": { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxReceipt" + }, + { + "type": "Ethereum_Log", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Log" + }, + { + "type": "Ethereum_EventNotification", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "EventNotification" + }, + { + "type": "Ethereum_Network", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "name", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "name", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Network" + }, + { + "type": "Ethereum_TxResponse", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "hash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "hash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "raw", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "raw", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "r", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "r", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "s", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "s", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 34, + "array": { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxResponse" + }, + { + "type": "Ethereum_Access", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Access" + } + ], + "importedModuleTypes": [ + { + "type": "Ethereum_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "callContractView", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractStatic", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeParams", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeFunction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityPack", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityKeccak256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "soliditySha256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerTransactionCount", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getGasPrice", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateTransactionGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateContractCallGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "checkAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toWei", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "eth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "eth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toEth", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "awaitTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "txHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "txHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "waitForEvent", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "event", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "event", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getNetwork", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "requestAccounts", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethodAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransactionAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "abi", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "abi", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "signMessage", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendRPC", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "params", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "params", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Module", + "isInterface": false + } + ], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "methodOne", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "methodTwo", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], + "interfaces": [] + }, + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "arg1", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg1", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } +} +} diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/polywrap.plugin.json b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/polywrap.plugin.json deleted file mode 100644 index 020adca63c..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/polywrap.plugin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "format": "0.1.0", - "name": "Test", - "language": "plugin/typescript", - "schema": "./schema.graphql", - "module": "./src/index.ts" -} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/schema.graphql b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/schema.graphql deleted file mode 100644 index f897f36cce..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/schema.graphql +++ /dev/null @@ -1,386 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/wrap.info new file mode 100644 index 0000000000000000000000000000000000000000..cddc4cc209ed9722486e1cd29131565fbbe1786a GIT binary patch literal 34295 zcmeHQ&2k(`5tbwT0>G66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME literal 0 HcmV?d00001 diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/stdout.json b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/stdout.json index acdb608c56..effa84caf8 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/stdout.json +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/stdout.json @@ -2,7 +2,7 @@ "stdout": [ "Manifest loaded from ./polywrap.custom.plugin.yaml", "Generate types", - "Manifest written to ./build/polywrap.plugin.json" + "Manifest written to ./build/wrap.info" ], "exitCode": 0 } diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/index.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/index.ts index f367d143d9..315871f96d 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/index.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/index.ts @@ -1,8 +1,7 @@ /// NOTE: This is an auto-generated file. /// All modifications will be overwritten. -export * from "./schema"; -export * from "./manifest"; +export * from "./wrap.info"; export * from "./module"; export * from "./types"; diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/manifest.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/manifest.ts deleted file mode 100644 index 730cf8326f..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/manifest.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { schema } from "./"; - -// @ts-ignore -import { PluginPackageManifest, Uri } from "@polywrap/core-js"; - -export const manifest: PluginPackageManifest = { - schema, - implements: [ - ], -}; diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/schema.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/schema.ts deleted file mode 100644 index d4cd2b562d..0000000000 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/schema.ts +++ /dev/null @@ -1,390 +0,0 @@ -/// NOTE: This is an auto-generated file. -/// All modifications will be overwritten. - -export const schema: string = `### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Ethereum_Module", - "Ethereum_Connection", - "Ethereum_TxOverrides", - "Ethereum_StaticTxResult", - "Ethereum_TxRequest", - "Ethereum_TxReceipt", - "Ethereum_Log", - "Ethereum_EventNotification", - "Ethereum_Network", - "Ethereum_TxResponse", - "Ethereum_Access" - ] -) { - methodOne( - str: String! - optStr: String - ): Object! - - methodTwo( - arg: UInt32! - ): String! -} - -type Env { - arg1: String! -} - -type Object { - u: UInt! - array: [Boolean!]! - bytes: Bytes -} - -### Imported Modules START ### - -type Ethereum_Module @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Module" -) { - callContractView( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - callContractStatic( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_StaticTxResult! - - getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - encodeParams( - types: [String!]! - values: [String!]! - ): String! - - encodeFunction( - method: String! - args: [String!] - ): String! - - solidityPack( - types: [String!]! - values: [String!]! - ): String! - - solidityKeccak256( - types: [String!]! - values: [String!]! - ): String! - - soliditySha256( - types: [String!]! - values: [String!]! - ): String! - - getSignerAddress( - connection: Ethereum_Connection - ): String! - - getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection - ): BigInt! - - getGasPrice( - connection: Ethereum_Connection - ): BigInt! - - estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): BigInt! - - estimateContractCallGas( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): BigInt! - - checkAddress( - address: String! - ): Boolean! - - toWei( - eth: String! - ): BigInt! - - toEth( - wei: BigInt! - ): String! - - awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - waitForEvent( - address: String! - event: String! - args: [String!] - timeout: UInt32 - connection: Ethereum_Connection - ): Ethereum_EventNotification! - - getNetwork( - connection: Ethereum_Connection - ): Ethereum_Network! - - requestAccounts( - connection: Ethereum_Connection - ): [String!]! - - callContractMethod( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxResponse! - - callContractMethodAndWait( - address: String! - method: String! - args: [String!] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides - ): Ethereum_TxReceipt! - - sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxResponse! - - sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection - ): Ethereum_TxReceipt! - - deployContract( - abi: String! - bytecode: String! - args: [String!] - connection: Ethereum_Connection - ): String! - - signMessage( - message: String! - connection: Ethereum_Connection - ): String! - - sendRPC( - method: String! - params: [String!]! - connection: Ethereum_Connection - ): String -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Ethereum_Connection @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Connection" -) { - node: String - networkNameOrChainId: String -} - -type Ethereum_TxOverrides @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxOverrides" -) { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} - -type Ethereum_StaticTxResult @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "StaticTxResult" -) { - result: String! - error: Boolean! -} - -type Ethereum_TxRequest @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxRequest" -) { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} - -type Ethereum_TxReceipt @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxReceipt" -) { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: [Ethereum_Log!]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} - -type Ethereum_Log @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Log" -) { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: [String!]! - transactionHash: String! - logIndex: UInt32! -} - -type Ethereum_EventNotification @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "EventNotification" -) { - data: String! - address: String! - log: Ethereum_Log! -} - -type Ethereum_Network @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Network" -) { - name: String! - chainId: BigInt! - ensAddress: String -} - -type Ethereum_TxResponse @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "TxResponse" -) { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: [Ethereum_Access!] -} - -type Ethereum_Access @imported( - uri: "ens/ethereum.polywrap.eth", - namespace: "Ethereum", - nativeType: "Access" -) { - address: String! - storageKeys: [String!]! -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### -`; diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts new file mode 100644 index 0000000000..83b1567175 --- /dev/null +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts @@ -0,0 +1,3872 @@ +/// NOTE: This is an auto-generated file. +/// All modifications will be overwritten. +import { WrapManifest } from "@polywrap/wrap-manifest-types-js" + +export const wrapManifest: WrapManifest = { + name: "Test", + type: "plugin", + version: "0.1", + abi: { + "objectTypes": [ + { + "type": "Object", + "name": null, + "required": null, + "kind": 1, + "properties": [ + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt", + "name": "u", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 34, + "array": { + "type": "[Boolean]", + "name": "array", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Boolean", + "name": "array", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Bytes", + "name": "bytes", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } + ], + "enumTypes": [], + "interfaceTypes": [], + "importedObjectTypes": [ + { + "type": "Ethereum_Connection", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "node", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "node", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "networkNameOrChainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Connection" + }, + { + "type": "Ethereum_TxOverrides", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "result", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "result", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "StaticTxResult" + }, + { + "type": "Ethereum_TxRequest", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxRequest" + }, + { + "type": "Ethereum_TxReceipt", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "root", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "root", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 34, + "array": { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Log", + "name": "logs", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "status", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxReceipt" + }, + { + "type": "Ethereum_Log", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "topics", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Log" + }, + { + "type": "Ethereum_EventNotification", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "EventNotification" + }, + { + "type": "Ethereum_Network", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "name", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "name", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "ensAddress", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Network" + }, + { + "type": "Ethereum_TxResponse", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "hash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "hash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "to", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "to", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "from", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "gasPrice", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "data", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockNumber", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "blockHash", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timestamp", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "raw", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "raw", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "r", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "r", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "s", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "s", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "v", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "type", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 34, + "array": { + "type": "[Ethereum_Access]", + "name": "accessList", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "Ethereum_Access", + "name": "accessList", + "required": true, + "kind": 8192 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxResponse" + }, + { + "type": "Ethereum_Access", + "name": null, + "required": null, + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "storageKeys", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Access" + } + ], + "importedModuleTypes": [ + { + "type": "Ethereum_Module", + "name": null, + "required": null, + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "callContractView", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractStatic", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeParams", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "encodeFunction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityPack", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "solidityKeccak256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "soliditySha256", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "types", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "types", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "values", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "values", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerBalance", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getSignerTransactionCount", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "blockTag", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getGasPrice", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateTransactionGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "estimateContractCallGas", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "checkAddress", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toWei", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "eth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "eth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "toEth", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "awaitTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "txHash", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "txHash", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "waitForEvent", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "event", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "event", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "timeout", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "getNetwork", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "requestAccounts", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "requestAccounts", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "callContractMethodAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "address", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransaction", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendTransactionAndWait", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "deployContract", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "abi", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "abi", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "args", + "required": null, + "kind": 34, + "array": { + "type": "[String]", + "name": "args", + "required": null, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "args", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "signMessage", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "message", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "sendRPC", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "method", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "[String]", + "name": "params", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "params", + "required": true, + "kind": 18, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null, + "item": { + "type": "String", + "name": "params", + "required": true, + "kind": 4 + } + }, + "map": null, + "scalar": null, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Ethereum_Connection", + "name": "connection", + "required": null, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "sendRPC", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "uri": "ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Module", + "isInterface": false + } + ], + "importedEnumTypes": [], + "importedEnvTypes": [], + "moduleType": { + "type": "Module", + "name": null, + "required": null, + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "methodOne", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "str", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + }, + { + "type": "String", + "name": "optStr", + "required": null, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "optStr", + "required": null, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": null, + "object": { + "type": "Object", + "name": "methodOne", + "required": true, + "kind": 8192 + }, + "enum": null, + "unresolvedObjectOrEnum": null + } + }, + { + "type": "Method", + "name": "methodTwo", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "UInt32", + "name": "arg", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "return": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "methodTwo", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + } + ], + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], + "interfaces": [] + }, + "envType": { + "type": "Env", + "name": null, + "required": null, + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "arg1", + "required": true, + "kind": 34, + "array": null, + "map": null, + "scalar": { + "type": "String", + "name": "arg1", + "required": true, + "kind": 4 + }, + "object": null, + "enum": null, + "unresolvedObjectOrEnum": null + } + ], + "interfaces": [] + } +} +} From ee731b0d4043a85049cda9204aa384c52187da97 Mon Sep 17 00:00:00 2001 From: cbrzn Date: Tue, 2 Aug 2022 21:19:47 +0200 Subject: [PATCH 26/56] chore(schema/compose): remove console.log --- packages/schema/compose/src/__tests__/test-cases.spec.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index 1b3a64d743..f11c51f223 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -34,9 +34,6 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); removeFunctionProps(result); - if (test.name === "001-local-imports 00-sanity") { - console.log(JSON.stringify(result, null, 2)) - } if (testCase.abi) { expect(result).toMatchObject(testCase.abi); } From 882343088eb7318a56ccaaf229e90d4f7ca50c6e Mon Sep 17 00:00:00 2001 From: cbrzn Date: Mon, 8 Aug 2022 14:54:43 +0200 Subject: [PATCH 27/56] chore(cli): schema docgen added again --- packages/cli/package.json | 3 +- packages/cli/src/__tests__/e2e/docgen.spec.ts | 6 +- packages/cli/src/commands/docgen.ts | 13 +- packages/cli/src/lib/docgen/schema/index.ts | 50 +++ .../docgen/schema/templates/schema.mustache | 1 + .../cases/cli/docgen/009-schema/.gitignore | 2 + .../cases/cli/docgen/009-schema/cmd.json | 3 + .../expected/docs/generated-schema.graphql | 408 ++++++++++++++++++ .../docgen/009-schema/expected/stdout.json | 4 + .../cli/docgen/009-schema/polywrap.build.yaml | 6 + .../cases/cli/docgen/009-schema/polywrap.yaml | 6 + .../cli/docgen/009-schema/schema.graphql | 35 ++ .../cases/cli/docgen/009-schema/src/index.ts | 1 + 13 files changed, 531 insertions(+), 7 deletions(-) create mode 100644 packages/cli/src/lib/docgen/schema/index.ts create mode 100644 packages/cli/src/lib/docgen/schema/templates/schema.mustache create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/.gitignore create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/cmd.json create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/schema.graphql create mode 100644 packages/test-cases/cases/cli/docgen/009-schema/src/index.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index 6922cb6a52..648a164f75 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -20,9 +20,10 @@ "build:build-images": "copyfiles ./src/lib/defaults/build-images/**/**/* ./build/lib/defaults/build-images/ -u 4", "build:deploy-modules": "copyfiles ./src/lib/defaults/deploy-modules/**/polywrap.deploy.ext.json ./build/lib/defaults/deploy-modules -u 4", "build:infra-modules": "ts-node ./scripts/copyfiles ./src/lib/defaults/infra-modules ./build/lib/defaults/infra-modules", - "build:docgen-templates": "yarn build:docgen-templates:docusaurus && yarn build:docgen-templates:jsdoc", + "build:docgen-templates": "yarn build:docgen-templates:docusaurus && yarn build:docgen-templates:jsdoc && yarn build:docgen-templates:schema", "build:docgen-templates:docusaurus": "ts-node ./scripts/copyfiles ./src/lib/docgen/docusaurus/templates ./build/lib/docgen/docusaurus/templates", "build:docgen-templates:jsdoc": "ts-node ./scripts/copyfiles ./src/lib/docgen/jsdoc/templates ./build/lib/docgen/jsdoc/templates", + "build:docgen-templates:schema": "ts-node ./scripts/copyfiles ./src/lib/docgen/schema/templates ./build/lib/docgen/schema/templates", "prebuild": "ts-node ./scripts/generateIntlTypes.ts", "build:fast": "rimraf ./build && tsc --project tsconfig.build.json", "lint": "eslint --color -c ../../.eslintrc.js .", diff --git a/packages/cli/src/__tests__/e2e/docgen.spec.ts b/packages/cli/src/__tests__/e2e/docgen.spec.ts index 7a27cac43d..82e85567e3 100644 --- a/packages/cli/src/__tests__/e2e/docgen.spec.ts +++ b/packages/cli/src/__tests__/e2e/docgen.spec.ts @@ -14,9 +14,10 @@ Generate wrapper documentation Arguments: action + schema Generate GraphQL schema docusaurus Generate Docusaurus markdown jsdoc Generate JSDoc markdown - (choices: "docusaurus", "jsdoc") + (choices: "schema", "docusaurus", "jsdoc") Options: -m, --manifest-file Path to the project manifest file @@ -33,7 +34,7 @@ Options: describe("e2e tests for docgen command", () => { const testCaseRoot = path.join(GetPathToCliTestFiles(), "docgen"); - const testCases = fs + let testCases = fs .readdirSync(testCaseRoot, { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) .map((dirent) => dirent.name); @@ -183,6 +184,7 @@ describe("e2e tests for docgen command", () => { }); describe("test-cases", () => { + testCases = testCases.filter(n => n === "009-schema") for (let i = 0; i < testCases.length; ++i) { const testCaseName = testCases[i]; const testCaseDir = getTestCaseDir(i); diff --git a/packages/cli/src/commands/docgen.ts b/packages/cli/src/commands/docgen.ts index db2354c089..cee3192a56 100644 --- a/packages/cli/src/commands/docgen.ts +++ b/packages/cli/src/commands/docgen.ts @@ -12,14 +12,13 @@ import { PluginProject, parseClientConfigOption, defaultPluginManifest, -} from "../lib"; -import { Command, Program } from "./types"; -import { parseDirOption, parseDocgenManifestFileOption, -} from "../lib/option-parsers"; +} from "../lib"; +import { Command, Program } from "./types"; import { scriptPath as docusaurusScriptPath } from "../lib/docgen/docusaurus"; import { scriptPath as jsdocScriptPath } from "../lib/docgen/jsdoc"; +import { scriptPath as schemaScriptPath } from "../lib/docgen/schema"; import path from "path"; import { PolywrapClient, PolywrapClientConfig } from "@polywrap/client-js"; @@ -27,6 +26,7 @@ import chalk from "chalk"; import { Argument } from "commander"; const commandToPathMap: Record = { + schema: schemaScriptPath, docusaurus: docusaurusScriptPath, jsdoc: jsdocScriptPath, }; @@ -46,11 +46,15 @@ type DocgenCommandOptions = { }; enum Actions { + SCHEMA = "schema", DOCUSAURUS = "docusaurus", JSDOC = "jsdoc", } const argumentsDescription = ` + ${chalk.bold( + Actions.SCHEMA + )} ${intlMsg.commands_docgen_options_schema()} ${chalk.bold( Actions.DOCUSAURUS )} ${intlMsg.commands_docgen_options_markdown({ @@ -72,6 +76,7 @@ export const docgen: Command = { .usage(" [options]") .addArgument( new Argument("", argumentsDescription).choices([ + Actions.SCHEMA, Actions.DOCUSAURUS, Actions.JSDOC, ]) diff --git a/packages/cli/src/lib/docgen/schema/index.ts b/packages/cli/src/lib/docgen/schema/index.ts new file mode 100644 index 0000000000..0f85d1254d --- /dev/null +++ b/packages/cli/src/lib/docgen/schema/index.ts @@ -0,0 +1,50 @@ +import { + BindOptions, + BindOutput, + GenerateBindingFn, +} from "@polywrap/schema-bind"; +import Mustache from "mustache"; +import path from "path"; +import { readFileSync } from "fs"; +import { renderSchema } from "@polywrap/schema-compose"; + +export const scriptPath = path.join(__dirname, "index.js"); + +export const generateBinding: GenerateBindingFn = ( + options: BindOptions +): BindOutput => { + const result: BindOutput = { + output: { + entries: [], + }, + outputDirAbs: options.outputDirAbs, + }; + const output = result.output; + + const renderTemplate = ( + subPath: string, + context: unknown, + fileName: string + ) => { + const absPath = path.join(__dirname, subPath); + const template = readFileSync(absPath, { encoding: "utf-8" }); + + output.entries.push({ + type: "File", + name: fileName, + data: Mustache.render(template, context), + }); + }; + + // generate schema + const schemaContext = { + schema: renderSchema(options.abi, true), + }; + renderTemplate( + "./templates/schema.mustache", + schemaContext, + "generated-schema.graphql" + ); + + return result; +}; diff --git a/packages/cli/src/lib/docgen/schema/templates/schema.mustache b/packages/cli/src/lib/docgen/schema/templates/schema.mustache new file mode 100644 index 0000000000..45b42444e3 --- /dev/null +++ b/packages/cli/src/lib/docgen/schema/templates/schema.mustache @@ -0,0 +1 @@ +{{schema}} diff --git a/packages/test-cases/cases/cli/docgen/009-schema/.gitignore b/packages/test-cases/cases/cli/docgen/009-schema/.gitignore new file mode 100644 index 0000000000..29d09945fc --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/.gitignore @@ -0,0 +1,2 @@ +docs +!expected/** \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/cmd.json b/packages/test-cases/cases/cli/docgen/009-schema/cmd.json new file mode 100644 index 0000000000..df63238ee8 --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/cmd.json @@ -0,0 +1,3 @@ +{ + "args": ["schema"] +} \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql b/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql new file mode 100644 index 0000000000..7c591de829 --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/expected/docs/generated-schema.graphql @@ -0,0 +1,408 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Ethereum_Module", + "Ethereum_Connection", + "Ethereum_TxOverrides", + "Ethereum_StaticTxResult", + "Ethereum_TxRequest", + "Ethereum_TxReceipt", + "Ethereum_Log", + "Ethereum_EventNotification", + "Ethereum_Network", + "Ethereum_TxResponse", + "Ethereum_Access" + ] +) { + method( + str: String! + optStr: String + ): Object! +} + +type Object { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +""" +Test Comment +""" +type Object2 { + """ + Test Comment + """ + u: UInt! + """ + Test Comment + """ + array: [Boolean!]! + """ + Test Comment + """ + bytes: Bytes +} + +type Object3 { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +enum test { + ARG1 + ARG2 +} + +### Imported Modules START ### + +type Ethereum_Module @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Module" +) { + callContractView( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + callContractStatic( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_StaticTxResult! + + getBalance( + address: String! + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + encodeParams( + types: [String!]! + values: [String!]! + ): String! + + encodeFunction( + method: String! + args: [String!] + ): String! + + solidityPack( + types: [String!]! + values: [String!]! + ): String! + + solidityKeccak256( + types: [String!]! + values: [String!]! + ): String! + + soliditySha256( + types: [String!]! + values: [String!]! + ): String! + + getSignerAddress( + connection: Ethereum_Connection + ): String! + + getSignerBalance( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getSignerTransactionCount( + blockTag: BigInt + connection: Ethereum_Connection + ): BigInt! + + getGasPrice( + connection: Ethereum_Connection + ): BigInt! + + estimateTransactionGas( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): BigInt! + + estimateContractCallGas( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): BigInt! + + checkAddress( + address: String! + ): Boolean! + + toWei( + eth: String! + ): BigInt! + + toEth( + wei: BigInt! + ): String! + + awaitTransaction( + txHash: String! + confirmations: UInt32! + timeout: UInt32! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + waitForEvent( + address: String! + event: String! + args: [String!] + timeout: UInt32 + connection: Ethereum_Connection + ): Ethereum_EventNotification! + + getNetwork( + connection: Ethereum_Connection + ): Ethereum_Network! + + requestAccounts( + connection: Ethereum_Connection + ): [String!]! + + callContractMethod( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxResponse! + + callContractMethodAndWait( + address: String! + method: String! + args: [String!] + connection: Ethereum_Connection + txOverrides: Ethereum_TxOverrides + ): Ethereum_TxReceipt! + + sendTransaction( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxResponse! + + sendTransactionAndWait( + tx: Ethereum_TxRequest! + connection: Ethereum_Connection + ): Ethereum_TxReceipt! + + deployContract( + abi: String! + bytecode: String! + args: [String!] + connection: Ethereum_Connection + ): String! + + signMessage( + message: String! + connection: Ethereum_Connection + ): String! + + sendRPC( + method: String! + params: [String!]! + connection: Ethereum_Connection + ): String +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Ethereum_Connection @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Connection" +) { + node: String + networkNameOrChainId: String +} + +type Ethereum_TxOverrides @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxOverrides" +) { + gasLimit: BigInt + gasPrice: BigInt + value: BigInt +} + +type Ethereum_StaticTxResult @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "StaticTxResult" +) { + result: String! + error: Boolean! +} + +type Ethereum_TxRequest @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxRequest" +) { + to: String + from: String + nonce: UInt32 + gasLimit: BigInt + gasPrice: BigInt + data: String + value: BigInt + chainId: BigInt + type: UInt32 +} + +type Ethereum_TxReceipt @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxReceipt" +) { + to: String! + from: String! + contractAddress: String! + transactionIndex: UInt32! + root: String + gasUsed: BigInt! + logsBloom: String! + transactionHash: String! + logs: [Ethereum_Log!]! + blockNumber: BigInt! + blockHash: String! + confirmations: UInt32! + cumulativeGasUsed: BigInt! + effectiveGasPrice: BigInt! + byzantium: Boolean! + type: UInt32! + status: UInt32 +} + +type Ethereum_Log @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Log" +) { + blockNumber: BigInt! + blockHash: String! + transactionIndex: UInt32! + removed: Boolean! + address: String! + data: String! + topics: [String!]! + transactionHash: String! + logIndex: UInt32! +} + +type Ethereum_EventNotification @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "EventNotification" +) { + data: String! + address: String! + log: Ethereum_Log! +} + +type Ethereum_Network @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Network" +) { + name: String! + chainId: BigInt! + ensAddress: String +} + +type Ethereum_TxResponse @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "TxResponse" +) { + hash: String! + to: String + from: String! + nonce: UInt32! + gasLimit: BigInt! + gasPrice: BigInt + data: String! + value: BigInt! + chainId: BigInt! + blockNumber: BigInt + blockHash: String + timestamp: UInt32 + confirmations: UInt32! + raw: String + r: String + s: String + v: UInt32 + type: UInt32 + accessList: [Ethereum_Access!] +} + +type Ethereum_Access @imported( + uri: "ens/ethereum.polywrap.eth", + namespace: "Ethereum", + nativeType: "Access" +) { + address: String! + storageKeys: [String!]! +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### + diff --git a/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json b/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json new file mode 100644 index 0000000000..a7621f6c30 --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/expected/stdout.json @@ -0,0 +1,4 @@ +{ + "stdout": "Docs were generated successfully", + "exitCode": 0 +} diff --git a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml new file mode 100644 index 0000000000..5b7b10a7c5 --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.build.yaml @@ -0,0 +1,6 @@ +format: 0.1.0 +config: + node_version: "16.13.0" +linked_packages: + - name: "@polywrap/wasm-as" + path: ../../../../../../wasm/as diff --git a/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml new file mode 100644 index 0000000000..b4f64cde3d --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/polywrap.yaml @@ -0,0 +1,6 @@ +format: "0.2" +name: test-project +build: ./polywrap.build.yaml +language: wasm/assemblyscript +schema: ./schema.graphql +module: ./src/index.ts \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql b/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql new file mode 100644 index 0000000000..47f526f13a --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/schema.graphql @@ -0,0 +1,35 @@ +#import { Module } into Ethereum from "ens/ethereum.polywrap.eth" + +type Module { + method( + str: String! + optStr: String + ): Object! +} + +type Object { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +"""Test Comment""" +type Object2 { + """Test Comment""" + u: UInt! + """Test Comment""" + array: [Boolean!]! + """Test Comment""" + bytes: Bytes +} + +type Object3 { + u: UInt! + array: [Boolean!]! + bytes: Bytes +} + +enum test { + ARG1, + ARG2 +} diff --git a/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts b/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts new file mode 100644 index 0000000000..5bb85ff3e4 --- /dev/null +++ b/packages/test-cases/cases/cli/docgen/009-schema/src/index.ts @@ -0,0 +1 @@ +export * from "./wrap"; From 3fb3126e797c080ff77b97ad893b92e91dc5d6b9 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 12 Aug 2022 17:15:54 -0700 Subject: [PATCH 28/56] merge origin-dev --- package.json | 4 +- packages/cli/lang/en.json | 1 + packages/cli/lang/es.json | 1 + packages/cli/src/__tests__/e2e/docgen.spec.ts | 1 + packages/cli/src/commands/docgen.ts | 9 +- packages/cli/src/lib/CodeGenerator.ts | 1 + packages/cli/src/lib/Compiler.ts | 8 +- packages/cli/src/lib/SchemaComposer.ts | 18 +- .../cli/src/lib/docgen/docusaurus/index.ts | 130 +-- .../templates/docusaurus-enums.mustache | 1 + .../templates/docusaurus-env.mustache | 1 + .../templates/docusaurus-module.mustache | 1 + .../templates/docusaurus-objects.mustache | 1 + packages/cli/src/lib/docgen/jsdoc/index.ts | 122 +-- packages/cli/src/lib/docgen/utils.ts | 22 +- packages/cli/src/lib/project/AppProject.ts | 4 +- packages/cli/src/lib/project/PluginProject.ts | 4 +- .../cli/src/lib/project/PolywrapProject.ts | 4 +- packages/js/client/src/PolywrapClient.ts | 6 +- .../src/__tests__/core/plugin-wrapper.spec.ts | 11 - .../js/client/src/plugin/PluginWrapper.ts | 9 +- packages/js/client/src/wasm/WasmWrapper.ts | 8 +- packages/js/core/src/types/Client.ts | 9 +- packages/js/core/src/types/Wrapper.ts | 6 +- .../js/manifests/wrap/scripts/generate.ts | 10 +- .../wrap/scripts/templates/index-ts.mustache | 2 + .../src/formats/wrap.info/0.1.schema.json | 264 +++--- .../wrap/src/formats/wrap.info/0.1.ts | 96 +- .../wrap/src/formats/wrap.info/index.ts | 2 + packages/manifests/wrap/formats/abi/0.1.json | 248 ++--- .../manifests/wrap/formats/wrap.info/0.1.json | 1 + .../src/bindings/assemblyscript/wasm/index.ts | 154 +-- .../env-type/serialization-ts.mustache | 5 + .../env-type/serialization-ts.mustache | 5 + .../module-type/serialization-ts.mustache | 5 + .../object-type/serialization-ts.mustache | 5 + .../object-type/serialization-ts.mustache | 5 + .../bind/src/bindings/rust/wasm/index.ts | 154 +-- .../env-type/serialization-rs.mustache | 5 + .../env-type/serialization-rs.mustache | 5 + .../module-type/serialization-rs.mustache | 5 + .../object-type/serialization-rs.mustache | 5 + .../object-type/serialization-rs.mustache | 5 + .../bindings/rust/wasm/transforms/byRef.ts | 3 +- .../rust/wasm/transforms/propertyDeps.ts | 4 +- .../bind/src/bindings/typescript/app/index.ts | 4 +- .../src/bindings/typescript/plugin/index.ts | 4 +- packages/schema/bind/src/types.ts | 4 +- packages/schema/compose/package.json | 1 + .../schema/compose/src/__tests__/index.ts | 10 +- packages/schema/compose/src/env.ts | 17 +- packages/schema/compose/src/index.ts | 12 +- packages/schema/compose/src/render.ts | 5 +- packages/schema/compose/src/resolve.ts | 315 ++++--- packages/schema/parse/package.json | 1 + packages/schema/parse/src/__tests__/index.ts | 6 +- .../src/__tests__/parse-map-type.spec.ts | 5 - .../parse/src/__tests__/transforms.spec.ts | 45 +- packages/schema/parse/src/abi/definitions.ts | 216 ++--- packages/schema/parse/src/abi/index.ts | 169 +--- packages/schema/parse/src/abi/map.ts | 21 - packages/schema/parse/src/abi/module.ts | 9 - packages/schema/parse/src/abi/scalar.ts | 26 - packages/schema/parse/src/abi/utils.ts | 43 + .../schema/parse/src/extract/enum-types.ts | 11 +- .../schema/parse/src/extract/env-types.ts | 9 +- .../parse/src/extract/imported-enum-types.ts | 14 +- .../parse/src/extract/imported-env-types.ts | 22 +- .../src/extract/imported-module-types.ts | 30 +- .../src/extract/imported-object-types.ts | 22 +- packages/schema/parse/src/extract/index.ts | 4 +- .../schema/parse/src/extract/module-types.ts | 41 +- .../schema/parse/src/extract/object-types.ts | 21 +- .../src/extract/utils/imported-types-utils.ts | 7 +- .../parse/src/extract/utils/map-utils.ts | 13 +- .../src/extract/utils/module-types-utils.ts | 42 +- .../src/extract/utils/object-types-utils.ts | 26 +- .../parse/src/extract/utils/property-utils.ts | 14 +- packages/schema/parse/src/index.ts | 40 +- .../parse/src/transform/addAnnotations.ts | 4 +- .../parse/src/transform/addFirstLast.ts | 3 +- .../schema/parse/src/transform/extendType.ts | 5 +- .../src/transform/finalizePropertyDef.ts | 45 +- .../schema/parse/src/transform/hasImports.ts | 13 +- packages/schema/parse/src/transform/index.ts | 147 +-- .../parse/src/transform/interfaceUris.ts | 37 +- .../src/transform/methodParentPointers.ts | 5 +- .../parse/src/transform/moduleCapabilities.ts | 19 +- .../parse/src/transform/toGraphQLType.ts | 9 +- .../schema/parse/src/validate/directives.ts | 3 +- packages/schema/parse/src/validate/types.ts | 2 +- .../docgen/001-sanity/expected/docs/module.md | 1 + .../cases/cli/docgen/001-sanity/package.json | 2 +- .../expected/docs/Mock_module.md | 27 - .../002-custom-config/expected/docs/module.md | 1 + .../cli/docgen/002-custom-config/package.json | 2 +- .../expected/docs/module.md | 1 + .../003-custom-manifest-file/package.json | 2 +- .../cases/cli/docgen/004-app/cmd.json | 2 +- .../004-app/expected/docs/Console_enums.md | 5 +- .../004-app/expected/docs/Console_module.md | 5 +- .../004-app/expected/docs/Ethereum_env.md | 5 +- .../004-app/expected/docs/Ethereum_module.md | 5 +- .../004-app/expected/docs/Ethereum_objects.md | 5 +- .../docgen/005-wasm/expected/docs/module.md | 1 + .../docgen/005-wasm/expected/docs/objects.md | 1 + .../cases/cli/docgen/005-wasm/package.json | 2 +- .../expected/docs/Ethereum_module.md | 273 ------ .../expected/docs/Ethereum_objects.md | 145 --- .../docgen/006-plugin/expected/docs/env.md | 1 + .../docgen/006-plugin/expected/docs/module.md | 1 + .../006-plugin/expected/docs/objects.md | 1 + .../expected/docs/Ethereum_module.md | 273 ------ .../expected/docs/Ethereum_objects.md | 145 --- .../007-docusaurus/expected/docs/enums.md | 1 + .../007-docusaurus/expected/docs/module.md | 1 + .../007-docusaurus/expected/docs/objects.md | 1 + .../expected/docs/Ethereum_Module.js | 246 ----- .../expected/docs/Ethereum_objects.js | 134 --- .../wasm/build-cmd/001-sanity/package.json | 2 +- .../build-cmd/004-default-build/package.json | 2 +- .../005-default-dockerfile/package.json | 2 +- .../006-custom-dockerfile/package.json | 2 +- .../007-linked-packages/package.json | 2 +- .../wasm/build-cmd/008-metadata/package.json | 2 +- .../build-cmd/009-docker-buildx/package.json | 2 +- .../build-cmd/010-custom-config/package.json | 2 +- .../build-cmd/011-custom-config/package.json | 2 +- .../cli/wasm/codegen/001-sanity/package.json | 2 +- .../002-invalid-codegen-script/package.json | 2 +- .../codegen/003-codegen-script/package.json | 2 +- .../codegen/004-custom-config/package.json | 2 +- .../005-custom-manifest-file/package.json | 2 +- .../cli/wasm/deploy/001-sanity/package.json | 2 +- .../cli/wasm/deploy/002-no-ext/package.json | 2 +- .../deploy/003-invalid-config/package.json | 2 +- .../wasm/deploy/004-fail-between/package.json | 2 +- .../005-non-loaded-env-var/package.json | 2 +- .../cases/cli/wasm/run/package.json | 2 +- .../00-sanity/output/module.ts | 32 +- .../01-nested-objects/output/module.ts | 10 +- .../02-recursive/output/module.ts | 10 +- .../03-wild-card/output/module.ts | 32 +- .../00-sanity/output/module.ts | 12 +- .../output/module.ts | 12 +- .../02-wild-card/output/module.ts | 12 +- .../01-sanity/output/module.ts | 12 +- .../00-sanity/output/module.ts | 12 +- .../01-inherited/output/module.ts | 14 +- .../02-imported-inherited/output/module.ts | 20 +- .../03-external-import/output/module.ts | 10 +- .../output/module.ts | 16 +- .../005-map-types/00-sanity/output/module.ts | 8 +- .../01-inherited/output/module.ts | 8 +- .../02-imported-inherited/output/module.ts | 8 +- .../03-external-import/output/module.ts | 22 +- .../output/module.ts | 11 +- .../006-env-types/00-sanity/output/module.ts | 6 +- .../cases/compose/sanity/output/module.ts | 878 +++++++++++------- .../parse/recursive-properties/output.ts | 11 +- .../test-cases/cases/parse/sanity/output.ts | 66 +- .../wrappers/wasm-as/asyncify/package.json | 2 +- .../wrappers/wasm-as/bigint-type/package.json | 2 +- .../wasm-as/bignumber-type/package.json | 2 +- .../wrappers/wasm-as/bytes-type/package.json | 2 +- .../wrappers/wasm-as/enum-types/package.json | 2 +- .../wasm-as/env-types/external/package.json | 2 +- .../wasm-as/env-types/main/package.json | 2 +- .../test-use-getImpl/package.json | 2 +- .../implementations/test-wrapper/package.json | 2 +- .../test-implementation/package.json | 2 +- .../test-wrapper/package.json | 2 +- .../wasm-as/invalid-types/package.json | 2 +- .../wrappers/wasm-as/json-type/package.json | 2 +- .../wrappers/wasm-as/large-types/package.json | 2 +- .../wrappers/wasm-as/map-type/package.json | 2 +- .../wasm-as/number-types/package.json | 2 +- .../wasm-as/object-types/package.json | 2 +- .../wasm-as/reserved-words/package.json | 2 +- .../wasm-as/simple-calculator/package.json | 2 +- .../wasm-as/simple-env-types/package.json | 2 +- .../wasm-as/simple-fs-resolver/package.json | 2 +- .../wasm-as/simple-memory/package.json | 2 +- .../simple-redirect-resolver/package.json | 2 +- .../wasm-as/simple-storage/package.json | 2 +- .../wrappers/wasm-as/simple/package.json | 2 +- yarn.lock | 162 ++-- 187 files changed, 2253 insertions(+), 3401 deletions(-) delete mode 100644 packages/schema/parse/src/abi/map.ts delete mode 100644 packages/schema/parse/src/abi/module.ts delete mode 100644 packages/schema/parse/src/abi/scalar.ts create mode 100644 packages/schema/parse/src/abi/utils.ts delete mode 100644 packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/Mock_module.md delete mode 100644 packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_module.md delete mode 100644 packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_objects.md delete mode 100644 packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_module.md delete mode 100644 packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_objects.md delete mode 100644 packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_Module.js delete mode 100644 packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_objects.js diff --git a/package.json b/package.json index 6e32270031..e9477f2da2 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap", "dependencies:install": "cd dependencies && yarn", "preinstall": "yarn dependencies:install", - "build": "yarn build:core && yarn link:interface:deps && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", + "build": "yarn build:core && yarn build:plugins && yarn build:client && yarn build:test-env && yarn build:cli && yarn build:plugins:patch", "build:core": "lerna run build --no-private --ignore @polywrap/*-plugin-js --ignore polywrap --ignore @polywrap/client-js --ignore @polywrap/react --ignore @polywrap/test-env-js --ignore @polywrap/*-interface", "build:interfaces": "lerna run build --scope @polywrap/*-interface --concurrency 1", "build:plugins": "lerna run build --scope @polywrap/*-plugin-js --concurrency 1", "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", "build:cli": "lerna run build --scope polywrap", - "build:plugins:patch": "cd packages/js/plugins/ethereum && yarn codegen:patch && cd ../http && yarn codegen:patch && lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", + "build:plugins:patch": "lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "link:interface:deps": "yarn link:manifests && yarn link:schema", "link:manifests": "yarn link:manifests:polywrap && yarn link:manifests:wrap", "link:manifests:polywrap": "cd packages/js/manifests/polywrap && (yarn unlink || true) && yarn link && cd ../../../../dependencies && yarn link @polywrap/polywrap-manifest-types-js && cd ../", diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index cffc832130..5483424ed9 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -90,6 +90,7 @@ "commands_docgen_options_m": "Path to the project manifest file (default: {default})", "commands_docgen_options_schema": "Generate GraphQL schema", "commands_docgen_options_markdown": "Generate {framework} markdown", + "commands_docgen_options_i": "Also generate docs for dependencies", "commands_create_description": "Create a new project with polywrap CLI", "commands_create_directoryExists": "Directory with name {dir} already exists", "commands_create_error_commandFail": "Command failed: {error}", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index a1de2dcc88..ff6fdd15e7 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -90,6 +90,7 @@ "commands_docgen_options_m": "Path to the project manifest file (default: {default})", "commands_docgen_options_schema": "Generate GraphQL schema", "commands_docgen_options_markdown": "Generate {framework} markdown", + "commands_docgen_options_i": "Also generate docs for dependencies", "commands_create_description": "Create a new project with polywrap CLI", "commands_create_directoryExists": "Directory with name {dir} already exists", "commands_create_error_commandFail": "Command failed: {error}", diff --git a/packages/cli/src/__tests__/e2e/docgen.spec.ts b/packages/cli/src/__tests__/e2e/docgen.spec.ts index 82e85567e3..7504926859 100644 --- a/packages/cli/src/__tests__/e2e/docgen.spec.ts +++ b/packages/cli/src/__tests__/e2e/docgen.spec.ts @@ -29,6 +29,7 @@ Options: (default: ./docs) -c, --client-config Add custom configuration to the PolywrapClient + -i, --imports Also generate docs for dependencies -h, --help display help for command `; diff --git a/packages/cli/src/commands/docgen.ts b/packages/cli/src/commands/docgen.ts index cee3192a56..3feaf1d798 100644 --- a/packages/cli/src/commands/docgen.ts +++ b/packages/cli/src/commands/docgen.ts @@ -43,6 +43,7 @@ type DocgenCommandOptions = { manifestFile: string; docgenDir: string; clientConfig: Partial; + imports: boolean; }; enum Actions { @@ -52,9 +53,7 @@ enum Actions { } const argumentsDescription = ` - ${chalk.bold( - Actions.SCHEMA - )} ${intlMsg.commands_docgen_options_schema()} + ${chalk.bold(Actions.SCHEMA)} ${intlMsg.commands_docgen_options_schema()} ${chalk.bold( Actions.DOCUSAURUS )} ${intlMsg.commands_docgen_options_markdown({ @@ -97,6 +96,7 @@ export const docgen: Command = { `-c, --client-config <${intlMsg.commands_common_options_configPath()}>`, `${intlMsg.commands_common_options_config()}` ) + .option(`-i, --imports`, `${intlMsg.commands_docgen_options_i()}`) .action(async (action, options) => { await run(action, { ...options, @@ -109,7 +109,7 @@ export const docgen: Command = { }; async function run(command: DocType, options: DocgenCommandOptions) { - const { manifestFile, docgenDir, clientConfig } = options; + const { manifestFile, docgenDir, clientConfig, imports } = options; const isAppManifest: boolean = (manifestFile).toLowerCase().endsWith("polywrap.app.yaml") || @@ -159,6 +159,7 @@ async function run(command: DocType, options: DocgenCommandOptions) { customScript, codegenDirAbs: docgenDir, omitHeader: true, + mustacheView: { imports }, }); if (await codeGenerator.generate()) { diff --git a/packages/cli/src/lib/CodeGenerator.ts b/packages/cli/src/lib/CodeGenerator.ts index b0807f26c0..cbbc0cf3de 100644 --- a/packages/cli/src/lib/CodeGenerator.ts +++ b/packages/cli/src/lib/CodeGenerator.ts @@ -114,6 +114,7 @@ export class CodeGenerator { abi, outputDirAbs: codegenDirAbs, bindLanguage, + config: this._config.mustacheView, }); resetDir(codegenDirAbs); diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 7c93f3e989..1f4a809c0d 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -25,10 +25,10 @@ import { normalizePath, writeDirectorySync } from "@polywrap/os-js"; import * as gluegun from "gluegun"; import fs from "fs"; import path from "path"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/schema-parse"; interface CompilerState { - abi: Abi; + abi: WrapAbi; compilerOverrides?: CompilerOverrides; } @@ -193,7 +193,7 @@ export class Compiler { return manifest.language === "interface"; } - private async _composeAbi(): Promise { + private async _composeAbi(): Promise { const { schemaComposer } = this._config; // Get the fully composed schema @@ -330,7 +330,7 @@ export class Compiler { const manifest = await project.getManifest(); - const abi: Abi = { + const abi: WrapAbi = { ...state.abi, }; diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 253bc685a5..e9d28ca31e 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -13,7 +13,7 @@ import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; import { deserializeWrapManifest } from "@polywrap/wrap-manifest-types-js"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/schema-parse"; export interface SchemaComposerConfig { project: Project; @@ -22,13 +22,13 @@ export interface SchemaComposerConfig { export class SchemaComposer { private _client: PolywrapClient; - private _abi: Abi | undefined; + private _abi: WrapAbi | undefined; constructor(private _config: SchemaComposerConfig) { this._client = this._config.client; } - public async getComposedAbis(): Promise { + public async getComposedAbis(): Promise { if (this._abi) { return Promise.resolve(this._abi); } @@ -45,13 +45,14 @@ export class SchemaComposer { absolutePath: schemaPath, } : undefined; + const schemaFile = getSchemaFile(schemaNamedPath); if (!schemaFile) { throw Error(`Schema cannot be loaded at path: ${schemaNamedPath}`); } const options: ComposerOptions = { - schemaFile, + schema: schemaFile, resolvers: { external: (uri: string) => this._fetchExternalAbi(uri, import_redirects), @@ -59,7 +60,7 @@ export class SchemaComposer { }, }; - this._abi = (await composeSchema(options)) as Abi; + this._abi = await composeSchema(options); return this._abi; } @@ -70,7 +71,7 @@ export class SchemaComposer { private async _fetchExternalAbi( uri: string, import_redirects?: ImportRedirects - ): Promise { + ): Promise { // Check to see if we have any import redirects that match if (import_redirects) { for (const redirect of import_redirects) { @@ -81,15 +82,14 @@ export class SchemaComposer { const manifest = fs.readFileSync( path.join(this._config.project.getManifestDir(), redirect.info) ); - return ((await deserializeWrapManifest(manifest)) - .abi as unknown) as Abi; + return (await deserializeWrapManifest(manifest)).abi as WrapAbi; } } } try { const manifest = await this._client.getManifest(new Uri(uri)); - return (manifest.abi as unknown) as Abi; + return manifest.abi as WrapAbi; } catch (e) { gluegun.print.error(e); throw e; diff --git a/packages/cli/src/lib/docgen/docusaurus/index.ts b/packages/cli/src/lib/docgen/docusaurus/index.ts index 4d78ff8228..ef175f7dae 100644 --- a/packages/cli/src/lib/docgen/docusaurus/index.ts +++ b/packages/cli/src/lib/docgen/docusaurus/index.ts @@ -6,7 +6,7 @@ import { } from "../utils"; import { - Abi, + WrapAbi, transformAbi, addFirstLast, toPrefixedGraphQLType, @@ -64,7 +64,7 @@ export const generateBinding: GenerateBindingFn = ( } // generate object types - if (abi.objectTypes.length > 0) { + if (abi.objectTypes && abi.objectTypes.length > 0) { const objectContext = { objectTypes: abi.objectTypes, }; @@ -76,7 +76,7 @@ export const generateBinding: GenerateBindingFn = ( } // generate enum types - if (abi.enumTypes.length > 0) { + if (abi.enumTypes && abi.enumTypes.length > 0) { const enumContext = { enumTypes: abi.enumTypes, }; @@ -95,74 +95,84 @@ export const generateBinding: GenerateBindingFn = ( renderTemplate("./templates/docusaurus-env.mustache", envContext, "env.md"); } - // TODO: for imported modules, module.type contains the namespace. Should it? - // generate imported modules - for (const module of abi.importedModuleTypes) { - const moduleType = module.type.split("_")[1]; - const moduleContext = { - ...module, - namespace: module.namespace, - type: moduleType, - }; - renderTemplate( - "./templates/docusaurus-module.mustache", - moduleContext, - `${module.namespace}_${moduleType.toLowerCase()}.md` - ); - } + if (options.config?.["imports"]) { + // TODO: for imported modules, module.type contains the namespace. Should it? + // generate imported modules + if (abi.importedModuleTypes) { + for (const module of abi.importedModuleTypes) { + const moduleType = module.type.split("_")[1]; + const moduleContext = { + ...module, + type: moduleType, + imported: { namespace: module.namespace }, + }; + renderTemplate( + "./templates/docusaurus-module.mustache", + moduleContext, + `${module.namespace}_${moduleType.toLowerCase()}.md` + ); + } + } - // generated imported object types - const importedObjects = arrangeByNamespace(abi.importedObjectTypes); - for (const [namespace, objectTypes] of Object.entries(importedObjects)) { - if (objectTypes.length > 0) { - const objectContext = { - objectTypes, - namespace, - }; - renderTemplate( - "./templates/docusaurus-objects.mustache", - objectContext, - `${namespace}_objects.md` - ); + // generated imported object types + if (abi.importedObjectTypes) { + const importedObjects = arrangeByNamespace(abi.importedObjectTypes); + for (const [namespace, objectTypes] of Object.entries(importedObjects)) { + if (objectTypes.length > 0) { + const objectContext = { + objectTypes, + imported: { namespace }, + }; + renderTemplate( + "./templates/docusaurus-objects.mustache", + objectContext, + `${namespace}_objects.md` + ); + } + } } - } - // generate imported enum types - const importedEnums = arrangeByNamespace(abi.importedEnumTypes); - for (const [namespace, enumTypes] of Object.entries(importedEnums)) { - if (enumTypes.length > 0) { - const enumContext = { - enumTypes, - namespace, - }; - renderTemplate( - "./templates/docusaurus-enums.mustache", - enumContext, - `${namespace}_enums.md` - ); + // generate imported enum types + if (abi.importedEnumTypes) { + const importedEnums = arrangeByNamespace(abi.importedEnumTypes); + for (const [namespace, enumTypes] of Object.entries(importedEnums)) { + if (enumTypes.length > 0) { + const enumContext = { + enumTypes, + imported: { namespace }, + }; + renderTemplate( + "./templates/docusaurus-enums.mustache", + enumContext, + `${namespace}_enums.md` + ); + } + } } - } - // generate imported env types - const importedEnvs = arrangeByNamespace(abi.importedEnvTypes); - for (const [namespace, envType] of Object.entries(importedEnvs)) { - if (envType) { - const envContext = { - envType, - namespace, - }; - renderTemplate( - "./templates/docusaurus-env.mustache", - envContext, - `${namespace}_env.md` - ); + // generate imported env types + if (abi.importedEnvTypes) { + const importedEnvs = arrangeByNamespace(abi.importedEnvTypes); + for (const [namespace, envType] of Object.entries(importedEnvs)) { + if (envType) { + const envContext = { + envType, + imported: { namespace }, + }; + renderTemplate( + "./templates/docusaurus-env.mustache", + envContext, + `${namespace}_env.md` + ); + } + } } } return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), extendType(TypeScript.Functions), diff --git a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-enums.mustache b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-enums.mustache index 8129150440..ad9003cc5f 100644 --- a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-enums.mustache +++ b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-enums.mustache @@ -1,6 +1,7 @@ --- id: {{#imported}}{{namespace}}_{{/imported}}enums title: {{#imported}}{{namespace}} {{/imported}}Enum Types +sidebar_position: 3 --- diff --git a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-env.mustache b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-env.mustache index da062e6c0e..d25872b38c 100644 --- a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-env.mustache +++ b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-env.mustache @@ -1,6 +1,7 @@ --- id: {{#imported}}{{namespace}}_{{/imported}}env title: {{#imported}}{{namespace}} {{/imported}}Env Type +sidebar_position: 4 --- diff --git a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-module.mustache b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-module.mustache index 721fbcd1b4..70419c35b5 100644 --- a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-module.mustache +++ b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-module.mustache @@ -1,6 +1,7 @@ --- id: {{#imported}}{{namespace}}_{{/imported}}{{#toLowerCase}}{{type}}{{/toLowerCase}} title: {{#toTitle}}{{#imported}}{{namespace}} {{/imported}}{{type}}{{/toTitle}} +sidebar_position: 1 --- {{#methods}} diff --git a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-objects.mustache b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-objects.mustache index ea3453a530..6cd78c2ae7 100644 --- a/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-objects.mustache +++ b/packages/cli/src/lib/docgen/docusaurus/templates/docusaurus-objects.mustache @@ -1,6 +1,7 @@ --- id: {{#imported}}{{namespace}}_{{/imported}}objects title: {{#imported}}{{namespace}} {{/imported}}Object Types +sidebar_position: 2 --- diff --git a/packages/cli/src/lib/docgen/jsdoc/index.ts b/packages/cli/src/lib/docgen/jsdoc/index.ts index 3fd3f9e0b5..d9d95ce684 100644 --- a/packages/cli/src/lib/docgen/jsdoc/index.ts +++ b/packages/cli/src/lib/docgen/jsdoc/index.ts @@ -6,7 +6,6 @@ import { } from "../utils"; import { - Abi, transformAbi, addFirstLast, toPrefixedGraphQLType, @@ -14,6 +13,7 @@ import { methodParentPointers, ImportedDefinition, ModuleDefinition, + WrapAbi, } from "@polywrap/schema-parse"; import { BindOptions, @@ -67,12 +67,12 @@ export const generateBinding: GenerateBindingFn = ( } // generate object types - if (abi.objectTypes.length > 0) { + if (abi.objectTypes && abi.objectTypes.length > 0) { renderTemplate("./templates/jsdoc-objects.mustache", abi, "objects.js"); } // generate enum types - if (abi.enumTypes.length > 0) { + if (abi.enumTypes && abi.enumTypes.length > 0) { renderTemplate("./templates/jsdoc-enums.mustache", abi, "enums.js"); } @@ -84,68 +84,82 @@ export const generateBinding: GenerateBindingFn = ( renderTemplate("./templates/jsdoc-env.mustache", envContext, "env.js"); } - // TODO: for imported modules, module.type contains the namespace. Should it? - // generate imported modules - for (const module of abi.importedModuleTypes) { - renderTemplate( - "./templates/jsdoc-module.mustache", - module, - `${module.type}.js` - ); - } + if (options.config?.["imports"]) { + // TODO: for imported modules, module.type contains the namespace. Should it? + // generate imported modules + if (abi.importedModuleTypes) { + for (const module of abi.importedModuleTypes) { + const moduleContext = { + ...module, + imported: { namespace: module.namespace }, + }; + renderTemplate( + "./templates/jsdoc-module.mustache", + moduleContext, + `${module.type}.js` + ); + } + } - // generated imported object types - const importedObjects = sortByNamespace(abi.importedObjectTypes); - for (const [namespace, objectTypes] of Object.entries(importedObjects)) { - if (objectTypes.length > 0) { - const objectContext = { - objectTypes, - imported: { namespace }, - }; - renderTemplate( - "./templates/jsdoc-objects.mustache", - objectContext, - `${namespace}_objects.js` - ); + // generated imported object types + if (abi.importedObjectTypes) { + const importedObjects = sortByNamespace(abi.importedObjectTypes); + for (const [namespace, objectTypes] of Object.entries(importedObjects)) { + if (objectTypes.length > 0) { + const objectContext = { + objectTypes, + imported: { namespace }, + }; + renderTemplate( + "./templates/jsdoc-objects.mustache", + objectContext, + `${namespace}_objects.js` + ); + } + } } - } - // generate imported enum types - const importedEnums = sortByNamespace(abi.importedEnumTypes); - for (const [namespace, enumTypes] of Object.entries(importedEnums)) { - if (enumTypes.length > 0) { - const enumContext = { - enumTypes, - imported: { namespace }, - }; - renderTemplate( - "./templates/jsdoc-enums.mustache", - enumContext, - `${namespace}_enums.js` - ); + // generate imported enum types + if (abi.importedEnumTypes) { + const importedEnums = sortByNamespace(abi.importedEnumTypes); + for (const [namespace, enumTypes] of Object.entries(importedEnums)) { + if (enumTypes.length > 0) { + const enumContext = { + enumTypes, + imported: { namespace }, + }; + renderTemplate( + "./templates/jsdoc-enums.mustache", + enumContext, + `${namespace}_enums.js` + ); + } + } } - } - // generate imported env types - const importedEnvs = arrangeByNamespace(abi.importedEnvTypes); - for (const [namespace, envType] of Object.entries(importedEnvs)) { - if (envType) { - const envContext = { - envType, - namespace, - }; - renderTemplate( - "./templates/jsdoc-env.mustache", - envContext, - `${namespace}_env.js` - ); + // generate imported env types + if (abi.importedEnvTypes) { + const importedEnvs = arrangeByNamespace(abi.importedEnvTypes); + for (const [namespace, envType] of Object.entries(importedEnvs)) { + if (envType) { + const envContext = { + envType, + imported: { namespace }, + }; + renderTemplate( + "./templates/jsdoc-env.mustache", + envContext, + `${namespace}_env.js` + ); + } + } } } return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), extendType(TypeScript.Functions), diff --git a/packages/cli/src/lib/docgen/utils.ts b/packages/cli/src/lib/docgen/utils.ts index ccbfecb92a..e41b84045e 100644 --- a/packages/cli/src/lib/docgen/utils.ts +++ b/packages/cli/src/lib/docgen/utils.ts @@ -2,6 +2,7 @@ import { ImportedDefinition, MethodDefinition, Abi, + GenericDefinition, } from "@polywrap/schema-parse"; export function arrangeByNamespace( @@ -18,27 +19,34 @@ export function arrangeByNamespace( } export function sortObjectsInPlaceByType(abi: Abi): void { - const typesToSort: { type: string }[][] = [ + const typesToSort: (GenericDefinition[] | undefined)[] = [ abi.objectTypes, abi.enumTypes, abi.importedObjectTypes, abi.importedEnumTypes, ]; for (const definitions of typesToSort) { - definitions.sort((a: { type: string }, b: { type: string }) => - a.type.localeCompare(b.type) - ); + if (definitions) { + definitions.sort((a: { type: string }, b: { type: string }) => + a.type.localeCompare(b.type) + ); + } } } export function sortMethodsInPlaceByName(abi: Abi): void { const methodsToSort: MethodDefinition[][] = []; - if (abi.moduleType) { + if (abi.moduleType && abi.moduleType.methods) { methodsToSort.push(abi.moduleType.methods); } - for (const moduleType of abi.importedModuleTypes) { - methodsToSort.push(moduleType.methods); + if (abi.importedModuleTypes) { + for (const moduleType of abi.importedModuleTypes) { + if (moduleType.methods) { + methodsToSort.push(moduleType.methods); + } + } } + for (const definitions of methodsToSort) { definitions.sort((a: MethodDefinition, b: MethodDefinition) => { if (!a.name || !b.name) return 0; diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index ef7471fae5..eb69ba0fa9 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -10,8 +10,8 @@ import { import { AppManifest } from "@polywrap/polywrap-manifest-types-js"; import { Client } from "@polywrap/core-js"; import { bindSchema, BindOutput } from "@polywrap/schema-bind"; -import { Abi } from "@polywrap/schema-parse"; import path from "path"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; export interface AppProjectConfig extends ProjectConfig { appManifestPath: string; @@ -100,7 +100,7 @@ export class AppProject extends Project { } public async generateSchemaBindings( - abi: Abi, + abi: WrapAbi, generationSubPath?: string ): Promise { return bindSchema({ diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index a56db9d46c..c6e8795938 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -10,7 +10,7 @@ import { resetDir } from "../system"; import { PluginManifest } from "@polywrap/polywrap-manifest-types-js"; import { bindSchema, BindOutput, BindOptions } from "@polywrap/schema-bind"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/schema-parse"; import path from "path"; export interface PluginProjectConfig extends ProjectConfig { @@ -100,7 +100,7 @@ export class PluginProject extends Project { } public async generateSchemaBindings( - abi: Abi, + abi: WrapAbi, generationSubPath?: string ): Promise { const manifest = await this.getManifest(); diff --git a/packages/cli/src/lib/project/PolywrapProject.ts b/packages/cli/src/lib/project/PolywrapProject.ts index 3db94a9730..02938efa70 100644 --- a/packages/cli/src/lib/project/PolywrapProject.ts +++ b/packages/cli/src/lib/project/PolywrapProject.ts @@ -27,7 +27,7 @@ import { } from "@polywrap/polywrap-manifest-types-js"; import { normalizePath } from "@polywrap/os-js"; import { BindOptions, BindOutput, bindSchema } from "@polywrap/schema-bind"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/schema-parse"; import regexParser from "regex-parser"; import path from "path"; import { Schema as JsonSchema } from "jsonschema"; @@ -141,7 +141,7 @@ export class PolywrapProject extends Project { } public async generateSchemaBindings( - abi: Abi, + abi: WrapAbi, generationSubPath?: string ): Promise { const manifest = await this.getManifest(); diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index 01382a36a6..09669f59b6 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -44,6 +44,7 @@ import { JobRunner, PluginPackage, RunOptions, + GetManifestOptions, } from "@polywrap/core-js"; import { msgpackEncode, msgpackDecode } from "@polywrap/msgpack-js"; import { WrapManifest } from "@polywrap/wrap-manifest-types-js"; @@ -171,11 +172,12 @@ export class PolywrapClient implements Client { @Tracer.traceMethod("PolywrapClient: getManifest") public async getManifest( - uri: TUri + uri: TUri, + options: GetManifestOptions = {} ): Promise { const wrapper = await this._loadWrapper(this._toUri(uri), undefined); const client = contextualizeClient(this, undefined); - return await wrapper.getManifest(client); + return await wrapper.getManifest(options, client); } @Tracer.traceMethod("PolywrapClient: getFile") diff --git a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts index bf6630f7ac..e30c235823 100644 --- a/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts +++ b/packages/js/client/src/__tests__/core/plugin-wrapper.spec.ts @@ -42,21 +42,10 @@ describe("plugin-wrapper", () => { } return { -<<<<<<< HEAD factory: () => new MockMapPlugin({ map: new Map().set("a", 1).set("b", 2) }), manifest: {} as WrapManifest, -======= - factory: () => - new MockMapPlugin({ - map: new Map().set("a", 1).set("b", 2), - }), - manifest: { - schema: ``, - implements: [], - }, ->>>>>>> origin-dev }; }; diff --git a/packages/js/client/src/plugin/PluginWrapper.ts b/packages/js/client/src/plugin/PluginWrapper.ts index 4e7a19ed6e..0de639af91 100644 --- a/packages/js/client/src/plugin/PluginWrapper.ts +++ b/packages/js/client/src/plugin/PluginWrapper.ts @@ -7,6 +7,7 @@ import { PluginPackage, Uri, GetFileOptions, + GetManifestOptions, Env, isBuffer, } from "@polywrap/core-js"; @@ -35,14 +36,16 @@ export class PluginWrapper extends Wrapper { public async getFile( _: GetFileOptions, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - client: Client + _client: Client ): Promise { throw Error("client.getFile(...) is not implemented for Plugins."); } @Tracer.traceMethod("PluginWrapper: getManifest") - public async getManifest(_: Client): Promise { + public async getManifest( + _: GetManifestOptions, + _client: Client + ): Promise { return this._plugin.manifest; } diff --git a/packages/js/client/src/wasm/WasmWrapper.ts b/packages/js/client/src/wasm/WasmWrapper.ts index 161a8af814..09473a5dc6 100644 --- a/packages/js/client/src/wasm/WasmWrapper.ts +++ b/packages/js/client/src/wasm/WasmWrapper.ts @@ -7,6 +7,7 @@ import { combinePaths, Env, GetFileOptions, + GetManifestOptions, InvocableResult, InvokeOptions, InvokeResult, @@ -116,7 +117,10 @@ export class WasmWrapper extends Wrapper { } @Tracer.traceMethod("WasmWrapper: getManifest") - public async getManifest(client: Client): Promise { + public async getManifest( + options: GetManifestOptions, + client: Client + ): Promise { if (this._info !== undefined) { return this._info; } @@ -131,7 +135,7 @@ export class WasmWrapper extends Wrapper { if (!data) { throw Error(`Package manifest does not contain information`); } - return deserializeWrapManifest(data); + return deserializeWrapManifest(data, options); } @Tracer.traceMethod("WasmWrapper: invoke") diff --git a/packages/js/core/src/types/Client.ts b/packages/js/core/src/types/Client.ts index 8c8d8f3658..fe27370f2a 100644 --- a/packages/js/core/src/types/Client.ts +++ b/packages/js/core/src/types/Client.ts @@ -36,6 +36,10 @@ export type GetEnvsOptions = Contextualized; export type GetUriResolversOptions = Contextualized; +export interface GetManifestOptions extends Contextualized { + noValidate?: boolean; +} + export interface GetFileOptions extends Contextualized { path: string; encoding?: "utf-8" | string; @@ -68,7 +72,10 @@ export interface Client getUriResolvers(options: GetUriResolversOptions): readonly UriResolver[]; - getManifest(uri: TUri): Promise; + getManifest( + uri: TUri, + options: GetManifestOptions + ): Promise; getFile( uri: TUri, diff --git a/packages/js/core/src/types/Wrapper.ts b/packages/js/core/src/types/Wrapper.ts index b3c22dbec1..c92f98e7e9 100644 --- a/packages/js/core/src/types/Wrapper.ts +++ b/packages/js/core/src/types/Wrapper.ts @@ -2,6 +2,7 @@ import { Uri, Client, GetFileOptions, + GetManifestOptions, InvokeOptions, Invocable, Invoker, @@ -47,7 +48,10 @@ export abstract class Wrapper implements Invocable { * * @param client The client instance requesting the manifest. */ - public abstract getManifest(client: Client): Promise; + public abstract getManifest( + options: GetManifestOptions, + client: Client + ): Promise; } export type WrapperCache = Map; diff --git a/packages/js/manifests/wrap/scripts/generate.ts b/packages/js/manifests/wrap/scripts/generate.ts index 4f7d326a65..341f48d690 100644 --- a/packages/js/manifests/wrap/scripts/generate.ts +++ b/packages/js/manifests/wrap/scripts/generate.ts @@ -63,16 +63,10 @@ async function generateFormatTypes() { }, }); - const finalWrapSchema = JSON.parse( - JSON.stringify(bundledSchema).replace( - /unevaluatedProperties/g, - "additionalProperties" - ) - ); - wrapSchemas.push(finalWrapSchema); + wrapSchemas.push(bundledSchema); // Convert it to a TypeScript interface - const tsFile = await compile(finalWrapSchema, wrapSchema.id); + const tsFile = await compile(bundledSchema as any, wrapSchema.id, {additionalProperties: false}); // Emit the result const tsOutputPath = path.join(wrapOutputDir, `${wrapVersion}.ts`); diff --git a/packages/js/manifests/wrap/scripts/templates/index-ts.mustache b/packages/js/manifests/wrap/scripts/templates/index-ts.mustache index 8e4235dd72..ea7177577f 100644 --- a/packages/js/manifests/wrap/scripts/templates/index-ts.mustache +++ b/packages/js/manifests/wrap/scripts/templates/index-ts.mustache @@ -12,6 +12,8 @@ import { } from "./{{version}}"; {{/formats}} +{{#latest}}export * from "./{{version}}";{{/latest}} + {{#formats}} import WrapManifestSchema_{{tsVersion}} from "./{{version}}.schema.json"; {{/formats}} diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.schema.json b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.schema.json index 2da8c080e2..1c457327b0 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.schema.json +++ b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.schema.json @@ -32,18 +32,10 @@ "pattern": "^[a-zA-Z0-9\\-\\_]+$" }, "abi": { + "description": "Information of modules", "id": "Abi", "type": "object", "unevaluatedProperties": false, - "required": [ - "objectTypes", - "enumTypes", - "interfaceTypes", - "importedObjectTypes", - "importedModuleTypes", - "importedEnumTypes", - "importedEnvTypes" - ], "properties": { "version": { "description": "ABI Version", @@ -102,75 +94,66 @@ "definitions": { "objectDefinition": { "type": "object", - "required": [ - "properties", - "interfaces" - ], "allOf": [ { "$ref": "#/properties/abi/definitions/genericDefinition" }, { "$ref": "#/properties/abi/definitions/withComment" - } - ], - "properties": { - "properties": { - "type": "array", - "items": { - "$ref": "#/properties/abi/definitions/propertyDefinition" - } }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/properties/abi/definitions/interfaceImplementedDefinition" - } + { + "properties": { + "properties": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/propertyDefinition" + } + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/interfaceImplementedDefinition" + } + } + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "moduleDefinition": { "type": "object", - "required": [ - "methods", - "imports", - "interfaces" - ], "allOf": [ { "$ref": "#/properties/abi/definitions/genericDefinition" }, { "$ref": "#/properties/abi/definitions/withComment" - } - ], - "properties": { - "methods": { - "type": "array", - "items": [ - { - "$ref": "#/properties/abi/definitions/methodDefinition" - } - ] }, - "imports": { - "type": "array", - "items": [ - { - "$ref": "#/properties/abi/definitions/importedModuleRef" - } - ] - }, - "interfaces": { - "type": "array", - "items": [ - { - "$ref": "#/properties/abi/definitions/interfaceImplementedDefinition" + { + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/methodDefinition" + } + }, + "imports": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/importedModuleRef" + } + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/interfaceImplementedDefinition" + } } - ] + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "interfaceImplementedDefinition": { @@ -185,7 +168,6 @@ "methodDefinition": { "type": "object", "required": [ - "arguments", "return" ], "allOf": [ @@ -194,30 +176,31 @@ }, { "$ref": "#/properties/abi/definitions/withComment" - } - ], - "properties": { - "arguments": { - "type": "array", - "items": [ - { - "$ref": "#/properties/abi/definitions/propertyDefinition" - } - ] }, - "env": { - "type": "object", + { "properties": { - "required": { - "type": "boolean" + "arguments": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/propertyDefinition" + } + }, + "env": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "unevaluatedProperties": false + }, + "return": { + "$ref": "#/properties/abi/definitions/propertyDefinition" } }, "unevaluatedProperties": false - }, - "return": { - "$ref": "#/properties/abi/definitions/propertyDefinition" } - }, + ], "unevaluatedProperties": false }, "envDefinition": { @@ -239,16 +222,19 @@ }, { "$ref": "#/properties/abi/definitions/withComment" + }, + { + "properties": { + "constants": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "unevaluatedProperties": false } ], - "properties": { - "constants": { - "type": "array", - "items": { - "type": "string" - } - } - }, "unevaluatedProperties": false }, "interfaceDefinition": { @@ -262,13 +248,16 @@ }, { "$ref": "#/properties/abi/definitions/importedDefinition" + }, + { + "properties": { + "capabilities": { + "$ref": "#/properties/abi/definitions/capabilityDefinition" + } + }, + "unevaluatedProperties": false } ], - "properties": { - "capabilities": { - "$ref": "#/properties/abi/definitions/capabilityDefinition" - } - }, "unevaluatedProperties": false }, "capabilityDefinition": { @@ -326,9 +315,6 @@ }, "importedModuleDefinition": { "type": "object", - "required": [ - "methods" - ], "allOf": [ { "$ref": "#/properties/abi/definitions/genericDefinition" @@ -338,24 +324,24 @@ }, { "$ref": "#/properties/abi/definitions/withComment" - } - ], - "properties": { - "methods": { - "type": "array", - "items": [ - { - "$ref": "#/properties/abi/definitions/methodDefinition" - } - ] }, - "isInterface": { - "type": [ - "boolean", - "null" - ] + { + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "#/properties/abi/definitions/methodDefinition" + } + }, + "isInterface": { + "type": [ + "boolean" + ] + } + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "importedEnumDefinition": { @@ -366,9 +352,6 @@ }, { "$ref": "#/properties/abi/definitions/importedDefinition" - }, - { - "$ref": "#/properties/abi/definitions/withComment" } ], "unevaluatedProperties": false @@ -431,14 +414,12 @@ }, "name": { "type": [ - "string", - "null" + "string" ] }, "required": { "type": [ - "boolean", - "null" + "boolean" ] } }, @@ -456,64 +437,29 @@ { "properties": { "array": { - "anyOf": [ - { - "$ref": "#/properties/abi/definitions/arrayDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/properties/abi/definitions/arrayDefinition" }, "scalar": { - "anyOf": [ - { - "$ref": "#/properties/abi/definitions/scalarDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/properties/abi/definitions/scalarDefinition" }, "map": { - "anyOf": [ - { - "$ref": "#/properties/abi/definitions/mapDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/properties/abi/definitions/mapDefinition" }, "object": { - "anyOf": [ - { - "$ref": "#/properties/abi/definitions/objectRef" - }, - { - "type": "null" - } - ] + "$ref": "#/properties/abi/definitions/objectRef" }, "enum": { - "anyOf": [ + "allOf": [ { "$ref": "#/properties/abi/definitions/enumRef" - }, - { - "type": "null" } + ], + "required": [ + "type" ] }, "unresolvedObjectOrEnum": { - "anyOf": [ - { - "$ref": "#/properties/abi/definitions/unresolvedObjectOrEnumRef" - }, - { - "type": "null" - } - ] + "$ref": "#/properties/abi/definitions/unresolvedObjectOrEnumRef" } }, "unevaluatedProperties": false diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts index 41e2c22064..6b3001ad61 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts @@ -6,23 +6,24 @@ * and run json-schema-to-typescript to regenerate this file. */ -export type ObjectDefinition = (GenericDefinition & WithComment) & { - properties: PropertyDefinition[]; - interfaces: InterfaceImplementedDefinition[]; -}; +export type ObjectDefinition = GenericDefinition & + WithComment & { + properties?: PropertyDefinition[]; + interfaces?: InterfaceImplementedDefinition[]; + }; export type GenericDefinition = WithKind & { type: string; - name?: string | null; - required?: boolean | null; + name?: string; + required?: boolean; }; export type PropertyDefinition = WithComment & AnyDefinition; export type AnyDefinition = GenericDefinition & { - array?: ArrayDefinition | null; - scalar?: ScalarDefinition | null; - map?: MapDefinition | null; - object?: ObjectRef | null; - enum?: EnumRef | null; - unresolvedObjectOrEnum?: UnresolvedObjectOrEnumRef | null; + array?: ArrayDefinition; + scalar?: ScalarDefinition; + map?: MapDefinition; + object?: ObjectRef; + enum?: EnumRef; + unresolvedObjectOrEnum?: UnresolvedObjectOrEnumRef; }; export type ArrayDefinition = AnyDefinition & { item?: GenericDefinition; @@ -56,32 +57,38 @@ export type ObjectRef = GenericDefinition; export type EnumRef = GenericDefinition; export type UnresolvedObjectOrEnumRef = GenericDefinition; export type InterfaceImplementedDefinition = GenericDefinition; -export type ModuleDefinition = (GenericDefinition & WithComment) & { - methods: [] | [MethodDefinition]; - imports: [] | [ImportedModuleRef]; - interfaces: [] | [InterfaceImplementedDefinition]; -}; -export type MethodDefinition = (GenericDefinition & WithComment) & { - arguments: [] | [PropertyDefinition]; - env?: { - required?: boolean; +export type ModuleDefinition = GenericDefinition & + WithComment & { + methods?: MethodDefinition[]; + imports?: ImportedModuleRef[]; + interfaces?: InterfaceImplementedDefinition[]; }; - return: PropertyDefinition; -}; -export type EnumDefinition = (GenericDefinition & WithComment) & { - constants: string[]; -}; -export type InterfaceDefinition = (GenericDefinition & ImportedDefinition) & { - capabilities: CapabilityDefinition; -}; -export type ImportedObjectDefinition = (GenericDefinition & WithComment) & ImportedDefinition & WithComment; -export type ImportedModuleDefinition = (GenericDefinition & ImportedDefinition & WithComment) & { - methods: [] | [GenericDefinition & WithComment]; - isInterface?: boolean | null; -}; -export type ImportedEnumDefinition = (GenericDefinition & WithComment) & ImportedDefinition & WithComment; +export type MethodDefinition = GenericDefinition & + WithComment & { + arguments?: PropertyDefinition[]; + env?: { + required?: boolean; + }; + return?: PropertyDefinition; + }; +export type EnumDefinition = GenericDefinition & + WithComment & { + constants?: string[]; + }; +export type InterfaceDefinition = GenericDefinition & + ImportedDefinition & { + capabilities?: CapabilityDefinition; + }; +export type ImportedObjectDefinition = ObjectDefinition & ImportedDefinition & WithComment; +export type ImportedModuleDefinition = GenericDefinition & + ImportedDefinition & + WithComment & { + methods?: MethodDefinition[]; + isInterface?: boolean; + }; +export type ImportedEnumDefinition = EnumDefinition & ImportedDefinition; export type ImportedEnvDefinition = ImportedObjectDefinition; -export type EnvDefinition = GenericDefinition & WithComment; +export type EnvDefinition = ObjectDefinition; export interface WrapManifest { /** @@ -98,19 +105,22 @@ export interface WrapManifest { name: string; abi: unknown; } +/** + * Information of modules + */ export interface Abi { /** * ABI Version */ version?: "0.1"; - objectTypes: ObjectDefinition[]; + objectTypes?: ObjectDefinition[]; moduleType?: ModuleDefinition; - enumTypes: EnumDefinition[]; - interfaceTypes: InterfaceDefinition[]; - importedObjectTypes: ImportedObjectDefinition[]; - importedModuleTypes: ImportedModuleDefinition[]; - importedEnumTypes: ImportedEnumDefinition[]; - importedEnvTypes: ImportedEnvDefinition[]; + enumTypes?: EnumDefinition[]; + interfaceTypes?: InterfaceDefinition[]; + importedObjectTypes?: ImportedObjectDefinition[]; + importedModuleTypes?: ImportedModuleDefinition[]; + importedEnumTypes?: ImportedEnumDefinition[]; + importedEnvTypes?: ImportedEnvDefinition[]; envType?: EnvDefinition; } export interface WithKind { diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/index.ts b/packages/js/manifests/wrap/src/formats/wrap.info/index.ts index 5bbcae4a72..a26080885a 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/index.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/index.ts @@ -10,6 +10,8 @@ import { Abi as WrapAbi_0_1_0_1 } from "./0.1"; +export * from "./0.1"; + import WrapManifestSchema_0_1 from "./0.1.schema.json"; export { diff --git a/packages/manifests/wrap/formats/abi/0.1.json b/packages/manifests/wrap/formats/abi/0.1.json index e3fca215bf..fd3e425799 100644 --- a/packages/manifests/wrap/formats/abi/0.1.json +++ b/packages/manifests/wrap/formats/abi/0.1.json @@ -2,15 +2,6 @@ "id": "Abi", "type": "object", "unevaluatedProperties": false, - "required": [ - "objectTypes", - "enumTypes", - "interfaceTypes", - "importedObjectTypes", - "importedModuleTypes", - "importedEnumTypes", - "importedEnvTypes" - ], "properties": { "version": { "description": "ABI Version", @@ -69,68 +60,66 @@ "definitions": { "objectDefinition": { "type": "object", - "required": ["properties", "interfaces"], "allOf": [ { "$ref": "#/definitions/genericDefinition" }, { "$ref": "#/definitions/withComment" - } - ], - "properties": { - "properties": { - "type": "array", - "items": { - "$ref": "#/definitions/propertyDefinition" - } }, - "interfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/interfaceImplementedDefinition" - } + { + "properties": { + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/propertyDefinition" + } + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/interfaceImplementedDefinition" + } + } + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "moduleDefinition": { "type": "object", - "required": ["methods", "imports", "interfaces"], "allOf": [ { "$ref": "#/definitions/genericDefinition" }, { "$ref": "#/definitions/withComment" - } - ], - "properties": { - "methods": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/methodDefinition" - } - ] }, - "imports": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/importedModuleRef" - } - ] - }, - "interfaces": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/interfaceImplementedDefinition" + { + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "#/definitions/methodDefinition" + } + }, + "imports": { + "type": "array", + "items": { + "$ref": "#/definitions/importedModuleRef" + } + }, + "interfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/interfaceImplementedDefinition" + } } - ] + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "interfaceImplementedDefinition": { @@ -144,37 +133,38 @@ }, "methodDefinition": { "type": "object", - "required": ["arguments", "return"], + "required": ["return"], "allOf": [ { "$ref": "#/definitions/genericDefinition" }, { "$ref": "#/definitions/withComment" - } - ], - "properties": { - "arguments": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/propertyDefinition" - } - ] }, - "env": { - "type": "object", + { "properties": { - "required": { - "type": "boolean" + "arguments": { + "type": "array", + "items": { + "$ref": "#/definitions/propertyDefinition" + } + }, + "env": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "unevaluatedProperties": false + }, + "return": { + "$ref": "#/definitions/propertyDefinition" } }, "unevaluatedProperties": false - }, - "return": { - "$ref": "#/definitions/propertyDefinition" } - }, + ], "unevaluatedProperties": false }, "envDefinition": { @@ -194,16 +184,19 @@ }, { "$ref": "#/definitions/withComment" + }, + { + "properties": { + "constants": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "unevaluatedProperties": false } ], - "properties": { - "constants": { - "type": "array", - "items": { - "type": "string" - } - } - }, "unevaluatedProperties": false }, "interfaceDefinition": { @@ -215,13 +208,16 @@ }, { "$ref": "#/definitions/importedDefinition" + }, + { + "properties": { + "capabilities": { + "$ref": "#/definitions/capabilityDefinition" + } + }, + "unevaluatedProperties": false } ], - "properties": { - "capabilities": { - "$ref": "#/definitions/capabilityDefinition" - } - }, "unevaluatedProperties": false }, "capabilityDefinition": { @@ -273,7 +269,6 @@ }, "importedModuleDefinition": { "type": "object", - "required": ["methods"], "allOf": [ { "$ref": "#/definitions/genericDefinition" @@ -283,21 +278,22 @@ }, { "$ref": "#/definitions/withComment" - } - ], - "properties": { - "methods": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/methodDefinition" - } - ] }, - "isInterface": { - "type": ["boolean", "null"] + { + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "#/definitions/methodDefinition" + } + }, + "isInterface": { + "type": ["boolean"] + } + }, + "unevaluatedProperties": false } - }, + ], "unevaluatedProperties": false }, "importedEnumDefinition": { @@ -308,9 +304,6 @@ }, { "$ref": "#/definitions/importedDefinition" - }, - { - "$ref": "#/definitions/withComment" } ], "unevaluatedProperties": false @@ -368,10 +361,10 @@ "type": "string" }, "name": { - "type": ["string", "null"] + "type": ["string"] }, "required": { - "type": ["boolean", "null"] + "type": ["boolean"] } }, "unevaluatedProperties": false @@ -388,64 +381,27 @@ { "properties": { "array": { - "anyOf": [ - { - "$ref": "#/definitions/arrayDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/arrayDefinition" }, "scalar": { - "anyOf": [ - { - "$ref": "#/definitions/scalarDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/scalarDefinition" }, "map": { - "anyOf": [ - { - "$ref": "#/definitions/mapDefinition" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/mapDefinition" }, "object": { - "anyOf": [ - { - "$ref": "#/definitions/objectRef" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/objectRef" }, "enum": { - "anyOf": [ + "allOf": [ { "$ref": "#/definitions/enumRef" - }, - { - "type": "null" } - ] + ], + "required": ["type"] }, "unresolvedObjectOrEnum": { - "anyOf": [ - { - "$ref": "#/definitions/unresolvedObjectOrEnumRef" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/unresolvedObjectOrEnumRef" } }, "unevaluatedProperties": false diff --git a/packages/manifests/wrap/formats/wrap.info/0.1.json b/packages/manifests/wrap/formats/wrap.info/0.1.json index 30678e9d2d..2e8a0d72d1 100644 --- a/packages/manifests/wrap/formats/wrap.info/0.1.json +++ b/packages/manifests/wrap/formats/wrap.info/0.1.json @@ -25,6 +25,7 @@ "pattern": "^[a-zA-Z0-9\\-\\_]+$" }, "abi": { + "description": "Information of modules", "$ref": "../abi/0.1.json" } } diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/index.ts b/packages/schema/bind/src/bindings/assemblyscript/wasm/index.ts index 6ab18ee31a..1bfdea57cc 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/index.ts +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/index.ts @@ -4,7 +4,6 @@ import { loadSubTemplates } from "../../utils"; import { BindOptions, BindOutput } from "../../.."; import { - Abi, transformAbi, addFirstLast, extendType, @@ -12,6 +11,7 @@ import { } from "@polywrap/schema-parse"; import { OutputEntry, readDirectorySync } from "@polywrap/os-js"; import path from "path"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js/src"; const templatesDir = readDirectorySync(path.join(__dirname, "./templates")); const subTemplates = loadSubTemplates(templatesDir.entries); @@ -31,71 +31,81 @@ export const generateBinding: GenerateBindingFn = ( const abi = applyTransforms(options.abi); // Generate object type folders - for (const objectType of abi.objectTypes) { - output.entries.push({ - type: "Directory", - name: objectType.type, - data: renderTemplates( - templatePath("object-type"), - objectType, - subTemplates - ), - }); + if (abi.objectTypes) { + for (const objectType of abi.objectTypes) { + output.entries.push({ + type: "Directory", + name: objectType.type, + data: renderTemplates( + templatePath("object-type"), + objectType, + subTemplates + ), + }); + } } // Generate imported folder const importEntries: OutputEntry[] = []; // Generate imported module type folders - for (const importedModuleType of abi.importedModuleTypes) { - importEntries.push({ - type: "Directory", - name: importedModuleType.type, - data: renderTemplates( - templatePath("imported/module-type"), - importedModuleType, - subTemplates - ), - }); + if (abi.importedModuleTypes) { + for (const importedModuleType of abi.importedModuleTypes) { + importEntries.push({ + type: "Directory", + name: importedModuleType.type, + data: renderTemplates( + templatePath("imported/module-type"), + importedModuleType, + subTemplates + ), + }); + } } // Generate imported env type folders - for (const importedEnvType of abi.importedEnvTypes) { - importEntries.push({ - type: "Directory", - name: importedEnvType.type, - data: renderTemplates( - templatePath("imported/env-type"), - importedEnvType, - subTemplates - ), - }); + if (abi.importedEnvTypes) { + for (const importedEnvType of abi.importedEnvTypes) { + importEntries.push({ + type: "Directory", + name: importedEnvType.type, + data: renderTemplates( + templatePath("imported/env-type"), + importedEnvType, + subTemplates + ), + }); + } } // Generate imported enum type folders - for (const importedEnumType of abi.importedEnumTypes) { - importEntries.push({ - type: "Directory", - name: importedEnumType.type, - data: renderTemplates( - templatePath("imported/enum-type"), - importedEnumType, - subTemplates - ), - }); + if (abi.importedEnumTypes) { + for (const importedEnumType of abi.importedEnumTypes) { + importEntries.push({ + type: "Directory", + name: importedEnumType.type, + data: renderTemplates( + templatePath("imported/enum-type"), + importedEnumType, + subTemplates + ), + }); + } } // Generate imported object type folders - for (const importedObectType of abi.importedObjectTypes) { - importEntries.push({ - type: "Directory", - name: importedObectType.type, - data: renderTemplates( - templatePath("imported/object-type"), - importedObectType, - subTemplates - ), - }); + if (abi.importedObjectTypes) { + for (const importedObectType of abi.importedObjectTypes) { + importEntries.push({ + type: "Directory", + name: importedObectType.type, + data: renderTemplates( + templatePath("imported/object-type"), + importedObectType, + subTemplates + ), + }); + } } if (importEntries.length) { @@ -110,16 +120,18 @@ export const generateBinding: GenerateBindingFn = ( } // Generate interface type folders - for (const interfaceType of abi.interfaceTypes) { - output.entries.push({ - type: "Directory", - name: interfaceType.type, - data: renderTemplates( - templatePath("interface-type"), - interfaceType, - subTemplates - ), - }); + if (abi.interfaceTypes) { + for (const interfaceType of abi.interfaceTypes) { + output.entries.push({ + type: "Directory", + name: interfaceType.type, + data: renderTemplates( + templatePath("interface-type"), + interfaceType, + subTemplates + ), + }); + } } // Generate module type folders @@ -136,12 +148,18 @@ export const generateBinding: GenerateBindingFn = ( } // Generate enum type folders - for (const enumType of abi.enumTypes) { - output.entries.push({ - type: "Directory", - name: enumType.type, - data: renderTemplates(templatePath("enum-type"), enumType, subTemplates), - }); + if (abi.enumTypes) { + for (const enumType of abi.enumTypes) { + output.entries.push({ + type: "Directory", + name: enumType.type, + data: renderTemplates( + templatePath("enum-type"), + enumType, + subTemplates + ), + }); + } } // Generate env type folders @@ -163,7 +181,7 @@ export const generateBinding: GenerateBindingFn = ( return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), addFirstLast, diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/env-type/serialization-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/env-type/serialization-ts.mustache index 6f4f6740d7..1725329af7 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/env-type/serialization-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/env-type/serialization-ts.mustache @@ -14,7 +14,12 @@ export function serialize{{type}}(type: {{type}}): ArrayBuffer { } export function write{{type}}(writer: Write, type: {{type}}): void { + {{#properties.length}} writer.writeMapLength({{properties.length}}); + {{/properties.length}} + {{^properties}} + writer.writeMapLength(0); + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.writeString("{{name}}"); diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/env-type/serialization-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/env-type/serialization-ts.mustache index c04f3cbd1d..344c10898b 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/env-type/serialization-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/env-type/serialization-ts.mustache @@ -14,7 +14,12 @@ export function serialize{{type}}(type: {{type}}): ArrayBuffer { } export function write{{type}}(writer: Write, type: {{type}}): void { + {{#properties.length}} writer.writeMapLength({{properties.length}}); + {{/properties.length}} + {{^properties}} + writer.writeMapLength(0); + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.writeString("{{name}}"); diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/module-type/serialization-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/module-type/serialization-ts.mustache index 112f931289..949b4f5e5c 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/module-type/serialization-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/module-type/serialization-ts.mustache @@ -24,7 +24,12 @@ export function write{{name}}Args( writer: Write, args: Args_{{name}} ): void { + {{#arguments.length}} writer.writeMapLength({{arguments.length}}); + {{/arguments.length}} + {{^arguments}} + writer.writeMapLength(0); + {{/arguments}} {{#arguments}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.writeString("{{name}}"); diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/object-type/serialization-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/object-type/serialization-ts.mustache index 1ead6c6436..ffb389c743 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/object-type/serialization-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/imported/object-type/serialization-ts.mustache @@ -14,7 +14,12 @@ export function serialize{{type}}(type: {{type}}): ArrayBuffer { } export function write{{type}}(writer: Write, type: {{type}}): void { + {{#properties.length}} writer.writeMapLength({{properties.length}}); + {{/properties.length}} + {{^properties}} + writer.writeMapLength(0); + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.writeString("{{name}}"); diff --git a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/object-type/serialization-ts.mustache b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/object-type/serialization-ts.mustache index 614ae21c3e..4e72dd75cf 100644 --- a/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/object-type/serialization-ts.mustache +++ b/packages/schema/bind/src/bindings/assemblyscript/wasm/templates/object-type/serialization-ts.mustache @@ -14,7 +14,12 @@ export function serialize{{type}}(type: {{type}}): ArrayBuffer { } export function write{{type}}(writer: Write, type: {{type}}): void { + {{#properties.length}} writer.writeMapLength({{properties.length}}); + {{/properties.length}} + {{^properties}} + writer.writeMapLength(0); + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.writeString("{{name}}"); diff --git a/packages/schema/bind/src/bindings/rust/wasm/index.ts b/packages/schema/bind/src/bindings/rust/wasm/index.ts index 818eee5581..b41be4ad11 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/index.ts +++ b/packages/schema/bind/src/bindings/rust/wasm/index.ts @@ -5,7 +5,6 @@ import { loadSubTemplates } from "../../utils"; import { BindOptions, BindOutput } from "../../.."; import { - Abi, transformAbi, extendType, addFirstLast, @@ -15,6 +14,7 @@ import { } from "@polywrap/schema-parse"; import { OutputEntry, readDirectorySync } from "@polywrap/os-js"; import path from "path"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js/src"; const templatesDir = readDirectorySync(path.join(__dirname, "./templates")); const subTemplates = loadSubTemplates(templatesDir.entries); @@ -36,16 +36,18 @@ export const generateBinding: GenerateBindingFn = ( const abi = applyTransforms(options.abi); // Generate object type folders - for (const objectType of abi.objectTypes) { - output.entries.push({ - type: "Directory", - name: toLower(objectType.type), - data: renderTemplates( - templatePath("object-type"), - objectType, - subTemplates - ), - }); + if (abi.objectTypes) { + for (const objectType of abi.objectTypes) { + output.entries.push({ + type: "Directory", + name: toLower(objectType.type), + data: renderTemplates( + templatePath("object-type"), + objectType, + subTemplates + ), + }); + } } // Generate env type folders @@ -65,55 +67,63 @@ export const generateBinding: GenerateBindingFn = ( const importEntries: OutputEntry[] = []; // Generate imported module type folders - for (const importedModuleType of abi.importedModuleTypes) { - importEntries.push({ - type: "Directory", - name: toLower(importedModuleType.type), - data: renderTemplates( - templatePath("imported/module-type"), - importedModuleType, - subTemplates - ), - }); + if (abi.importedModuleTypes) { + for (const importedModuleType of abi.importedModuleTypes) { + importEntries.push({ + type: "Directory", + name: toLower(importedModuleType.type), + data: renderTemplates( + templatePath("imported/module-type"), + importedModuleType, + subTemplates + ), + }); + } } // Generate imported enum type folders - for (const importedEnumType of abi.importedEnumTypes) { - importEntries.push({ - type: "Directory", - name: toLower(importedEnumType.type), - data: renderTemplates( - templatePath("imported/enum-type"), - importedEnumType, - subTemplates - ), - }); + if (abi.importedEnumTypes) { + for (const importedEnumType of abi.importedEnumTypes) { + importEntries.push({ + type: "Directory", + name: toLower(importedEnumType.type), + data: renderTemplates( + templatePath("imported/enum-type"), + importedEnumType, + subTemplates + ), + }); + } } // Generate imported object type folders - for (const importedObectType of abi.importedObjectTypes) { - importEntries.push({ - type: "Directory", - name: toLower(importedObectType.type), - data: renderTemplates( - templatePath("imported/object-type"), - importedObectType, - subTemplates - ), - }); + if (abi.importedObjectTypes) { + for (const importedObectType of abi.importedObjectTypes) { + importEntries.push({ + type: "Directory", + name: toLower(importedObectType.type), + data: renderTemplates( + templatePath("imported/object-type"), + importedObectType, + subTemplates + ), + }); + } } // Generate imported env type folders - for (const importedEnvType of abi.importedEnvTypes) { - importEntries.push({ - type: "Directory", - name: toLower(importedEnvType.type), - data: renderTemplates( - templatePath("imported/env-type"), - importedEnvType, - subTemplates - ), - }); + if (abi.importedEnvTypes) { + for (const importedEnvType of abi.importedEnvTypes) { + importEntries.push({ + type: "Directory", + name: toLower(importedEnvType.type), + data: renderTemplates( + templatePath("imported/env-type"), + importedEnvType, + subTemplates + ), + }); + } } if (importEntries.length > 0) { @@ -128,16 +138,18 @@ export const generateBinding: GenerateBindingFn = ( } // Generate interface type folders - for (const interfaceType of abi.interfaceTypes) { - output.entries.push({ - type: "Directory", - name: toLower(interfaceType.type), - data: renderTemplates( - templatePath("interface-type"), - interfaceType, - subTemplates - ), - }); + if (abi.interfaceTypes) { + for (const interfaceType of abi.interfaceTypes) { + output.entries.push({ + type: "Directory", + name: toLower(interfaceType.type), + data: renderTemplates( + templatePath("interface-type"), + interfaceType, + subTemplates + ), + }); + } } // Generate module type folders @@ -150,12 +162,18 @@ export const generateBinding: GenerateBindingFn = ( } // Generate enum type folders - for (const enumType of abi.enumTypes) { - output.entries.push({ - type: "Directory", - name: toLower(enumType.type), - data: renderTemplates(templatePath("enum-type"), enumType, subTemplates), - }); + if (abi.enumTypes) { + for (const enumType of abi.enumTypes) { + output.entries.push({ + type: "Directory", + name: toLower(enumType.type), + data: renderTemplates( + templatePath("enum-type"), + enumType, + subTemplates + ), + }); + } } // Generate root entry file @@ -164,7 +182,7 @@ export const generateBinding: GenerateBindingFn = ( return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), addFirstLast, diff --git a/packages/schema/bind/src/bindings/rust/wasm/templates/env-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm/templates/env-type/serialization-rs.mustache index 58cf56566a..7ae5a2743f 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/templates/env-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm/templates/env-type/serialization-rs.mustache @@ -37,7 +37,12 @@ pub fn serialize_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/ } pub fn write_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/toUpper}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.write_string("{{name}}")?; diff --git a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/env-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/env-type/serialization-rs.mustache index 4f709a1910..1a0375342e 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/env-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/env-type/serialization-rs.mustache @@ -37,7 +37,12 @@ pub fn serialize_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/ } pub fn write_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/toUpper}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.write_string("{{name}}")?; diff --git a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/module-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/module-type/serialization-rs.mustache index d8f055e608..05f9850ac9 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/module-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/module-type/serialization-rs.mustache @@ -46,7 +46,12 @@ pub fn serialize_{{#toLower}}{{name}}{{/toLower}}_args(args: &Args{{#toUpper}}{{ } pub fn write_{{#toLower}}{{name}}{{/toLower}}_args(args: &Args{{#toUpper}}{{name}}{{/toUpper}}, writer: &mut W) -> Result<(), EncodeError> { + {{#arguments.length}} writer.write_map_length(&{{arguments.length}})?; + {{/arguments.length}} + {{^arguments}} + writer.write_map_length(&0)?; + {{/arguments}} {{#arguments}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.write_string("{{name}}")?; diff --git a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/object-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/object-type/serialization-rs.mustache index 945e27e141..d84fb37e72 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/templates/imported/object-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm/templates/imported/object-type/serialization-rs.mustache @@ -37,7 +37,12 @@ pub fn serialize_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/ } pub fn write_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/toUpper}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.write_string("{{name}}")?; diff --git a/packages/schema/bind/src/bindings/rust/wasm/templates/object-type/serialization-rs.mustache b/packages/schema/bind/src/bindings/rust/wasm/templates/object-type/serialization-rs.mustache index aa2e5efba8..077427daec 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/templates/object-type/serialization-rs.mustache +++ b/packages/schema/bind/src/bindings/rust/wasm/templates/object-type/serialization-rs.mustache @@ -37,7 +37,12 @@ pub fn serialize_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/ } pub fn write_{{#toLower}}{{type}}{{/toLower}}(args: &{{#toUpper}}{{type}}{{/toUpper}}, writer: &mut W) -> Result<(), EncodeError> { + {{#properties.length}} writer.write_map_length(&{{properties.length}})?; + {{/properties.length}} + {{^properties}} + writer.write_map_length(&0)?; + {{/properties}} {{#properties}} writer.context().push("{{name}}", "{{#toWasm}}{{toGraphQLType}}{{/toWasm}}", "writing property"); writer.write_string("{{name}}")?; diff --git a/packages/schema/bind/src/bindings/rust/wasm/transforms/byRef.ts b/packages/schema/bind/src/bindings/rust/wasm/transforms/byRef.ts index fd4e9eba63..b5f87a673c 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/transforms/byRef.ts +++ b/packages/schema/bind/src/bindings/rust/wasm/transforms/byRef.ts @@ -1,4 +1,5 @@ -import { AbiTransforms, AnyDefinition } from "@polywrap/schema-parse"; +import { AbiTransforms } from "@polywrap/schema-parse"; +import { AnyDefinition } from "@polywrap/wrap-manifest-types-js"; export function byRef(): AbiTransforms { return { diff --git a/packages/schema/bind/src/bindings/rust/wasm/transforms/propertyDeps.ts b/packages/schema/bind/src/bindings/rust/wasm/transforms/propertyDeps.ts index 9c0ce42528..2c895dd7db 100644 --- a/packages/schema/bind/src/bindings/rust/wasm/transforms/propertyDeps.ts +++ b/packages/schema/bind/src/bindings/rust/wasm/transforms/propertyDeps.ts @@ -7,9 +7,9 @@ import { ObjectDefinition, AnyDefinition, ModuleDefinition, - AbiTransforms, EnvDefinition, -} from "@polywrap/schema-parse"; +} from "@polywrap/wrap-manifest-types-js"; +import { AbiTransforms } from "@polywrap/schema-parse"; interface PropertyDep { crate: string; diff --git a/packages/schema/bind/src/bindings/typescript/app/index.ts b/packages/schema/bind/src/bindings/typescript/app/index.ts index 836e80d07e..b45d8b531c 100644 --- a/packages/schema/bind/src/bindings/typescript/app/index.ts +++ b/packages/schema/bind/src/bindings/typescript/app/index.ts @@ -9,8 +9,8 @@ import { addFirstLast, toPrefixedGraphQLType, methodParentPointers, - Abi, } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; import path from "path"; export { Functions }; @@ -36,7 +36,7 @@ export const generateBinding: GenerateBindingFn = ( return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), addFirstLast, diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index 28ae5399de..0e73c9a5ce 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -4,7 +4,6 @@ import { GenerateBindingFn, renderTemplates } from "../.."; import { BindOptions, BindOutput } from "../../.."; import { - Abi, transformAbi, extendType, addFirstLast, @@ -12,6 +11,7 @@ import { methodParentPointers, interfaceUris, } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; import path from "path"; import { latestWrapManifestVersion } from "@polywrap/wrap-manifest-types-js"; @@ -49,7 +49,7 @@ export const generateBinding: GenerateBindingFn = ( return result; }; -function applyTransforms(abi: Abi): Abi { +function applyTransforms(abi: WrapAbi): WrapAbi { const transforms = [ extendType(Functions), addFirstLast, diff --git a/packages/schema/bind/src/types.ts b/packages/schema/bind/src/types.ts index 6e7801cb8d..3ae6aa13dc 100644 --- a/packages/schema/bind/src/types.ts +++ b/packages/schema/bind/src/types.ts @@ -1,5 +1,5 @@ import { OutputDirectory } from "@polywrap/os-js"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/schema-parse"; export type BindLanguage = "wasm-as" | "wasm-rs" | "plugin-ts" | "app-ts"; @@ -11,7 +11,7 @@ export interface BindOutput { export interface BindOptions { projectName: string; bindLanguage: BindLanguage; - abi: Abi; + abi: WrapAbi; config?: Record; outputDirAbs: string; } diff --git a/packages/schema/compose/package.json b/packages/schema/compose/package.json index ab8f3d6be4..0c671e3c29 100644 --- a/packages/schema/compose/package.json +++ b/packages/schema/compose/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@polywrap/schema-parse": "0.3.0", + "@polywrap/wrap-manifest-types-js": "0.3.0", "graphql": "15.5.0", "mustache": "4.0.1" }, diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 853b36ef16..26f57c1026 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -88,9 +88,13 @@ async function importCase( return Promise.resolve(readFileIfExists(path, directory, true) || ""); }; + if (!moduleInput) { + throw new Error("Expected input schema.graphql file to Exist") + } + const input: ComposerOptions = { - schemaFile: { - schema: moduleInput as string, + schema: { + schema: moduleInput, absolutePath: path.join( directory, "input/module.graphql" @@ -103,7 +107,7 @@ async function importCase( }; if (moduleInput) { - input.schemaFile = { + input.schema = { schema: moduleInput, absolutePath: path.join( directory, diff --git a/packages/schema/compose/src/env.ts b/packages/schema/compose/src/env.ts index eaf30c2a7c..f6d914585f 100644 --- a/packages/schema/compose/src/env.ts +++ b/packages/schema/compose/src/env.ts @@ -1,4 +1,7 @@ -import { ObjectDefinition, AnyDefinition } from "@polywrap/schema-parse"; +import { + ObjectDefinition, + AnyDefinition, +} from "@polywrap/wrap-manifest-types-js"; export function checkDuplicateEnvProperties( envType: ObjectDefinition, @@ -7,11 +10,13 @@ export function checkDuplicateEnvProperties( const envPropertiesSet = new Set( envProperties.map((envProperty) => envProperty.name) ); - for (const specificProperty of envType.properties) { - if (envPropertiesSet.has(specificProperty.name)) { - throw new Error( - `Type '${envType.type}' contains duplicate property '${specificProperty.name}' of type 'Env'` - ); + if (envType.properties) { + for (const specificProperty of envType.properties) { + if (envPropertiesSet.has(specificProperty.name)) { + throw new Error( + `Type '${envType.type}' contains duplicate property '${specificProperty.name}' of type 'Env'` + ); + } } } } diff --git a/packages/schema/compose/src/index.ts b/packages/schema/compose/src/index.ts index ac1d20e7ca..57225dda95 100644 --- a/packages/schema/compose/src/index.ts +++ b/packages/schema/compose/src/index.ts @@ -2,20 +2,22 @@ import { SchemaFile, AbiResolvers } from "./types"; import { resolveImportsAndParseSchemas } from "./resolve"; import { renderSchema } from "./render"; -import { Abi } from "@polywrap/schema-parse"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; export * from "./types"; export { renderSchema }; export interface ComposerOptions { - schemaFile: SchemaFile; + schema: SchemaFile; resolvers: AbiResolvers; } -export async function composeSchema(options: ComposerOptions): Promise { +export async function composeSchema( + options: ComposerOptions +): Promise { return await resolveImportsAndParseSchemas( - options.schemaFile.schema, - options.schemaFile.absolutePath, + options.schema.schema, + options.schema.absolutePath, options.resolvers ); } diff --git a/packages/schema/compose/src/render.ts b/packages/schema/compose/src/render.ts index 77cc4288d7..f28c70a9c2 100644 --- a/packages/schema/compose/src/render.ts +++ b/packages/schema/compose/src/render.ts @@ -3,18 +3,17 @@ import { addHeader } from "./templates/header.mustache"; import Mustache from "mustache"; import { - Abi, addFirstLast, toGraphQLType, transformAbi, moduleCapabilities, addAnnotations, } from "@polywrap/schema-parse"; - +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; // Remove mustache's built-in HTML escaping Mustache.escape = (value) => value; -export function renderSchema(abi: Abi, header: boolean): string { +export function renderSchema(abi: WrapAbi, header: boolean): string { // Prepare the Abi for the renderer abi = transformAbi(abi, addFirstLast); abi = transformAbi(abi, toGraphQLType); diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index af356dba16..14450b561f 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -16,29 +16,34 @@ import { checkDuplicateEnvProperties } from "./env"; import { addHeader } from "./templates/header.mustache"; import { - Abi, - parseSchema, + WrapAbi, ObjectDefinition, ImportedObjectDefinition, ModuleDefinition, + ImportedModuleDefinition, + ImportedEnumDefinition, + EnumDefinition, + GenericDefinition, + InterfaceImplementedDefinition, + ObjectRef, + EnumRef, + EnvDefinition, + ImportedEnvDefinition, +} from "@polywrap/wrap-manifest-types-js"; +import { + parseSchema, AbiTransforms, visitObjectDefinition, visitModuleDefinition, visitEnvDefinition, - ImportedModuleDefinition, DefinitionKind, visitImportedModuleDefinition, visitImportedObjectDefinition, - ImportedEnumDefinition, - EnumDefinition, visitEnumDefinition, visitImportedEnumDefinition, - GenericDefinition, isKind, + isImportedModuleType, header, - InterfaceImplementedDefinition, - ObjectRef, - EnumRef, isEnvType, createImportedObjectDefinition, createImportedEnumDefinition, @@ -48,12 +53,9 @@ import { ModuleCapability, createEnvDefinition, createModuleDefinition, - EnvDefinition, createImportedEnvDefinition, - ImportedEnvDefinition, visitImportedEnvDefinition, isImportedEnvType, - isImportedModuleType, } from "@polywrap/schema-parse"; type ImplementationWithInterfaces = { @@ -66,7 +68,7 @@ const TYPE_NAME_REGEX = `[a-zA-Z0-9_]+`; export async function resolveUseStatements( schema: string, schemaPath: string, - abi: Abi + abi: WrapAbi ): Promise { const useKeywordCapture = /^[#]*["{3}]*use[ \n\t]/gm; const useCapture = /[#]*["{3}]*use[ \n\t]*{([a-zA-Z0-9_, \n\t]+)}[ \n\t]*for[ \n\t]*(\w+)[ \n\t]/g; @@ -85,9 +87,10 @@ export async function resolveUseStatements( ImportedModuleDefinition > = {}; - abi.importedModuleTypes.forEach((value) => { - importedModuleByNamespace[value.namespace] = value; - }); + abi.importedModuleTypes && + abi.importedModuleTypes.forEach((value) => { + importedModuleByNamespace[value.namespace] = value; + }); // TODO: come back to this const capabilitiesExt: ModuleCapability[] = []; @@ -110,14 +113,16 @@ export async function resolveUseStatements( }) .reduce((o1, o2) => ({ ...o1, ...o2 })); - abi.interfaceTypes.push( - createInterfaceDefinition({ - type: parsedUse.namespace, - uri: importedModule.uri, - namespace: parsedUse.namespace, - capabilities: capabilities, - }) - ); + const interfaceType = createInterfaceDefinition({ + type: parsedUse.namespace, + uri: importedModule.uri, + namespace: parsedUse.namespace, + capabilities: capabilities, + }); + + abi.interfaceTypes = abi.interfaceTypes + ? [...abi.interfaceTypes, interfaceType] + : [interfaceType]; } return capabilitiesExt; } @@ -127,7 +132,7 @@ export async function resolveImportsAndParseSchemas( schemaPath: string, resolvers: AbiResolvers, noValidate = false -): Promise { +): Promise { const importKeywordCapture = /^#+["{3}]*import\s/gm; const externalImportCapture = /#+["{3}]*import\s*(?:({[^}]+}|\*))\s*into\s*(\w+?)\s*from\s*[\"'`]([^\"'`\s]+)[\"'`]/g; const localImportCapture = /#+["{3}]*import\s*(?:({[^}]+}|\*))\s*from\s*[\"'`]([^\"'`\s]+)[\"'`]/g; @@ -163,7 +168,7 @@ export async function resolveImportsAndParseSchemas( schemaPath ); - const subAbi: Abi = { + const subAbi: WrapAbi = { objectTypes: [], enumTypes: [], interfaceTypes: [], @@ -245,7 +250,7 @@ type ImportedEnumOrObjectOrEnv = // imported object definitions const extractObjectImportDependencies = ( importsFound: ImportMap, - rootAbi: Abi, + rootAbi: WrapAbi, namespace: string, uri: string ): AbiTransforms => { @@ -280,8 +285,6 @@ const extractObjectImportDependencies = ( // Create the new ImportedObjectDefinition return { ...obj, - name: null, - required: null, type: namespaceType, __namespaced: true, kind, @@ -308,7 +311,7 @@ const extractObjectImportDependencies = ( type, namespaceType, rootAbi.envType ? [rootAbi.envType] : [], - rootAbi.importedEnvTypes, + rootAbi.importedEnvTypes || [], DefinitionKind.ImportedObject ) as ImportedEnvDefinition; @@ -328,8 +331,8 @@ const extractObjectImportDependencies = ( const importFound = findImport( type, namespaceType, - rootAbi.objectTypes, - rootAbi.importedObjectTypes, + rootAbi.objectTypes || [], + rootAbi.importedObjectTypes || [], DefinitionKind.ImportedObject ) as ImportedObjectDefinition; @@ -367,7 +370,7 @@ const extractObjectImportDependencies = ( type, namespaceType, rootAbi.envType ? [rootAbi.envType] : [], - rootAbi.importedEnvTypes, + rootAbi.importedEnvTypes || [], DefinitionKind.ImportedObject ) as ImportedEnvDefinition; @@ -387,8 +390,8 @@ const extractObjectImportDependencies = ( const importFound = findImport( type, namespaceType, - rootAbi.objectTypes, - rootAbi.importedObjectTypes, + rootAbi.objectTypes || [], + rootAbi.importedObjectTypes || [], DefinitionKind.ImportedObject ) as ImportedObjectDefinition; @@ -420,8 +423,8 @@ const extractObjectImportDependencies = ( const importFound = findImport( def.type, namespaceType, - rootAbi.enumTypes, - rootAbi.importedEnumTypes, + rootAbi.enumTypes || [], + rootAbi.importedEnumTypes || [], DefinitionKind.ImportedEnum ) as ImportedEnumDefinition; @@ -642,7 +645,7 @@ function resolveInterfaces( async function resolveExternalImports( importsToResolve: ExternalImport[], resolveAbi: AbiResolver, - abi: Abi + abi: WrapAbi ): Promise { // Keep track of all imported object type names const typesToImport: ImportMap = {}; @@ -657,15 +660,19 @@ async function resolveExternalImports( throw Error(`Unable to resolve abi at "${uri}"`); } - let extTypesToImport = importedTypes; + const extTypesToImport = importedTypes; + const starIdx = extTypesToImport.indexOf("*"); // If the importedTypes array contains the catch-all "*" // go ahead and add all extAbi types to the importedTypes array - if (extTypesToImport.indexOf("*") > -1) { - extTypesToImport = [ - ...extAbi.objectTypes.map((x) => x.type), - ...extAbi.enumTypes.map((x) => x.type), - ]; + if (starIdx > -1) { + extTypesToImport.splice(starIdx, 1); + if (extAbi.objectTypes) { + extTypesToImport.push(...extAbi.objectTypes.map((x) => x.type)); + } + if (extAbi.enumTypes) { + extTypesToImport.push(...extAbi.enumTypes.map((x) => x.type)); + } if (extAbi.moduleType) { extTypesToImport.push(extAbi.moduleType.type); @@ -678,11 +685,9 @@ async function resolveExternalImports( // For each imported type to resolve for (const importedType of extTypesToImport) { - let extTypes: ( - | ModuleDefinition - | ObjectDefinition - | EnumDefinition - )[] = []; + let extTypes: + | (ModuleDefinition | ObjectDefinition | EnumDefinition)[] + | undefined; let visitorFunc: Function | undefined; let trueType: | ImportedModuleDefinition @@ -739,26 +744,34 @@ async function resolveExternalImports( `Cannot import an import's imported env type. Tried to import ${importedType} from ${uri}.` ); } else { - const objIdx = extAbi.objectTypes.findIndex( - (def) => def.type === importedType - ); + const objIdx = extAbi.objectTypes + ? extAbi.objectTypes.findIndex((def) => def.type === importedType) + : -1; const impObjIdx = - objIdx === -1 && - extAbi.importedObjectTypes.findIndex( - (def) => def.type === importedType - ); + objIdx === -1 && extAbi.importedObjectTypes + ? extAbi.importedObjectTypes.findIndex( + (def) => def.type === importedType + ) + : -1; const enumIdx = - impObjIdx === -1 && - extAbi.enumTypes.findIndex((def) => def.type === importedType); + impObjIdx === -1 && extAbi.enumTypes + ? extAbi.enumTypes.findIndex((def) => def.type === importedType) + : -1; const impEnumIdx = - enumIdx === -1 && - extAbi.importedEnumTypes.findIndex( - (def) => def.type === importedType - ); + enumIdx === -1 && extAbi.importedEnumTypes + ? extAbi.importedEnumTypes.findIndex( + (def) => def.type === importedType + ) + : -1; if (objIdx > -1) { extTypes = extAbi.objectTypes; visitorFunc = visitObjectDefinition; + if (!extAbi.objectTypes || !extAbi.objectTypes.length) { + throw new Error( + "Expected objectTypes to be an array got undefined" + ); + } const type = extAbi.objectTypes[objIdx]; trueType = { ...createImportedObjectDefinition({ @@ -772,9 +785,17 @@ async function resolveExternalImports( }), properties: type.properties, }; - } else if (impObjIdx !== false && impObjIdx > -1) { + } else if (impObjIdx > -1) { extTypes = extAbi.importedObjectTypes; visitorFunc = visitObjectDefinition; + if ( + !extAbi.importedObjectTypes || + !extAbi.importedObjectTypes.length + ) { + throw new Error( + "Expected importedObjectTypes to be an array got undefined" + ); + } const type = extAbi.importedObjectTypes[impObjIdx]; trueType = { ...createImportedObjectDefinition({ @@ -788,28 +809,32 @@ async function resolveExternalImports( }), properties: type.properties, }; - } else if (enumIdx !== false && enumIdx > -1) { + } else if (enumIdx > -1) { extTypes = extAbi.enumTypes; visitorFunc = visitEnumDefinition; + if (!extAbi.enumTypes || !extAbi.enumTypes.length) { + throw new Error("Expected enumTypes to be an array got undefined"); + } const type = extAbi.enumTypes[enumIdx]; trueType = createImportedEnumDefinition({ ...type, type: appendNamespace(namespace, importedType), - name: undefined, - required: undefined, uri, nativeType: type.type, namespace, }); - } else if (impEnumIdx !== false && impEnumIdx > -1) { + } else if (impEnumIdx > -1) { extTypes = extAbi.importedEnumTypes; visitorFunc = visitEnumDefinition; + if (!extAbi.importedEnumTypes || !extAbi.importedEnumTypes.length) { + throw new Error( + "Expected importedEnumTypes to be an array got undefined" + ); + } const type = extAbi.importedEnumTypes[impEnumIdx]; trueType = createImportedEnumDefinition({ ...type, type: appendNamespace(namespace, importedType), - name: undefined, - required: undefined, uri, nativeType: type.type, namespace, @@ -819,9 +844,9 @@ async function resolveExternalImports( if (!trueType) { throw Error( - `Cannot find type "${importedType}" in the schema at ${uri}.\nFound: [ ${extTypes.map( - (type) => type.type + " " - )}]` + `Cannot find type "${importedType}" in the schema at ${uri}.\nFound: ${ + extTypes && JSON.stringify(extTypes.map((type) => type.type)) + }` ); } @@ -856,42 +881,53 @@ async function resolveExternalImports( | ImportedObjectDefinition[] | ImportedModuleDefinition[] | ImportedEnumDefinition[] - | ImportedEnvDefinition[]; + | ImportedEnvDefinition[] + | undefined; let append; if (importType.kind === DefinitionKind.ImportedEnv) { destArray = abi.importedEnvTypes; append = () => { const importDef = importType as ImportedEnvDefinition; - abi.importedEnvTypes.push( - visitImportedEnvDefinition(importDef, namespaceTypes(namespace)) - ); + abi.importedEnvTypes && + abi.importedEnvTypes.push( + visitImportedEnvDefinition(importDef, namespaceTypes(namespace)) + ); }; } else if (importType.kind === DefinitionKind.ImportedObject) { destArray = abi.importedObjectTypes; append = () => { const importDef = importType as ImportedObjectDefinition; - abi.importedObjectTypes.push( - visitImportedObjectDefinition(importDef, namespaceTypes(namespace)) - ); + abi.importedObjectTypes && + abi.importedObjectTypes.push( + visitImportedObjectDefinition( + importDef, + namespaceTypes(namespace) + ) + ); }; } else if (importType.kind === DefinitionKind.ImportedModule) { destArray = abi.importedModuleTypes; append = () => { const importDef = importType as ImportedModuleDefinition; - abi.importedModuleTypes.push( - visitImportedModuleDefinition(importDef, namespaceTypes(namespace)) - ); + abi.importedModuleTypes && + abi.importedModuleTypes.push( + visitImportedModuleDefinition( + importDef, + namespaceTypes(namespace) + ) + ); }; } else if (importType.kind === DefinitionKind.ImportedEnum) { destArray = abi.importedEnumTypes; append = () => { - abi.importedEnumTypes.push( - visitImportedEnumDefinition( - importType as ImportedEnumDefinition, - namespaceTypes(namespace) - ) - ); + abi.importedEnumTypes && + abi.importedEnumTypes.push( + visitImportedEnumDefinition( + importType as ImportedEnumDefinition, + namespaceTypes(namespace) + ) + ); }; } else { throw Error( @@ -904,6 +940,7 @@ async function resolveExternalImports( } const found = + destArray !== undefined && destArray.findIndex( ( def: @@ -925,7 +962,7 @@ async function resolveExternalImports( async function resolveLocalImports( importsToResolve: LocalImport[], resolveSchema: SchemaResolver, - abi: Abi, + abi: WrapAbi, resolvers: AbiResolvers ): Promise { for (const importToResolve of importsToResolve) { @@ -950,15 +987,20 @@ async function resolveLocalImports( resolvers, true ); - let extTypesToImport = importedTypes; + + const extTypesToImport = importedTypes; + const starIdx = extTypesToImport.indexOf("*"); // If the importedTypes array contains the catch-all "*" // go ahead and add all extAbi types to the importedTypes array - if (extTypesToImport.indexOf("*") > -1) { - extTypesToImport = [ - ...localAbi.objectTypes.map((x) => x.type), - ...localAbi.enumTypes.map((x) => x.type), - ]; + if (starIdx > -1) { + extTypesToImport.splice(starIdx, 1); + if (localAbi.objectTypes) { + extTypesToImport.push(...localAbi.objectTypes.map((x) => x.type)); + } + if (localAbi.enumTypes) { + extTypesToImport.push(...localAbi.enumTypes.map((x) => x.type)); + } if (localAbi.moduleType) { extTypesToImport.push(localAbi.moduleType.type); @@ -982,28 +1024,32 @@ async function resolveLocalImports( visitorFunc = visitEnvDefinition; type = localAbi.envType; } else { - const objectIdx = localAbi.objectTypes.findIndex( - (type) => type.type === importedType - ); + const objectIdx = localAbi.objectTypes + ? localAbi.objectTypes.findIndex((type) => type.type === importedType) + : -1; const enumIdx = - objectIdx === -1 && - localAbi.enumTypes.findIndex((type) => type.type === importedType); + objectIdx === -1 && localAbi.enumTypes + ? localAbi.enumTypes.findIndex((type) => type.type === importedType) + : -1; if (objectIdx > -1) { visitorFunc = visitObjectDefinition; - type = localAbi.objectTypes[objectIdx]; + type = localAbi.objectTypes && localAbi.objectTypes[objectIdx]; } else if (enumIdx > -1) { visitorFunc = visitEnumDefinition; - type = localAbi.enumTypes.find((type) => type.type === importedType); + type = + localAbi.enumTypes && + localAbi.enumTypes.find((type) => type.type === importedType); } } if (!type) { throw Error( - `Cannot find type "${importedType}" in the schema at ${path}.\nFound: [ ${localAbi.objectTypes.map( - (type) => type.type + " " - )}]` + `Cannot find type "${importedType}" in the schema at ${path}.\nFound: [ ${ + localAbi.objectTypes && + localAbi.objectTypes.map((type) => type.type + " ") + }]` ); } @@ -1039,8 +1085,6 @@ async function resolveLocalImports( typesToImport[def.type] = { ...objectDefinition, - name: null, - required: null, }; return def; }; @@ -1051,24 +1095,36 @@ async function resolveLocalImports( visitorFunc(type, { enter: { ObjectRef: (def: ObjectRef) => { - return findImport(def, [ - ...localAbi.objectTypes, - ...localAbi.importedObjectTypes, - ]); + const allObjectTypes = []; + if (localAbi.objectTypes) { + allObjectTypes.push(...localAbi.objectTypes); + } + if (localAbi.importedObjectTypes) { + allObjectTypes.push(...localAbi.importedObjectTypes); + } + return findImport(def, allObjectTypes); }, EnumRef: (def: EnumRef) => { - return findImport(def, [ - ...localAbi.enumTypes, - ...localAbi.importedEnumTypes, - ]); + const allEnumTypes = []; + if (localAbi.enumTypes) { + allEnumTypes.push(...localAbi.enumTypes); + } + if (localAbi.importedEnumTypes) { + allEnumTypes.push(...localAbi.importedEnumTypes); + } + return findImport(def, allEnumTypes); }, InterfaceImplementedDefinition: ( def: InterfaceImplementedDefinition ) => { - return findImport(def, [ - ...localAbi.objectTypes, - ...localAbi.importedObjectTypes, - ]); + const allObjectTypes = []; + if (localAbi.objectTypes) { + allObjectTypes.push(...localAbi.objectTypes); + } + if (localAbi.importedObjectTypes) { + allObjectTypes.push(...localAbi.importedObjectTypes); + } + return findImport(def, allObjectTypes); }, }, }); @@ -1087,13 +1143,19 @@ async function resolveLocalImports( const sharedEnv = localAbi.envType as EnvDefinition; - checkDuplicateEnvProperties(abi.envType, sharedEnv.properties); - - abi.envType.properties.push(...sharedEnv.properties); + if (sharedEnv.properties) { + checkDuplicateEnvProperties(abi.envType, sharedEnv.properties); + if (abi.envType.properties) { + abi.envType.properties.push(...sharedEnv.properties); + } else { + abi.envType.properties = sharedEnv.properties; + } + } } else if ( isKind(typesToImport[importType], DefinitionKind.ImportedObject) ) { if ( + abi.importedObjectTypes && abi.importedObjectTypes.findIndex( (def) => def.type === importType ) === -1 @@ -1104,6 +1166,7 @@ async function resolveLocalImports( } } else if (isKind(typesToImport[importType], DefinitionKind.Object)) { if ( + abi.objectTypes && abi.objectTypes.findIndex((def) => def.type === importType) === -1 ) { abi.objectTypes.push(typesToImport[importType] as ObjectDefinition); @@ -1112,15 +1175,19 @@ async function resolveLocalImports( isKind(typesToImport[importType], DefinitionKind.ImportedEnum) ) { if ( + abi.importedEnumTypes && abi.importedEnumTypes.findIndex((def) => def.type === importType) === - -1 + -1 ) { abi.importedEnumTypes.push( typesToImport[importType] as ImportedEnumDefinition ); } } else if (isKind(typesToImport[importType], DefinitionKind.Enum)) { - if (abi.enumTypes.findIndex((def) => def.type === importType) === -1) { + if ( + abi.enumTypes && + abi.enumTypes.findIndex((def) => def.type === importType) === -1 + ) { abi.enumTypes.push(typesToImport[importType] as EnumDefinition); } } diff --git a/packages/schema/parse/package.json b/packages/schema/parse/package.json index 4a001c509e..01f285a9d9 100644 --- a/packages/schema/parse/package.json +++ b/packages/schema/parse/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@dorgjelli/graphql-schema-cycles": "1.1.4", + "@polywrap/wrap-manifest-types-js": "0.3.0", "graphql": "15.5.0" }, "devDependencies": { diff --git a/packages/schema/parse/src/__tests__/index.ts b/packages/schema/parse/src/__tests__/index.ts index ca1214c716..c2cc127c06 100644 --- a/packages/schema/parse/src/__tests__/index.ts +++ b/packages/schema/parse/src/__tests__/index.ts @@ -1,4 +1,4 @@ -import { Abi } from "../abi"; +import { WrapAbi } from "../abi"; import path from "path"; import { readdirSync, Dirent } from "fs"; @@ -14,7 +14,7 @@ const root = GetPathToParseTestFiles(); export type TestCase = { name: string; input: string; - output: Abi; + output: WrapAbi; }; export type TestCases = { @@ -72,7 +72,7 @@ async function importCase( const input = readFileIfExists("input.graphql", directory); // Fetch the output Abi - const output = await readNamedExportIfExists("abi", "output.ts", directory); + const output = await readNamedExportIfExists("abi", "output.ts", directory); if (!input) { console.error(`Missing input file "input.graphql" for test case "${name}" at ${directory}`); diff --git a/packages/schema/parse/src/__tests__/parse-map-type.spec.ts b/packages/schema/parse/src/__tests__/parse-map-type.spec.ts index a9769116a4..65fd989623 100644 --- a/packages/schema/parse/src/__tests__/parse-map-type.spec.ts +++ b/packages/schema/parse/src/__tests__/parse-map-type.spec.ts @@ -133,7 +133,6 @@ describe("parseCurrentType", () => { expect(result).toMatchObject({ currentType: "Map", subType: "String, Int", - required: false, }); }); @@ -142,7 +141,6 @@ describe("parseCurrentType", () => { expect(result).toMatchObject({ currentType: "Map", subType: "String, CustomType!", - required: false, }); }); @@ -177,7 +175,6 @@ describe("parseCurrentType", () => { const result = parseCurrentType("CustomType!"); expect(result).toMatchObject({ currentType: "CustomType", - subType: null, required: true, }); }); @@ -186,8 +183,6 @@ describe("parseCurrentType", () => { const result = parseCurrentType("String"); expect(result).toMatchObject({ currentType: "String", - subType: null, - required: false, }); }); }); diff --git a/packages/schema/parse/src/__tests__/transforms.spec.ts b/packages/schema/parse/src/__tests__/transforms.spec.ts index 1397915f47..84195662dc 100644 --- a/packages/schema/parse/src/__tests__/transforms.spec.ts +++ b/packages/schema/parse/src/__tests__/transforms.spec.ts @@ -1,24 +1,25 @@ import { parseSchema } from "../"; -import { addFirstLast } from "../transform/addFirstLast"; -import { extendType } from "../transform/extendType"; +import { addFirstLast, extendType } from "../transform"; import { createObjectDefinition, createScalarPropertyDefinition, - ObjectDefinition, - PropertyDefinition, - Abi, createModuleDefinition, - ModuleDefinition, createMethodDefinition, - MethodDefinition, createImportedModuleDefinition, - ImportedModuleDefinition, } from "../abi"; +import { + WrapAbi, + ImportedModuleDefinition, + MethodDefinition, + ModuleDefinition, + ObjectDefinition, + PropertyDefinition, +} from "@polywrap/wrap-manifest-types-js"; const schema1 = ` type MyType { prop1: String! - prop2: String! + prop2: String } type AnotherType { @@ -59,7 +60,7 @@ type TestImport_Module @imported( const schema2 = ` type MyType { prop1: String! - prop2: String! + prop2: String } type AnotherType { @@ -72,11 +73,7 @@ describe("Polywrap Schema Abi Transformations", () => { const abi = parseSchema(schema1, { transforms: [addFirstLast], }); - const expected: Abi = { - enumTypes: [], - importedEnumTypes: [], - interfaceTypes: [], - importedEnvTypes: [], + const expected: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "MyType" }), @@ -93,8 +90,7 @@ describe("Polywrap Schema Abi Transformations", () => { { ...createScalarPropertyDefinition({ name: "prop2", - type: "String", - required: true + type: "String" }), first: null, last: true, @@ -141,7 +137,6 @@ describe("Polywrap Schema Abi Transformations", () => { ...createScalarPropertyDefinition({ type: "String", name: "arg2", - required: false, }), first: null, last: null @@ -150,7 +145,6 @@ describe("Polywrap Schema Abi Transformations", () => { ...createScalarPropertyDefinition({ type: "Boolean", name: "arg3", - required: false, }), first: null, last: true @@ -204,7 +198,6 @@ describe("Polywrap Schema Abi Transformations", () => { return: createScalarPropertyDefinition({ type: "Boolean", name: "method3", - required: false }) }), first: null, @@ -212,7 +205,6 @@ describe("Polywrap Schema Abi Transformations", () => { } as MethodDefinition, ], } as ModuleDefinition, - importedObjectTypes: [], importedModuleTypes: [ { ...createImportedModuleDefinition({ @@ -286,11 +278,7 @@ describe("Polywrap Schema Abi Transformations", () => { }), ], }); - const expected: Abi = { - enumTypes: [], - interfaceTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], + const expected: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "MyType" }), @@ -306,8 +294,7 @@ describe("Polywrap Schema Abi Transformations", () => { { ...createScalarPropertyDefinition({ name: "prop2", - type: "String", - required: true + type: "String" }), foo: "bar", }, @@ -329,8 +316,6 @@ describe("Polywrap Schema Abi Transformations", () => { foo: "bar", } as ObjectDefinition, ], - importedObjectTypes: [], - importedModuleTypes: [], }; expect(abi).toMatchObject(expected); diff --git a/packages/schema/parse/src/abi/definitions.ts b/packages/schema/parse/src/abi/definitions.ts index f6d33bb048..b0a7da7d51 100644 --- a/packages/schema/parse/src/abi/definitions.ts +++ b/packages/schema/parse/src/abi/definitions.ts @@ -1,6 +1,36 @@ -import { ScalarType, isScalarType } from "./scalar"; -import { isModuleType } from "./module"; -import { isMapKeyType, MapKeyType } from "./map"; +import { + isMapKeyType, + isModuleType, + isScalarType, + MapKeyType, + ScalarType, +} from "./utils"; + +import { + AnyDefinition, + ArrayDefinition, + CapabilityDefinition, + EnumDefinition, + EnumRef, + EnvDefinition, + GenericDefinition, + ImportedEnumDefinition, + ImportedEnvDefinition, + ImportedModuleDefinition, + ImportedObjectDefinition, + InterfaceDefinition, + InterfaceImplementedDefinition, + MapDefinition, + MapKeyDefinition, + MethodDefinition, + ModuleDefinition, + ObjectDefinition, + ObjectRef, + PropertyDefinition, + ScalarDefinition, + UnresolvedObjectOrEnumRef, + WithKind, +} from "@polywrap/wrap-manifest-types-js"; export enum DefinitionKind { Generic = 0, @@ -30,39 +60,22 @@ export function isKind(type: WithKind, kind: DefinitionKind): boolean { return (type.kind & kind) === kind; } -export interface WithComment { - comment?: string; -} - -export interface WithKind { - kind: DefinitionKind; -} - -export interface GenericDefinition extends WithKind { - type: string; - name: string | null; - required: boolean | null; -} export function createGenericDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): GenericDefinition { return { type: args.type, - name: args.name ? args.name : null, - required: args.required ? args.required : null, + name: args.name, + required: args.required, kind: DefinitionKind.Generic, }; } -export interface ObjectDefinition extends GenericDefinition, WithComment { - properties: PropertyDefinition[]; - interfaces: InterfaceImplementedDefinition[]; -} export function createObjectDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; properties?: PropertyDefinition[]; interfaces?: InterfaceImplementedDefinition[]; @@ -70,17 +83,16 @@ export function createObjectDefinition(args: { }): ObjectDefinition { return { ...createGenericDefinition(args), - properties: args.properties ? args.properties : [], - interfaces: args.interfaces ? args.interfaces : [], + properties: args.properties, + interfaces: args.interfaces, comment: args.comment, kind: DefinitionKind.Object, }; } -export type ObjectRef = GenericDefinition; export function createObjectRef(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): ObjectRef { return { @@ -89,17 +101,9 @@ export function createObjectRef(args: { }; } -export interface AnyDefinition extends GenericDefinition { - array: ArrayDefinition | null; - scalar: ScalarDefinition | null; - map: MapDefinition | null; - object: ObjectRef | null; - enum: EnumRef | null; - unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | null; -} export function createAnyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; array?: ArrayDefinition; map?: MapDefinition; @@ -110,24 +114,19 @@ export function createAnyDefinition(args: { }): AnyDefinition { return { ...createGenericDefinition(args), - array: args.array ? args.array : null, - map: args.map ? args.map : null, - scalar: args.scalar ? args.scalar : null, - object: args.object ? args.object : null, - enum: args.enum ? args.enum : null, - unresolvedObjectOrEnum: args.unresolvedObjectOrEnum - ? args.unresolvedObjectOrEnum - : null, + array: args.array, + map: args.map, + scalar: args.scalar, + object: args.object, + enum: args.enum, + unresolvedObjectOrEnum: args.unresolvedObjectOrEnum, kind: DefinitionKind.Any, }; } -export interface MapKeyDefinition extends GenericDefinition { - type: MapKeyType; -} export function createMapKeyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): MapKeyDefinition { if (!isMapKeyType(args.type)) { @@ -137,17 +136,14 @@ export function createMapKeyDefinition(args: { } return { ...createGenericDefinition(args), - type: args.type, + type: args.type as MapKeyType, kind: DefinitionKind.Scalar, }; } -export interface ScalarDefinition extends GenericDefinition { - type: ScalarType; -} export function createScalarDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): ScalarDefinition { if (!isScalarType(args.type)) { @@ -157,17 +153,14 @@ export function createScalarDefinition(args: { } return { ...createGenericDefinition(args), - type: args.type, + type: args.type as ScalarType, kind: DefinitionKind.Scalar, }; } -export interface EnumDefinition extends GenericDefinition, WithComment { - constants: string[]; -} export function createEnumDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; constants?: string[]; comment?: string; @@ -176,15 +169,14 @@ export function createEnumDefinition(args: { ...createGenericDefinition(args), type: args.type, kind: DefinitionKind.Enum, - constants: args.constants ? args.constants : [], + constants: args.constants, comment: args.comment, }; } -export type EnumRef = GenericDefinition; export function createEnumRef(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): EnumRef { return { @@ -193,10 +185,9 @@ export function createEnumRef(args: { }; } -export type UnresolvedObjectOrEnumRef = GenericDefinition; export function createUnresolvedObjectOrEnumRef(args: { type: string; - name?: string | null; + name?: string; required?: boolean; }): UnresolvedObjectOrEnumRef { return { @@ -206,16 +197,12 @@ export function createUnresolvedObjectOrEnumRef(args: { }; } -export interface MapDefinition extends AnyDefinition, WithComment { - key: MapKeyDefinition | null; - value: GenericDefinition | null; -} export function createMapDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; key?: MapKeyDefinition; - value?: GenericDefinition | null; + value?: GenericDefinition; }): MapDefinition { return { ...createAnyDefinition({ @@ -245,18 +232,15 @@ export function createMapDefinition(args: { ? (args.value as UnresolvedObjectOrEnumRef) : undefined, }), - key: args.key ? args.key : null, - value: args.value ? args.value : null, + key: args.key, + value: args.value, kind: DefinitionKind.Map, }; } -export interface ArrayDefinition extends AnyDefinition { - item: GenericDefinition | null; -} export function createArrayDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; item?: GenericDefinition; }): ArrayDefinition { @@ -288,15 +272,14 @@ export function createArrayDefinition(args: { ? (args.item as UnresolvedObjectOrEnumRef) : undefined, }), - item: args.item ? args.item : null, + item: args.item, kind: DefinitionKind.Array, }; } -export type PropertyDefinition = AnyDefinition & WithComment; export function createPropertyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; array?: ArrayDefinition; map?: MapDefinition; @@ -312,10 +295,9 @@ export function createPropertyDefinition(args: { }; } -export type InterfaceImplementedDefinition = GenericDefinition; export function createInterfaceImplementedDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; array?: ArrayDefinition; map?: MapDefinition; @@ -331,7 +313,7 @@ export function createInterfaceImplementedDefinition(args: { export function createArrayPropertyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; item?: GenericDefinition; comment?: string; @@ -344,7 +326,7 @@ export function createArrayPropertyDefinition(args: { export function createMapPropertyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; key: MapKeyDefinition; value?: GenericDefinition; @@ -357,8 +339,8 @@ export function createMapPropertyDefinition(args: { } export function createScalarPropertyDefinition(args: { - type: string; - name?: string | null; + type: ScalarDefinition["type"]; + name?: string; required?: boolean; comment?: string; }): PropertyDefinition { @@ -370,7 +352,7 @@ export function createScalarPropertyDefinition(args: { export function createEnumPropertyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; constants?: string[]; comment?: string; @@ -383,7 +365,7 @@ export function createEnumPropertyDefinition(args: { export function createObjectPropertyDefinition(args: { type: string; - name?: string | null; + name?: string; required?: boolean; properties?: PropertyDefinition[]; comment?: string; @@ -394,13 +376,6 @@ export function createObjectPropertyDefinition(args: { }); } -export interface MethodDefinition extends GenericDefinition, WithComment { - arguments: PropertyDefinition[]; - env?: { - required: boolean; - }; - return: PropertyDefinition; -} export function createMethodDefinition(args: { name: string; arguments?: PropertyDefinition[]; @@ -416,20 +391,15 @@ export function createMethodDefinition(args: { type: "Method", }), required: true, - arguments: args.arguments ? args.arguments : [], + arguments: args.arguments, return: args.return, comment: args.comment, kind: DefinitionKind.Method, }; } -export interface ModuleDefinition extends GenericDefinition, WithComment { - methods: MethodDefinition[]; - imports: { type: string }[]; - interfaces: InterfaceImplementedDefinition[]; -} export function createModuleDefinition(args: { - imports?: { type: string }[]; + imports?: { type: ModuleDefinition["type"] }[]; interfaces?: InterfaceImplementedDefinition[]; required?: boolean; comment?: string; @@ -440,26 +410,16 @@ export function createModuleDefinition(args: { type: "Module", }), methods: [], - imports: args.imports ? args.imports : [], - interfaces: args.interfaces ? args.interfaces : [], + imports: args.imports, + interfaces: args.interfaces, comment: args.comment, kind: DefinitionKind.Module, }; } -export interface ImportedDefinition { - uri: string; - namespace: string; - nativeType: string; -} - -export interface ImportedEnumDefinition - extends EnumDefinition, - ImportedDefinition, - WithComment {} export function createImportedEnumDefinition(args: { type: string; - constants: string[]; + constants?: string[]; name?: string; required?: boolean; uri: string; @@ -477,11 +437,9 @@ export function createImportedEnumDefinition(args: { }; } +// TODO: We don't want this hard coded export const capabilityTypes = ["getImplementations"] as const; export type CapabilityType = typeof capabilityTypes[number]; -export interface Capability { - enabled: boolean; -} export function createCapability(args: { type: CapabilityType; enabled: boolean; @@ -493,13 +451,6 @@ export function createCapability(args: { }; } -export type CapabilityDefinition = Record; - -export interface InterfaceDefinition - extends GenericDefinition, - ImportedDefinition { - capabilities: CapabilityDefinition; -} export function createInterfaceDefinition(args: { type: string; required?: boolean; @@ -517,13 +468,6 @@ export function createInterfaceDefinition(args: { }; } -export interface ImportedModuleDefinition - extends GenericDefinition, - ImportedDefinition, - WithComment { - methods: MethodDefinition[]; - isInterface?: boolean; -} export function createImportedModuleDefinition(args: { required?: boolean; uri: string; @@ -554,10 +498,6 @@ export function createImportedModuleDefinition(args: { }; } -export interface ImportedObjectDefinition - extends ObjectDefinition, - ImportedDefinition, - WithComment {} export function createImportedObjectDefinition(args: { type: string; name?: string; @@ -578,10 +518,8 @@ export function createImportedObjectDefinition(args: { }; } -export type EnvDefinition = ObjectDefinition; - export function createEnvDefinition(args: { - name?: string | null; + name?: string; required?: boolean; properties?: PropertyDefinition[]; interfaces?: InterfaceImplementedDefinition[]; @@ -593,8 +531,6 @@ export function createEnvDefinition(args: { }; } -export type ImportedEnvDefinition = ImportedObjectDefinition; - export function createImportedEnvDefinition(args: { type: string; name?: string; diff --git a/packages/schema/parse/src/abi/index.ts b/packages/schema/parse/src/abi/index.ts index 95fb61e2fd..cfb2e27155 100644 --- a/packages/schema/parse/src/abi/index.ts +++ b/packages/schema/parse/src/abi/index.ts @@ -1,36 +1,9 @@ -import { - ObjectDefinition, - ModuleDefinition, - ImportedModuleDefinition, - ImportedObjectDefinition, - GenericDefinition, - EnumDefinition, - ImportedEnumDefinition, - InterfaceDefinition, - CapabilityType, - CapabilityDefinition, - EnvDefinition, - createModuleDefinition, - ImportedEnvDefinition, -} from "./definitions"; +import { Abi } from "@polywrap/wrap-manifest-types-js"; +export * from "@polywrap/wrap-manifest-types-js"; export * from "./definitions"; -export * from "./scalar"; -export * from "./module"; export * from "./env"; -export * from "./map"; - -export interface Abi { - objectTypes: ObjectDefinition[]; - moduleType?: ModuleDefinition; - enumTypes: EnumDefinition[]; - interfaceTypes: InterfaceDefinition[]; - importedObjectTypes: ImportedObjectDefinition[]; - importedModuleTypes: ImportedModuleDefinition[]; - importedEnumTypes: ImportedEnumDefinition[]; - importedEnvTypes: ImportedEnvDefinition[]; - envType?: EnvDefinition; -} +export * from "./utils"; export function createAbi(): Abi { return { @@ -43,139 +16,3 @@ export function createAbi(): Abi { importedEnvTypes: [], }; } - -type ImportedDefinition = ImportedObjectDefinition | ImportedModuleDefinition; - -export function combineAbi(abis: Abi[]): Abi { - const combined: Abi = { - objectTypes: [], - moduleType: createModuleDefinition({}), - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], - }; - - const compareImportedType = ( - a: ImportedDefinition, - b: ImportedDefinition - ) => { - return a.uri === b.uri && a.nativeType === b.nativeType; - }; - - for (const abi of abis) { - for (const enumType of abi.enumTypes) { - tryInsert(combined.enumTypes, enumType); - } - - for (const objectType of abi.objectTypes) { - tryInsert(combined.objectTypes, objectType); - } - - combined.moduleType = abi.moduleType; - - for (const interfaceType of abi.interfaceTypes) { - tryInsert( - combined.interfaceTypes, - interfaceType, - compareImportedType, - ( - a: InterfaceDefinition, - b: InterfaceDefinition - ): InterfaceDefinition => { - const combinedCapabilities: CapabilityDefinition = { - ...a.capabilities, - ...b.capabilities, - }; - const combinedCapabilityTypes = Object.keys( - combinedCapabilities - ) as CapabilityType[]; - for (const capability of combinedCapabilityTypes) { - if (b.capabilities[capability] && a.capabilities[capability]) { - combinedCapabilities[capability] = { - enabled: true, - }; - } else if (a.capabilities[capability]) { - combinedCapabilities[capability] = a.capabilities[capability]; - } else if (b.capabilities[capability]) { - combinedCapabilities[capability] = b.capabilities[capability]; - } - } - return { ...a, capabilities: combinedCapabilities }; - } - ); - } - - if (abi.envType) { - combined.envType = abi.envType; - } - - for (const importedObjectType of abi.importedObjectTypes) { - tryInsert( - combined.importedObjectTypes, - importedObjectType, - compareImportedType - ); - } - - for (const importedModuleType of abi.importedModuleTypes) { - tryInsert( - combined.importedModuleTypes, - importedModuleType, - compareImportedType, - (a: ImportedModuleDefinition, b: ImportedModuleDefinition) => { - return { ...a, isInterface: a.isInterface || b.isInterface }; - } - ); - } - - for (const importedEnumType of abi.importedEnumTypes) { - tryInsert(combined.importedEnumTypes, importedEnumType); - } - - for (const importedEnvType of abi.importedEnvTypes) { - tryInsert( - combined.importedEnvTypes, - importedEnvType, - compareImportedType - ); - } - } - - return combined; -} - -const tryInsert = ( - dest: GenericDefinition[], - value: GenericDefinition, - compare: (a: GenericDefinition, b: GenericDefinition) => boolean = (a, b) => - a.type === b.type, - join?: ( - dest: GenericDefinition, - source: GenericDefinition - ) => GenericDefinition -) => { - const index = dest.findIndex((item: GenericDefinition) => - compare(item, value) - ); - - if (index > -1) { - if (join) { - dest[index] = join(dest[index], value); - return; - } - - const destType = JSON.stringify(dest[index]); - const valueType = JSON.stringify(value); - if (destType !== valueType) { - throw Error( - `combineAbi found two types by the same type that are not equivalent.\n` + - `Type: "${value.type}"\nObject A: ${destType}\nObject B: ${valueType}` - ); - } - } else { - dest.push(value); - } -}; diff --git a/packages/schema/parse/src/abi/map.ts b/packages/schema/parse/src/abi/map.ts deleted file mode 100644 index 9e9e8f3eb1..0000000000 --- a/packages/schema/parse/src/abi/map.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const mapKeyTypes = { - UInt: "UInt", - UInt8: "UInt8", - UInt16: "UInt16", - UInt32: "UInt32", - Int: "Int", - Int8: "Int8", - Int16: "Int16", - Int32: "Int32", - String: "String", -}; - -export type MapKeyTypes = typeof mapKeyTypes; - -export type MapKeyType = keyof MapKeyTypes; - -export const mapKeyTypeNames = Object.keys(mapKeyTypes); - -export function isMapKeyType(type: string): type is MapKeyType { - return type in mapKeyTypes; -} diff --git a/packages/schema/parse/src/abi/module.ts b/packages/schema/parse/src/abi/module.ts deleted file mode 100644 index b0294d29aa..0000000000 --- a/packages/schema/parse/src/abi/module.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const MODULE_NAME = "Module"; - -export function isModuleType(type: string): boolean { - return type === MODULE_NAME; -} - -export function isImportedModuleType(type: string): boolean { - return type.endsWith(`_${MODULE_NAME}`); -} diff --git a/packages/schema/parse/src/abi/scalar.ts b/packages/schema/parse/src/abi/scalar.ts deleted file mode 100644 index e7c40a4495..0000000000 --- a/packages/schema/parse/src/abi/scalar.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const scalarTypes = { - UInt: "UInt", - UInt8: "UInt8", - UInt16: "UInt16", - UInt32: "UInt32", - Int: "Int", - Int8: "Int8", - Int16: "Int16", - Int32: "Int32", - String: "String", - Boolean: "Boolean", - Bytes: "Bytes", - BigInt: "BigInt", - BigNumber: "BigNumber", - JSON: "JSON", -}; - -export type ScalarTypes = typeof scalarTypes; - -export type ScalarType = keyof ScalarTypes; - -export function isScalarType(type: string): type is ScalarType { - return type in scalarTypes; -} - -export const scalarTypeNames = Object.keys(scalarTypes); diff --git a/packages/schema/parse/src/abi/utils.ts b/packages/schema/parse/src/abi/utils.ts new file mode 100644 index 0000000000..74ad904cc1 --- /dev/null +++ b/packages/schema/parse/src/abi/utils.ts @@ -0,0 +1,43 @@ +export const MapKeyTypes = { + UInt: "UInt", + UInt8: "UInt8", + UInt16: "UInt16", + UInt32: "UInt32", + Int: "Int", + Int8: "Int8", + Int16: "Int16", + Int32: "Int32", + String: "String", +}; + +export const ScalarTypes = { + ...MapKeyTypes, + Boolean: "Boolean", + Bytes: "Bytes", + BigInt: "BigInt", + BigNumber: "BigNumber", + JSON: "JSON", +}; + +export type ScalarType = keyof typeof ScalarTypes; +export type MapKeyType = keyof typeof MapKeyTypes; + +export function isMapKeyType(type: string): boolean { + return type in MapKeyTypes; +} + +export const MODULE_NAME = "Module"; + +export function isModuleType(type: string): boolean { + return type === MODULE_NAME; +} + +export function isImportedModuleType(type: string): boolean { + return type.endsWith(`_${MODULE_NAME}`); +} + +export function isScalarType(type: string): boolean { + return type in ScalarTypes; +} + +export const scalarTypeNames = Object.keys(ScalarTypes); diff --git a/packages/schema/parse/src/extract/enum-types.ts b/packages/schema/parse/src/extract/enum-types.ts index ae43225c42..a6454ed8ad 100644 --- a/packages/schema/parse/src/extract/enum-types.ts +++ b/packages/schema/parse/src/extract/enum-types.ts @@ -1,5 +1,6 @@ -import { Abi, EnumDefinition, createEnumDefinition } from "../abi"; +import { createEnumDefinition } from ".."; +import { WrapAbi, EnumDefinition } from "@polywrap/wrap-manifest-types-js"; import { ASTVisitor, DirectiveNode, EnumTypeDefinitionNode } from "graphql"; const visitorEnter = (enumTypes: EnumDefinition[]) => ({ @@ -30,6 +31,8 @@ const visitorEnter = (enumTypes: EnumDefinition[]) => ({ }, }); -export const getEnumTypesVisitor = (abi: Abi): ASTVisitor => ({ - enter: visitorEnter(abi.enumTypes), -}); +export const getEnumTypesVisitor = (abi: WrapAbi): ASTVisitor => { + return { + enter: visitorEnter(abi.enumTypes || []), + }; +}; diff --git a/packages/schema/parse/src/extract/env-types.ts b/packages/schema/parse/src/extract/env-types.ts index 9e3123956a..b2c14d1c58 100644 --- a/packages/schema/parse/src/extract/env-types.ts +++ b/packages/schema/parse/src/extract/env-types.ts @@ -1,4 +1,4 @@ -import { Abi, isEnvType, createEnvDefinition } from "../abi"; +import { isEnvType, createEnvDefinition } from ".."; import { extractFieldDefinition, extractListType, @@ -14,8 +14,9 @@ import { FieldDefinitionNode, ASTVisitor, } from "graphql"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; -const visitorEnter = (abi: Abi, state: State) => ({ +const visitorEnter = (abi: WrapAbi, state: State) => ({ ObjectTypeDefinition: (node: ObjectTypeDefinitionNode) => { const typeName = node.name.value; @@ -46,11 +47,11 @@ const visitorLeave = (state: State) => ({ state.currentProperty = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export function getEnvVisitor(abi: Abi): ASTVisitor { +export function getEnvVisitor(abi: WrapAbi): ASTVisitor { const state: State = {}; return { diff --git a/packages/schema/parse/src/extract/imported-enum-types.ts b/packages/schema/parse/src/extract/imported-enum-types.ts index 8faf6d04c1..c374735a7b 100644 --- a/packages/schema/parse/src/extract/imported-enum-types.ts +++ b/packages/schema/parse/src/extract/imported-enum-types.ts @@ -1,11 +1,11 @@ -import { - Abi, - createImportedEnumDefinition, - ImportedEnumDefinition, -} from "../abi"; +import { createImportedEnumDefinition } from ".."; import { extractImportedDefinition } from "./utils/imported-types-utils"; import { ASTVisitor, EnumTypeDefinitionNode } from "graphql"; +import { + ImportedEnumDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; const visitorEnter = (importedEnumTypes: ImportedEnumDefinition[]) => ({ EnumTypeDefinition: (node: EnumTypeDefinitionNode) => { @@ -34,6 +34,6 @@ const visitorEnter = (importedEnumTypes: ImportedEnumDefinition[]) => ({ }, }); -export const getImportedEnumTypesVisitor = (abi: Abi): ASTVisitor => ({ - enter: visitorEnter(abi.importedEnumTypes), +export const getImportedEnumTypesVisitor = (abi: WrapAbi): ASTVisitor => ({ + enter: visitorEnter(abi.importedEnumTypes || []), }); diff --git a/packages/schema/parse/src/extract/imported-env-types.ts b/packages/schema/parse/src/extract/imported-env-types.ts index 5e755d9126..4dd8f681f7 100644 --- a/packages/schema/parse/src/extract/imported-env-types.ts +++ b/packages/schema/parse/src/extract/imported-env-types.ts @@ -1,9 +1,7 @@ import { - Abi, - ImportedEnvDefinition, createInterfaceImplementedDefinition, createImportedEnvDefinition, -} from "../abi"; +} from ".."; import { extractFieldDefinition, extractListType, @@ -20,6 +18,10 @@ import { FieldDefinitionNode, ASTVisitor, } from "graphql"; +import { + ImportedEnvDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; const visitorEnter = ( importedEnvTypes: ImportedEnvDefinition[], @@ -32,14 +34,16 @@ const visitorEnter = ( return; } + const interfaces = node.interfaces?.map((x) => + createInterfaceImplementedDefinition({ type: x.name.value }) + ); + const importedType = createImportedEnvDefinition({ type: node.name.value, uri: imported.uri, namespace: imported.namespace, nativeType: imported.nativeType, - interfaces: node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ), + interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); @@ -68,15 +72,15 @@ const visitorLeave = (state: State) => ({ state.currentProperty = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export const getImportedEnvTypesVisitor = (abi: Abi): ASTVisitor => { +export const getImportedEnvTypesVisitor = (abi: WrapAbi): ASTVisitor => { const state: State = {}; return { - enter: visitorEnter(abi.importedEnvTypes, state), + enter: visitorEnter(abi.importedEnvTypes || [], state), leave: visitorLeave(state), }; }; diff --git a/packages/schema/parse/src/extract/imported-module-types.ts b/packages/schema/parse/src/extract/imported-module-types.ts index 1186ddf6cc..731f753acf 100644 --- a/packages/schema/parse/src/extract/imported-module-types.ts +++ b/packages/schema/parse/src/extract/imported-module-types.ts @@ -3,10 +3,7 @@ import { createInterfaceImplementedDefinition, createMethodDefinition, createPropertyDefinition, - ImportedModuleDefinition, - MapDefinition, - Abi, -} from "../abi"; +} from ".."; import { extractImportedDefinition } from "./utils/imported-types-utils"; import { extractEnvDirective, @@ -26,6 +23,11 @@ import { NonNullTypeNode, ObjectTypeDefinitionNode, } from "graphql"; +import { + ImportedModuleDefinition, + MapDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; const visitorEnter = ( importedModuleTypes: ImportedModuleDefinition[], @@ -43,14 +45,16 @@ const visitorEnter = ( node.directives.find((dir) => dir.name.value === "enabled_interface"); const isInterface = dir ? true : false; + const interfaces = node.interfaces?.map((x) => + createInterfaceImplementedDefinition({ type: x.name.value }) + ); + const importedType = createImportedModuleDefinition({ uri: imported.uri, namespace: imported.namespace, nativeType: imported.nativeType, isInterface: isInterface, - interfaces: node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ), + interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); importedModuleTypes.push(importedType); @@ -73,7 +77,7 @@ const visitorEnter = ( map: def ? ({ ...def, name: node.name.value } as MapDefinition) : undefined, - required: def && def.required ? true : false, + required: def && def.required ? true : undefined, }); const method = createMethodDefinition({ @@ -88,6 +92,10 @@ const visitorEnter = ( method.env = envDirDefinition; } + if (!importDef.methods) { + importDef.methods = []; + } + importDef.methods.push(method); state.currentMethod = method; state.currentReturn = returnType; @@ -118,15 +126,15 @@ const visitorLeave = (state: State) => ({ state.currentArgument = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export const getImportedModuleTypesVisitor = (abi: Abi): ASTVisitor => { +export const getImportedModuleTypesVisitor = (abi: WrapAbi): ASTVisitor => { const state: State = {}; return { - enter: visitorEnter(abi.importedModuleTypes, state), + enter: visitorEnter(abi.importedModuleTypes || [], state), leave: visitorLeave(state), }; }; diff --git a/packages/schema/parse/src/extract/imported-object-types.ts b/packages/schema/parse/src/extract/imported-object-types.ts index 6a9fb15134..49b4191ca4 100644 --- a/packages/schema/parse/src/extract/imported-object-types.ts +++ b/packages/schema/parse/src/extract/imported-object-types.ts @@ -1,9 +1,7 @@ import { - Abi, - ImportedObjectDefinition, createImportedObjectDefinition, createInterfaceImplementedDefinition, -} from "../abi"; +} from ".."; import { extractFieldDefinition, extractListType, @@ -20,6 +18,10 @@ import { FieldDefinitionNode, ASTVisitor, } from "graphql"; +import { + ImportedObjectDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; const visitorEnter = ( importedObjectTypes: ImportedObjectDefinition[], @@ -32,14 +34,16 @@ const visitorEnter = ( return; } + const interfaces = node.interfaces?.map((x) => + createInterfaceImplementedDefinition({ type: x.name.value }) + ); + const importedType = createImportedObjectDefinition({ type: node.name.value, uri: imported.uri, namespace: imported.namespace, nativeType: imported.nativeType, - interfaces: node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ), + interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); importedObjectTypes.push(importedType); @@ -67,15 +71,15 @@ const visitorLeave = (state: State) => ({ state.currentProperty = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export const getImportedObjectTypesVisitor = (abi: Abi): ASTVisitor => { +export const getImportedObjectTypesVisitor = (abi: WrapAbi): ASTVisitor => { const state: State = {}; return { - enter: visitorEnter(abi.importedObjectTypes, state), + enter: visitorEnter(abi.importedObjectTypes || [], state), leave: visitorLeave(state), }; }; diff --git a/packages/schema/parse/src/extract/index.ts b/packages/schema/parse/src/extract/index.ts index e9fb02da0b..5089ce3278 100644 --- a/packages/schema/parse/src/extract/index.ts +++ b/packages/schema/parse/src/extract/index.ts @@ -1,4 +1,3 @@ -import { Abi } from "../abi"; import { getEnumTypesVisitor } from "./enum-types"; import { getObjectTypesVisitor } from "./object-types"; import { getModuleTypesVisitor } from "./module-types"; @@ -9,8 +8,9 @@ import { getEnvVisitor } from "./env-types"; import { getImportedEnvTypesVisitor } from "./imported-env-types"; import { ASTVisitor } from "graphql"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; -export type SchemaExtractorBuilder = (abi: Abi) => ASTVisitor; +export type SchemaExtractorBuilder = (abi: WrapAbi) => ASTVisitor; export const extractors: SchemaExtractorBuilder[] = [ getEnumTypesVisitor, diff --git a/packages/schema/parse/src/extract/module-types.ts b/packages/schema/parse/src/extract/module-types.ts index 8a20e5c9fe..521678346e 100644 --- a/packages/schema/parse/src/extract/module-types.ts +++ b/packages/schema/parse/src/extract/module-types.ts @@ -1,5 +1,4 @@ import { - Abi, createModuleDefinition, createMethodDefinition, createPropertyDefinition, @@ -7,10 +6,8 @@ import { CapabilityType, createCapability, createInterfaceDefinition, - InterfaceDefinition, capabilityTypes, - MapDefinition, -} from "../abi"; +} from ".."; import { extractEnvDirective, extractInputValueDefinition, @@ -32,8 +29,13 @@ import { ValueNode, ASTVisitor, } from "graphql"; +import { + InterfaceDefinition, + MapDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; -const visitorEnter = (abi: Abi, state: State) => ({ +const visitorEnter = (abi: WrapAbi, state: State) => ({ ObjectTypeDefinition: (node: ObjectTypeDefinitionNode) => { const nodeName = node.name.value; @@ -43,14 +45,16 @@ const visitorEnter = (abi: Abi, state: State) => ({ const imports = parseImportsDirective(nodeName, node); - const interfaces = parseCapabilitiesDirective(nodeName, node); - state.currentInterfaces = interfaces; + const enabledInterfaces = parseCapabilitiesDirective(nodeName, node); + state.currentInterfaces = enabledInterfaces; + + const interfaces = node.interfaces?.map((x) => + createInterfaceImplementedDefinition({ type: x.name.value }) + ); const module = createModuleDefinition({ - imports, - interfaces: node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ), + imports: imports.length ? imports : undefined, + interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); @@ -74,7 +78,7 @@ const visitorEnter = (abi: Abi, state: State) => ({ map: def ? ({ ...def, name: node.name.value } as MapDefinition) : undefined, - required: def && def.required ? true : false, + required: def && def.required, }); const method = createMethodDefinition({ @@ -89,6 +93,10 @@ const visitorEnter = (abi: Abi, state: State) => ({ method.env = envDirDefinition; } + if (!module.methods) { + module.methods = []; + } + module.methods.push(method); state.currentMethod = method; state.currentReturn = returnType; @@ -271,8 +279,11 @@ const parseImportsDirective = ( return imports; }; -const visitorLeave = (abi: Abi, state: State) => ({ +const visitorLeave = (abi: WrapAbi, state: State) => ({ ObjectTypeDefinition: (_node: ObjectTypeDefinitionNode) => { + if (!abi.interfaceTypes) { + abi.interfaceTypes = []; + } if (state.currentInterfaces) { abi.interfaceTypes = [...abi.interfaceTypes, ...state.currentInterfaces]; } @@ -288,11 +299,11 @@ const visitorLeave = (abi: Abi, state: State) => ({ state.currentArgument = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export const getModuleTypesVisitor = (abi: Abi): ASTVisitor => { +export const getModuleTypesVisitor = (abi: WrapAbi): ASTVisitor => { const state: State = {}; return { diff --git a/packages/schema/parse/src/extract/object-types.ts b/packages/schema/parse/src/extract/object-types.ts index 96640242f6..8ab6b33a4b 100644 --- a/packages/schema/parse/src/extract/object-types.ts +++ b/packages/schema/parse/src/extract/object-types.ts @@ -1,11 +1,9 @@ import { - Abi, - ObjectDefinition, createObjectDefinition, createInterfaceImplementedDefinition, - isModuleType, isEnvType, -} from "../abi"; + isModuleType, +} from ".."; import { extractFieldDefinition, extractListType, @@ -22,6 +20,7 @@ import { DirectiveNode, ASTVisitor, } from "graphql"; +import { ObjectDefinition, WrapAbi } from "@polywrap/wrap-manifest-types-js"; const visitorEnter = (objectTypes: ObjectDefinition[], state: State) => ({ ObjectTypeDefinition: (node: ObjectTypeDefinitionNode) => { @@ -42,12 +41,14 @@ const visitorEnter = (objectTypes: ObjectDefinition[], state: State) => ({ return; } + const interfaces = node.interfaces?.map((x) => + createInterfaceImplementedDefinition({ type: x.name.value }) + ); + // Create a new TypeDefinition const type = createObjectDefinition({ type: typeName, - interfaces: node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ), + interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); objectTypes.push(type); @@ -75,15 +76,15 @@ const visitorLeave = (state: State) => ({ state.currentProperty = undefined; }, NonNullType: (_node: NonNullTypeNode) => { - state.nonNullType = false; + state.nonNullType = undefined; }, }); -export const getObjectTypesVisitor = (abi: Abi): ASTVisitor => { +export const getObjectTypesVisitor = (abi: WrapAbi): ASTVisitor => { const state: State = {}; return { - enter: visitorEnter(abi.objectTypes, state), + enter: visitorEnter(abi.objectTypes || [], state), leave: visitorLeave(state), }; }; diff --git a/packages/schema/parse/src/extract/utils/imported-types-utils.ts b/packages/schema/parse/src/extract/utils/imported-types-utils.ts index c8d93da299..cdb1290b34 100644 --- a/packages/schema/parse/src/extract/utils/imported-types-utils.ts +++ b/packages/schema/parse/src/extract/utils/imported-types-utils.ts @@ -1,10 +1,7 @@ -import { - ImportedDefinition, - isImportedEnvType, - isImportedModuleType, -} from "../../abi"; +import { isImportedEnvType, isImportedModuleType } from "../.."; import { DirectiveNode, TypeDefinitionNode } from "graphql"; +import { ImportedDefinition } from "@polywrap/wrap-manifest-types-js"; export function extractImportedDefinition( node: TypeDefinitionNode, diff --git a/packages/schema/parse/src/extract/utils/map-utils.ts b/packages/schema/parse/src/extract/utils/map-utils.ts index 3f823a2745..9e0d679163 100644 --- a/packages/schema/parse/src/extract/utils/map-utils.ts +++ b/packages/schema/parse/src/extract/utils/map-utils.ts @@ -4,21 +4,22 @@ import { createMapKeyDefinition, createScalarDefinition, createUnresolvedObjectOrEnumRef, - GenericDefinition, - isScalarType, isMapKeyType, + isScalarType, } from "../.."; +import { GenericDefinition } from "@polywrap/wrap-manifest-types-js"; + type CurrentAbi = { currentType: string; - subType: string | null; - required: boolean; + subType: string | undefined; + required: boolean | undefined; }; // TODO: Make sure map also works for imported types and modules const _parseCurrentType = (rootType: string, type: string): CurrentAbi => { - let required = false; + let required = undefined; if (type.startsWith("[")) { const closeSquareBracketIdx = type.lastIndexOf("]"); if (type[closeSquareBracketIdx + 1] === "!") { @@ -64,7 +65,7 @@ const _parseCurrentType = (rootType: string, type: string): CurrentAbi => { : type, subType: hasSubType ? type.substring(openAngleBracketIdx + 1, closeAngleBracketIdx) - : null, + : undefined, required: required, }; }; diff --git a/packages/schema/parse/src/extract/utils/module-types-utils.ts b/packages/schema/parse/src/extract/utils/module-types-utils.ts index 3dceb1e1e6..4605e5e9cf 100644 --- a/packages/schema/parse/src/extract/utils/module-types-utils.ts +++ b/packages/schema/parse/src/extract/utils/module-types-utils.ts @@ -1,13 +1,4 @@ -import { - PropertyDefinition, - ImportedModuleDefinition, - MethodDefinition, - createPropertyDefinition, - ModuleDefinition, - createArrayDefinition, - InterfaceDefinition, - MapDefinition, -} from "../../abi"; +import { createPropertyDefinition, createArrayDefinition } from "../.."; import { setPropertyType } from "./property-utils"; import { extractAnnotateDirective } from "./object-types-utils"; @@ -17,6 +8,14 @@ import { InputValueDefinitionNode, NamedTypeNode, } from "graphql"; +import { + ImportedModuleDefinition, + InterfaceDefinition, + MapDefinition, + MethodDefinition, + ModuleDefinition, + PropertyDefinition, +} from "@polywrap/wrap-manifest-types-js"; export interface EnvDirDefinition { required: boolean; @@ -54,7 +53,7 @@ export function extractNamedType(node: NamedTypeNode, state: State): void { required: state.nonNullType, }); - state.nonNullType = false; + state.nonNullType = undefined; } else if (method) { // Return value if (!state.currentReturn) { @@ -72,12 +71,14 @@ export function extractNamedType(node: NamedTypeNode, state: State): void { ); } - setPropertyType(state.currentReturn, method.name, { - type: node.name.value, - required: state.nonNullType, - }); + if (state.currentReturn) { + setPropertyType(state.currentReturn, method.name, { + type: node.name.value, + required: state.nonNullType, + }); + } - state.nonNullType = false; + state.nonNullType = undefined; } } @@ -93,7 +94,7 @@ export function extractListType(state: State): void { required: state.nonNullType, }); state.currentArgument = argument.array; - state.nonNullType = false; + state.nonNullType = undefined; } else if (method) { // Return value if (!method.return) { @@ -112,7 +113,7 @@ export function extractListType(state: State): void { required: state.nonNullType, }); state.currentReturn = state.currentReturn.array; - state.nonNullType = false; + state.nonNullType = undefined; } } @@ -134,9 +135,12 @@ export function extractInputValueDefinition( name: name, map: def ? (def as MapDefinition) : undefined, comment: node.description?.value, - required: def && def.required ? true : false, + required: def && def.required ? true : undefined, }); + if (!method.arguments) { + method.arguments = []; + } method.arguments.push(argument); state.currentArgument = argument; } diff --git a/packages/schema/parse/src/extract/utils/object-types-utils.ts b/packages/schema/parse/src/extract/utils/object-types-utils.ts index d3bca33e8e..0fd8fa4b89 100644 --- a/packages/schema/parse/src/extract/utils/object-types-utils.ts +++ b/packages/schema/parse/src/extract/utils/object-types-utils.ts @@ -1,11 +1,4 @@ -import { - createArrayDefinition, - createPropertyDefinition, - GenericDefinition, - MapDefinition, - ObjectDefinition, - PropertyDefinition, -} from "../../abi"; +import { createArrayDefinition, createPropertyDefinition } from "../.."; import { parseMapType } from "./map-utils"; import { setPropertyType } from "./property-utils"; @@ -15,10 +8,16 @@ import { NamedTypeNode, StringValueNode, } from "graphql"; +import { + GenericDefinition, + MapDefinition, + ObjectDefinition, + PropertyDefinition, +} from "@polywrap/wrap-manifest-types-js"; export interface State { currentType?: ObjectDefinition; - currentProperty?: PropertyDefinition | undefined; + currentProperty?: PropertyDefinition; nonNullType?: boolean; } @@ -76,10 +75,13 @@ export function extractFieldDefinition( name: name, map: def ? (def as MapDefinition) : undefined, comment: node.description?.value, - required: def && def.required ? true : false, + required: def && def.required, }); state.currentProperty = property; + if (!importDef.properties) { + importDef.properties = []; + } importDef.properties.push(property); } @@ -110,7 +112,7 @@ export function extractNamedType(node: NamedTypeNode, state: State): void { required: state.nonNullType, }); - state.nonNullType = false; + state.nonNullType = undefined; } export function extractListType(state: State): void { @@ -130,5 +132,5 @@ export function extractListType(state: State): void { required: state.nonNullType, }); state.currentProperty = property.array; - state.nonNullType = false; + state.nonNullType = undefined; } diff --git a/packages/schema/parse/src/extract/utils/property-utils.ts b/packages/schema/parse/src/extract/utils/property-utils.ts index 2500f88f9f..077e7b5737 100644 --- a/packages/schema/parse/src/extract/utils/property-utils.ts +++ b/packages/schema/parse/src/extract/utils/property-utils.ts @@ -3,15 +3,19 @@ import { createMapDefinition, createUnresolvedObjectOrEnumRef, isScalarType, - PropertyDefinition, -} from "../../abi"; +} from "../.."; -const toBoolean = (val: unknown) => (val ? true : false); +import { PropertyDefinition } from "@polywrap/wrap-manifest-types-js"; + +const toBoolean = (val: unknown) => !!val; export function setPropertyType( property: PropertyDefinition, name: string, - type: { type: string; required: boolean | undefined } + type: { + type: string; + required: boolean | undefined; + } ): void { if (isScalarType(type.type)) { property.scalar = createScalarDefinition({ @@ -39,7 +43,7 @@ export function setPropertyType( }), ...property.map, name: name, - required: type.required ? true : null, + required: type.required, }; return; } diff --git a/packages/schema/parse/src/index.ts b/packages/schema/parse/src/index.ts index eee4d4a86b..1ec67c4da4 100644 --- a/packages/schema/parse/src/index.ts +++ b/packages/schema/parse/src/index.ts @@ -1,14 +1,15 @@ -import { Abi, createAbi } from "./abi"; +import { createAbi } from "./abi"; import { extractors, SchemaExtractorBuilder } from "./extract"; -import { AbiTransforms, transformAbi } from "./transform"; -import { finalizePropertyDef } from "./transform/finalizePropertyDef"; -import { validators } from "./validate"; -import { SchemaValidatorBuilder } from "./validate"; +import { AbiTransforms, transformAbi, finalizePropertyDef } from "./transform"; +import { validators, SchemaValidatorBuilder } from "./validate"; import { DocumentNode, parse, visit, visitInParallel } from "graphql"; +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; export * from "./abi"; +export * from "./extract"; export * from "./transform"; +export * from "./validate"; export * from "./header"; interface ParserOptions { @@ -22,7 +23,10 @@ interface ParserOptions { transforms?: AbiTransforms[]; } -export function parseSchema(schema: string, options: ParserOptions = {}): Abi { +export function parseSchema( + schema: string, + options: ParserOptions = {} +): WrapAbi { const astNode = parse(schema); // Validate GraphQL Schema @@ -46,7 +50,27 @@ export function parseSchema(schema: string, options: ParserOptions = {}): Abi { } } - return info; + return { + objectTypes: info.objectTypes?.length ? info.objectTypes : undefined, + moduleType: info.moduleType ? info.moduleType : undefined, + enumTypes: info.enumTypes?.length ? info.enumTypes : undefined, + interfaceTypes: info.interfaceTypes?.length + ? info.interfaceTypes + : undefined, + importedObjectTypes: info.importedObjectTypes?.length + ? info.importedObjectTypes + : undefined, + importedModuleTypes: info.importedModuleTypes?.length + ? info.importedModuleTypes + : undefined, + importedEnumTypes: info.importedEnumTypes?.length + ? info.importedEnumTypes + : undefined, + importedEnvTypes: info.importedEnvTypes?.length + ? info.importedEnvTypes + : undefined, + envType: info.envType ? info.envType : undefined, + }; } const validate = ( @@ -68,7 +92,7 @@ const validate = ( const extract = ( astNode: DocumentNode, - abi: Abi, + abi: WrapAbi, extractors: SchemaExtractorBuilder[] ) => { const allVisitors = extractors.map((getVisitor) => getVisitor(abi)); diff --git a/packages/schema/parse/src/transform/addAnnotations.ts b/packages/schema/parse/src/transform/addAnnotations.ts index 49ce397ffd..f64500d433 100644 --- a/packages/schema/parse/src/transform/addAnnotations.ts +++ b/packages/schema/parse/src/transform/addAnnotations.ts @@ -1,5 +1,7 @@ import { toGraphQL } from "."; -import { PropertyDefinition, AbiTransforms } from ".."; +import { AbiTransforms } from ".."; + +import { PropertyDefinition } from "@polywrap/wrap-manifest-types-js"; export const addAnnotations: AbiTransforms = { enter: { diff --git a/packages/schema/parse/src/transform/addFirstLast.ts b/packages/schema/parse/src/transform/addFirstLast.ts index 5175b8159f..c8ee7a1581 100644 --- a/packages/schema/parse/src/transform/addFirstLast.ts +++ b/packages/schema/parse/src/transform/addFirstLast.ts @@ -1,5 +1,6 @@ import { AbiTransforms } from "."; -import { Abi, GenericDefinition } from "../abi"; + +import { Abi, GenericDefinition } from "@polywrap/wrap-manifest-types-js"; export const addFirstLast: AbiTransforms = { enter: { diff --git a/packages/schema/parse/src/transform/extendType.ts b/packages/schema/parse/src/transform/extendType.ts index e7ff93bf14..092578a42a 100644 --- a/packages/schema/parse/src/transform/extendType.ts +++ b/packages/schema/parse/src/transform/extendType.ts @@ -1,11 +1,12 @@ import { AbiTransforms } from "."; -import { GenericDefinition, Abi } from "../abi"; + +import { GenericDefinition, WrapAbi } from "@polywrap/wrap-manifest-types-js"; // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types export function extendType(extension: any): AbiTransforms { return { enter: { - Abi: (abi: Abi) => ({ + Abi: (abi: WrapAbi) => ({ ...abi, extension, }), diff --git a/packages/schema/parse/src/transform/finalizePropertyDef.ts b/packages/schema/parse/src/transform/finalizePropertyDef.ts index d9c5929626..d22fe27398 100644 --- a/packages/schema/parse/src/transform/finalizePropertyDef.ts +++ b/packages/schema/parse/src/transform/finalizePropertyDef.ts @@ -1,16 +1,16 @@ import { AbiTransforms } from "."; +import { createEnumRef, createObjectRef } from ".."; + import { + AnyDefinition, ArrayDefinition, - createEnumRef, - createObjectRef, GenericDefinition, - PropertyDefinition, - Abi, MapDefinition, - AnyDefinition, -} from "../abi"; + PropertyDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; -export const finalizePropertyDef = (abi: Abi): AbiTransforms => { +export const finalizePropertyDef = (abi: WrapAbi): AbiTransforms => { return { enter: { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -24,7 +24,7 @@ export const finalizePropertyDef = (abi: Abi): AbiTransforms => { export function populatePropertyType( property: PropertyDefinition, - abi: Abi + abi: WrapAbi ): void { let propertyType: GenericDefinition | undefined; if (property.array) { @@ -49,7 +49,7 @@ export function populatePropertyType( property.required = propertyType.required; } -function populateMapType(map: MapDefinition, abi: Abi) { +function populateMapType(map: MapDefinition, abi: WrapAbi) { let baseTypeFound = false; let currentType: AnyDefinition = map; @@ -97,7 +97,7 @@ function populateMapType(map: MapDefinition, abi: Abi) { } } -function populateArrayType(array: ArrayDefinition, abi: Abi) { +function populateArrayType(array: ArrayDefinition, abi: WrapAbi) { let baseTypeFound = false; let currentArray = array; @@ -146,7 +146,7 @@ function populateArrayType(array: ArrayDefinition, abi: Abi) { function resolveObjectOrEnumKind( property: PropertyDefinition, - abi: Abi + abi: WrapAbi ): GenericDefinition { if (!property.unresolvedObjectOrEnum) { throw Error("Type reference is undefined, this should never happen."); @@ -155,13 +155,14 @@ function resolveObjectOrEnumKind( const unresolved = property.unresolvedObjectOrEnum; // Check to see if the type is a part of the custom types defined inside the schema (objects, enums, envs) - let customType: GenericDefinition | undefined = abi.objectTypes.find( - (type) => type.type === unresolved.type - ); + let customType: GenericDefinition | undefined = + abi.objectTypes && + abi.objectTypes.find((type) => type.type === unresolved.type); customType = customType ? customType - : abi.importedObjectTypes.find((type) => type.type === unresolved.type); + : abi.importedObjectTypes && + abi.importedObjectTypes.find((type) => type.type === unresolved.type); const envType = abi.envType; customType = customType @@ -172,14 +173,18 @@ function resolveObjectOrEnumKind( customType = customType ? customType - : abi.importedEnvTypes.find((type) => type.type === unresolved.type); + : abi.importedEnvTypes && + abi.importedEnvTypes.find((type) => type.type === unresolved.type); if (!customType) { - customType = abi.enumTypes.find((type) => type.type === unresolved.type); + customType = + abi.enumTypes && + abi.enumTypes.find((type) => type.type === unresolved.type); customType = customType ? customType - : abi.importedEnumTypes.find((type) => type.type === unresolved.type); + : abi.importedEnumTypes && + abi.importedEnumTypes.find((type) => type.type === unresolved.type); if (!customType) { throw new Error(`Unsupported type ${unresolved.type}`); @@ -191,7 +196,7 @@ function resolveObjectOrEnumKind( type: unresolved.type, }); - property.unresolvedObjectOrEnum = null; + property.unresolvedObjectOrEnum = undefined; return property.enum; } else { @@ -201,7 +206,7 @@ function resolveObjectOrEnumKind( type: property.unresolvedObjectOrEnum.type, }); - property.unresolvedObjectOrEnum = null; + property.unresolvedObjectOrEnum = undefined; return property.object; } diff --git a/packages/schema/parse/src/transform/hasImports.ts b/packages/schema/parse/src/transform/hasImports.ts index 31257adf3a..d2350d1e05 100644 --- a/packages/schema/parse/src/transform/hasImports.ts +++ b/packages/schema/parse/src/transform/hasImports.ts @@ -1,16 +1,17 @@ import { AbiTransforms } from "."; -import { Abi } from "../abi"; + +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; export const hasImports: AbiTransforms = { enter: { - Abi: (abi: Abi) => ({ + Abi: (abi: WrapAbi) => ({ ...abi, hasImports: () => { return ( - abi.importedEnumTypes.length || - abi.importedObjectTypes.length || - abi.importedModuleTypes.length || - abi.importedEnvTypes.length + (abi.importedEnumTypes && abi.importedEnumTypes.length) || + (abi.importedObjectTypes && abi.importedObjectTypes.length) || + (abi.importedModuleTypes && abi.importedModuleTypes.length) || + (abi.importedEnvTypes && abi.importedEnvTypes.length) ); }, }), diff --git a/packages/schema/parse/src/transform/index.ts b/packages/schema/parse/src/transform/index.ts index 9501171f16..8990ae7093 100644 --- a/packages/schema/parse/src/transform/index.ts +++ b/packages/schema/parse/src/transform/index.ts @@ -1,10 +1,13 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/naming-convention */ +import { DefinitionKind, isKind } from "../abi"; + import { - Abi, + AnyDefinition, + EnvDefinition, + ImportedEnvDefinition, GenericDefinition, ObjectDefinition, - AnyDefinition, ScalarDefinition, PropertyDefinition, ArrayDefinition, @@ -12,19 +15,16 @@ import { ModuleDefinition, ImportedModuleDefinition, ImportedObjectDefinition, - DefinitionKind, - isKind, EnumDefinition, ImportedEnumDefinition, InterfaceImplementedDefinition, EnumRef, ObjectRef, InterfaceDefinition, - EnvDefinition, WithKind, MapDefinition, - ImportedEnvDefinition, -} from "../abi"; + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; export * from "./finalizePropertyDef"; export * from "./extendType"; @@ -42,7 +42,7 @@ export interface AbiTransforms { } export interface AbiTransformer { - Abi?: (abi: Abi) => Abi; + Abi?: (abi: WrapAbi) => WrapAbi; GenericDefinition?: (def: GenericDefinition) => GenericDefinition; ObjectDefinition?: (def: ObjectDefinition) => ObjectDefinition; ObjectRef?: (def: ObjectRef) => ObjectRef; @@ -72,29 +72,38 @@ export interface AbiTransformer { MapDefinition?: (def: MapDefinition) => MapDefinition; } -export function transformAbi(abi: Abi, transforms: AbiTransforms): Abi { +export function transformAbi(abi: WrapAbi, transforms: AbiTransforms): WrapAbi { let result = Object.assign({}, abi); if (transforms.enter && transforms.enter.Abi) { result = transforms.enter.Abi(result); } - for (let i = 0; i < result.interfaceTypes.length; ++i) { - result.interfaceTypes[i] = visitInterfaceDefinition( - result.interfaceTypes[i], - transforms - ); + if (result.interfaceTypes) { + for (let i = 0; i < result.interfaceTypes.length; ++i) { + result.interfaceTypes[i] = visitInterfaceDefinition( + result.interfaceTypes[i], + transforms + ); + } } - for (let i = 0; i < result.enumTypes.length; ++i) { - result.enumTypes[i] = visitEnumDefinition(result.enumTypes[i], transforms); + if (result.enumTypes) { + for (let i = 0; i < result.enumTypes.length; ++i) { + result.enumTypes[i] = visitEnumDefinition( + result.enumTypes[i], + transforms + ); + } } - for (let i = 0; i < result.objectTypes.length; ++i) { - result.objectTypes[i] = visitObjectDefinition( - result.objectTypes[i], - transforms - ); + if (result.objectTypes) { + for (let i = 0; i < result.objectTypes.length; ++i) { + result.objectTypes[i] = visitObjectDefinition( + result.objectTypes[i], + transforms + ); + } } if (result.moduleType) { @@ -105,32 +114,40 @@ export function transformAbi(abi: Abi, transforms: AbiTransforms): Abi { result.envType = visitEnvDefinition(result.envType, transforms); } - for (let i = 0; i < result.importedObjectTypes.length; ++i) { - result.importedObjectTypes[i] = visitImportedObjectDefinition( - result.importedObjectTypes[i], - transforms - ); + if (result.importedObjectTypes) { + for (let i = 0; i < result.importedObjectTypes.length; ++i) { + result.importedObjectTypes[i] = visitImportedObjectDefinition( + result.importedObjectTypes[i], + transforms + ); + } } - for (let i = 0; i < result.importedModuleTypes.length; ++i) { - result.importedModuleTypes[i] = visitImportedModuleDefinition( - result.importedModuleTypes[i], - transforms - ); + if (result.importedModuleTypes) { + for (let i = 0; i < result.importedModuleTypes.length; ++i) { + result.importedModuleTypes[i] = visitImportedModuleDefinition( + result.importedModuleTypes[i], + transforms + ); + } } - for (let i = 0; i < result.importedEnumTypes.length; ++i) { - result.importedEnumTypes[i] = visitImportedEnumDefinition( - result.importedEnumTypes[i], - transforms - ); + if (result.importedEnumTypes) { + for (let i = 0; i < result.importedEnumTypes.length; ++i) { + result.importedEnumTypes[i] = visitImportedEnumDefinition( + result.importedEnumTypes[i], + transforms + ); + } } - for (let i = 0; i < result.importedEnvTypes.length; ++i) { - result.importedEnvTypes[i] = visitImportedEnvDefinition( - result.importedEnvTypes[i], - transforms - ); + if (result.importedEnvTypes) { + for (let i = 0; i < result.importedEnvTypes.length; ++i) { + result.importedEnvTypes[i] = visitImportedEnvDefinition( + result.importedEnvTypes[i], + transforms + ); + } } if (transforms.leave && transforms.leave.Abi) { @@ -147,18 +164,22 @@ export function visitObjectDefinition( let result = Object.assign({}, def); result = transformType(result, transforms.enter); - for (let i = 0; i < result.properties.length; ++i) { - result.properties[i] = visitPropertyDefinition( - result.properties[i], - transforms - ); + if (result.properties) { + for (let i = 0; i < result.properties.length; ++i) { + result.properties[i] = visitPropertyDefinition( + result.properties[i], + transforms + ); + } } - for (let i = 0; i < result.interfaces.length; ++i) { - result.interfaces[i] = visitInterfaceImplementedDefinition( - result.interfaces[i], - transforms - ); + if (result.interfaces) { + for (let i = 0; i < result.interfaces.length; ++i) { + result.interfaces[i] = visitInterfaceImplementedDefinition( + result.interfaces[i], + transforms + ); + } } return transformType(result, transforms.leave); @@ -274,11 +295,13 @@ export function visitMethodDefinition( let result = Object.assign({}, def); result = transformType(result, transforms.enter); - for (let i = 0; i < result.arguments.length; ++i) { - result.arguments[i] = visitPropertyDefinition( - result.arguments[i], - transforms - ); + if (result.arguments) { + for (let i = 0; i < result.arguments.length; ++i) { + result.arguments[i] = visitPropertyDefinition( + result.arguments[i], + transforms + ); + } } if (result.return) { @@ -295,8 +318,10 @@ export function visitModuleDefinition( let result = Object.assign({}, def); result = transformType(result, transforms.enter); - for (let i = 0; i < result.methods.length; ++i) { - result.methods[i] = visitMethodDefinition(result.methods[i], transforms); + if (result.methods) { + for (let i = 0; i < result.methods.length; ++i) { + result.methods[i] = visitMethodDefinition(result.methods[i], transforms); + } } return transformType(result, transforms.leave); @@ -318,8 +343,10 @@ export function visitImportedModuleDefinition( let result = Object.assign({}, def); result = transformType(result, transforms.enter); - for (let i = 0; i < result.methods.length; ++i) { - result.methods[i] = visitMethodDefinition(result.methods[i], transforms); + if (result.methods) { + for (let i = 0; i < result.methods.length; ++i) { + result.methods[i] = visitMethodDefinition(result.methods[i], transforms); + } } return transformType(result, transforms.leave); diff --git a/packages/schema/parse/src/transform/interfaceUris.ts b/packages/schema/parse/src/transform/interfaceUris.ts index 6ccc69064a..b0dcb1b3b4 100644 --- a/packages/schema/parse/src/transform/interfaceUris.ts +++ b/packages/schema/parse/src/transform/interfaceUris.ts @@ -1,5 +1,10 @@ import { AbiTransforms } from "."; -import { Abi, ModuleDefinition, ObjectDefinition } from "../abi"; + +import { + ModuleDefinition, + ObjectDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; export function interfaceUris(): AbiTransforms { const uniqueInterfaceUris: Record = {}; @@ -9,24 +14,30 @@ export function interfaceUris(): AbiTransforms { return { enter: { ModuleDefinition: (def: ModuleDefinition) => { - for (const interfaceDef of def.interfaces) { - uniqueModuleInterfaceTypes[interfaceDef.type] = true; + if (def.interfaces) { + for (const interfaceDef of def.interfaces) { + uniqueModuleInterfaceTypes[interfaceDef.type] = true; + } } return def; }, ObjectDefinition: (def: ObjectDefinition) => { - for (const interfaceDef of def.interfaces) { - uniqueObjectInterfaceTypes[interfaceDef.type] = true; + if (def.interfaces) { + for (const interfaceDef of def.interfaces) { + uniqueObjectInterfaceTypes[interfaceDef.type] = true; + } } return def; }, }, leave: { - Abi: (abi: Abi) => { + Abi: (abi: WrapAbi) => { for (const interfaceType of Object.keys(uniqueModuleInterfaceTypes)) { - const importedInterface = abi.importedModuleTypes.find( - (importedModule) => importedModule.type === interfaceType - ); + const importedInterface = + abi.importedModuleTypes && + abi.importedModuleTypes.find( + (importedModule) => importedModule.type === interfaceType + ); if (importedInterface) { uniqueInterfaceUris[importedInterface.uri] = true; @@ -34,9 +45,11 @@ export function interfaceUris(): AbiTransforms { } for (const interfaceType of Object.keys(uniqueObjectInterfaceTypes)) { - const importedInterface = abi.importedObjectTypes.find( - (importedObject) => importedObject.type === interfaceType - ); + const importedInterface = + abi.importedObjectTypes && + abi.importedObjectTypes.find( + (importedObject) => importedObject.type === interfaceType + ); if (importedInterface) { uniqueInterfaceUris[importedInterface.uri] = true; diff --git a/packages/schema/parse/src/transform/methodParentPointers.ts b/packages/schema/parse/src/transform/methodParentPointers.ts index 105da6cd44..ba250812f8 100644 --- a/packages/schema/parse/src/transform/methodParentPointers.ts +++ b/packages/schema/parse/src/transform/methodParentPointers.ts @@ -1,9 +1,10 @@ import { AbiTransforms } from "."; + import { - ModuleDefinition, ImportedModuleDefinition, MethodDefinition, -} from "../abi"; + ModuleDefinition, +} from "@polywrap/wrap-manifest-types-js"; export function methodParentPointers(): AbiTransforms { const visitorStack: (ModuleDefinition | ImportedModuleDefinition)[] = []; diff --git a/packages/schema/parse/src/transform/moduleCapabilities.ts b/packages/schema/parse/src/transform/moduleCapabilities.ts index 531959accb..267005e5d6 100644 --- a/packages/schema/parse/src/transform/moduleCapabilities.ts +++ b/packages/schema/parse/src/transform/moduleCapabilities.ts @@ -1,5 +1,10 @@ import { AbiTransforms } from "."; -import { InterfaceDefinition, CapabilityDefinition, Abi } from "../abi"; + +import { + CapabilityDefinition, + InterfaceDefinition, + WrapAbi, +} from "@polywrap/wrap-manifest-types-js"; export interface ModuleCapability { type: string; @@ -17,7 +22,7 @@ export function moduleCapabilities(): AbiTransforms { InterfaceDefinition: (def: InterfaceDefinition) => { for (const type in def.capabilities) { const info = def.capabilities[type as keyof CapabilityDefinition]; - if (info.enabled) { + if (info?.enabled) { capabilities.push({ uri: def.uri, namespace: def.namespace, @@ -30,15 +35,17 @@ export function moduleCapabilities(): AbiTransforms { }, }, leave: { - Abi: (info: Abi) => { + Abi: (info: WrapAbi) => { if (info.moduleType) { // eslint-disable-next-line @typescript-eslint/no-explicit-any (info.moduleType as any).capabilities = capabilities; } - for (const importedModuleDef of info.importedModuleTypes) { - if (enabledInterfaces.has(importedModuleDef.namespace)) { - importedModuleDef.isInterface = true; + if (info.importedModuleTypes) { + for (const importedModuleDef of info.importedModuleTypes) { + if (enabledInterfaces.has(importedModuleDef.namespace)) { + importedModuleDef.isInterface = true; + } } } diff --git a/packages/schema/parse/src/transform/toGraphQLType.ts b/packages/schema/parse/src/transform/toGraphQLType.ts index c495cb3fcd..300b2417d3 100644 --- a/packages/schema/parse/src/transform/toGraphQLType.ts +++ b/packages/schema/parse/src/transform/toGraphQLType.ts @@ -1,14 +1,15 @@ import { AbiTransforms } from "."; +import { DefinitionKind } from ".."; + import { GenericDefinition, AnyDefinition, ArrayDefinition, MethodDefinition, - DefinitionKind, MapDefinition, -} from "../abi"; +} from "@polywrap/wrap-manifest-types-js"; -function applyRequired(type: string, required: boolean | null): string { +function applyRequired(type: string, required: boolean | undefined): string { return `${type}${required ? "!" : ""}`; } @@ -108,7 +109,7 @@ export function toGraphQL(def: GenericDefinition, prefixed = false): string { } const result = `${method.name}( - ${method.arguments + ${(method.arguments || []) .map((arg) => `${arg.name}: ${toGraphQL(arg, prefixed)}`) .join("\n ")} ): ${toGraphQL(method.return, prefixed)}`; diff --git a/packages/schema/parse/src/validate/directives.ts b/packages/schema/parse/src/validate/directives.ts index 87dc622dbb..8d3abcb51a 100644 --- a/packages/schema/parse/src/validate/directives.ts +++ b/packages/schema/parse/src/validate/directives.ts @@ -1,7 +1,8 @@ -import { ImportedDefinition, isImportedModuleType, isModuleType } from "../abi"; import { SchemaValidator } from "."; +import { isImportedModuleType, isModuleType } from ".."; import { DirectiveNode, ASTNode, ObjectTypeDefinitionNode } from "graphql"; +import { ImportedDefinition } from "@polywrap/wrap-manifest-types-js"; export const getSupportedDirectivesValidator = (): SchemaValidator => { const supportedDirectives = [ diff --git a/packages/schema/parse/src/validate/types.ts b/packages/schema/parse/src/validate/types.ts index 8fea2cf475..ba01c4f721 100644 --- a/packages/schema/parse/src/validate/types.ts +++ b/packages/schema/parse/src/validate/types.ts @@ -1,4 +1,4 @@ -import { isScalarType, scalarTypeNames, isModuleType } from "../abi"; +import { isScalarType, isModuleType, scalarTypeNames } from ".."; import { SchemaValidator } from "./"; import { diff --git a/packages/test-cases/cases/cli/docgen/001-sanity/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/001-sanity/expected/docs/module.md index 70913a2786..a2abb12a0a 100644 --- a/packages/test-cases/cases/cli/docgen/001-sanity/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/001-sanity/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### method diff --git a/packages/test-cases/cases/cli/docgen/001-sanity/package.json b/packages/test-cases/cases/cli/docgen/001-sanity/package.json index 50cccdf499..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/docgen/001-sanity/package.json +++ b/packages/test-cases/cases/cli/docgen/001-sanity/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.2.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/Mock_module.md b/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/Mock_module.md deleted file mode 100644 index 13fa23a884..0000000000 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/Mock_module.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: module -title: Module ---- - -### deployContract - -```graphql -deployContract( -): String! -``` - -### getData - -```graphql -getData( -): Int! -``` - -### setData - -```graphql -setData( - value: Int! -): Boolean! -``` - diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/module.md index ac9ad34c71..46bf7e0d15 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### deployContract diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/package.json b/packages/test-cases/cases/cli/docgen/002-custom-config/package.json index 50cccdf499..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/package.json +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.2.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/expected/docs/module.md index 70913a2786..a2abb12a0a 100644 --- a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### method diff --git a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/package.json b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/package.json index 50cccdf499..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/package.json +++ b/packages/test-cases/cases/cli/docgen/003-custom-manifest-file/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.2.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/docgen/004-app/cmd.json b/packages/test-cases/cases/cli/docgen/004-app/cmd.json index 161ffa8693..57c076a586 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/cmd.json +++ b/packages/test-cases/cases/cli/docgen/004-app/cmd.json @@ -1,3 +1,3 @@ { - "args": ["docusaurus"] + "args": ["docusaurus", "--imports"] } \ No newline at end of file diff --git a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_enums.md b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_enums.md index eef7340e8b..06bc25b43a 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_enums.md +++ b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_enums.md @@ -1,6 +1,7 @@ --- -id: enums -title: Enum Types +id: Console_enums +title: Console Enum Types +sidebar_position: 3 --- diff --git a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_module.md b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_module.md index c50635a56f..3be64276af 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_module.md +++ b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Console_module.md @@ -1,6 +1,7 @@ --- -id: module -title: Module +id: Console_module +title: Console Module +sidebar_position: 1 --- ### log diff --git a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_env.md b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_env.md index 4db4b74f08..369e322563 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_env.md +++ b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_env.md @@ -1,6 +1,7 @@ --- -id: env -title: Env Type +id: Ethereum_env +title: Ethereum Env Type +sidebar_position: 4 --- diff --git a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_module.md b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_module.md index e2c630d053..2981a95951 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_module.md +++ b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_module.md @@ -1,6 +1,7 @@ --- -id: module -title: Module +id: Ethereum_module +title: Ethereum Module +sidebar_position: 1 --- ### awaitTransaction diff --git a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_objects.md b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_objects.md index bdc3fab753..a6d65d3d74 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_objects.md +++ b/packages/test-cases/cases/cli/docgen/004-app/expected/docs/Ethereum_objects.md @@ -1,6 +1,7 @@ --- -id: objects -title: Object Types +id: Ethereum_objects +title: Ethereum Object Types +sidebar_position: 2 --- diff --git a/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/module.md index 70913a2786..a2abb12a0a 100644 --- a/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### method diff --git a/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/objects.md b/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/objects.md index 12eda3bf46..656ab28e09 100644 --- a/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/objects.md +++ b/packages/test-cases/cases/cli/docgen/005-wasm/expected/docs/objects.md @@ -1,6 +1,7 @@ --- id: objects title: Object Types +sidebar_position: 2 --- diff --git a/packages/test-cases/cases/cli/docgen/005-wasm/package.json b/packages/test-cases/cases/cli/docgen/005-wasm/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/docgen/005-wasm/package.json +++ b/packages/test-cases/cases/cli/docgen/005-wasm/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_module.md b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_module.md deleted file mode 100644 index e2c630d053..0000000000 --- a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_module.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: module -title: Module ---- - -### awaitTransaction - -```graphql -awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection -): Ethereum_TxReceipt! -``` - -### callContractMethod - -```graphql -callContractMethod( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_TxResponse! -``` - -### callContractMethodAndWait - -```graphql -callContractMethodAndWait( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_TxReceipt! -``` - -### callContractStatic - -```graphql -callContractStatic( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_StaticTxResult! -``` - -### callContractView - -```graphql -callContractView( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection -): String! -``` - -### checkAddress - -```graphql -checkAddress( - address: String! -): Boolean! -``` - -### deployContract - -```graphql -deployContract( - abi: String! - bytecode: String! - args: String[] - connection: Ethereum_Connection -): String! -``` - -### encodeFunction - -```graphql -encodeFunction( - method: String! - args: String[] -): String! -``` - -### encodeParams - -```graphql -encodeParams( - types: String[]! - values: String[]! -): String! -``` - -### estimateContractCallGas - -```graphql -estimateContractCallGas( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): BigInt! -``` - -### estimateTransactionGas - -```graphql -estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): BigInt! -``` - -### getBalance - -```graphql -getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### getGasPrice - -```graphql -getGasPrice( - connection: Ethereum_Connection -): BigInt! -``` - -### getNetwork - -```graphql -getNetwork( - connection: Ethereum_Connection -): Ethereum_Network! -``` - -### getSignerAddress - -```graphql -getSignerAddress( - connection: Ethereum_Connection -): String! -``` - -### getSignerBalance - -```graphql -getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### getSignerTransactionCount - -```graphql -getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### requestAccounts - -```graphql -requestAccounts( - connection: Ethereum_Connection -): String[]! -``` - -### sendRPC - -```graphql -sendRPC( - method: String! - params: String[]! - connection: Ethereum_Connection -): String -``` - -### sendTransaction - -```graphql -sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): Ethereum_TxResponse! -``` - -### sendTransactionAndWait - -```graphql -sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): Ethereum_TxReceipt! -``` - -### signMessage - -```graphql -signMessage( - message: String! - connection: Ethereum_Connection -): String! -``` - -### solidityKeccak256 - -```graphql -solidityKeccak256( - types: String[]! - values: String[]! -): String! -``` - -### solidityPack - -```graphql -solidityPack( - types: String[]! - values: String[]! -): String! -``` - -### soliditySha256 - -```graphql -soliditySha256( - types: String[]! - values: String[]! -): String! -``` - -### toEth - -```graphql -toEth( - wei: BigInt! -): String! -``` - -### toWei - -```graphql -toWei( - eth: String! -): BigInt! -``` - -### waitForEvent - -```graphql -waitForEvent( - address: String! - event: String! - args: String[] - timeout: UInt32 - connection: Ethereum_Connection -): Ethereum_EventNotification! -``` - diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_objects.md b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_objects.md deleted file mode 100644 index bdc3fab753..0000000000 --- a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/Ethereum_objects.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -id: objects -title: Object Types ---- - - -### Ethereum_Access - -```graphql -type Ethereum_Access { - address: String! - storageKeys: String[]! -} -``` - -### Ethereum_Connection - -```graphql -type Ethereum_Connection { - node: String - networkNameOrChainId: String -} -``` - -### Ethereum_EventNotification - -```graphql -type Ethereum_EventNotification { - data: String! - address: String! - log: Ethereum_Log! -} -``` - -### Ethereum_Log - -```graphql -type Ethereum_Log { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: String[]! - transactionHash: String! - logIndex: UInt32! -} -``` - -### Ethereum_Network - -```graphql -type Ethereum_Network { - name: String! - chainId: BigInt! - ensAddress: String -} -``` - -### Ethereum_StaticTxResult - -```graphql -type Ethereum_StaticTxResult { - result: String! - error: Boolean! -} -``` - -### Ethereum_TxOverrides - -```graphql -type Ethereum_TxOverrides { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} -``` - -### Ethereum_TxReceipt - -```graphql -type Ethereum_TxReceipt { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: Ethereum_Log[]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} -``` - -### Ethereum_TxRequest - -```graphql -type Ethereum_TxRequest { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} -``` - -### Ethereum_TxResponse - -```graphql -type Ethereum_TxResponse { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: Ethereum_Access[] -} -``` - diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/env.md b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/env.md index 0f0fbad9ce..277239ca0a 100644 --- a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/env.md +++ b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/env.md @@ -1,6 +1,7 @@ --- id: env title: Env Type +sidebar_position: 4 --- diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/module.md index 61ab98b356..678ec7c901 100644 --- a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### methodOne diff --git a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/objects.md b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/objects.md index ea8c574b50..794ce00c0a 100644 --- a/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/objects.md +++ b/packages/test-cases/cases/cli/docgen/006-plugin/expected/docs/objects.md @@ -1,6 +1,7 @@ --- id: objects title: Object Types +sidebar_position: 2 --- diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_module.md b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_module.md deleted file mode 100644 index e2c630d053..0000000000 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_module.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: module -title: Module ---- - -### awaitTransaction - -```graphql -awaitTransaction( - txHash: String! - confirmations: UInt32! - timeout: UInt32! - connection: Ethereum_Connection -): Ethereum_TxReceipt! -``` - -### callContractMethod - -```graphql -callContractMethod( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_TxResponse! -``` - -### callContractMethodAndWait - -```graphql -callContractMethodAndWait( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_TxReceipt! -``` - -### callContractStatic - -```graphql -callContractStatic( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): Ethereum_StaticTxResult! -``` - -### callContractView - -```graphql -callContractView( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection -): String! -``` - -### checkAddress - -```graphql -checkAddress( - address: String! -): Boolean! -``` - -### deployContract - -```graphql -deployContract( - abi: String! - bytecode: String! - args: String[] - connection: Ethereum_Connection -): String! -``` - -### encodeFunction - -```graphql -encodeFunction( - method: String! - args: String[] -): String! -``` - -### encodeParams - -```graphql -encodeParams( - types: String[]! - values: String[]! -): String! -``` - -### estimateContractCallGas - -```graphql -estimateContractCallGas( - address: String! - method: String! - args: String[] - connection: Ethereum_Connection - txOverrides: Ethereum_TxOverrides -): BigInt! -``` - -### estimateTransactionGas - -```graphql -estimateTransactionGas( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): BigInt! -``` - -### getBalance - -```graphql -getBalance( - address: String! - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### getGasPrice - -```graphql -getGasPrice( - connection: Ethereum_Connection -): BigInt! -``` - -### getNetwork - -```graphql -getNetwork( - connection: Ethereum_Connection -): Ethereum_Network! -``` - -### getSignerAddress - -```graphql -getSignerAddress( - connection: Ethereum_Connection -): String! -``` - -### getSignerBalance - -```graphql -getSignerBalance( - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### getSignerTransactionCount - -```graphql -getSignerTransactionCount( - blockTag: BigInt - connection: Ethereum_Connection -): BigInt! -``` - -### requestAccounts - -```graphql -requestAccounts( - connection: Ethereum_Connection -): String[]! -``` - -### sendRPC - -```graphql -sendRPC( - method: String! - params: String[]! - connection: Ethereum_Connection -): String -``` - -### sendTransaction - -```graphql -sendTransaction( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): Ethereum_TxResponse! -``` - -### sendTransactionAndWait - -```graphql -sendTransactionAndWait( - tx: Ethereum_TxRequest! - connection: Ethereum_Connection -): Ethereum_TxReceipt! -``` - -### signMessage - -```graphql -signMessage( - message: String! - connection: Ethereum_Connection -): String! -``` - -### solidityKeccak256 - -```graphql -solidityKeccak256( - types: String[]! - values: String[]! -): String! -``` - -### solidityPack - -```graphql -solidityPack( - types: String[]! - values: String[]! -): String! -``` - -### soliditySha256 - -```graphql -soliditySha256( - types: String[]! - values: String[]! -): String! -``` - -### toEth - -```graphql -toEth( - wei: BigInt! -): String! -``` - -### toWei - -```graphql -toWei( - eth: String! -): BigInt! -``` - -### waitForEvent - -```graphql -waitForEvent( - address: String! - event: String! - args: String[] - timeout: UInt32 - connection: Ethereum_Connection -): Ethereum_EventNotification! -``` - diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_objects.md b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_objects.md deleted file mode 100644 index bdc3fab753..0000000000 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/Ethereum_objects.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -id: objects -title: Object Types ---- - - -### Ethereum_Access - -```graphql -type Ethereum_Access { - address: String! - storageKeys: String[]! -} -``` - -### Ethereum_Connection - -```graphql -type Ethereum_Connection { - node: String - networkNameOrChainId: String -} -``` - -### Ethereum_EventNotification - -```graphql -type Ethereum_EventNotification { - data: String! - address: String! - log: Ethereum_Log! -} -``` - -### Ethereum_Log - -```graphql -type Ethereum_Log { - blockNumber: BigInt! - blockHash: String! - transactionIndex: UInt32! - removed: Boolean! - address: String! - data: String! - topics: String[]! - transactionHash: String! - logIndex: UInt32! -} -``` - -### Ethereum_Network - -```graphql -type Ethereum_Network { - name: String! - chainId: BigInt! - ensAddress: String -} -``` - -### Ethereum_StaticTxResult - -```graphql -type Ethereum_StaticTxResult { - result: String! - error: Boolean! -} -``` - -### Ethereum_TxOverrides - -```graphql -type Ethereum_TxOverrides { - gasLimit: BigInt - gasPrice: BigInt - value: BigInt -} -``` - -### Ethereum_TxReceipt - -```graphql -type Ethereum_TxReceipt { - to: String! - from: String! - contractAddress: String! - transactionIndex: UInt32! - root: String - gasUsed: BigInt! - logsBloom: String! - transactionHash: String! - logs: Ethereum_Log[]! - blockNumber: BigInt! - blockHash: String! - confirmations: UInt32! - cumulativeGasUsed: BigInt! - effectiveGasPrice: BigInt! - byzantium: Boolean! - type: UInt32! - status: UInt32 -} -``` - -### Ethereum_TxRequest - -```graphql -type Ethereum_TxRequest { - to: String - from: String - nonce: UInt32 - gasLimit: BigInt - gasPrice: BigInt - data: String - value: BigInt - chainId: BigInt - type: UInt32 -} -``` - -### Ethereum_TxResponse - -```graphql -type Ethereum_TxResponse { - hash: String! - to: String - from: String! - nonce: UInt32! - gasLimit: BigInt! - gasPrice: BigInt - data: String! - value: BigInt! - chainId: BigInt! - blockNumber: BigInt - blockHash: String - timestamp: UInt32 - confirmations: UInt32! - raw: String - r: String - s: String - v: UInt32 - type: UInt32 - accessList: Ethereum_Access[] -} -``` - diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/enums.md b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/enums.md index 9becb5d318..f5467760a0 100644 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/enums.md +++ b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/enums.md @@ -1,6 +1,7 @@ --- id: enums title: Enum Types +sidebar_position: 3 --- diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/module.md b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/module.md index f26efdefea..d194ca9215 100644 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/module.md +++ b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/module.md @@ -1,6 +1,7 @@ --- id: module title: Module +sidebar_position: 1 --- ### method diff --git a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/objects.md b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/objects.md index 7829881679..96a0bbdbc9 100644 --- a/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/objects.md +++ b/packages/test-cases/cases/cli/docgen/007-docusaurus/expected/docs/objects.md @@ -1,6 +1,7 @@ --- id: objects title: Object Types +sidebar_position: 2 --- diff --git a/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_Module.js b/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_Module.js deleted file mode 100644 index 9686e4f30c..0000000000 --- a/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_Module.js +++ /dev/null @@ -1,246 +0,0 @@ -/** -* Ethereum Module -* @module ethereum_module -* -*/ - -/** -* -* @function module:method.awaitTransaction -* @param { String } txHash -* @param { UInt32 } confirmations -* @param { UInt32 } timeout -* @param { Ethereum_Connection | null } connection -* @returns { Ethereum_TxReceipt } -*/ - -/** -* -* @function module:method.callContractMethod -* @param { String } address -* @param { String } method -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @param { Ethereum_TxOverrides | null } txOverrides -* @returns { Ethereum_TxResponse } -*/ - -/** -* -* @function module:method.callContractMethodAndWait -* @param { String } address -* @param { String } method -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @param { Ethereum_TxOverrides | null } txOverrides -* @returns { Ethereum_TxReceipt } -*/ - -/** -* -* @function module:method.callContractStatic -* @param { String } address -* @param { String } method -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @param { Ethereum_TxOverrides | null } txOverrides -* @returns { Ethereum_StaticTxResult } -*/ - -/** -* -* @function module:method.callContractView -* @param { String } address -* @param { String } method -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @returns { String } -*/ - -/** -* -* @function module:method.checkAddress -* @param { String } address -* @returns { Boolean } -*/ - -/** -* -* @function module:method.deployContract -* @param { String } abi -* @param { String } bytecode -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @returns { String } -*/ - -/** -* -* @function module:method.encodeFunction -* @param { String } method -* @param { String[] | null } args -* @returns { String } -*/ - -/** -* -* @function module:method.encodeParams -* @param { String[] } types -* @param { String[] } values -* @returns { String } -*/ - -/** -* -* @function module:method.estimateContractCallGas -* @param { String } address -* @param { String } method -* @param { String[] | null } args -* @param { Ethereum_Connection | null } connection -* @param { Ethereum_TxOverrides | null } txOverrides -* @returns { BigInt } -*/ - -/** -* -* @function module:method.estimateTransactionGas -* @param { Ethereum_TxRequest } tx -* @param { Ethereum_Connection | null } connection -* @returns { BigInt } -*/ - -/** -* -* @function module:method.getBalance -* @param { String } address -* @param { BigInt | null } blockTag -* @param { Ethereum_Connection | null } connection -* @returns { BigInt } -*/ - -/** -* -* @function module:method.getGasPrice -* @param { Ethereum_Connection | null } connection -* @returns { BigInt } -*/ - -/** -* -* @function module:method.getNetwork -* @param { Ethereum_Connection | null } connection -* @returns { Ethereum_Network } -*/ - -/** -* -* @function module:method.getSignerAddress -* @param { Ethereum_Connection | null } connection -* @returns { String } -*/ - -/** -* -* @function module:method.getSignerBalance -* @param { BigInt | null } blockTag -* @param { Ethereum_Connection | null } connection -* @returns { BigInt } -*/ - -/** -* -* @function module:method.getSignerTransactionCount -* @param { BigInt | null } blockTag -* @param { Ethereum_Connection | null } connection -* @returns { BigInt } -*/ - -/** -* -* @function module:method.requestAccounts -* @param { Ethereum_Connection | null } connection -* @returns { String[] } -*/ - -/** -* -* @function module:method.sendRPC -* @param { String } method -* @param { String[] } params -* @param { Ethereum_Connection | null } connection -* @returns { String } -*/ - -/** -* -* @function module:method.sendTransaction -* @param { Ethereum_TxRequest } tx -* @param { Ethereum_Connection | null } connection -* @returns { Ethereum_TxResponse } -*/ - -/** -* -* @function module:method.sendTransactionAndWait -* @param { Ethereum_TxRequest } tx -* @param { Ethereum_Connection | null } connection -* @returns { Ethereum_TxReceipt } -*/ - -/** -* -* @function module:method.signMessage -* @param { String } message -* @param { Ethereum_Connection | null } connection -* @returns { String } -*/ - -/** -* -* @function module:method.solidityKeccak256 -* @param { String[] } types -* @param { String[] } values -* @returns { String } -*/ - -/** -* -* @function module:method.solidityPack -* @param { String[] } types -* @param { String[] } values -* @returns { String } -*/ - -/** -* -* @function module:method.soliditySha256 -* @param { String[] } types -* @param { String[] } values -* @returns { String } -*/ - -/** -* -* @function module:method.toEth -* @param { BigInt } wei -* @returns { String } -*/ - -/** -* -* @function module:method.toWei -* @param { String } eth -* @returns { BigInt } -*/ - -/** -* -* @function module:method.waitForEvent -* @param { String } address -* @param { String } event -* @param { String[] | null } args -* @param { UInt32 | null } timeout -* @param { Ethereum_Connection | null } connection -* @returns { Ethereum_EventNotification } -*/ - diff --git a/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_objects.js b/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_objects.js deleted file mode 100644 index 1b2d0ca5f8..0000000000 --- a/packages/test-cases/cases/cli/docgen/008-jsdoc/expected/docs/Ethereum_objects.js +++ /dev/null @@ -1,134 +0,0 @@ -/** -* Ethereum Object Types -* @module Ethereum_objects -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_Access -* -* @property { String } address -* @property { String[] } storageKeys -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_Connection -* -* @property { String } node -* @property { String } networkNameOrChainId -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_EventNotification -* -* @property { String } data -* @property { String } address -* @property { Ethereum_Log } log -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_Log -* -* @property { BigInt } blockNumber -* @property { String } blockHash -* @property { UInt32 } transactionIndex -* @property { Boolean } removed -* @property { String } address -* @property { String } data -* @property { String[] } topics -* @property { String } transactionHash -* @property { UInt32 } logIndex -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_Network -* -* @property { String } name -* @property { BigInt } chainId -* @property { String } ensAddress -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_StaticTxResult -* -* @property { String } result -* @property { Boolean } error -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_TxOverrides -* -* @property { BigInt } gasLimit -* @property { BigInt } gasPrice -* @property { BigInt } value -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_TxReceipt -* -* @property { String } to -* @property { String } from -* @property { String } contractAddress -* @property { UInt32 } transactionIndex -* @property { String } root -* @property { BigInt } gasUsed -* @property { String } logsBloom -* @property { String } transactionHash -* @property { Ethereum_Log[] } logs -* @property { BigInt } blockNumber -* @property { String } blockHash -* @property { UInt32 } confirmations -* @property { BigInt } cumulativeGasUsed -* @property { BigInt } effectiveGasPrice -* @property { Boolean } byzantium -* @property { UInt32 } type -* @property { UInt32 } status -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_TxRequest -* -* @property { String } to -* @property { String } from -* @property { UInt32 } nonce -* @property { BigInt } gasLimit -* @property { BigInt } gasPrice -* @property { String } data -* @property { BigInt } value -* @property { BigInt } chainId -* @property { UInt32 } type -*/ - -/** -* -* @typedef {Object} module:Ethereum_objects.Ethereum_TxResponse -* -* @property { String } hash -* @property { String } to -* @property { String } from -* @property { UInt32 } nonce -* @property { BigInt } gasLimit -* @property { BigInt } gasPrice -* @property { String } data -* @property { BigInt } value -* @property { BigInt } chainId -* @property { BigInt } blockNumber -* @property { String } blockHash -* @property { UInt32 } timestamp -* @property { UInt32 } confirmations -* @property { String } raw -* @property { String } r -* @property { String } s -* @property { UInt32 } v -* @property { UInt32 } type -* @property { Ethereum_Access[] } accessList -*/ - diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/001-sanity/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/004-default-build/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/005-default-dockerfile/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/006-custom-dockerfile/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/007-linked-packages/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/008-metadata/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json index a896acb449..c04e004f93 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/009-docker-buildx/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.1" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json index 50cccdf499..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/010-custom-config/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.2.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/package.json b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/package.json +++ b/packages/test-cases/cases/cli/wasm/build-cmd/011-custom-config/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json +++ b/packages/test-cases/cases/cli/wasm/codegen/001-sanity/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json +++ b/packages/test-cases/cases/cli/wasm/codegen/002-invalid-codegen-script/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json +++ b/packages/test-cases/cases/cli/wasm/codegen/003-codegen-script/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/package.json b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/package.json +++ b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/package.json b/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/package.json index 52c8a2560f..0e7747dc4a 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/package.json +++ b/packages/test-cases/cases/cli/wasm/codegen/005-custom-manifest-file/package.json @@ -7,7 +7,7 @@ "build": "polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json index f639e16666..bf7ab87b59 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json +++ b/packages/test-cases/cases/cli/wasm/deploy/001-sanity/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json index f639e16666..bf7ab87b59 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json +++ b/packages/test-cases/cases/cli/wasm/deploy/002-no-ext/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json index f639e16666..bf7ab87b59 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json +++ b/packages/test-cases/cases/cli/wasm/deploy/003-invalid-config/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json index f639e16666..bf7ab87b59 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json +++ b/packages/test-cases/cases/cli/wasm/deploy/004-fail-between/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json index 5c877fcae9..602fd33423 100644 --- a/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json +++ b/packages/test-cases/cases/cli/wasm/deploy/005-non-loaded-env-var/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap test-env down" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5" diff --git a/packages/test-cases/cases/cli/wasm/run/package.json b/packages/test-cases/cases/cli/wasm/run/package.json index 37970cba1f..e10de07a89 100644 --- a/packages/test-cases/cases/cli/wasm/run/package.json +++ b/packages/test-cases/cases/cli/wasm/run/package.json @@ -10,7 +10,7 @@ "test:env:down": "polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { - "@polywrap/wasm-as": "0.1.0" + "@polywrap/wasm-as": "0.3.0" }, "devDependencies": { "assemblyscript": "0.19.5", diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts index b40ef62381..4553903bf3 100644 --- a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts @@ -8,14 +8,12 @@ import { createObjectPropertyDefinition, createObjectDefinition, createEnumDefinition, - Abi, createEnumPropertyDefinition, createObjectRef, - createAbi + WrapAbi } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { moduleType: { ...createModuleDefinition({}), @@ -37,7 +35,7 @@ export const abi: Abi = { }), createScalarPropertyDefinition({ name: "optStr", - required: false, + required: undefined, type: "String" }), createScalarPropertyDefinition({ @@ -51,11 +49,11 @@ export const abi: Abi = { type: "[[UInt]]", item: createArrayDefinition({ name: "uArrayArray", - required: false, + required: undefined, type: "[UInt]", item: createScalarDefinition({ name: "uArrayArray", - required: false, + required: undefined, type: "UInt" }) }) @@ -96,9 +94,9 @@ export const abi: Abi = { ...createObjectDefinition({ type: "CustomModuleType" }), properties: [ createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "optStr", type: "String", required: false }), + createScalarPropertyDefinition({ name: "optStr", type: "String", required: undefined }), createScalarPropertyDefinition({ name: "u", type: "UInt", required: true }), - createScalarPropertyDefinition({ name: "optU", type: "UInt", required: false }), + createScalarPropertyDefinition({ name: "optU", type: "UInt", required: undefined }), createScalarPropertyDefinition({ name: "u8", type: "UInt8", required: true }), createScalarPropertyDefinition({ name: "i", type: "Int", required: true }), createScalarPropertyDefinition({ name: "i8", type: "Int8", required: true }), @@ -112,23 +110,23 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "uOptArray", type: "[UInt]", - required: false, + required: undefined, item: createScalarDefinition({ name: "uOptArray", type: "UInt", required: true }) }), createArrayPropertyDefinition({ name: "optStrOptArray", type: "[String]", - required: false, - item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: false }) + required: undefined, + item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: undefined }) }), createArrayPropertyDefinition({ name: "crazyArray", type: "[[[[UInt32]]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[[UInt32]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[UInt32]]", @@ -136,7 +134,7 @@ export const abi: Abi = { item: createArrayDefinition({ name: "crazyArray", type: "[UInt32]", - required: false, + required: undefined, item: createScalarDefinition({ name: "crazyArray", type: "UInt32", required: true }) }) }) @@ -165,11 +163,11 @@ export const abi: Abi = { item: createArrayDefinition({ name: "objectArray", type: "[ArrayObject]", - required: false, + required: undefined, item: createObjectRef({ name: "objectArray", type: "ArrayObject", - required: false + required: undefined }) }) }), diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts index 948afdd812..908a79b451 100644 --- a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts @@ -4,12 +4,10 @@ import { createScalarPropertyDefinition, createObjectDefinition, createObjectPropertyDefinition, - createAbi, - Abi, + WrapAbi } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -37,8 +35,6 @@ export const abi: Abi = { moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -48,8 +44,6 @@ export const abi: Abi = { type: "TypeA", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts index f45a63c554..009ef90883 100644 --- a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts @@ -4,12 +4,10 @@ import { createScalarPropertyDefinition, createObjectDefinition, createObjectPropertyDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -48,8 +46,6 @@ export const abi: Abi = { moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -59,8 +55,6 @@ export const abi: Abi = { type: "TypeA", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts index 4373d1585e..b48c222e32 100644 --- a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts @@ -9,22 +9,20 @@ import { createObjectPropertyDefinition, createObjectDefinition, createEnumDefinition, - Abi, + WrapAbi, createEnumPropertyDefinition, createObjectRef, - createAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "CustomModuleType" }), properties: [ createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "optStr", type: "String", required: false }), + createScalarPropertyDefinition({ name: "optStr", type: "String", required: undefined }), createScalarPropertyDefinition({ name: "u", type: "UInt", required: true }), - createScalarPropertyDefinition({ name: "optU", type: "UInt", required: false }), + createScalarPropertyDefinition({ name: "optU", type: "UInt", required: undefined }), createScalarPropertyDefinition({ name: "u8", type: "UInt8", required: true }), createScalarPropertyDefinition({ name: "i", type: "Int", required: true }), createScalarPropertyDefinition({ name: "i8", type: "Int8", required: true }), @@ -38,23 +36,23 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "uOptArray", type: "[UInt]", - required: false, + required: undefined, item: createScalarDefinition({ name: "uOptArray", type: "UInt", required: true }) }), createArrayPropertyDefinition({ name: "optStrOptArray", type: "[String]", - required: false, - item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: false }) + required: undefined, + item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: undefined }) }), createArrayPropertyDefinition({ name: "crazyArray", type: "[[[[UInt32]]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[[UInt32]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[UInt32]]", @@ -62,7 +60,7 @@ export const abi: Abi = { item: createArrayDefinition({ name: "crazyArray", type: "[UInt32]", - required: false, + required: undefined, item: createScalarDefinition({ name: "crazyArray", type: "UInt32", required: true }) }) }) @@ -91,11 +89,11 @@ export const abi: Abi = { item: createArrayDefinition({ name: "objectArray", type: "[ArrayObject]", - required: false, + required: undefined, item: createObjectRef({ name: "objectArray", type: "ArrayObject", - required: false + required: undefined }) }) }), @@ -159,7 +157,7 @@ export const abi: Abi = { }), createScalarPropertyDefinition({ name: "optStr", - required: false, + required: undefined, type: "String" }), createScalarPropertyDefinition({ @@ -173,11 +171,11 @@ export const abi: Abi = { type: "[[UInt]]", item: createArrayDefinition({ name: "uArrayArray", - required: false, + required: undefined, type: "[UInt]", item: createScalarDefinition({ name: "uArrayArray", - required: false, + required: undefined, type: "UInt" }) }) diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts index bd5981494d..d57605ae12 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts @@ -4,16 +4,12 @@ import { createObjectPropertyDefinition, createImportedObjectDefinition, createScalarPropertyDefinition, - Abi, - createAbi, + WrapAbi, createImportedModuleDefinition, createImportedEnvDefinition, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), - objectTypes: [ - ], +export const abi: WrapAbi = { moduleType: { ...createModuleDefinition({}), imports: [ @@ -21,7 +17,6 @@ export const abi: Abi = { { type: "Namespace_Env" }, { type: "Namespace_Module" } ], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -31,12 +26,9 @@ export const abi: Abi = { type: "Namespace_ExternalType", }), }), - arguments: [ - ], }, ], }, - enumTypes: [], importedModuleTypes: [ { ...createImportedModuleDefinition({ diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts index 253c9acc64..ab36c68b0f 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts @@ -5,12 +5,10 @@ import { createObjectPropertyDefinition, createImportedObjectDefinition, createScalarPropertyDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "LocalType" }), @@ -28,7 +26,6 @@ export const abi: Abi = { imports: [ { type: "Namespace_ExternalType" } ], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -38,8 +35,6 @@ export const abi: Abi = { type: "Namespace_ExternalType", }), }), - arguments: [ - ], }, { ...createMethodDefinition({ @@ -49,12 +44,9 @@ export const abi: Abi = { type: "LocalType", }), }), - arguments: [ - ], }, ], }, - enumTypes: [], importedObjectTypes: [ { ...createImportedObjectDefinition({ diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts index 1453318786..3e0ad04e90 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts @@ -4,16 +4,12 @@ import { createObjectPropertyDefinition, createImportedObjectDefinition, createScalarPropertyDefinition, - createAbi, - Abi, + WrapAbi, createImportedEnvDefinition, createImportedModuleDefinition, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), - objectTypes: [ - ], +export const abi: WrapAbi = { moduleType: { ...createModuleDefinition({}), @@ -23,7 +19,6 @@ export const abi: Abi = { { type: "Namespace_Module" }, { type: "Namespace_Env" }, ], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -33,12 +28,9 @@ export const abi: Abi = { type: "Namespace_ExternalType", }), }), - arguments: [ - ], }, ], }, - enumTypes: [], importedModuleTypes: [ { ...createImportedModuleDefinition({ diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts index ff6294782b..573b4fa073 100644 --- a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts @@ -5,12 +5,10 @@ import { createObjectPropertyDefinition, createScalarPropertyDefinition, createInterfaceImplementedDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "BaseType1" }), @@ -49,8 +47,6 @@ export const abi: Abi = { ], moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -60,8 +56,6 @@ export const abi: Abi = { type: "DerivedType1", }), }), - arguments: [ - ], }, { ...createMethodDefinition({ @@ -71,8 +65,6 @@ export const abi: Abi = { type: "DerivedType2", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts index 33d9884369..a62e7bd747 100644 --- a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts @@ -1,26 +1,18 @@ import { createModuleDefinition, createObjectDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "CustomType", }), - properties: [ - ], }, ], moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], - methods: [ - ], }, }; diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts index 4459ffc254..7a0d637a8e 100644 --- a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts @@ -4,19 +4,15 @@ import { createObjectDefinition, createObjectPropertyDefinition, createInterfaceImplementedDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "BaseType", }), - properties: [ - ], }, { ...createObjectDefinition({ @@ -27,15 +23,11 @@ export const abi: Abi = { type: "BaseType" }) ], - properties: [ - ], }, ], moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -45,8 +37,6 @@ export const abi: Abi = { type: "DerivedType", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts index 41c99b6800..f1695fe734 100644 --- a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts @@ -4,19 +4,15 @@ import { createObjectDefinition, createObjectPropertyDefinition, createInterfaceImplementedDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "BaseType", }), - properties: [ - ], }, { ...createObjectDefinition({ @@ -27,8 +23,6 @@ export const abi: Abi = { type: "BaseType" }) ], - properties: [ - ], }, { ...createObjectDefinition({ @@ -39,21 +33,15 @@ export const abi: Abi = { type: "ImportedBaseType" }) ], - properties: [ - ], }, { ...createObjectDefinition({ type: "ImportedBaseType", }), - properties: [ - ], }, ], moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -63,8 +51,6 @@ export const abi: Abi = { type: "DerivedType", }), }), - arguments: [ - ], }, { ...createMethodDefinition({ @@ -74,8 +60,6 @@ export const abi: Abi = { type: "ImportedDerivedType", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts index 2cbcfc58ff..be1b18df37 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts @@ -2,12 +2,10 @@ import { createModuleDefinition, createInterfaceImplementedDefinition, createImportedModuleDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { moduleType: { ...createModuleDefinition({}), @@ -17,8 +15,6 @@ export const abi: Abi = { interfaces: [ createInterfaceImplementedDefinition({ type: "Namespace_Module" }) ], - methods: [ - ], }, importedModuleTypes: [ { @@ -28,8 +24,6 @@ export const abi: Abi = { nativeType: "Module", isInterface: false, }), - methods: [ - ] }, ], }; diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts index 8f55b26541..e5f5d3503e 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts @@ -5,12 +5,10 @@ import { createObjectPropertyDefinition, createInterfaceImplementedDefinition, createImportedObjectDefinition, - createAbi, - Abi, + WrapAbi } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -21,8 +19,6 @@ export const abi: Abi = { type: "Base_ImportedBaseType" }) ], - properties: [ - ], }, ], moduleType: @@ -33,7 +29,6 @@ export const abi: Abi = { { type: "Derived_ImportedDerivedType" }, { type: "Derived_ImportedBaseType" }, ], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -43,8 +38,6 @@ export const abi: Abi = { type: "Derived_ImportedDerivedType", }), }), - arguments: [ - ], }, { ...createMethodDefinition({ @@ -54,8 +47,6 @@ export const abi: Abi = { type: "CustomType", }), }), - arguments: [ - ], }, ], }, @@ -67,7 +58,6 @@ export const abi: Abi = { nativeType: "ImportedBaseType", type: "Base_ImportedBaseType" }), - properties: [], }, { ...createImportedObjectDefinition({ @@ -81,7 +71,6 @@ export const abi: Abi = { type: "Derived_ImportedBaseType" }) ], - properties: [], }, { ...createImportedObjectDefinition({ @@ -90,7 +79,6 @@ export const abi: Abi = { nativeType: "ImportedBaseType", type: "Derived_ImportedBaseType" }), - properties: [], }, ], }; diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts index 3c6972ef22..69e060ca28 100644 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts @@ -7,12 +7,10 @@ import { createModuleDefinition, createObjectDefinition, createScalarDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -146,8 +144,6 @@ export const abi: Abi = { moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts index 8ec8ff2a82..277d1572b9 100644 --- a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts @@ -8,12 +8,10 @@ import { createObjectDefinition, createObjectPropertyDefinition, createScalarDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -94,8 +92,6 @@ export const abi: Abi = { moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts index e75b3b974f..154fdf332f 100644 --- a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts @@ -8,12 +8,10 @@ import { createObjectDefinition, createObjectPropertyDefinition, createScalarDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -169,8 +167,6 @@ export const abi: Abi = { moduleType: { ...createModuleDefinition({}), - imports: [], - interfaces: [], methods: [ { ...createMethodDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts index d0a619d2da..d5eff57333 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts @@ -2,16 +2,14 @@ import { createModuleDefinition, createInterfaceImplementedDefinition, createImportedModuleDefinition, - createAbi, - Abi, createMethodDefinition, createMapPropertyDefinition, createMapKeyDefinition, createScalarDefinition, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { moduleType: { ...createModuleDefinition({}), @@ -36,12 +34,10 @@ export const abi: Abi = { value: createScalarDefinition({ name: "getMap", type: "Int", - required: false, + required: undefined, }), required: true, }), - arguments: [ - ], }), }, { @@ -58,7 +54,7 @@ export const abi: Abi = { value: createScalarDefinition({ name: "updateMap", type: "Int", - required: false, + required: undefined, }), required: true, }), @@ -74,7 +70,7 @@ export const abi: Abi = { value: createScalarDefinition({ name: "map", type: "Int", - required: false, + required: undefined, }), required: true, })} @@ -106,12 +102,10 @@ export const abi: Abi = { value: createScalarDefinition({ name: "getMap", type: "Int", - required: false, + required: undefined, }), required: true, }), - arguments: [ - ], }), }, { @@ -128,7 +122,7 @@ export const abi: Abi = { value: createScalarDefinition({ name: "updateMap", type: "Int", - required: false, + required: undefined, }), required: true, }), @@ -144,7 +138,7 @@ export const abi: Abi = { value: createScalarDefinition({ name: "map", type: "Int", - required: false, + required: undefined, }), required: true, })} diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts index d820973f42..a0b4c81499 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts @@ -5,16 +5,14 @@ import { createObjectPropertyDefinition, createInterfaceImplementedDefinition, createImportedObjectDefinition, - createAbi, - Abi, createMapPropertyDefinition, createMapKeyDefinition, createScalarDefinition, createArrayDefinition, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ @@ -54,7 +52,6 @@ export const abi: Abi = { { type: "Derived_ImportedDerivedType" }, { type: "Derived_ImportedBaseType" }, ], - interfaces: [], methods: [ { ...createMethodDefinition({ @@ -64,8 +61,6 @@ export const abi: Abi = { type: "Derived_ImportedDerivedType", }), }), - arguments: [ - ], }, { ...createMethodDefinition({ @@ -75,8 +70,6 @@ export const abi: Abi = { type: "CustomType", }), }), - arguments: [ - ], }, ], }, diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts index 1fc7b88110..3084b631a6 100644 --- a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts @@ -2,13 +2,11 @@ import { createMethodDefinition, createModuleDefinition, createScalarPropertyDefinition, - createAbi, createEnvDefinition, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { envType: createEnvDefinition({ properties: [ createScalarPropertyDefinition({ name: "prop", type: "String", required: true }), diff --git a/packages/test-cases/cases/compose/sanity/output/module.ts b/packages/test-cases/cases/compose/sanity/output/module.ts index 77bef95a03..03489d0589 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.ts +++ b/packages/test-cases/cases/compose/sanity/output/module.ts @@ -17,18 +17,19 @@ import { createInterfaceImplementedDefinition, createObjectRef, createEnvDefinition, - createAbi, - Abi, + WrapAbi, } from "@polywrap/schema-parse"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { envType: createEnvDefinition({ properties: [ - createScalarPropertyDefinition({ name: "foo", type: "String", required: true }), + createScalarPropertyDefinition({ + name: "foo", + type: "String", + required: true, + }), ], }), - enumTypes: [], interfaceTypes: [ createInterfaceDefinition({ type: "Namespace", @@ -36,207 +37,248 @@ export const abi: Abi = { uri: "test.eth", capabilities: { getImplementations: { - enabled: true + enabled: true, }, }, }), ], - moduleType: - { - ...createModuleDefinition({ comment: "Module comment" }), - imports: [ - { type: "Namespace_Module" }, - { type: "Namespace_NestedObjectType" }, - { type: "Namespace_ObjectType" }, - { type: "Namespace_Imported_NestedObjectType" }, - { type: "Namespace_Imported_ObjectType" }, - { type: "Namespace_CustomType" }, - { type: "Namespace_CustomEnum" }, - { type: "Namespace_Imported_Enum" }, - { type: "JustModule_Module" }, - { type: "Interface_InterfaceObject1" }, - { type: "Interface_InterfaceObject2" }, - { type: "Interface_Object" }, - { type: "Interface_NestedInterfaceObject" }, - { type: "Interface_Module" }, - { type: "Interface_ModuleInterfaceArgument" }, - { type: "Interface_NestedModuleInterfaceArgument" } - ], - interfaces: [ - createInterfaceImplementedDefinition({type: "Interface_Module"}) - ], - methods: [ - { - ...createMethodDefinition({ + moduleType: { + ...createModuleDefinition({ comment: "Module comment" }), + imports: [ + { type: "Namespace_Module" }, + { type: "Namespace_NestedObjectType" }, + { type: "Namespace_ObjectType" }, + { type: "Namespace_Imported_NestedObjectType" }, + { type: "Namespace_Imported_ObjectType" }, + { type: "Namespace_CustomType" }, + { type: "Namespace_CustomEnum" }, + { type: "Namespace_Imported_Enum" }, + { type: "JustModule_Module" }, + { type: "Interface_InterfaceObject1" }, + { type: "Interface_InterfaceObject2" }, + { type: "Interface_Object" }, + { type: "Interface_NestedInterfaceObject" }, + { type: "Interface_Module" }, + { type: "Interface_ModuleInterfaceArgument" }, + { type: "Interface_NestedModuleInterfaceArgument" }, + ], + interfaces: [ + createInterfaceImplementedDefinition({ type: "Interface_Module" }), + ], + methods: [ + { + ...createMethodDefinition({ + name: "method1", + return: createScalarPropertyDefinition({ name: "method1", - return: createScalarPropertyDefinition({ - name: "method1", - type: "String", - required: true - }), - comment: "method1 comment" + type: "String", + required: true, }), - arguments: [ - createScalarPropertyDefinition({ - name: "str", - required: true, - type: "String", - comment: "str comment" - }), - createScalarPropertyDefinition({ - name: "optStr", - required: false, - type: "String", - comment: "optStr comment" - }), - createScalarPropertyDefinition({ - name: "u", - required: true, - type: "UInt" - }), - createArrayPropertyDefinition({ + comment: "method1 comment", + }), + arguments: [ + createScalarPropertyDefinition({ + name: "str", + required: true, + type: "String", + comment: "str comment", + }), + createScalarPropertyDefinition({ + name: "optStr", + type: "String", + comment: "optStr comment", + }), + createScalarPropertyDefinition({ + name: "u", + required: true, + type: "UInt", + }), + createArrayPropertyDefinition({ + name: "uArrayArray", + required: true, + type: "[[UInt]]", + item: createArrayDefinition({ name: "uArrayArray", - required: true, - type: "[[UInt]]", - item: createArrayDefinition({ + type: "[UInt]", + item: createScalarDefinition({ name: "uArrayArray", - required: false, - type: "[UInt]", - item: createScalarDefinition({ - name: "uArrayArray", - required: false, - type: "UInt" - }) + type: "UInt", }), - comment: "uArrayArray comment" }), - createObjectPropertyDefinition({ - name: "implObject", + comment: "uArrayArray comment", + }), + createObjectPropertyDefinition({ + name: "implObject", + required: true, + type: "LocalImplementationObject", + comment: "implObject comment", + }), + createMapPropertyDefinition({ + name: "map", + type: "Map", + key: createMapKeyDefinition({ + name: "map", + type: "String", required: true, - type: "LocalImplementationObject", - comment: "implObject comment" }), - createMapPropertyDefinition({ + value: createScalarDefinition({ name: "map", - type: "Map", - key: createMapKeyDefinition({ - name: "map", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "map", - type: "Int", - required: true, - }), - comment: "Map comment", + type: "Int", required: true, - }) - ] - }, - { - ...createMethodDefinition({ + }), + comment: "Map comment", + required: true, + }), + ], + }, + { + ...createMethodDefinition({ + name: "method2", + comment: "method2 comment", + return: createArrayPropertyDefinition({ name: "method2", - comment: "method2 comment", - return: createArrayPropertyDefinition({ + type: "[Int32]", + required: true, + item: createScalarDefinition({ name: "method2", - type: "[Int32]", required: true, - item: createScalarDefinition({ - name: "method2", - required: true, - type: "Int32" - }) - }) + type: "Int32", + }), }), - arguments: [ - createArrayPropertyDefinition({ + }), + arguments: [ + createArrayPropertyDefinition({ + name: "arg", + required: true, + type: "[String]", + item: createScalarDefinition({ name: "arg", required: true, - type: "[String]", - item: createScalarDefinition({ - name: "arg", - required: true, - type: "String" - }) - }) - ] - }, - { - ...createMethodDefinition({ - name: "abstractModuleMethod", - return: createObjectPropertyDefinition({ - name: "abstractModuleMethod", - type: "Interface_InterfaceObject2", - required: true + type: "String", }), }), - arguments: [ - createObjectPropertyDefinition({ - name: "arg", - required: true, - type: "Interface_ModuleInterfaceArgument" - }) - ] - }, - ] - }, + ], + }, + { + ...createMethodDefinition({ + name: "abstractModuleMethod", + return: createObjectPropertyDefinition({ + name: "abstractModuleMethod", + type: "Interface_InterfaceObject2", + required: true, + }), + }), + arguments: [ + createObjectPropertyDefinition({ + name: "arg", + required: true, + type: "Interface_ModuleInterfaceArgument", + }), + ], + }, + ], + }, objectTypes: [ { - ...createObjectDefinition({ type: "CustomModuleType", comment: "CustomModuleType multi-line comment\nline 2" }), + ...createObjectDefinition({ + type: "CustomModuleType", + comment: "CustomModuleType multi-line comment\nline 2", + }), properties: [ - createScalarPropertyDefinition({ name: "str", type: "String", required: true, comment: "str comment" }), - createScalarPropertyDefinition({ name: "optStr", type: "String", required: false, comment: "optStr comment" }), - createScalarPropertyDefinition({ name: "u", type: "UInt", required: true }), - createScalarPropertyDefinition({ name: "optU", type: "UInt", required: false }), - createScalarPropertyDefinition({ name: "u8", type: "UInt8", required: true }), - createScalarPropertyDefinition({ name: "i", type: "Int", required: true }), - createScalarPropertyDefinition({ name: "i8", type: "Int8", required: true }), - createScalarPropertyDefinition({ name: "bytes", type: "Bytes", required: true }), + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + comment: "str comment", + }), + createScalarPropertyDefinition({ + name: "optStr", + type: "String", + comment: "optStr comment", + }), + createScalarPropertyDefinition({ + name: "u", + type: "UInt", + required: true, + }), + createScalarPropertyDefinition({ + name: "optU", + type: "UInt", + }), + createScalarPropertyDefinition({ + name: "u8", + type: "UInt8", + required: true, + }), + createScalarPropertyDefinition({ + name: "i", + type: "Int", + required: true, + }), + createScalarPropertyDefinition({ + name: "i8", + type: "Int8", + required: true, + }), + createScalarPropertyDefinition({ + name: "bytes", + type: "Bytes", + required: true, + }), createArrayPropertyDefinition({ name: "uArray", type: "[UInt]", required: true, - item: createScalarDefinition({ name: "uArray", type: "UInt", required: true }) + item: createScalarDefinition({ + name: "uArray", + type: "UInt", + required: true, + }), }), createArrayPropertyDefinition({ name: "uOptArray", type: "[UInt]", - required: false, - item: createScalarDefinition({ name: "uOptArray", type: "UInt", required: true }) + item: createScalarDefinition({ + name: "uOptArray", + type: "UInt", + required: true, + }), }), createArrayPropertyDefinition({ name: "optStrOptArray", type: "[String]", - required: false, - item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: false }) + item: createScalarDefinition({ + name: "optStrOptArray", + type: "String", + }), }), createArrayPropertyDefinition({ name: "crazyArray", type: "[[[[UInt32]]]]", - required: false, comment: "crazyArray comment", item: createArrayDefinition({ name: "crazyArray", type: "[[[UInt32]]]", - required: false, item: createArrayDefinition({ name: "crazyArray", type: "[[UInt32]]", - required: true, item: createArrayDefinition({ name: "crazyArray", type: "[UInt32]", - required: false, - item: createScalarDefinition({ name: "crazyArray", type: "UInt32", required: true }) - }) - }) - }) + item: createScalarDefinition({ + name: "crazyArray", + type: "UInt32", + required: true, + }), + }), + required: true, + }), + }), }), createObjectPropertyDefinition({ name: "commonType", type: "CommonType", - required: true + required: true, }), createMapPropertyDefinition({ name: "optMap", @@ -249,21 +291,21 @@ export const abi: Abi = { value: createScalarDefinition({ name: "optMap", type: "Int", - required: false, }), - required: false, }), createObjectPropertyDefinition({ name: "customType", type: "Namespace_CustomType", required: true, - comment: "customType comment" - }) + comment: "customType comment", + }), ], }, { ...createObjectDefinition({ type: "AnotherModuleType" }), - properties: [createScalarPropertyDefinition({ name: "prop", type: "String" })], + properties: [ + createScalarPropertyDefinition({ name: "prop", type: "String" }), + ], }, { ...createObjectDefinition({ type: "TypeFromInterface" }), @@ -271,7 +313,11 @@ export const abi: Abi = { createInterfaceImplementedDefinition({ type: "AnotherModuleType" }), ], properties: [ - createScalarPropertyDefinition({ name: "prop2", type: "UInt32", required: true }), + createScalarPropertyDefinition({ + name: "prop2", + type: "UInt32", + required: true, + }), createScalarPropertyDefinition({ name: "prop", type: "String" }), ], }, @@ -279,44 +325,92 @@ export const abi: Abi = { ...createObjectDefinition({ type: "ImplementationObject", interfaces: [ - createInterfaceImplementedDefinition({ type: "Interface_InterfaceObject1" }), - createInterfaceImplementedDefinition({ type: "Interface_InterfaceObject2" }) + createInterfaceImplementedDefinition({ + type: "Interface_InterfaceObject1", + }), + createInterfaceImplementedDefinition({ + type: "Interface_InterfaceObject2", + }), ], - comment: "ImplementationObject comment" + comment: "ImplementationObject comment", }), properties: [ - createScalarPropertyDefinition({ name: "anotherProp", type: "String", required: false, comment: "anotherProp comment" }), - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true }), - createScalarPropertyDefinition({ name: "str2", type: "String", required: true }), - createObjectPropertyDefinition({ name: "object", type: "Interface_Object", required: false }), - ] + createScalarPropertyDefinition({ + name: "anotherProp", + type: "String", + comment: "anotherProp comment", + }), + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + }), + createScalarPropertyDefinition({ + name: "str2", + type: "String", + required: true, + }), + createObjectPropertyDefinition({ + name: "object", + type: "Interface_Object", + }), + ], }, { ...createObjectDefinition({ type: "LocalImplementationObject", interfaces: [ - createInterfaceImplementedDefinition({ type: "LocalInterfaceObject" }), - ] + createInterfaceImplementedDefinition({ + type: "LocalInterfaceObject", + }), + ], }), properties: [ - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true }), - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - ] + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + }), + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + ], }, { ...createObjectDefinition({ type: "LocalInterfaceObject", }), properties: [ - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - ] + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + ], }, { - ...createObjectDefinition({ type: "CommonType", comment: "CommonType comment" }), + ...createObjectDefinition({ + type: "CommonType", + comment: "CommonType comment", + }), properties: [ - createScalarPropertyDefinition({ name: "prop", type: "UInt8", required: true }), - createObjectPropertyDefinition({ name: "nestedObject", type: "NestedType", required: true }), + createScalarPropertyDefinition({ + name: "prop", + type: "UInt8", + required: true, + }), + createObjectPropertyDefinition({ + name: "nestedObject", + type: "NestedType", + required: true, + }), createArrayPropertyDefinition({ name: "objectArray", type: "[[ArrayObject]]", @@ -325,33 +419,43 @@ export const abi: Abi = { item: createArrayDefinition({ name: "objectArray", type: "[ArrayObject]", - required: false, item: createObjectRef({ name: "objectArray", type: "ArrayObject", - required: false - }) - }) + }), + }), + }), + createObjectPropertyDefinition({ + name: "anotherLocal", + type: "AnotherLocal", + required: true, }), - createObjectPropertyDefinition({ name: "anotherLocal", type: "AnotherLocal", required: true }), ], }, { ...createObjectDefinition({ type: "NestedType", - comment: "NestedType comment" + comment: "NestedType comment", }), properties: [ - createScalarPropertyDefinition({ name: "prop", type: "String", required: true }), + createScalarPropertyDefinition({ + name: "prop", + type: "String", + required: true, + }), ], }, { ...createObjectDefinition({ type: "ArrayObject", - comment: "ArrayObject comment" + comment: "ArrayObject comment", }), properties: [ - createScalarPropertyDefinition({ name: "prop", type: "String", required: true }), + createScalarPropertyDefinition({ + name: "prop", + type: "String", + required: true, + }), ], }, { @@ -359,7 +463,11 @@ export const abi: Abi = { type: "AnotherLocal", }), properties: [ - createScalarPropertyDefinition({ name: "prop", type: "String", required: true }), + createScalarPropertyDefinition({ + name: "prop", + type: "String", + required: true, + }), ], }, ], @@ -379,29 +487,27 @@ export const abi: Abi = { return: createScalarPropertyDefinition({ name: "method1", type: "String", - required: true - }) + required: true, + }), }), arguments: [ createScalarPropertyDefinition({ name: "str", required: true, - type: "String" + type: "String", }), createScalarPropertyDefinition({ name: "optStr", - required: false, - type: "String" + type: "String", }), createScalarPropertyDefinition({ name: "u", required: true, - type: "UInt" + type: "UInt", }), createScalarPropertyDefinition({ name: "optU", - required: false, - type: "UInt" + type: "UInt", }), createArrayPropertyDefinition({ name: "uArrayArray", @@ -409,16 +515,14 @@ export const abi: Abi = { type: "[[UInt]]", item: createArrayDefinition({ name: "uArrayArray", - required: false, type: "[UInt]", item: createScalarDefinition({ name: "uArrayArray", - required: false, - type: "UInt" - }) - }) - }) - ] + type: "UInt", + }), + }), + }), + ], }, { ...createMethodDefinition({ @@ -431,9 +535,9 @@ export const abi: Abi = { item: createScalarDefinition({ name: "method2", required: true, - type: "Int32" - }) - }) + type: "Int32", + }), + }), }), arguments: [ createArrayPropertyDefinition({ @@ -444,10 +548,10 @@ export const abi: Abi = { item: createScalarDefinition({ name: "arg", required: true, - type: "String" - }) - }) - ] + type: "String", + }), + }), + ], }, { ...createMethodDefinition({ @@ -455,26 +559,23 @@ export const abi: Abi = { return: createObjectPropertyDefinition({ name: "localObjects", type: "Namespace_NestedObjectType", - required: false, - }) + }), }), arguments: [ createObjectPropertyDefinition({ name: "nestedLocalObject", type: "Namespace_NestedObjectType", - required: false, }), createArrayPropertyDefinition({ name: "localObjectArray", - required: false, type: "[Namespace_NestedObjectType]", item: createObjectRef({ name: "localObjectArray", required: true, - type: "Namespace_NestedObjectType" - }) - }) - ] + type: "Namespace_NestedObjectType", + }), + }), + ], }, { ...createMethodDefinition({ @@ -482,28 +583,25 @@ export const abi: Abi = { return: createObjectPropertyDefinition({ name: "importedObjects", type: "Namespace_Imported_NestedObjectType", - required: false, - }) + }), }), arguments: [ createObjectPropertyDefinition({ name: "nestedLocalObject", type: "Namespace_Imported_NestedObjectType", - required: false, }), createArrayPropertyDefinition({ name: "localObjectArray", - required: false, type: "[Namespace_Imported_NestedObjectType]", item: createObjectRef({ name: "localObjectArray", required: true, - type: "Namespace_Imported_NestedObjectType" - }) - }) - ] + type: "Namespace_Imported_NestedObjectType", + }), + }), + ], }, - ] + ], }, { ...createImportedModuleDefinition({ @@ -523,8 +621,8 @@ export const abi: Abi = { item: createScalarDefinition({ name: "method", type: "Int32", - required: true - }) + required: true, + }), }), }), arguments: [ @@ -535,12 +633,12 @@ export const abi: Abi = { item: createScalarDefinition({ name: "arg", required: true, - type: "String" - }) - }) - ] + type: "String", + }), + }), + ], }, - ] + ], }, { ...createImportedModuleDefinition({ @@ -558,19 +656,19 @@ export const abi: Abi = { return: createObjectPropertyDefinition({ name: "abstractModuleMethod", type: "Interface_InterfaceObject2", - required: true - }) + required: true, + }), }), arguments: [ createObjectPropertyDefinition({ name: "arg", comment: "arg comment", required: true, - type: "Interface_ModuleInterfaceArgument" + type: "Interface_ModuleInterfaceArgument", }), - ] + ], }, - ] + ], }, ], importedObjectTypes: [ @@ -581,16 +679,28 @@ export const abi: Abi = { nativeType: "NestedObjectType", type: "Namespace_NestedObjectType", }), - properties: [createObjectPropertyDefinition({ name: "nestedObject", type: "Namespace_ObjectType", required: true })], + properties: [ + createObjectPropertyDefinition({ + name: "nestedObject", + type: "Namespace_ObjectType", + required: true, + }), + ], }, { ...createImportedObjectDefinition({ uri: "test.eth", namespace: "Namespace", nativeType: "ObjectType", - type: "Namespace_ObjectType" + type: "Namespace_ObjectType", }), - properties: [createScalarPropertyDefinition({ name: "prop", type: "String", required: true })], + properties: [ + createScalarPropertyDefinition({ + name: "prop", + type: "String", + required: true, + }), + ], }, { ...createImportedObjectDefinition({ @@ -598,18 +708,30 @@ export const abi: Abi = { namespace: "Namespace", nativeType: "Imported_NestedObjectType", type: "Namespace_Imported_NestedObjectType", - comment: "Imported_NestedObjectType comment" + comment: "Imported_NestedObjectType comment", }), - properties: [createObjectPropertyDefinition({ name: "nestedObject", type: "Namespace_Imported_ObjectType", required: true })], + properties: [ + createObjectPropertyDefinition({ + name: "nestedObject", + type: "Namespace_Imported_ObjectType", + required: true, + }), + ], }, { ...createImportedObjectDefinition({ uri: "test.eth", namespace: "Namespace", nativeType: "Imported_ObjectType", - type: "Namespace_Imported_ObjectType" + type: "Namespace_Imported_ObjectType", }), - properties: [createScalarPropertyDefinition({ name: "prop", type: "String", required: true })], + properties: [ + createScalarPropertyDefinition({ + name: "prop", + type: "String", + required: true, + }), + ], }, { ...createImportedObjectDefinition({ @@ -617,44 +739,101 @@ export const abi: Abi = { namespace: "Namespace", nativeType: "CustomType", type: "Namespace_CustomType", - comment: "CustomType comment" + comment: "CustomType comment", }), properties: [ - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "optStr", type: "String", required: false }), - createScalarPropertyDefinition({ name: "u", type: "UInt", required: true }), - createScalarPropertyDefinition({ name: "optU", type: "UInt", required: false }), - createScalarPropertyDefinition({ name: "u8", type: "UInt8", required: true }), - createScalarPropertyDefinition({ name: "u16", type: "UInt16", required: true }), - createScalarPropertyDefinition({ name: "u32", type: "UInt32", required: true }), - createScalarPropertyDefinition({ name: "i", type: "Int", required: true }), - createScalarPropertyDefinition({ name: "i8", type: "Int8", required: true }), - createScalarPropertyDefinition({ name: "i16", type: "Int16", required: true }), - createScalarPropertyDefinition({ name: "i32", type: "Int32", required: true }), - createScalarPropertyDefinition({ name: "bytes", type: "Bytes", required: true }), + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + createScalarPropertyDefinition({ + name: "optStr", + type: "String", + }), + createScalarPropertyDefinition({ + name: "u", + type: "UInt", + required: true, + }), + createScalarPropertyDefinition({ + name: "optU", + type: "UInt", + }), + createScalarPropertyDefinition({ + name: "u8", + type: "UInt8", + required: true, + }), + createScalarPropertyDefinition({ + name: "u16", + type: "UInt16", + required: true, + }), + createScalarPropertyDefinition({ + name: "u32", + type: "UInt32", + required: true, + }), + createScalarPropertyDefinition({ + name: "i", + type: "Int", + required: true, + }), + createScalarPropertyDefinition({ + name: "i8", + type: "Int8", + required: true, + }), + createScalarPropertyDefinition({ + name: "i16", + type: "Int16", + required: true, + }), + createScalarPropertyDefinition({ + name: "i32", + type: "Int32", + required: true, + }), + createScalarPropertyDefinition({ + name: "bytes", + type: "Bytes", + required: true, + }), createArrayPropertyDefinition({ name: "uArray", type: "[UInt]", required: true, - item: createScalarDefinition({ name: "uArray", type: "UInt", required: true }) + item: createScalarDefinition({ + name: "uArray", + type: "UInt", + required: true, + }), }), createArrayPropertyDefinition({ name: "uOptArray", type: "[UInt]", - required: false, - item: createScalarDefinition({ name: "uOptArray", type: "UInt", required: true }) + item: createScalarDefinition({ + name: "uOptArray", + type: "UInt", + required: true, + }), }), createArrayPropertyDefinition({ name: "optUOptArray", type: "[UInt]", - required: false, - item: createScalarDefinition({ name: "optUOptArray", type: "UInt", required: false }) + item: createScalarDefinition({ + name: "optUOptArray", + type: "UInt", + }), }), createArrayPropertyDefinition({ name: "optStrOptArray", type: "[String]", - required: false, - item: createScalarDefinition({ name: "optStrOptArray", type: "String", required: false }) + item: createScalarDefinition({ + name: "optStrOptArray", + type: "String", + }), }), createArrayPropertyDefinition({ name: "uArrayArray", @@ -664,8 +843,12 @@ export const abi: Abi = { name: "uArrayArray", type: "[UInt]", required: true, - item: createScalarDefinition({ name: "uArrayArray", type: "UInt", required: true }) - }) + item: createScalarDefinition({ + name: "uArrayArray", + type: "UInt", + required: true, + }), + }), }), createArrayPropertyDefinition({ name: "uOptArrayOptArray", @@ -674,9 +857,11 @@ export const abi: Abi = { item: createArrayDefinition({ name: "uOptArrayOptArray", type: "[UInt32]", - required: false, - item: createScalarDefinition({ name: "uOptArrayOptArray", type: "UInt32", required: false }) - }) + item: createScalarDefinition({ + name: "uOptArrayOptArray", + type: "UInt32", + }), + }), }), createArrayPropertyDefinition({ name: "uArrayOptArrayArray", @@ -685,23 +870,24 @@ export const abi: Abi = { item: createArrayDefinition({ name: "uArrayOptArrayArray", type: "[[UInt32]]", - required: false, item: createArrayDefinition({ name: "uArrayOptArrayArray", type: "[UInt32]", required: true, - item: createScalarDefinition({ name: "uArrayOptArrayArray", type: "UInt32", required: true }) - }) - }) + item: createScalarDefinition({ + name: "uArrayOptArrayArray", + type: "UInt32", + required: true, + }), + }), + }), }), createArrayPropertyDefinition({ name: "crazyArray", type: "[[[[UInt32]]]]", - required: false, item: createArrayDefinition({ name: "crazyArray", type: "[[[UInt32]]]", - required: false, item: createArrayDefinition({ name: "crazyArray", type: "[[UInt32]]", @@ -709,31 +895,32 @@ export const abi: Abi = { item: createArrayDefinition({ name: "crazyArray", type: "[UInt32]", - required: false, - item: createScalarDefinition({ name: "crazyArray", type: "UInt32", required: true }) - }) - }) - }) + item: createScalarDefinition({ + name: "crazyArray", + type: "UInt32", + required: true, + }), + }), + }), + }), }), createObjectPropertyDefinition({ name: "object", type: "Namespace_ObjectType", - required: true + required: true, }), createObjectPropertyDefinition({ name: "optObject", type: "Namespace_ObjectType", - required: false }), createObjectPropertyDefinition({ name: "nestedObject", type: "Namespace_NestedObjectType", - required: true + required: true, }), createObjectPropertyDefinition({ name: "optNestedObject", type: "Namespace_NestedObjectType", - required: false }), createArrayPropertyDefinition({ name: "optNestedObjectArray", @@ -742,13 +929,12 @@ export const abi: Abi = { item: createObjectRef({ name: "optNestedObjectArray", type: "Namespace_NestedObjectType", - required: false }), }), createObjectPropertyDefinition({ name: "importedNestedObject", type: "Namespace_Imported_NestedObjectType", - required: true + required: true, }), createArrayPropertyDefinition({ name: "optImportedNestedObjectArray", @@ -757,31 +943,28 @@ export const abi: Abi = { item: createObjectRef({ name: "optImportedNestedObjectArray", type: "Namespace_Imported_NestedObjectType", - required: false }), }), createEnumPropertyDefinition({ name: "enum", type: "Namespace_CustomEnum", - required: true + required: true, }), createEnumPropertyDefinition({ name: "optEnum", type: "Namespace_CustomEnum", - required: false }), createEnumPropertyDefinition({ name: "importedEnum", type: "Namespace_Imported_Enum", - required: true + required: true, }), createEnumPropertyDefinition({ name: "optImportedEnum", type: "Namespace_Imported_Enum", - required: false, - comment: "optImportedEnum comment" + comment: "optImportedEnum comment", }), - ] + ], }, { ...createImportedObjectDefinition({ @@ -789,12 +972,21 @@ export const abi: Abi = { namespace: "Interface", nativeType: "InterfaceObject1", type: "Interface_InterfaceObject1", - comment: "InterfaceObject1 comment" + comment: "InterfaceObject1 comment", }), properties: [ - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true, comment: "InterfaceObject1_uint8 comment" }), - ] + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + comment: "InterfaceObject1_uint8 comment", + }), + ], }, { ...createImportedObjectDefinition({ @@ -802,15 +994,24 @@ export const abi: Abi = { namespace: "Interface", nativeType: "InterfaceObject2", type: "Interface_InterfaceObject2", - comment: "InterfaceObject2 comment" + comment: "InterfaceObject2 comment", }), interfaces: [ - createInterfaceImplementedDefinition({ type: "Interface_NestedInterfaceObject" }) + createInterfaceImplementedDefinition({ + type: "Interface_NestedInterfaceObject", + }), ], properties: [ - createScalarPropertyDefinition({ name: "str2", type: "String", required: true }), - createObjectPropertyDefinition({ name: "object", type: "Interface_Object", required: false }), - ] + createScalarPropertyDefinition({ + name: "str2", + type: "String", + required: true, + }), + createObjectPropertyDefinition({ + name: "object", + type: "Interface_Object", + }), + ], }, { ...createImportedObjectDefinition({ @@ -818,11 +1019,15 @@ export const abi: Abi = { namespace: "Interface", nativeType: "Object", type: "Interface_Object", - comment: "Object comment" + comment: "Object comment", }), properties: [ - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true }), - ] + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + }), + ], }, { ...createImportedObjectDefinition({ @@ -830,11 +1035,15 @@ export const abi: Abi = { namespace: "Interface", nativeType: "NestedInterfaceObject", type: "Interface_NestedInterfaceObject", - comment: "NestedInterfaceObject comment" + comment: "NestedInterfaceObject comment", }), properties: [ - createObjectPropertyDefinition({ name: "object", type: "Interface_Object", required: false, comment: "object comment" }), - ] + createObjectPropertyDefinition({ + name: "object", + type: "Interface_Object", + comment: "object comment", + }), + ], }, { ...createImportedObjectDefinition({ @@ -842,15 +1051,26 @@ export const abi: Abi = { namespace: "Interface", nativeType: "ModuleInterfaceArgument", type: "Interface_ModuleInterfaceArgument", - comment: "ModuleInterfaceArgument comment" + comment: "ModuleInterfaceArgument comment", }), interfaces: [ - createInterfaceImplementedDefinition({ type: "Interface_NestedModuleInterfaceArgument" }) + createInterfaceImplementedDefinition({ + type: "Interface_NestedModuleInterfaceArgument", + }), ], properties: [ - createScalarPropertyDefinition({ name: "str", type: "String", required: true }), - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true, comment: "uint8 comment" }), - ] + createScalarPropertyDefinition({ + name: "str", + type: "String", + required: true, + }), + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + comment: "uint8 comment", + }), + ], }, { ...createImportedObjectDefinition({ @@ -858,11 +1078,15 @@ export const abi: Abi = { namespace: "Interface", nativeType: "NestedModuleInterfaceArgument", type: "Interface_NestedModuleInterfaceArgument", - comment: "NestedModuleInterfaceArgument comment" + comment: "NestedModuleInterfaceArgument comment", }), properties: [ - createScalarPropertyDefinition({ name: "uint8", type: "UInt8", required: true }), - ] + createScalarPropertyDefinition({ + name: "uint8", + type: "UInt8", + required: true, + }), + ], }, ], importedEnumTypes: [ @@ -872,11 +1096,8 @@ export const abi: Abi = { namespace: "Namespace", nativeType: "CustomEnum", type: "Namespace_CustomEnum", - constants: [ - "STRING", - "BYTES" - ] - }) + constants: ["STRING", "BYTES"], + }), }, { ...createImportedEnumDefinition({ @@ -884,12 +1105,9 @@ export const abi: Abi = { namespace: "Namespace", nativeType: "Imported_Enum", type: "Namespace_Imported_Enum", - constants: [ - "STRING", - "BYTES" - ], - comment: "Imported_Enum comment" - }) - } + constants: ["STRING", "BYTES"], + comment: "Imported_Enum comment", + }), + }, ], -} +}; diff --git a/packages/test-cases/cases/parse/recursive-properties/output.ts b/packages/test-cases/cases/parse/recursive-properties/output.ts index 0df8d3023e..88f9ba2e0d 100644 --- a/packages/test-cases/cases/parse/recursive-properties/output.ts +++ b/packages/test-cases/cases/parse/recursive-properties/output.ts @@ -1,14 +1,12 @@ import { - Abi, - createAbi, + WrapAbi, createObjectDefinition, createObjectPropertyDefinition, createArrayPropertyDefinition, createObjectRef, } from "../../../../schema/parse/src/abi"; -export const abi: Abi = { - ...createAbi(), +export const abi: WrapAbi = { objectTypes: [ { ...createObjectDefinition({ type: "Object" }), @@ -16,7 +14,6 @@ export const abi: Abi = { createObjectPropertyDefinition({ name: "recursive", type: "Object", - required: false }), createArrayPropertyDefinition({ name: "recursiveArray", @@ -31,7 +28,6 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "recursiveOptArray", type: "[Object]", - required: false, item: createObjectRef({ name: "recursiveOptArray", type: "Object", @@ -45,17 +41,14 @@ export const abi: Abi = { item: createObjectRef({ name: "recursiveArrayOpt", type: "Object", - required: false, }) }), createArrayPropertyDefinition({ name: "recursiveOptArrayOpt", type: "[Object]", - required: false, item: createObjectRef({ name: "recursiveOptArrayOpt", type: "Object", - required: false, }) }), ], diff --git a/packages/test-cases/cases/parse/sanity/output.ts b/packages/test-cases/cases/parse/sanity/output.ts index c449f4f7ff..67c46ccf12 100644 --- a/packages/test-cases/cases/parse/sanity/output.ts +++ b/packages/test-cases/cases/parse/sanity/output.ts @@ -21,10 +21,10 @@ import { createObjectRef, createScalarDefinition, createScalarPropertyDefinition, - Abi, + WrapAbi, } from "../../../../schema/parse/src/abi"; -export const abi: Abi = { +export const abi: WrapAbi = { interfaceTypes: [ createInterfaceDefinition({ type: "TestImport", @@ -68,7 +68,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optStr", type: "String", - required: false, + required: undefined, comment: "optStr comment", }), createScalarPropertyDefinition({ @@ -79,7 +79,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optU", type: "UInt", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "u8", @@ -124,7 +124,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optBigint", type: "BigInt", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "bignumber", @@ -134,7 +134,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optBignumber", type: "BigNumber", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "json", @@ -144,7 +144,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optJson", type: "JSON", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "bytes", @@ -164,7 +164,7 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "uOptArray", type: "[UInt]", - required: false, + required: undefined, item: createScalarDefinition({ name: "uOptArray", type: "UInt", @@ -174,21 +174,21 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "optUOptArray", type: "[UInt]", - required: false, + required: undefined, item: createScalarDefinition({ name: "optUOptArray", type: "UInt", - required: false, + required: undefined, }), }), createArrayPropertyDefinition({ name: "optStrOptArray", type: "[String]", - required: false, + required: undefined, item: createScalarDefinition({ name: "optStrOptArray", type: "String", - required: false, + required: undefined, }), }), createArrayPropertyDefinition({ @@ -213,11 +213,11 @@ export const abi: Abi = { item: createArrayDefinition({ name: "uOptArrayOptArray", type: "[UInt32]", - required: false, + required: undefined, item: createScalarDefinition({ name: "uOptArrayOptArray", type: "UInt32", - required: false, + required: undefined, }), }), }), @@ -228,7 +228,7 @@ export const abi: Abi = { item: createArrayDefinition({ name: "uArrayOptArrayArray", type: "[[UInt32]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "uArrayOptArrayArray", type: "[UInt32]", @@ -244,11 +244,11 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "crazyArray", type: "[[[[UInt32]]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[[UInt32]]]", - required: false, + required: undefined, item: createArrayDefinition({ name: "crazyArray", type: "[[UInt32]]", @@ -256,7 +256,7 @@ export const abi: Abi = { item: createArrayDefinition({ name: "crazyArray", type: "[UInt32]", - required: false, + required: undefined, item: createScalarDefinition({ name: "crazyArray", type: "UInt32", @@ -322,11 +322,11 @@ export const abi: Abi = { createArrayPropertyDefinition({ name: "optEnumArray", type: "[CustomEnum]", - required: false, + required: undefined, item: createEnumRef({ name: "optEnumArray", type: "CustomEnum", - required: false, + required: undefined, }), }), createMapPropertyDefinition({ @@ -391,7 +391,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "fieldA", type: "String", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "fieldB", @@ -406,7 +406,7 @@ export const abi: Abi = { createInterfaceImplementedDefinition({ type: "UserObject" }), ], properties: [ - createScalarPropertyDefinition({ name: "fieldA", type: "String", required: false }), + createScalarPropertyDefinition({ name: "fieldA", type: "String", required: undefined }), createScalarPropertyDefinition({ name: "fieldB", type: "Int", required: true }), createScalarPropertyDefinition({ name: "fieldC", type: "UInt32", required: true }), ], @@ -424,7 +424,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "anotherProp", type: "String", - required: false, + required: undefined, comment: "anotherProp comment", }), createScalarPropertyDefinition({ @@ -494,7 +494,7 @@ export const abi: Abi = { item: createScalarDefinition({ name: "moduleMethod", type: "Int", - required: false, + required: undefined, }), }), comment: "moduleMethod comment", @@ -644,7 +644,7 @@ export const abi: Abi = { ...createMethodDefinition({ name: "methodOptionalEnv", env: { - required: false, + required: undefined, }, return: createObjectPropertyDefinition({ name: "methodOptionalEnv", @@ -709,7 +709,7 @@ export const abi: Abi = { createObjectPropertyDefinition({ name: "circular", type: "TestImport_Object", - required: false, + required: undefined, }), ], }, @@ -780,7 +780,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optStr", type: "String", - required: false, + required: undefined, }), createScalarPropertyDefinition({ name: "u", @@ -790,7 +790,7 @@ export const abi: Abi = { createScalarPropertyDefinition({ name: "optU", type: "UInt", - required: false, + required: undefined, }), createArrayPropertyDefinition({ name: "uArrayArray", @@ -800,11 +800,11 @@ export const abi: Abi = { item: createArrayDefinition({ name: "uArrayArray", type: "[UInt]", - required: false, + required: undefined, item: createScalarDefinition({ name: "uArrayArray", type: "UInt", - required: false, + required: undefined, }), }), }), @@ -820,7 +820,7 @@ export const abi: Abi = { item: createScalarDefinition({ name: "anotherMethod", type: "Int32", - required: false, + required: undefined, }), }), }), @@ -893,7 +893,7 @@ export const abi: Abi = { ...createEnumPropertyDefinition({ name: "optEnum", type: "TestImport_Enum", - required: false, + required: undefined, }), }, ], @@ -927,7 +927,7 @@ export const abi: Abi = { return: createObjectPropertyDefinition({ name: "optEnvMethod", type: "TestImport_Env", - required: false, + required: undefined, }), }), arguments: [ diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json b/packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json index 4391eaaff9..02e489ea33 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/package.json @@ -2,7 +2,7 @@ "name": "test-case-asyncify", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json index 99e7c69eef..4d9e800622 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/bigint-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bigint-type", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json index b7af8f8f31..7b58132d31 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/bignumber-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bignumber-type", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json index 7816806b24..c41bc18bb5 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/bytes-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-bytes-type", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json index 93bf0d01cf..51c5a42aa4 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/enum-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-enum-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/external/package.json b/packages/test-cases/cases/wrappers/wasm-as/env-types/external/package.json index b439f9c396..3bc2c41260 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/external/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/external/package.json @@ -2,7 +2,7 @@ "name": "test-case-complex-env-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/package.json b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/package.json index b439f9c396..3bc2c41260 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/package.json @@ -2,7 +2,7 @@ "name": "test-case-complex-env-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json index 81006ed52a..3f4c69310d 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/package.json @@ -2,7 +2,7 @@ "name": "test-case-implementation", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json index 81006ed52a..3f4c69310d 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/package.json @@ -2,7 +2,7 @@ "name": "test-case-implementation", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json index 8b110f16ec..9019af61bc 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/package.json @@ -2,7 +2,7 @@ "name": "test-case-interface-invoke", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json index 8b110f16ec..9019af61bc 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/package.json @@ -2,7 +2,7 @@ "name": "test-case-interface-invoke", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json index 83f222747f..f6012c63b2 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/invalid-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-invalid-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/json-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/json-type/package.json index fff1549a28..d56a579825 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/json-type/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/json-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-json-type", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/large-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/large-types/package.json index c5efbcf500..5de9a3d52f 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/large-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/large-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-large-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/map-type/package.json b/packages/test-cases/cases/wrappers/wasm-as/map-type/package.json index ed0799f22d..7756e243a4 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/map-type/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/map-type/package.json @@ -2,7 +2,7 @@ "name": "test-case-map-type", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/number-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/number-types/package.json index 6d57ce5275..1b1fece24b 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/number-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/number-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-number-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/object-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/object-types/package.json index 4baea5fbb4..bdab090fc3 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/object-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/object-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-object-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json index 8146de1eb1..4ead5ba342 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/reserved-words/package.json @@ -2,7 +2,7 @@ "name": "test-case-reserved-words", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-calculator/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-calculator/package.json index 2e7eed2dd7..7f0141e6bc 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-calculator/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-calculator/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-calculator", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json index 3754c9fc5e..310c311e12 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-env-types/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-env-types", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/package.json index ae53454d6d..54880cb264 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-fs-resolver", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.2.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-memory/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-memory/package.json index 807b493681..50a9a1fcdc 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-memory/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-memory/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-memory", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/package.json index 15ecbabffb..26d41093fe 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple-redirect-resolver", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.2.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json index 78c2922f0e..d097d8b3d9 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/package.json @@ -5,7 +5,7 @@ "build": "../../../../../cli/bin/polywrap build" }, "dependencies": { - "@polywrap/wasm-as": "0.2.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.5" } } \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple/package.json b/packages/test-cases/cases/wrappers/wasm-as/simple/package.json index b1cf366f2b..0c89b0f08e 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple/package.json +++ b/packages/test-cases/cases/wrappers/wasm-as/simple/package.json @@ -2,7 +2,7 @@ "name": "test-case-simple", "private": true, "dependencies": { - "@polywrap/wasm-as": "0.1.0", + "@polywrap/wasm-as": "0.3.0", "assemblyscript": "0.19.1" } } diff --git a/yarn.lock b/yarn.lock index 0601fe27f9..b86e9a6a6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -173,9 +173,9 @@ semver "^6.3.0" "@babel/generator@^7.18.10", "@babel/generator@^7.4.0", "@babel/generator@^7.9.0": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a" - integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA== + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4" + integrity sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg== dependencies: "@babel/types" "^7.18.10" "@jridgewell/gen-mapping" "^0.3.2" @@ -364,13 +364,13 @@ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-wrap-function@^7.18.9": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.10.tgz#a7fcd3ab9b1be4c9b52cf7d7fdc1e88c2ce93396" - integrity sha512-95NLBP59VWdfK2lyLKe6eTMq9xg+yWKzxzxbJ1wcYNi1Auz200+83fMDADjRxBvc2QQor5zja2yTQzXGhk2GtQ== + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz#bff23ace436e3f6aefb61f85ffae2291c80ed1fb" + integrity sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w== dependencies: "@babel/helper-function-name" "^7.18.9" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.10" + "@babel/traverse" "^7.18.11" "@babel/types" "^7.18.10" "@babel/helpers@^7.18.9", "@babel/helpers@^7.9.0": @@ -391,10 +391,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" - integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.11", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.9.0": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" + integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -924,9 +924,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-constant-elements@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.18.9.tgz#ff6aeedd38f57ba6b41dcf824fcc8bcedb3e783f" - integrity sha512-IrTYh1I3YCEL1trjknnlLKTp5JggjzhKl/d3ibzPc97JhpFcDTr38Jdek/oX4cFbS6By0bXJcOkpRvJ5ZHK2wQ== + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.18.12.tgz#edf3bec47eb98f14e84fa0af137fcc6aad8e0443" + integrity sha512-Q99U9/ttiu+LMnRU8psd23HhvwXmKWDQIpocm0JKaICcZHnw+mdQbHm6xnSy7dOl8I5PELakYtNBubNQlBXbZw== dependencies: "@babel/helper-plugin-utils" "^7.18.9" @@ -1046,9 +1046,9 @@ "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typescript@^7.9.0": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.10.tgz#b23401b32f1f079396bcaed01667a54ebe4f9f85" - integrity sha512-j2HQCJuMbi88QftIb5zlRu3c7PU+sXNnscqsrjqegoGiCgXR569pEdben9vly5QHKL2ilYkfnSwu64zsZo/VYQ== + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.12.tgz#712e9a71b9e00fde9f8c0238e0cceee86ab2f8fd" + integrity sha512-2vjjam0cum0miPkenUbQswKowuxs/NjMwIKEq0zwegRxXk12C9YOF9STXnaUptITOtOJHKHpzvvWYOjbm6tc0w== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.9" "@babel/helper-plugin-utils" "^7.18.9" @@ -1290,10 +1290,10 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08" - integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.11", "@babel/traverse@^7.18.9", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.9.0": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f" + integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ== dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.18.10" @@ -1301,7 +1301,7 @@ "@babel/helper-function-name" "^7.18.9" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.10" + "@babel/parser" "^7.18.11" "@babel/types" "^7.18.10" debug "^4.1.0" globals "^11.1.0" @@ -2266,9 +2266,9 @@ integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + version "0.3.15" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -3518,9 +3518,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.17.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.1.tgz#1a0e73e8c28c7e832656db372b779bfd2ef37314" - integrity sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA== + version "7.18.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.0.tgz#8134fd78cb39567465be65b9fdc16d378095f41f" + integrity sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw== dependencies: "@babel/types" "^7.3.0" @@ -3670,9 +3670,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "18.6.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" - integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== + version "18.7.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.2.tgz#22306626110c459aedd2cdf131c749ec781e3b34" + integrity sha512-ce7MIiaYWCFv6A83oEultwhBXb22fxwNOQf5DIxWA4WXvDQ7K+L0fbWl/YOfCzlR5B/uFkSnVBhPcOfOECcWvA== "@types/node@12.12.26": version "12.12.26" @@ -3695,9 +3695,9 @@ integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== "@types/prettier@^2.0.0", "@types/prettier@^2.6.1": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.4.tgz#ad899dad022bab6b5a9f0a0fe67c2f7a4a8950ed" - integrity sha512-fOwvpvQYStpb/zHMx0Cauwywu9yLDmzWiiQBC7gJyq5tYLUXFZvDG7VK1B7WBxxjBJNKFOZ0zLoOQn8vmATbhw== + version "2.7.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.0.tgz#ea03e9f0376a4446f44797ca19d9c46c36e352dc" + integrity sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A== "@types/prop-types@*": version "15.7.5" @@ -4719,7 +4719,7 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@^2.6.2: +async@^2.6.4: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== @@ -5080,11 +5080,16 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bignumber.js@9.0.2, bignumber.js@^9.0.0: +bignumber.js@9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== +bignumber.js@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== + binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -5615,9 +5620,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001373" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be" - integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ== + version "1.0.30001375" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz#8e73bc3d1a4c800beb39f3163bf0190d7e5d7672" + integrity sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw== capture-exit@^2.0.0: version "2.0.0" @@ -6801,7 +6806,7 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: dependencies: ms "2.1.2" -debug@^3.1.1, debug@^3.2.5, debug@^3.2.7: +debug@^3.2.5, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -7285,9 +7290,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.202: - version "1.4.206" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz#580ff85b54d7ec0c05f20b1e37ea0becdd7b0ee4" - integrity sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA== + version "1.4.218" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.218.tgz#d6b817b5454499a92c85888b42dc2ad075e4493a" + integrity sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -7479,9 +7484,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: - version "0.10.61" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.61.tgz#311de37949ef86b6b0dcea894d1ffedb909d3269" - integrity sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA== + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" @@ -7590,12 +7595,11 @@ eslint-loader@3.0.3: schema-utils "^2.6.1" eslint-module-utils@^2.4.1, eslint-module-utils@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" - integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== dependencies: debug "^3.2.7" - find-up "^2.1.0" eslint-plugin-flowtype@4.6.0: version "4.6.0" @@ -8385,7 +8389,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== @@ -9917,9 +9921,9 @@ is-color-stop@^1.0.0: rgba-regex "^1.0.0" is-core-module@^2.5.0, is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" @@ -12558,7 +12562,7 @@ mkdirp@1.x, mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@~0.5.1: +mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@^0.5.6, mkdirp@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -13308,13 +13312,13 @@ object-visit@^1.0.0: isobject "^3.0.0" object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + version "4.1.3" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f" + integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" object.entries@^1.1.0, object.entries@^1.1.1: @@ -14008,13 +14012,13 @@ pnp-webpack-plugin@1.6.4: ts-pnp "^1.1.6" portfinder@^1.0.25: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== + version "1.0.29" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.29.tgz#d06ff886f4ff91274ed3e25c7e6b0c68d2a0735a" + integrity sha512-Z5+DarHWCKlufshB9Z1pN95oLtANoY5Wn9X3JGELGyQ6VhEcBfT2t+1fGUBq7MwUant6g/mqowH+4HifByPbiQ== dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" + async "^2.6.4" + debug "^3.2.7" + mkdirp "^0.5.6" posix-character-classes@^0.1.0: version "0.1.1" @@ -17406,9 +17410,9 @@ type@^1.0.1: integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== type@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/type/-/type-2.6.1.tgz#808f389ec777205cc3cd97c1c88ec1a913105aae" - integrity sha512-OvgH5rB0XM+iDZGQ1Eg/o7IZn0XYJFVrN/9FQ4OWIYILyJJgVP2s1hLTOFn6UOZoDUI/HctGa0PFlE2n2HW3NQ== + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -17458,9 +17462,9 @@ uint8arrays@^2.0.5, uint8arrays@^2.1.3: multiformats "^9.4.2" uint8arrays@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.0.0.tgz#260869efb8422418b6f04e3fac73a3908175c63b" - integrity sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" + integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== dependencies: multiformats "^9.4.2" @@ -17829,9 +17833,9 @@ vscode-languageserver-types@^3.16.0: integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== vscode-nls@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.1.tgz#ba23fc4d4420d25e7f886c8e83cbdcec47aa48b2" - integrity sha512-hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A== + version "5.1.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.1.0.tgz#443b301a7465d88c81c0f4e1914f9857f0dce1e4" + integrity sha512-37Ha44QrLFwR2IfSSYdOArzUvOyoWbOYTwQC+wS0NfqKjhW7s0WQ1lMy5oJXgSZy9sAiZS5ifELhbpXodeMR8w== vscode-uri@^3.0.3: version "3.0.3" @@ -18627,8 +18631,8 @@ zen-observable@^0.8.0: integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== zone.js@^0.11.0: - version "0.11.7" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.7.tgz#262194267c7b964e8da77ce16b9fba9bea23cfdc" - integrity sha512-e39K2EdK5JfA3FDuUTVRvPlYV4aBfnOOcGuILhQAT7nzeV12uSrLBzImUM9CDVoncDSX4brR/gwqu0heQ3BQ0g== + version "0.11.8" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.8.tgz#40dea9adc1ad007b5effb2bfed17f350f1f46a21" + integrity sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA== dependencies: tslib "^2.3.0" From 6c2dd308b377f9061228d76132cb3d1aacc42c24 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 12 Aug 2022 18:28:16 -0700 Subject: [PATCH 29/56] fix interface manifests --- package.json | 2 +- .../file-system/build-man/wrap.info | Bin 3435 -> 2160 bytes packages/interfaces/ipfs/build-man/wrap.info | Bin 2596 -> 1625 bytes .../interfaces/logger/build-man/wrap.info | Bin 788 -> 473 bytes .../uri-resolver/build-man/wrap.info | Bin 1452 -> 849 bytes .../ethereum/src/wrap-man/wrap.info.ts | 4626 +++++++---------- .../file-system/src/wrap-man/wrap.info.ts | 888 ++-- 7 files changed, 2086 insertions(+), 3430 deletions(-) diff --git a/package.json b/package.json index e9477f2da2..44b5a594b2 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "build:client": "lerna run build --scope @polywrap/client-js --scope @polywrap/react", "build:test-env": "lerna run build --scope @polywrap/test-env-js", "build:cli": "lerna run build --scope polywrap", - "build:plugins:patch": "lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", + "build:plugins:patch": "cd packages/js/plugins/ethereum && yarn codegen:patch && cd ../http && yarn codegen:patch && lerna run codegen:patch --scope @polywrap/*-plugin-js --concurrency 1", "link:interface:deps": "yarn link:manifests && yarn link:schema", "link:manifests": "yarn link:manifests:polywrap && yarn link:manifests:wrap", "link:manifests:polywrap": "cd packages/js/manifests/polywrap && (yarn unlink || true) && yarn link && cd ../../../../dependencies && yarn link @polywrap/polywrap-manifest-types-js && cd ../", diff --git a/packages/interfaces/file-system/build-man/wrap.info b/packages/interfaces/file-system/build-man/wrap.info index c6c06fa1ba3f7897e996e538c821db2e0c68b407..3f7a1fad5137004b4a7e7015f03495f770f8b133 100644 GIT binary patch literal 2160 zcmchYy-ve05XTuh@Em;rL=i%aq$r3=g@LpZj3&8))!G5u0lFc+c3?oPG)WsK-hma~ ziNq!%2_`8LWl7@r?sWg3?|fI|6JQ*>bhNn8@F^njynzQ`4Y>f~i{TMOm!d6vkgk%$s{24aq7Jdl?tN`8M=;EsPL<3&%HMcun1*nM zx!^yO{D<-xH(hrCh{^)eCzRJbg@ZJSprIltBRMg(g1p5oUyf}YFlO3WFn62vi{D!!?S25!JeY4y$YYSNLB`BVu~Sxc*0luUzUtn=IA zOh~51d}O{yhGSf#K)Y{^_Q zK|)1HtVd!C??f`rOf$E{$!gf-V)xCaS` z-w}uX0P%C1z>LH72Nh*V9#eDrNM2+j?z@O{Gz`ZC^+QjXsE7EKR^(kz85TNoufkt8 zyVkWo!REc!h-&3AX>Eo%{x4JwP;S zsNxjLxoQM&jWc-3v4qtFs#<-tG+Z1DNtCICa*S&NH4&z!WXhQWl;u6GIz}&EQ(1mi zy5!QrJOik*12PSRgK2Yt2e%jJW-!a*HDQ+9oPoNLs=`=JMR|L_a#HT?r%GLZmGV}R zNl9|g7&o^pwZd3UQ_IV2+1!n4EFY+;C0}4JCoAViC7)c=zNRzS2xKOE6|2e8SFaRe lG)-Pq#3;J_r}Mkk7zzm_dUy|#4gLUT1CLR6cc-?q`wwp<8esqc diff --git a/packages/interfaces/ipfs/build-man/wrap.info b/packages/interfaces/ipfs/build-man/wrap.info index af4cbeb25808b7c67f890a17fb7835e2de604af3..2b3dd654b2654f3672d0e8bf99499d413569081c 100644 GIT binary patch literal 1625 zcmdT^yKdVs6m0=b`3fRayBKM^bt;0ufQKM~V}HPvcpbB$NQI|` z3CGfE{ zQj~enK35Xjl$&6YO=Oy)FptAQs3y;tAgO*%Mp6+oMp8Kl6^YJX7dVe0xgc|ynt(!* zYovsYNIjo0O%y^hM%vk8(URdc&4ukW#&}%A^I_m9Rk3I|5F<$(NQ7zjP)d#I3hjyOs-`Yk4J}Qak6AsHyc?r%rc?>7K*N4d z-=&h~9IFi1>W}>gulLt`o1z&@s;@tXEFSyUI=Em~0`}$>)OlVl@}DF;N#bktMe%5>czyF-$G49fLpLzEMc&a@NL4JA@EB*VW z1(N#%&_9u{Vul0AP6fP-r~s11N0gDzsF% z8^2Mk1A0rfKigVZW50e-DnW{)u9adrr@Nf{fSDQ44?-pG`mm3MZUOi$y)7V>bRO7E zZrf7R#gk{2B+}f(Q15CfP9ia-ei-p*o8~>%%?d# z_VCs6*g$$Z#o{o^t^H3W*g{OC+-8P@jj|#pZKk^1@(0~oAE}7|6$xgOb+S8DV8g4T znX8j%J%L7e|N1*J?|Dl>^cDtcgy!1GN~;B|=Hmc%nusFPsV1X&L0{0EE$kbpt>%h=Dc@LxJ_w?1rA2wIlLMI4IF=PBC*~v; gwE#J)(kv@MIzT2CPlTAc!Y4o7C$%g!XQHh-0B=?|A^-pY literal 788 zcma))O-{ow5QSN=;2a#FDmN$<1tFD23Lw^QGK4^4m$4J6I~L_ftWv}cnxCdf2!zDi z5?i)t)F?m1ZEsNVw~<{nGfQO*?f326RWEdk38m- z(|xGv8aY8H@S&LQ;a(XQ(@4B&Fn>&&2|*-%Ir2$QrraVPL7D1|Wju{{P_@-pW9>bl z2%LH0JTL>NaY&7m9tw1+qxg%_I42HNz|jB|%aurO9AOfVCDQhz30imlxU6zjq n`p;RBCeus8qe;1XJW@1ivC9siia#$Ovk;KGj3)KkR;~UG+s$M4 diff --git a/packages/interfaces/uri-resolver/build-man/wrap.info b/packages/interfaces/uri-resolver/build-man/wrap.info index 9c8e4b8286502d181769d7a192d173ef097810a5..69a7a52c60e1022c0386383030718e3cd4645759 100644 GIT binary patch delta 270 zcmZ3(eUXi~WqDa@QE_H|-eLni!^w553c`yMlQNrD=O<;QCYOX%7NizWY@U38SyCuF zGcSd4RY6gHL26M+W@_=ImWlqNd`m#WO3R9q6LS)ant>v0U=fzd0*q2{#y2l10g}sn!2*;2F?ut$PWEEbp4`Y}3}gker~z4$ljpFAu@$A3losVp t-p{N9GZ^AXkn^-Tzy_aHV3;h;Vv4Gf9ip*i@_iNwm`1&CGKD>O}-Rvqusv%yVx<8uWhVH7=nk&I2F#;5HQ5`D&4%0T)Q?Xc0zRz(vT2 z3+V*mT2cf%4X-G(x2HaOKA@n$hYyMxoe89@t;$CdX@RjfCWs_RM=tTxh&PEtuxCQt ziL}f#1SZ||T`~mjIbE>pN`4)W=eQOzJ_-bIrD5VO8ZZ`OKsFRJrAz>}NE3KJnafrl z_n&fD-`}X~dnlHj6hO Date: Fri, 12 Aug 2022 18:41:51 -0700 Subject: [PATCH 30/56] fix uri-resolver tests --- .../uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts | 1 + .../uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts index b0e927da79..cc9d9b047e 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/__tests__/e2e.spec.ts @@ -76,6 +76,7 @@ describe("ENS Resolver Plugin", () => { expect(resolution.wrapper).toBeTruthy(); const manifest = await resolution.wrapper?.getManifest( + {}, client ); diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts index d93fd49875..27b08549f9 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts @@ -51,7 +51,7 @@ describe("IPFS Plugin", () => { expect(resolution.wrapper).toBeTruthy(); - const info = await resolution.wrapper?.getManifest(client); + const info = await resolution.wrapper?.getManifest({}, client); expect(info?.name).toBe("SimpleStorage"); }); }); From 43b0b3113a14e9c95eaa2bf46052f0458b6f9df8 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 12 Aug 2022 19:16:27 -0700 Subject: [PATCH 31/56] fix bind test --- .../bind/sanity/output/plugin-ts/wrap.info.ts | 2734 ++++++----------- 1 file changed, 876 insertions(+), 1858 deletions(-) diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index 24647467bc..719c71bfce 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -10,8 +10,6 @@ export const wrapManifest: WrapManifest = { "objectTypes": [ { "type": "CustomType", - "name": null, - "required": null, "kind": 1, "properties": [ { @@ -19,357 +17,238 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optStr", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStr", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt", "name": "u", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "u", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt", "name": "optU", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "optU", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt8", "name": "u8", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt8", "name": "u8", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt16", "name": "u16", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt16", "name": "u16", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "u32", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "u32", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Int", "name": "i", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "i", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Int8", "name": "i8", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int8", "name": "i8", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Int16", "name": "i16", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int16", "name": "i16", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Int32", "name": "i32", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int32", "name": "i32", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "bigint", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "bigint", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "optBigint", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "optBigint", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigNumber", "name": "bignumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigNumber", "name": "bignumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigNumber", "name": "optBignumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigNumber", "name": "optBignumber", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "JSON", "name": "json", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "JSON", "name": "json", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "JSON", "name": "optJson", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "JSON", "name": "optJson", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "bytes", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "bytes", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "optBytes", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "optBytes", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "boolean", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "boolean", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "optBoolean", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "optBoolean", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[UInt]", @@ -381,131 +260,81 @@ export const wrapManifest: WrapManifest = { "name": "uArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "uArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt", "name": "uArray", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[UInt]", "name": "uOptArray", - "required": null, "kind": 34, "array": { "type": "[UInt]", "name": "uOptArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "uOptArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt", "name": "uOptArray", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[UInt]", "name": "optUOptArray", - "required": null, "kind": 34, "array": { "type": "[UInt]", "name": "optUOptArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "optUOptArray", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt", "name": "optUOptArray", - "required": null, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "optStrOptArray", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "optStrOptArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStrOptArray", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "optStrOptArray", - "required": null, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[[UInt]]", @@ -522,17 +351,12 @@ export const wrapManifest: WrapManifest = { "name": "uArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "uArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt", "name": "uArrayArray", @@ -540,27 +364,17 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt]", "name": "uArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "uArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt", "name": "uArrayArray", @@ -568,12 +382,7 @@ export const wrapManifest: WrapManifest = { "kind": 4 } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[[UInt32]]", @@ -588,60 +397,34 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[UInt32]", "name": "uOptArrayOptArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uOptArrayOptArray", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uOptArrayOptArray", - "required": null, "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "uOptArrayOptArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uOptArrayOptArray", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uOptArrayOptArray", - "required": null, "kind": 4 } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[[[UInt32]]]", @@ -656,24 +439,18 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[[UInt32]]", "name": "uArrayOptArrayArray", - "required": null, "kind": 18, "array": { "type": "[UInt32]", "name": "uArrayOptArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uArrayOptArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uArrayOptArrayArray", @@ -681,27 +458,17 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "uArrayOptArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uArrayOptArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uArrayOptArrayArray", @@ -710,32 +477,21 @@ export const wrapManifest: WrapManifest = { } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[[UInt32]]", "name": "uArrayOptArrayArray", - "required": null, "kind": 18, "array": { "type": "[UInt32]", "name": "uArrayOptArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uArrayOptArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uArrayOptArrayArray", @@ -743,27 +499,17 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "uArrayOptArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "uArrayOptArrayArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "uArrayOptArrayArray", @@ -772,27 +518,19 @@ export const wrapManifest: WrapManifest = { } } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[[[[UInt32]]]]", "name": "crazyArray", - "required": null, "kind": 34, "array": { "type": "[[[[UInt32]]]]", "name": "crazyArray", - "required": null, "kind": 18, "array": { "type": "[[[UInt32]]]", "name": "crazyArray", - "required": null, "kind": 18, "array": { "type": "[[UInt32]]", @@ -802,19 +540,13 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -822,27 +554,16 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -851,11 +572,6 @@ export const wrapManifest: WrapManifest = { } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[[UInt32]]", "name": "crazyArray", @@ -864,19 +580,13 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -884,27 +594,16 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -914,15 +613,9 @@ export const wrapManifest: WrapManifest = { } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[[[UInt32]]]", "name": "crazyArray", - "required": null, "kind": 18, "array": { "type": "[[UInt32]]", @@ -932,19 +625,13 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -952,27 +639,16 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -981,11 +657,6 @@ export const wrapManifest: WrapManifest = { } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[[UInt32]]", "name": "crazyArray", @@ -994,19 +665,13 @@ export const wrapManifest: WrapManifest = { "array": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -1014,27 +679,16 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "[UInt32]", "name": "crazyArray", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "crazyArray", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "UInt32", "name": "crazyArray", @@ -1044,46 +698,29 @@ export const wrapManifest: WrapManifest = { } } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "AnotherType", "name": "object", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "object", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "AnotherType", "name": "optObject", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "optObject", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[AnotherType]", @@ -1095,97 +732,61 @@ export const wrapManifest: WrapManifest = { "name": "objectArray", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "objectArray", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "AnotherType", "name": "objectArray", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[AnotherType]", "name": "optObjectArray", - "required": null, "kind": 34, "array": { "type": "[AnotherType]", "name": "optObjectArray", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "optObjectArray", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "AnotherType", "name": "optObjectArray", - "required": null, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "CustomEnum", "name": "en", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, "enum": { "type": "CustomEnum", "name": "en", "required": true, "kind": 16384 - }, - "unresolvedObjectOrEnum": null + } }, { "type": "CustomEnum", "name": "optEnum", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, "enum": { "type": "CustomEnum", "name": "optEnum", - "required": null, "kind": 16384 - }, - "unresolvedObjectOrEnum": null + } }, { "type": "[CustomEnum]", @@ -1197,86 +798,56 @@ export const wrapManifest: WrapManifest = { "name": "enumArray", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, "enum": { "type": "CustomEnum", "name": "enumArray", "required": true, "kind": 16384 }, - "unresolvedObjectOrEnum": null, "item": { "type": "CustomEnum", "name": "enumArray", "required": true, "kind": 16384 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[CustomEnum]", "name": "optEnumArray", - "required": null, "kind": 34, "array": { "type": "[CustomEnum]", "name": "optEnumArray", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, "enum": { "type": "CustomEnum", "name": "optEnumArray", - "required": null, "kind": 16384 }, - "unresolvedObjectOrEnum": null, "item": { "type": "CustomEnum", "name": "optEnumArray", - "required": null, "kind": 16384 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Map", "name": "map", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "map", "required": true, "kind": 262146, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "map", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "map", @@ -1289,18 +860,13 @@ export const wrapManifest: WrapManifest = { "required": true, "kind": 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Map", "name": "mapOfArr", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "mapOfArr", @@ -1311,17 +877,12 @@ export const wrapManifest: WrapManifest = { "name": "mapOfArr", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "mapOfArr", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Int", "name": "mapOfArr", @@ -1329,11 +890,6 @@ export const wrapManifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "mapOfArr", @@ -1345,17 +901,12 @@ export const wrapManifest: WrapManifest = { "name": "mapOfArr", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "mapOfArr", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Int", "name": "mapOfArr", @@ -1363,34 +914,24 @@ export const wrapManifest: WrapManifest = { "kind": 4 } } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Map", "name": "mapOfObj", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "mapOfObj", "required": true, "kind": 262146, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "mapOfObj", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "mapOfObj", @@ -1403,18 +944,13 @@ export const wrapManifest: WrapManifest = { "required": true, "kind": 8192 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Map", "name": "mapOfArrOfObj", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "mapOfArrOfObj", @@ -1425,17 +961,12 @@ export const wrapManifest: WrapManifest = { "name": "mapOfArrOfObj", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "mapOfArrOfObj", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "AnotherType", "name": "mapOfArrOfObj", @@ -1443,11 +974,6 @@ export const wrapManifest: WrapManifest = { "kind": 8192 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "mapOfArrOfObj", @@ -1459,17 +985,12 @@ export const wrapManifest: WrapManifest = { "name": "mapOfArrOfObj", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "AnotherType", "name": "mapOfArrOfObj", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "AnotherType", "name": "mapOfArrOfObj", @@ -1477,1514 +998,1038 @@ export const wrapManifest: WrapManifest = { "kind": 8192 } } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, { "type": "AnotherType", - "name": null, - "required": null, "kind": 1, "properties": [ { "type": "String", "name": "prop", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "prop", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "CustomType", "name": "circular", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "CustomType", "name": "circular", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "const", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "const", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] - } - ], - "enumTypes": [ - { - "type": "CustomEnum", - "name": null, - "required": null, - "kind": 8, - "constants": [ - "STRING", - "BYTES" ] } ], - "interfaceTypes": [ - { - "type": "TestImport", - "name": null, - "required": null, - "kind": 32768, - "namespace": "TestImport", - "uri": "testimport.uri.eth", - "nativeType": "Interface", - "capabilities": { - "getImplementations": { - "enabled": true - } - } - } - ], - "importedObjectTypes": [ - { - "type": "TestImport_Object", - "name": null, - "required": null, - "kind": 1025, - "properties": [ - { - "type": "TestImport_AnotherObject", - "name": "object", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_AnotherObject", - "name": "object", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_AnotherObject", - "name": "optObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_AnotherObject", - "name": "optObject", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_AnotherObject]", - "name": "objectArray", - "required": true, - "kind": 34, - "array": { - "type": "[TestImport_AnotherObject]", - "name": "objectArray", + "moduleType": { + "type": "Module", + "kind": 128, + "methods": [ + { + "type": "Method", + "name": "moduleMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "String", + "name": "str", "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_AnotherObject", - "name": "objectArray", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "TestImport_AnotherObject", - "name": "objectArray", + "kind": 34, + "scalar": { + "type": "String", + "name": "str", "required": true, - "kind": 8192 + "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_AnotherObject]", - "name": "optObjectArray", - "required": null, - "kind": 34, - "array": { - "type": "[TestImport_AnotherObject]", - "name": "optObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_AnotherObject", - "name": "optObjectArray", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "TestImport_AnotherObject", - "name": "optObjectArray", - "required": null, - "kind": 8192 + { + "type": "String", + "name": "optStr", + "kind": 34, + "scalar": { + "type": "String", + "name": "optStr", + "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Enum", - "name": "en", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", + { + "type": "CustomEnum", "name": "en", "required": true, - "kind": 16384 + "kind": 34, + "enum": { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 16384 + } }, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Enum", - "name": "optEnum", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", + { + "type": "CustomEnum", "name": "optEnum", - "required": null, - "kind": 16384 + "kind": 34, + "enum": { + "type": "CustomEnum", + "name": "optEnum", + "kind": 16384 + } }, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Enum]", - "name": "enumArray", - "required": true, - "kind": 34, - "array": { - "type": "[TestImport_Enum]", + { + "type": "[CustomEnum]", "name": "enumArray", "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", + "kind": 34, + "array": { + "type": "[CustomEnum]", "name": "enumArray", "required": true, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null, - "item": { - "type": "TestImport_Enum", - "name": "enumArray", - "required": true, - "kind": 16384 + "kind": 18, + "enum": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "item": { + "type": "CustomEnum", + "name": "enumArray", + "required": true, + "kind": 16384 + } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "required": null, - "kind": 34, - "array": { - "type": "[TestImport_Enum]", + { + "type": "[CustomEnum]", "name": "optEnumArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", - "name": "optEnumArray", - "required": null, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null, - "item": { - "type": "TestImport_Enum", + "kind": 34, + "array": { + "type": "[CustomEnum]", "name": "optEnumArray", - "required": null, - "kind": 16384 + "kind": 18, + "enum": { + "type": "CustomEnum", + "name": "optEnumArray", + "kind": 16384 + }, + "item": { + "type": "CustomEnum", + "name": "optEnumArray", + "kind": 16384 + } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "interfaces": [], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Object" - }, - { - "type": "TestImport_AnotherObject", - "name": null, - "required": null, - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "prop", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "prop", + { + "type": "Map", + "name": "map", "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "interfaces": [], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "AnotherObject" - } - ], - "importedModuleTypes": [ - { - "type": "TestImport_Module", - "name": null, - "required": null, - "kind": 256, - "methods": [ - { - "type": "Method", - "name": "importedMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "str", + "kind": 34, + "map": { + "type": "Map", + "name": "map", "required": true, - "kind": 34, - "array": null, - "map": null, + "kind": 262146, "scalar": { - "type": "String", - "name": "str", + "type": "Int", + "name": "map", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "String", - "name": "optStr", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { + "key": { "type": "String", - "name": "optStr", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "UInt", - "name": "u", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "u", + "name": "map", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "UInt", - "name": "optU", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "optU", - "required": null, + "value": { + "type": "Int", + "name": "map", + "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[[UInt]]", - "name": "uArrayArray", + } + } + }, + { + "type": "Map", + "name": "mapOfArr", + "required": true, + "kind": 34, + "map": { + "type": "Map", + "name": "mapOfArr", "required": true, - "kind": 34, + "kind": 262146, "array": { - "type": "[[UInt]]", - "name": "uArrayArray", + "type": "[Int]", + "name": "mapOfArr", "required": true, "kind": 18, - "array": { - "type": "[UInt]", - "name": "uArrayArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 - } + "scalar": { + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { - "type": "[UInt]", - "name": "uArrayArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 - } + "type": "Int", + "name": "mapOfArr", + "required": true, + "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Object", - "name": "object", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_Object", - "name": "object", + "key": { + "type": "String", + "name": "mapOfArr", "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Object", - "name": "optObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_Object", - "name": "optObject", - "required": null, - "kind": 8192 + "kind": 4 }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Object]", - "name": "objectArray", - "required": true, - "kind": 34, - "array": { - "type": "[TestImport_Object]", - "name": "objectArray", + "value": { + "type": "[Int]", + "name": "mapOfArr", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_Object", - "name": "objectArray", + "scalar": { + "type": "Int", + "name": "mapOfArr", "required": true, - "kind": 8192 + "kind": 4 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { - "type": "TestImport_Object", - "name": "objectArray", + "type": "Int", + "name": "mapOfArr", "required": true, - "kind": 8192 + "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Object]", - "name": "optObjectArray", - "required": null, - "kind": 34, - "array": { - "type": "[TestImport_Object]", - "name": "optObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "TestImport_Object", - "name": "optObjectArray", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "TestImport_Object", - "name": "optObjectArray", - "required": null, - "kind": 8192 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Enum", - "name": "en", + } + } + }, + { + "type": "Map", + "name": "mapOfObj", + "required": true, + "kind": 34, + "map": { + "type": "Map", + "name": "mapOfObj", "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", - "name": "en", + "kind": 262146, + "object": { + "type": "AnotherType", + "name": "mapOfObj", "required": true, - "kind": 16384 + "kind": 8192 }, - "unresolvedObjectOrEnum": null - }, - { - "type": "TestImport_Enum", - "name": "optEnum", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", - "name": "optEnum", - "required": null, - "kind": 16384 + "key": { + "type": "String", + "name": "mapOfObj", + "required": true, + "kind": 4 }, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Enum]", - "name": "enumArray", + "value": { + "type": "AnotherType", + "name": "mapOfObj", + "required": true, + "kind": 8192 + } + } + }, + { + "type": "Map", + "name": "mapOfArrOfObj", + "required": true, + "kind": 34, + "map": { + "type": "Map", + "name": "mapOfArrOfObj", "required": true, - "kind": 34, + "kind": 262146, "array": { - "type": "[TestImport_Enum]", - "name": "enumArray", + "type": "[AnotherType]", + "name": "mapOfArrOfObj", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", - "name": "enumArray", + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", "required": true, - "kind": 16384 + "kind": 8192 }, - "unresolvedObjectOrEnum": null, "item": { - "type": "TestImport_Enum", - "name": "enumArray", + "type": "AnotherType", + "name": "mapOfArrOfObj", "required": true, - "kind": 16384 + "kind": 8192 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "required": null, - "kind": 34, - "array": { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "required": null, + "key": { + "type": "String", + "name": "mapOfArrOfObj", + "required": true, + "kind": 4 + }, + "value": { + "type": "[AnotherType]", + "name": "mapOfArrOfObj", + "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "TestImport_Enum", - "name": "optEnumArray", - "required": null, - "kind": 16384 + "object": { + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 }, - "unresolvedObjectOrEnum": null, "item": { - "type": "TestImport_Enum", - "name": "optEnumArray", - "required": null, - "kind": 16384 + "type": "AnotherType", + "name": "mapOfArrOfObj", + "required": true, + "kind": 8192 } + } + } + } + ], + "return": { + "type": "Int", + "name": "moduleMethod", + "required": true, + "kind": 34, + "scalar": { + "type": "Int", + "name": "moduleMethod", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Method", + "name": "objectMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "object": { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 8192 + } + }, + { + "type": "AnotherType", + "name": "optObject", + "kind": 34, + "object": { + "type": "AnotherType", + "name": "optObject", + "kind": 8192 + } + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 18, + "object": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + "item": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + } } - ], - "return": { - "type": "TestImport_Object", - "name": "importedMethod", - "required": null, + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 18, + "object": { + "type": "AnotherType", + "name": "optObjectArray", + "kind": 8192 + }, + "item": { + "type": "AnotherType", + "name": "optObjectArray", + "kind": 8192 + } + } + } + ], + "return": { + "type": "AnotherType", + "name": "objectMethod", + "kind": 34, + "object": { + "type": "AnotherType", + "name": "objectMethod", + "kind": 8192 + } + }, + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "optionalEnvMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { - "type": "TestImport_Object", - "name": "importedMethod", - "required": null, + "type": "AnotherType", + "name": "object", + "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, - "env": { - "required": true + { + "type": "AnotherType", + "name": "optObject", + "kind": 34, + "object": { + "type": "AnotherType", + "name": "optObject", + "kind": 8192 + } + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 18, + "object": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "item": { + "type": "AnotherType", + "name": "objectArray", + "required": true, + "kind": 8192 + } + } + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 34, + "array": { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 18, + "object": { + "type": "AnotherType", + "name": "optObjectArray", + "kind": 8192 + }, + "item": { + "type": "AnotherType", + "name": "optObjectArray", + "kind": 8192 + } + } + } + ], + "return": { + "type": "AnotherType", + "name": "optionalEnvMethod", + "kind": 34, + "object": { + "type": "AnotherType", + "name": "optionalEnvMethod", + "kind": 8192 + } + }, + "env": { + "required": false + } + } + ], + "imports": [ + { + "type": "TestImport_Module" + }, + { + "type": "TestImport_Object" + }, + { + "type": "TestImport_AnotherObject" + }, + { + "type": "TestImport_Enum" + } + ] + }, + "enumTypes": [ + { + "type": "CustomEnum", + "kind": 8, + "constants": [ + "STRING", + "BYTES" + ] + } + ], + "interfaceTypes": [ + { + "type": "TestImport", + "kind": 32768, + "namespace": "TestImport", + "uri": "testimport.uri.eth", + "nativeType": "Interface", + "capabilities": { + "getImplementations": { + "enabled": true + } + } + } + ], + "importedObjectTypes": [ + { + "type": "TestImport_Object", + "kind": 1025, + "properties": [ + { + "type": "TestImport_AnotherObject", + "name": "object", + "required": true, + "kind": 34, + "object": { + "type": "TestImport_AnotherObject", + "name": "object", + "required": true, + "kind": 8192 + } + }, + { + "type": "TestImport_AnotherObject", + "name": "optObject", + "kind": 34, + "object": { + "type": "TestImport_AnotherObject", + "name": "optObject", + "kind": 8192 + } + }, + { + "type": "[TestImport_AnotherObject]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_AnotherObject]", + "name": "objectArray", + "required": true, + "kind": 18, + "object": { + "type": "TestImport_AnotherObject", + "name": "objectArray", + "required": true, + "kind": 8192 + }, + "item": { + "type": "TestImport_AnotherObject", + "name": "objectArray", + "required": true, + "kind": 8192 + } + } + }, + { + "type": "[TestImport_AnotherObject]", + "name": "optObjectArray", + "kind": 34, + "array": { + "type": "[TestImport_AnotherObject]", + "name": "optObjectArray", + "kind": 18, + "object": { + "type": "TestImport_AnotherObject", + "name": "optObjectArray", + "kind": 8192 + }, + "item": { + "type": "TestImport_AnotherObject", + "name": "optObjectArray", + "kind": 8192 + } + } + }, + { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 34, + "enum": { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 16384 + } + }, + { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 34, + "enum": { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 16384 + } + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 18, + "enum": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "item": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + } } }, { - "type": "Method", - "name": "anotherMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "Int32", - "name": "anotherMethod", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int32", - "name": "anotherMethod", - "required": true, - "kind": 4 + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 18, + "enum": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "kind": 16384 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + "item": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "kind": 16384 + } } } ], "uri": "testimport.uri.eth", "namespace": "TestImport", - "nativeType": "Module", - "isInterface": true - } - ], - "importedEnumTypes": [ - { - "type": "TestImport_Enum", - "name": null, - "required": null, - "kind": 520, - "constants": [ - "STRING", - "BYTES" - ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Enum" - } - ], - "importedEnvTypes": [ + "nativeType": "Object" + }, { - "type": "TestImport_Env", - "name": null, - "required": null, - "kind": 524288, + "type": "TestImport_AnotherObject", + "kind": 1025, "properties": [ { "type": "String", - "name": "enviroProp", + "name": "prop", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", - "name": "enviroProp", + "name": "prop", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "testimport.uri.eth", "namespace": "TestImport", - "nativeType": "Env" + "nativeType": "AnotherObject" } ], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ - { - "type": "Method", - "name": "moduleMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { + "importedModuleTypes": [ + { + "type": "TestImport_Module", + "kind": 256, + "methods": [ + { + "type": "Method", + "name": "importedMethod", + "required": true, + "kind": 64, + "arguments": [ + { "type": "String", "name": "str", "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "String", - "name": "optStr", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "optStr", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "CustomEnum", - "name": "en", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "en", - "required": true, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null - }, - { - "type": "CustomEnum", - "name": "optEnum", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "optEnum", - "required": null, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null - }, - { - "type": "[CustomEnum]", - "name": "enumArray", - "required": true, - "kind": 34, - "array": { - "type": "[CustomEnum]", - "name": "enumArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "enumArray", - "required": true, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null, - "item": { - "type": "CustomEnum", - "name": "enumArray", - "required": true, - "kind": 16384 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[CustomEnum]", - "name": "optEnumArray", - "required": null, - "kind": 34, - "array": { - "type": "[CustomEnum]", - "name": "optEnumArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "optEnumArray", - "required": null, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null, - "item": { - "type": "CustomEnum", - "name": "optEnumArray", - "required": null, - "kind": 16384 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "Map", - "name": "map", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "map", - "required": true, - "kind": 262146, - "array": null, - "map": null, + "kind": 34, "scalar": { - "type": "Int", - "name": "map", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { "type": "String", - "name": "map", - "required": true, - "kind": 4 - }, - "value": { - "type": "Int", - "name": "map", + "name": "str", "required": true, "kind": 4 } }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "Map", - "name": "mapOfArr", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "mapOfArr", - "required": true, - "kind": 262146, - "array": { - "type": "[Int]", - "name": "mapOfArr", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { + { + "type": "String", + "name": "optStr", + "kind": 34, + "scalar": { "type": "String", - "name": "mapOfArr", + "name": "optStr", + "kind": 4 + } + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "scalar": { + "type": "UInt", + "name": "u", "required": true, "kind": 4 - }, - "value": { - "type": "[Int]", - "name": "mapOfArr", + } + }, + { + "type": "UInt", + "name": "optU", + "kind": 34, + "scalar": { + "type": "UInt", + "name": "optU", + "kind": 4 + } + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "type": "[[UInt]]", + "name": "uArrayArray", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 + "array": { + "type": "[UInt]", + "name": "uArrayArray", + "kind": 18, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "kind": 4 + }, + "item": { + "type": "UInt", + "name": "uArrayArray", + "kind": 4 + } }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 + "type": "[UInt]", + "name": "uArrayArray", + "kind": 18, + "scalar": { + "type": "UInt", + "name": "uArrayArray", + "kind": 4 + }, + "item": { + "type": "UInt", + "name": "uArrayArray", + "kind": 4 + } } } }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "Map", - "name": "mapOfObj", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "mapOfObj", + { + "type": "TestImport_Object", + "name": "object", "required": true, - "kind": 262146, - "array": null, - "map": null, - "scalar": null, + "kind": 34, "object": { - "type": "AnotherType", - "name": "mapOfObj", + "type": "TestImport_Object", + "name": "object", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "mapOfObj", - "required": true, - "kind": 4 - }, - "value": { - "type": "AnotherType", - "name": "mapOfObj", - "required": true, + } + }, + { + "type": "TestImport_Object", + "name": "optObject", + "kind": 34, + "object": { + "type": "TestImport_Object", + "name": "optObject", "kind": 8192 } }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "Map", - "name": "mapOfArrOfObj", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "mapOfArrOfObj", + { + "type": "[TestImport_Object]", + "name": "objectArray", "required": true, - "kind": 262146, + "kind": 34, "array": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", + "type": "[TestImport_Object]", + "name": "objectArray", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", + "type": "TestImport_Object", + "name": "objectArray", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", + "type": "TestImport_Object", + "name": "objectArray", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "mapOfArrOfObj", - "required": true, - "kind": 4 - }, - "value": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", - "required": true, + } + }, + { + "type": "[TestImport_Object]", + "name": "optObjectArray", + "kind": 34, + "array": { + "type": "[TestImport_Object]", + "name": "optObjectArray", "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, + "type": "TestImport_Object", + "name": "optObjectArray", "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, + "type": "TestImport_Object", + "name": "optObjectArray", "kind": 8192 } } }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "Int", - "name": "moduleMethod", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "moduleMethod", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "objectMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "AnotherType", - "name": "optObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "optObject", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "objectArray", + { + "type": "TestImport_Enum", + "name": "en", "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "objectArray", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "AnotherType", - "name": "objectArray", + "kind": 34, + "enum": { + "type": "TestImport_Enum", + "name": "en", "required": true, - "kind": 8192 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[AnotherType]", - "name": "optObjectArray", - "required": null, - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "optObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "optObjectArray", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "AnotherType", - "name": "optObjectArray", - "required": null, - "kind": 8192 + "kind": 16384 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "AnotherType", - "name": "objectMethod", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "objectMethod", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - "env": { - "required": true - } - }, - { - "type": "Method", - "name": "optionalEnvMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "object", + { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 34, + "enum": { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 16384 + } + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", "required": true, - "kind": 8192 + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 18, + "enum": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + }, + "item": { + "type": "TestImport_Enum", + "name": "enumArray", + "required": true, + "kind": 16384 + } + } }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "AnotherType", - "name": "optObject", - "required": null, + { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 18, + "enum": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "kind": 16384 + }, + "item": { + "type": "TestImport_Enum", + "name": "optEnumArray", + "kind": 16384 + } + } + } + ], + "return": { + "type": "TestImport_Object", + "name": "importedMethod", "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { - "type": "AnotherType", - "name": "optObject", - "required": null, + "type": "TestImport_Object", + "name": "importedMethod", "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, - { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "objectArray", + "env": { + "required": true + } + }, + { + "type": "Method", + "name": "anotherMethod", + "required": true, + "kind": 64, + "arguments": [ + { + "type": "[String]", + "name": "arg", "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "objectArray", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "AnotherType", - "name": "objectArray", + "kind": 34, + "array": { + "type": "[String]", + "name": "arg", "required": true, - "kind": 8192 + "kind": 18, + "scalar": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + }, + "item": { + "type": "String", + "name": "arg", + "required": true, + "kind": 4 + } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - }, - { - "type": "[AnotherType]", - "name": "optObjectArray", - "required": null, + } + ], + "return": { + "type": "Int32", + "name": "anotherMethod", + "required": true, "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "optObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "optObjectArray", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "AnotherType", - "name": "optObjectArray", - "required": null, - "kind": 8192 - } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + "scalar": { + "type": "Int32", + "name": "anotherMethod", + "required": true, + "kind": 4 + } } - ], - "return": { - "type": "AnotherType", - "name": "optionalEnvMethod", - "required": null, + } + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Module", + "isInterface": true + } + ], + "importedEnumTypes": [ + { + "type": "TestImport_Enum", + "kind": 520, + "constants": [ + "STRING", + "BYTES" + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Enum" + } + ], + "importedEnvTypes": [ + { + "type": "TestImport_Env", + "kind": 524288, + "properties": [ + { + "type": "String", + "name": "enviroProp", + "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "AnotherType", - "name": "optionalEnvMethod", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null - }, - "env": { - "required": false + "scalar": { + "type": "String", + "name": "enviroProp", + "required": true, + "kind": 4 + } } - } - ], - "imports": [ - { - "type": "TestImport_Module" - }, - { - "type": "TestImport_Object" - }, - { - "type": "TestImport_AnotherObject" - }, - { - "type": "TestImport_Enum" - } - ], - "interfaces": [] - }, + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Env" + } + ], "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -2992,57 +2037,36 @@ export const wrapManifest: WrapManifest = { "name": "prop", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "prop", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optProp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optProp", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Map", "name": "optMap", - "required": null, "kind": 34, - "array": null, "map": { "type": "Map", "name": "optMap", - "required": null, "kind": 262146, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "optMap", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "optMap", @@ -3052,17 +2076,11 @@ export const wrapManifest: WrapManifest = { "value": { "type": "Int", "name": "optMap", - "required": null, "kind": 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } } } From 4d96d814fb19f66a85ae1673544a019d8f33c40d Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Sun, 14 Aug 2022 22:58:27 -0700 Subject: [PATCH 32/56] type + optimize WrapAbi definitions --- .../wasm/codegen/004-custom-config/config.ts | 47 +- .../imports-ext/external.eth/module.ts | 58 +- .../imports-ext/external.eth/module.ts | 25 +- .../imports-ext/external.eth/module.ts | 88 +- .../imports-ext/external.eth/module.ts | 20 +- .../imports-ext/base.eth/module.ts | 33 +- .../imports-ext/derived.eth/module.ts | 33 +- .../imports-ext/external.eth/module.ts | 62 +- .../imports-ext/base.eth/module.ts | 276 +- .../imports-ext/derived.eth/module.ts | 279 +- .../imports-ext/just.module.eth/module.ts | 137 +- .../imports-ext/test-interface.eth/module.ts | 405 ++- .../sanity/imports-ext/test.eth/module.ts | 2355 +++++++---------- 13 files changed, 1401 insertions(+), 2417 deletions(-) diff --git a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts index 3c43ba8f48..4466a4b444 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts @@ -1,6 +1,6 @@ import { PolywrapClientConfig } from "@polywrap/client-js"; import { PluginModule } from "@polywrap/core-js"; -import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { latestWrapManifestVersion, WrapManifest, WrapAbi } from "@polywrap/wrap-manifest-types-js"; interface Config extends Record { val: number; @@ -47,18 +47,9 @@ export function getClientConfig(defaultConfigs: Partial) { return defaultConfigs; } -const abi = { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], +const abi: WrapAbi = { "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -72,17 +63,12 @@ const abi = { "name": "getData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "getData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -96,17 +82,12 @@ const abi = { "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -114,17 +95,12 @@ const abi = { "name": "setData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "setData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -138,21 +114,14 @@ const abi = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } - ], - "imports": [], - "interfaces": [] + ] } -} \ No newline at end of file +}; diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts index 16ee56680d..ce2aea1607 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts @@ -1,27 +1,20 @@ -export const abi = { +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "objectTypes": [ { "type": "ExternalType", - "name": null, - "required": null, "kind": 1, "properties": [ { "type": "String", "name": "str", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "interfaces": [] @@ -35,34 +28,23 @@ export const abi = { "importedEnvTypes": [], "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { "type": "ExternalType", "name": "externalProp", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "ExternalType", "name": "externalProp", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "interfaces": [] }, "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -76,17 +58,12 @@ export const abi = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -94,17 +71,12 @@ export const abi = { "name": "envMethod", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "envMethod", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, "env": { "required": true @@ -121,17 +93,12 @@ export const abi = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -139,17 +106,12 @@ export const abi = { "name": "optEnvMethod", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optEnvMethod", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, "env": { "required": false @@ -159,4 +121,4 @@ export const abi = { "imports": [], "interfaces": [] } -} \ No newline at end of file +}; diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts index f05fcdf107..e9da7d9665 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts @@ -1,36 +1,23 @@ -export const abi = { +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "objectTypes": [ { "type": "ExternalType", - "name": null, - "required": null, "kind": 1, "properties": [ { "type": "String", "name": "str", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "interfaces": [] } - ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [] -} \ No newline at end of file + ] +}; diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts index 39616e5e50..de3a212c51 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts @@ -1,94 +1,58 @@ -export const abi = { +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "objectTypes": [ { "type": "ExternalType", - "name": null, - "required": null, "kind": 1, "properties": [ { "type": "String", "name": "str", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, { "type": "ExternalType2", - "name": null, - "required": null, "kind": 1, "properties": [ { "type": "UInt32", "name": "foo", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "foo", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { "type": "ExternalType", "name": "externalProp", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "ExternalType", "name": "externalProp", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -102,17 +66,12 @@ export const abi = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -120,17 +79,12 @@ export const abi = { "name": "envMethod", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "envMethod", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, "env": { "required": true @@ -147,17 +101,12 @@ export const abi = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -165,24 +114,17 @@ export const abi = { "name": "optEnvMethod", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optEnvMethod", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, "env": { "required": false } } - ], - "imports": [], - "interfaces": [] + ] } -} \ No newline at end of file +}; diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts index 5a06c5abeb..710caf9409 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts @@ -1,18 +1,8 @@ -export const abi = { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "moduleType": { "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [], - "imports": [], - "interfaces": [] + "kind": 128 } -} \ No newline at end of file +}; diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts index 7b0f1cc51c..3074c957af 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -1,39 +1,20 @@ -export const abi = { +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "objectTypes": [ { "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 1, - "properties": [], - "interfaces": [] + "kind": 1 }, { "type": "ImportedDerivedType", - "name": null, - "required": null, "kind": 1, - "properties": [], "interfaces": [ { "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + "kind": 2048 } ] } - ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [] -} \ No newline at end of file + ] +}; diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts index 7b0f1cc51c..3074c957af 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -1,39 +1,20 @@ -export const abi = { +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "objectTypes": [ { "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 1, - "properties": [], - "interfaces": [] + "kind": 1 }, { "type": "ImportedDerivedType", - "name": null, - "required": null, "kind": 1, - "properties": [], "interfaces": [ { "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + "kind": 2048 } ] } - ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [] -} \ No newline at end of file + ] +}; diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts index ef7eab4659..7417995143 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts @@ -1,15 +1,8 @@ -export const abi = { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -17,29 +10,21 @@ export const abi = { "name": "getMap", "required": true, "kind": 64, - "arguments": [], "return": { "type": "Map", "name": "getMap", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "getMap", "required": true, "kind": 262146, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "getMap", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "getMap", @@ -49,14 +34,9 @@ export const abi = { "value": { "type": "Int", "name": "getMap", - "required": null, "kind": 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -70,23 +50,16 @@ export const abi = { "name": "map", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "map", "required": true, "kind": 262146, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "map", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "map", @@ -96,14 +69,9 @@ export const abi = { "value": { "type": "Int", "name": "map", - "required": null, "kind": 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -111,23 +79,16 @@ export const abi = { "name": "updateMap", "required": true, "kind": 34, - "array": null, "map": { "type": "Map", "name": "updateMap", "required": true, "kind": 262146, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "updateMap", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "key": { "type": "String", "name": "updateMap", @@ -137,18 +98,11 @@ export const abi = { "value": { "type": "Int", "name": "updateMap", - "required": null, "kind": 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } - ], - "imports": [], - "interfaces": [] + ] } -} \ No newline at end of file +}; diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts index 179849726b..7c0387dcde 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -1,195 +1,139 @@ -export const abi = { - "objectTypes": [ +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + objectTypes: [ { - "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ImportedBaseType", + kind: 1, + properties: [ { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 262146, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + type: "Map", + name: "requiredMap", + required: true, + kind: 34, + map: { + type: "Map", + name: "requiredMap", + required: true, + kind: 262146, + scalar: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "requiredMap", - "required": true, - "kind": 4 + key: { + type: "String", + name: "requiredMap", + required: true, + kind: 4 }, - "value": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + value: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [] + interfaces: [] }, { - "type": "ImportedDerivedType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ImportedDerivedType", + kind: 1, + properties: [ { - "type": "Map", - "name": "mapOfValueArr", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "mapOfValueArr", - "required": true, - "kind": 262146, - "array": { - "type": "[Int]", - "name": "mapOfValueArr", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + type: "Map", + name: "mapOfValueArr", + required: true, + kind: 34, + map: { + type: "Map", + name: "mapOfValueArr", + required: true, + kind: 262146, + array: { + type: "[Int]", + name: "mapOfValueArr", + required: true, + kind: 18, + scalar: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + item: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + key: { + type: "String", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "value": { - "type": "[Int]", - "name": "mapOfValueArr", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + value: { + type: "[Int]", + name: "mapOfValueArr", + required: true, + kind: 18, + scalar: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + item: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 } } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 262146, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + type: "Map", + name: "requiredMap", + required: true, + kind: 34, + map: { + type: "Map", + name: "requiredMap", + required: true, + kind: 262146, + scalar: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "requiredMap", - "required": true, - "kind": 4 + key: { + type: "String", + name: "requiredMap", + required: true, + kind: 4 }, - "value": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + value: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 } }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], - "interfaces": [ + interfaces: [ { - "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "ImportedBaseType", + kind: 2048 } ] } - ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [] -} \ No newline at end of file + ] +}; diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts index 179849726b..a554c5229c 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -1,195 +1,138 @@ -export const abi = { - "objectTypes": [ +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + objectTypes: [ { - "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ImportedBaseType", + kind: 1, + properties: [ { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 262146, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + type: "Map", + name: "requiredMap", + required: true, + kind: 34, + map: { + type: "Map", + name: "requiredMap", + required: true, + kind: 262146, + scalar: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "requiredMap", - "required": true, - "kind": 4 + key: { + type: "String", + name: "requiredMap", + required: true, + kind: 4 }, - "value": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + value: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, { - "type": "ImportedDerivedType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ImportedDerivedType", + kind: 1, + properties: [ { - "type": "Map", - "name": "mapOfValueArr", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "mapOfValueArr", - "required": true, - "kind": 262146, - "array": { - "type": "[Int]", - "name": "mapOfValueArr", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + type: "Map", + name: "mapOfValueArr", + required: true, + kind: 34, + map: { + type: "Map", + name: "mapOfValueArr", + required: true, + kind: 262146, + array: { + type: "[Int]", + name: "mapOfValueArr", + required: true, + kind: 18, + scalar: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + item: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + key: { + type: "String", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "value": { - "type": "[Int]", - "name": "mapOfValueArr", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + value: { + type: "[Int]", + name: "mapOfValueArr", + required: true, + kind: 18, + scalar: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int", - "name": "mapOfValueArr", - "required": true, - "kind": 4 + item: { + type: "Int", + name: "mapOfValueArr", + required: true, + kind: 4 } } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 34, - "array": null, - "map": { - "type": "Map", - "name": "requiredMap", - "required": true, - "kind": 262146, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + type: "Map", + name: "requiredMap", + required: true, + kind: 34, + map: { + type: "Map", + name: "requiredMap", + required: true, + kind: 262146, + scalar: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "key": { - "type": "String", - "name": "requiredMap", - "required": true, - "kind": 4 + key: { + type: "String", + name: "requiredMap", + required: true, + kind: 4 }, - "value": { - "type": "Int", - "name": "requiredMap", - "required": true, - "kind": 4 + value: { + type: "Int", + name: "requiredMap", + required: true, + kind: 4 } - }, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [ + interfaces: [ { - "type": "ImportedBaseType", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "ImportedBaseType", + kind: 2048 } ] } - ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [] -} \ No newline at end of file + ] +}; diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts index b1077b961d..59c5df1fc2 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts @@ -1,95 +1,66 @@ -export const abi = { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + moduleType: { + type: "Module", + kind: 128, + methods: [ { - "type": "Method", - "name": "method", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "method", + required: true, + kind: 64, + arguments: [ { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 + type: "[String]", + name: "arg", + required: true, + kind: 34, + array: { + type: "[String]", + name: "arg", + required: true, + kind: 18, + scalar: { + type: "String", + name: "arg", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 + item: { + type: "String", + name: "arg", + required: true, + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "return": { - "type": "[Int32]", - "name": "method", - "required": true, - "kind": 34, - "array": { - "type": "[Int32]", - "name": "method", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int32", - "name": "method", - "required": true, - "kind": 4 + return: { + type: "[Int32]", + name: "method", + required: true, + kind: 34, + array: { + type: "[Int32]", + name: "method", + required: true, + kind: 18, + scalar: { + type: "Int32", + name: "method", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int32", - "name": "method", - "required": true, - "kind": 4 + item: { + type: "Int32", + name: "method", + required: true, + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } - ], - "imports": [], - "interfaces": [] + ] } } \ No newline at end of file diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts index fcc8b4ee8c..94ec0dbddb 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts @@ -1,306 +1,207 @@ -export const abi = { - "objectTypes": [ +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + objectTypes: [ { - "type": "ModuleInterfaceArgument", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ModuleInterfaceArgument", + kind: 1, + properties: [ { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "str", + required: true, + kind: 34, + scalar: { + type: "String", + name: "str", + required: true, + kind: 4 + } }, { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt8", + name: "uint8", + required: true, + kind: 34, + scalar: { + type: "UInt8", + name: "uint8", + required: true, + kind: 4 + } } ], - "interfaces": [ + interfaces: [ { - "type": "NestedModuleInterfaceArgument", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "NestedModuleInterfaceArgument", + kind: 2048 } ], - "comment": "ModuleInterfaceArgument comment" + comment: "ModuleInterfaceArgument comment" }, { - "type": "NestedModuleInterfaceArgument", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "NestedModuleInterfaceArgument", + kind: 1, + properties: [ { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt8", + name: "uint8", + required: true, + kind: 34, + scalar: { + type: "UInt8", + name: "uint8", + required: true, + kind: 4 + } } ], - "interfaces": [], - "comment": "NestedModuleInterfaceArgument comment" + comment: "NestedModuleInterfaceArgument comment" }, { - "type": "InterfaceObject1", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "InterfaceObject1", + kind: 1, + properties: [ { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "str", + required: true, + kind: 34, + scalar: { + type: "String", + name: "str", + required: true, + kind: 4 + } }, { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 4 + type: "UInt8", + name: "uint8", + required: true, + kind: 34, + scalar: { + type: "UInt8", + name: "uint8", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "comment": "InterfaceObject1_uint8 comment" + comment: "InterfaceObject1_uint8 comment" } ], - "interfaces": [], - "comment": "InterfaceObject1 comment" + comment: "InterfaceObject1 comment" }, { - "type": "InterfaceObject2", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "InterfaceObject2", + kind: 1, + properties: [ { - "type": "String", - "name": "str2", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "str2", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "str2", + required: true, + kind: 34, + scalar: { + type: "String", + name: "str2", + required: true, + kind: 4 + } }, { - "type": "Object", - "name": "object", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Object", - "name": "object", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Object", + name: "object", + kind: 34, + object: { + type: "Object", + name: "object", + kind: 8192 + } } ], - "interfaces": [ + interfaces: [ { - "type": "NestedInterfaceObject", - "name": null, - "required": null, - "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "NestedInterfaceObject", + kind: 2048 } ], - "comment": "InterfaceObject2 comment" + comment: "InterfaceObject2 comment" }, { - "type": "NestedInterfaceObject", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "NestedInterfaceObject", + kind: 1, + properties: [ { - "type": "Object", - "name": "object", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Object", - "name": "object", - "required": null, - "kind": 8192 + type: "Object", + name: "object", + kind: 34, + object: { + type: "Object", + name: "object", + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "comment": "object comment" + comment: "object comment" } ], - "interfaces": [], - "comment": "NestedInterfaceObject comment" + comment: "NestedInterfaceObject comment" }, { - "type": "Object", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "Object", + kind: 1, + properties: [ { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt8", - "name": "uint8", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt8", + name: "uint8", + required: true, + kind: 34, + scalar: { + type: "UInt8", + name: "uint8", + required: true, + kind: 4 + } } ], - "interfaces": [], - "comment": "Object comment" + comment: "Object comment" } ], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ + moduleType: { + type: "Module", + kind: 128, + methods: [ { - "type": "Method", - "name": "abstractModuleMethod", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "abstractModuleMethod", + required: true, + kind: 64, + arguments: [ { - "type": "ModuleInterfaceArgument", - "name": "arg", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "ModuleInterfaceArgument", - "name": "arg", - "required": true, - "kind": 8192 + type: "ModuleInterfaceArgument", + name: "arg", + required: true, + kind: 34, + object: { + type: "ModuleInterfaceArgument", + name: "arg", + required: true, + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "comment": "arg comment" + comment: "arg comment" } ], - "return": { - "type": "InterfaceObject2", - "name": "abstractModuleMethod", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "InterfaceObject2", - "name": "abstractModuleMethod", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + return: { + type: "InterfaceObject2", + name: "abstractModuleMethod", + required: true, + kind: 34, + object: { + type: "InterfaceObject2", + name: "abstractModuleMethod", + required: true, + kind: 8192 + } }, - "comment": "abstractModuleMethod comment" + comment: "abstractModuleMethod comment" } ], - "imports": [], - "interfaces": [], - "comment": "Module comment" + comment: "Module comment" } -} +}; diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts index 7f231f5c4b..c78cc0b36a 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts @@ -1,1673 +1,1132 @@ -export const abi = { - "objectTypes": [ +import { WrapAbi } from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + objectTypes: [ { - "type": "CustomType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "CustomType", + kind: 1, + properties: [ { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "str", + required: true, + kind: 34, + scalar: { + type: "String", + name: "str", + required: true, + kind: 4 + } }, { - "type": "String", - "name": "optStr", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "optStr", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "optStr", + kind: 34, + scalar: { + type: "String", + name: "optStr", + kind: 4 + } }, { - "type": "UInt", - "name": "u", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt", + name: "u", + required: true, + kind: 34, + scalar: { + type: "UInt", + name: "u", + required: true, + kind: 4 + } }, { - "type": "UInt", - "name": "optU", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "optU", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt", + name: "optU", + kind: 34, + scalar: { + type: "UInt", + name: "optU", + kind: 4 + } }, { - "type": "UInt8", - "name": "u8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt8", - "name": "u8", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt8", + name: "u8", + required: true, + kind: 34, + scalar: { + type: "UInt8", + name: "u8", + required: true, + kind: 4 + } }, { - "type": "UInt16", - "name": "u16", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt16", - "name": "u16", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt16", + name: "u16", + required: true, + kind: 34, + scalar: { + type: "UInt16", + name: "u16", + required: true, + kind: 4 + } }, { - "type": "UInt32", - "name": "u32", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "u32", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt32", + name: "u32", + required: true, + kind: 34, + scalar: { + type: "UInt32", + name: "u32", + required: true, + kind: 4 + } }, { - "type": "Int", - "name": "i", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "i", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Int", + name: "i", + required: true, + kind: 34, + scalar: { + type: "Int", + name: "i", + required: true, + kind: 4 + } }, { - "type": "Int8", - "name": "i8", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int8", - "name": "i8", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Int8", + name: "i8", + required: true, + kind: 34, + scalar: { + type: "Int8", + name: "i8", + required: true, + kind: 4 + } }, { - "type": "Int16", - "name": "i16", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int16", - "name": "i16", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Int16", + name: "i16", + required: true, + kind: 34, + scalar: { + type: "Int16", + name: "i16", + required: true, + kind: 4 + } }, { - "type": "Int32", - "name": "i32", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int32", - "name": "i32", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Int32", + name: "i32", + required: true, + kind: 34, + scalar: { + type: "Int32", + name: "i32", + required: true, + kind: 4 + } }, { - "type": "Bytes", - "name": "bytes", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Bytes", - "name": "bytes", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Bytes", + name: "bytes", + required: true, + kind: 34, + scalar: { + type: "Bytes", + name: "bytes", + required: true, + kind: 4 + } }, { - "type": "[UInt]", - "name": "uArray", - "required": true, - "kind": 34, - "array": { - "type": "[UInt]", - "name": "uArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArray", - "required": true, - "kind": 4 + type: "[UInt]", + name: "uArray", + required: true, + kind: 34, + array: { + type: "[UInt]", + name: "uArray", + required: true, + kind: 18, + scalar: { + type: "UInt", + name: "uArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArray", - "required": true, - "kind": 4 + item: { + type: "UInt", + name: "uArray", + required: true, + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[UInt]", - "name": "uOptArray", - "required": null, - "kind": 34, - "array": { - "type": "[UInt]", - "name": "uOptArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uOptArray", - "required": true, - "kind": 4 + type: "[UInt]", + name: "uOptArray", + kind: 34, + array: { + type: "[UInt]", + name: "uOptArray", + kind: 18, + scalar: { + type: "UInt", + name: "uOptArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uOptArray", - "required": true, - "kind": 4 + item: { + type: "UInt", + name: "uOptArray", + required: true, + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[UInt]", - "name": "optUOptArray", - "required": null, - "kind": 34, - "array": { - "type": "[UInt]", - "name": "optUOptArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "optUOptArray", - "required": null, - "kind": 4 + type: "[UInt]", + name: "optUOptArray", + kind: 34, + array: { + type: "[UInt]", + name: "optUOptArray", + kind: 18, + scalar: { + type: "UInt", + name: "optUOptArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "optUOptArray", - "required": null, - "kind": 4 + item: { + type: "UInt", + name: "optUOptArray", + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[String]", - "name": "optStrOptArray", - "required": null, - "kind": 34, - "array": { - "type": "[String]", - "name": "optStrOptArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "optStrOptArray", - "required": null, - "kind": 4 + type: "[String]", + name: "optStrOptArray", + kind: 34, + array: { + type: "[String]", + name: "optStrOptArray", + kind: 18, + scalar: { + type: "String", + name: "optStrOptArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "String", - "name": "optStrOptArray", - "required": null, - "kind": 4 + item: { + type: "String", + name: "optStrOptArray", + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 + type: "[[UInt]]", + name: "uArrayArray", + required: true, + kind: 34, + array: { + type: "[[UInt]]", + name: "uArrayArray", + required: true, + kind: 18, + array: { + type: "[UInt]", + name: "uArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt", + name: "uArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt", + name: "uArrayArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 + item: { + type: "[UInt]", + name: "uArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt", + name: "uArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt", + name: "uArrayArray", + required: true, + kind: 4 } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[[UInt32]]", - "name": "uOptArrayOptArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt32]]", - "name": "uOptArrayOptArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "uOptArrayOptArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "required": null, - "kind": 4 + type: "[[UInt32]]", + name: "uOptArrayOptArray", + required: true, + kind: 34, + array: { + type: "[[UInt32]]", + name: "uOptArrayOptArray", + required: true, + kind: 18, + array: { + type: "[UInt32]", + name: "uOptArrayOptArray", + kind: 18, + scalar: { + type: "UInt32", + name: "uOptArrayOptArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "required": null, - "kind": 4 + item: { + type: "UInt32", + name: "uOptArrayOptArray", + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "uOptArrayOptArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "required": null, - "kind": 4 + item: { + type: "[UInt32]", + name: "uOptArrayOptArray", + kind: 18, + scalar: { + type: "UInt32", + name: "uOptArrayOptArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "required": null, - "kind": 4 + item: { + type: "UInt32", + name: "uOptArrayOptArray", + kind: 4 } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[[[UInt32]]]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[[UInt32]]]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "uArrayOptArrayArray", - "required": null, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + type: "[[[UInt32]]]", + name: "uArrayOptArrayArray", + required: true, + kind: 34, + array: { + type: "[[[UInt32]]]", + name: "uArrayOptArrayArray", + required: true, + kind: 18, + array: { + type: "[[UInt32]]", + name: "uArrayOptArrayArray", + kind: 18, + array: { + type: "[UInt32]", + name: "uArrayOptArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "uArrayOptArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[[UInt32]]", - "name": "uArrayOptArrayArray", - "required": null, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "[[UInt32]]", + name: "uArrayOptArrayArray", + kind: 18, + array: { + type: "[UInt32]", + name: "uArrayOptArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "uArrayOptArrayArray", + required: true, + kind: 18, + scalar: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "uArrayOptArrayArray", + required: true, + kind: 4 } } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "[[[[UInt32]]]]", - "name": "crazyArray", - "required": null, - "kind": 34, - "array": { - "type": "[[[[UInt32]]]]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": { - "type": "[[[UInt32]]]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "crazyArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + type: "[[[[UInt32]]]]", + name: "crazyArray", + kind: 34, + array: { + type: "[[[[UInt32]]]]", + name: "crazyArray", + kind: 18, + array: { + type: "[[[UInt32]]]", + name: "crazyArray", + kind: 18, + array: { + type: "[[UInt32]]", + name: "crazyArray", + required: true, + kind: 18, + array: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[[UInt32]]", - "name": "crazyArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[[UInt32]]", + name: "crazyArray", + required: true, + kind: 18, + array: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[[[UInt32]]]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "crazyArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[[[UInt32]]]", + name: "crazyArray", + kind: 18, + array: { + type: "[[UInt32]]", + name: "crazyArray", + required: true, + kind: 18, + array: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[[UInt32]]", - "name": "crazyArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[[UInt32]]", + name: "crazyArray", + required: true, + kind: 18, + array: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "[UInt32]", + name: "crazyArray", + kind: 18, + scalar: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 + item: { + type: "UInt32", + name: "crazyArray", + required: true, + kind: 4 } } } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "ObjectType", - "name": "object", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "ObjectType", - "name": "object", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "ObjectType", + name: "object", + required: true, + kind: 34, + object: { + type: "ObjectType", + name: "object", + required: true, + kind: 8192 + } }, { - "type": "ObjectType", - "name": "optObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "ObjectType", - "name": "optObject", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "ObjectType", + name: "optObject", + kind: 34, + object: { + type: "ObjectType", + name: "optObject", + kind: 8192 + } }, { - "type": "NestedObjectType", - "name": "nestedObject", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "nestedObject", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "NestedObjectType", + name: "nestedObject", + required: true, + kind: 34, + object: { + type: "NestedObjectType", + name: "nestedObject", + required: true, + kind: 8192 + } }, { - "type": "NestedObjectType", - "name": "optNestedObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "optNestedObject", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "NestedObjectType", + name: "optNestedObject", + kind: 34, + object: { + type: "NestedObjectType", + name: "optNestedObject", + kind: 8192 + } }, { - "type": "[NestedObjectType]", - "name": "optNestedObjectArray", - "required": true, - "kind": 34, - "array": { - "type": "[NestedObjectType]", - "name": "optNestedObjectArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "optNestedObjectArray", - "required": null, - "kind": 8192 + type: "[NestedObjectType]", + name: "optNestedObjectArray", + required: true, + kind: 34, + array: { + type: "[NestedObjectType]", + name: "optNestedObjectArray", + required: true, + kind: 18, + object: { + type: "NestedObjectType", + name: "optNestedObjectArray", + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "NestedObjectType", - "name": "optNestedObjectArray", - "required": null, - "kind": 8192 + item: { + type: "NestedObjectType", + name: "optNestedObjectArray", + kind: 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "Imported_NestedObjectType", - "name": "importedNestedObject", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_NestedObjectType", - "name": "importedNestedObject", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Imported_NestedObjectType", + name: "importedNestedObject", + required: true, + kind: 34, + object: { + type: "Imported_NestedObjectType", + name: "importedNestedObject", + required: true, + kind: 8192 + } }, { - "type": "[Imported_NestedObjectType]", - "name": "optImportedNestedObjectArray", - "required": true, - "kind": 34, - "array": { - "type": "[Imported_NestedObjectType]", - "name": "optImportedNestedObjectArray", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_NestedObjectType", - "name": "optImportedNestedObjectArray", - "required": null, - "kind": 8192 + type: "[Imported_NestedObjectType]", + name: "optImportedNestedObjectArray", + required: true, + kind: 34, + array: { + type: "[Imported_NestedObjectType]", + name: "optImportedNestedObjectArray", + required: true, + kind: 18, + object: { + type: "Imported_NestedObjectType", + name: "optImportedNestedObjectArray", + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Imported_NestedObjectType", - "name": "optImportedNestedObjectArray", - "required": null, - "kind": 8192 + item: { + type: "Imported_NestedObjectType", + name: "optImportedNestedObjectArray", + kind: 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { - "type": "CustomEnum", - "name": "enum", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "enum", - "required": true, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null + type: "CustomEnum", + name: "enum", + required: true, + kind: 34, + enum: { + type: "CustomEnum", + name: "enum", + required: true, + kind: 16384 + } }, { - "type": "CustomEnum", - "name": "optEnum", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "CustomEnum", - "name": "optEnum", - "required": null, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null + type: "CustomEnum", + name: "optEnum", + kind: 34, + enum: { + type: "CustomEnum", + name: "optEnum", + kind: 16384 + } }, { - "type": "Imported_Enum", - "name": "importedEnum", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "Imported_Enum", - "name": "importedEnum", - "required": true, - "kind": 16384 - }, - "unresolvedObjectOrEnum": null + type: "Imported_Enum", + name: "importedEnum", + required: true, + kind: 34, + enum: { + type: "Imported_Enum", + name: "importedEnum", + required: true, + kind: 16384 + } }, { - "type": "Imported_Enum", - "name": "optImportedEnum", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": { - "type": "Imported_Enum", - "name": "optImportedEnum", - "required": null, - "kind": 16384 + type: "Imported_Enum", + name: "optImportedEnum", + kind: 34, + enum: { + type: "Imported_Enum", + name: "optImportedEnum", + kind: 16384 }, - "unresolvedObjectOrEnum": null, - "comment": "optImportedEnum comment" + comment: "optImportedEnum comment" } ], - "interfaces": [], - "comment": "CustomType comment" + comment: "CustomType comment" }, { - "type": "NestedObjectType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "NestedObjectType", + kind: 1, + properties: [ { - "type": "ObjectType", - "name": "nestedObject", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "ObjectType", - "name": "nestedObject", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "ObjectType", + name: "nestedObject", + required: true, + kind: 34, + object: { + type: "ObjectType", + name: "nestedObject", + required: true, + kind: 8192 + } } - ], - "interfaces": [] + ] }, { - "type": "ObjectType", - "name": null, - "required": null, - "kind": 1, - "properties": [ + type: "ObjectType", + kind: 1, + properties: [ { - "type": "String", - "name": "prop", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "prop", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "prop", + required: true, + kind: 34, + scalar: { + type: "String", + name: "prop", + required: true, + kind: 4 + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [ + enumTypes: [ { - "type": "CustomEnum", - "name": null, - "required": null, - "kind": 8, - "constants": [ + type: "CustomEnum", + kind: 8, + constants: [ "STRING", "BYTES" ] } ], - "interfaceTypes": [], - "importedObjectTypes": [ + importedObjectTypes: [ { - "type": "Imported_NestedObjectType", - "name": null, - "required": null, - "kind": 1025, - "properties": [ + type: "Imported_NestedObjectType", + kind: 1025, + properties: [ { - "type": "Imported_ObjectType", - "name": "nestedObject", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_ObjectType", - "name": "nestedObject", - "required": true, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Imported_ObjectType", + name: "nestedObject", + required: true, + kind: 34, + object: { + type: "Imported_ObjectType", + name: "nestedObject", + required: true, + kind: 8192 + } } ], - "interfaces": [], - "comment": "Imported_NestedObjectType comment", - "uri": "imported.eth", - "namespace": "Imported", - "nativeType": "NestedObjectType" + comment: "Imported_NestedObjectType comment", + uri: "imported.eth", + namespace: "Imported", + nativeType: "NestedObjectType" }, { - "type": "Imported_ObjectType", - "name": null, - "required": null, - "kind": 1025, - "properties": [ + type: "Imported_ObjectType", + kind: 1025, + properties: [ { - "type": "String", - "name": "prop", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "prop", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "prop", + required: true, + kind: 34, + scalar: { + type: "String", + name: "prop", + required: true, + kind: 4 + } } ], - "interfaces": [], - "uri": "imported.eth", - "namespace": "Imported", - "nativeType": "ObjectType" + uri: "imported.eth", + namespace: "Imported", + nativeType: "ObjectType" } ], - "importedModuleTypes": [], - "importedEnumTypes": [ + importedEnumTypes: [ { - "type": "Imported_Enum", - "name": null, - "required": null, - "kind": 520, - "constants": [ + type: "Imported_Enum", + kind: 520, + constants: [ "STRING", "BYTES" ], - "comment": "Imported_Enum comment", - "uri": "imported.eth", - "namespace": "Imported", - "nativeType": "ImportedEnum" + comment: "Imported_Enum comment", + uri: "imported.eth", + namespace: "Imported", + nativeType: "ImportedEnum" } ], - "importedEnvTypes": [], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ + moduleType: { + type: "Module", + kind: 128, + methods: [ { - "type": "Method", - "name": "method1", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "method1", + required: true, + kind: 64, + arguments: [ { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "str", + required: true, + kind: 34, + scalar: { + type: "String", + name: "str", + required: true, + kind: 4 + } }, { - "type": "String", - "name": "optStr", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "optStr", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "String", + name: "optStr", + kind: 34, + scalar: { + type: "String", + name: "optStr", + kind: 4 + } }, { - "type": "UInt", - "name": "u", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt", + name: "u", + required: true, + kind: 34, + scalar: { + type: "UInt", + name: "u", + required: true, + kind: 4 + } }, { - "type": "UInt", - "name": "optU", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "optU", - "required": null, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + type: "UInt", + name: "optU", + kind: 34, + scalar: { + type: "UInt", + name: "optU", + kind: 4 + } }, { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt]", - "name": "uArrayArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 + type: "[[UInt]]", + name: "uArrayArray", + required: true, + kind: 34, + array: { + type: "[[UInt]]", + name: "uArrayArray", + required: true, + kind: 18, + array: { + type: "[UInt]", + name: "uArrayArray", + kind: 18, + scalar: { + type: "UInt", + name: "uArrayArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 + item: { + type: "UInt", + name: "uArrayArray", + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "[UInt]", - "name": "uArrayArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 + item: { + type: "[UInt]", + name: "uArrayArray", + kind: 18, + scalar: { + type: "UInt", + name: "uArrayArray", + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": null, - "kind": 4 + item: { + type: "UInt", + name: "uArrayArray", + kind: 4 } } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "return": { - "type": "String", - "name": "method1", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "method1", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + return: { + type: "String", + name: "method1", + required: true, + kind: 34, + scalar: { + type: "String", + name: "method1", + required: true, + kind: 4 + } } }, { - "type": "Method", - "name": "method2", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "method2", + required: true, + kind: 64, + arguments: [ { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 + type: "[String]", + name: "arg", + required: true, + kind: 34, + array: { + type: "[String]", + name: "arg", + required: true, + kind: 18, + scalar: { + type: "String", + name: "arg", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 + item: { + type: "String", + name: "arg", + required: true, + kind: 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "comment": "arg comment" + comment: "arg comment" } ], - "return": { - "type": "[Int32]", - "name": "method2", - "required": true, - "kind": 34, - "array": { - "type": "[Int32]", - "name": "method2", - "required": true, - "kind": 18, - "array": null, - "map": null, - "scalar": { - "type": "Int32", - "name": "method2", - "required": true, - "kind": 4 + return: { + type: "[Int32]", + name: "method2", + required: true, + kind: 34, + array: { + type: "[Int32]", + name: "method2", + required: true, + kind: 18, + scalar: { + type: "Int32", + name: "method2", + required: true, + kind: 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Int32", - "name": "method2", - "required": true, - "kind": 4 + item: { + type: "Int32", + name: "method2", + required: true, + kind: 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, - "comment": "method2 comment" + comment: "method2 comment" }, { - "type": "Method", - "name": "localObjects", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "localObjects", + required: true, + kind: 64, + arguments: [ { - "type": "NestedObjectType", - "name": "nestedLocalObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "nestedLocalObject", - "required": null, - "kind": 8192 + type: "NestedObjectType", + name: "nestedLocalObject", + kind: 34, + object: { + type: "NestedObjectType", + name: "nestedLocalObject", + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { - "type": "[NestedObjectType]", - "name": "localObjectArray", - "required": null, - "kind": 34, - "array": { - "type": "[NestedObjectType]", - "name": "localObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "localObjectArray", - "required": true, - "kind": 8192 + type: "[NestedObjectType]", + name: "localObjectArray", + kind: 34, + array: { + type: "[NestedObjectType]", + name: "localObjectArray", + kind: 18, + object: { + type: "NestedObjectType", + name: "localObjectArray", + required: true, + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "NestedObjectType", - "name": "localObjectArray", - "required": true, - "kind": 8192 + item: { + type: "NestedObjectType", + name: "localObjectArray", + required: true, + kind: 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "return": { - "type": "NestedObjectType", - "name": "localObjects", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "NestedObjectType", - "name": "localObjects", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + return: { + type: "NestedObjectType", + name: "localObjects", + kind: 34, + object: { + type: "NestedObjectType", + name: "localObjects", + kind: 8192 + } } }, { - "type": "Method", - "name": "importedObjects", - "required": true, - "kind": 64, - "arguments": [ + type: "Method", + name: "importedObjects", + required: true, + kind: 64, + arguments: [ { - "type": "Imported_NestedObjectType", - "name": "nestedLocalObject", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_NestedObjectType", - "name": "nestedLocalObject", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + type: "Imported_NestedObjectType", + name: "nestedLocalObject", + kind: 34, + object: { + type: "Imported_NestedObjectType", + name: "nestedLocalObject", + kind: 8192 + } }, { - "type": "[Imported_NestedObjectType]", - "name": "localObjectArray", - "required": null, - "kind": 34, - "array": { - "type": "[Imported_NestedObjectType]", - "name": "localObjectArray", - "required": null, - "kind": 18, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_NestedObjectType", - "name": "localObjectArray", - "required": true, - "kind": 8192 + type: "[Imported_NestedObjectType]", + name: "localObjectArray", + kind: 34, + array: { + type: "[Imported_NestedObjectType]", + name: "localObjectArray", + kind: 18, + object: { + type: "Imported_NestedObjectType", + name: "localObjectArray", + required: true, + kind: 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, - "item": { - "type": "Imported_NestedObjectType", - "name": "localObjectArray", - "required": true, - "kind": 8192 + item: { + type: "Imported_NestedObjectType", + name: "localObjectArray", + required: true, + kind: 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "return": { - "type": "Imported_NestedObjectType", - "name": "importedObjects", - "required": null, - "kind": 34, - "array": null, - "map": null, - "scalar": null, - "object": { - "type": "Imported_NestedObjectType", - "name": "importedObjects", - "required": null, - "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + return: { + type: "Imported_NestedObjectType", + name: "importedObjects", + kind: 34, + object: { + type: "Imported_NestedObjectType", + name: "importedObjects", + kind: 8192 + } } } ], - "imports": [ + imports: [ { - "type": "Imported_NestedObjectType" + type: "Imported_NestedObjectType" }, { - "type": "Imported_ObjectType" + type: "Imported_ObjectType" } ], - "interfaces": [], - "comment": "Module comment" + comment: "Module comment" } -} \ No newline at end of file +}; From be47afa900773a1fd470af5ccad2974f1bf57b27 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 00:00:59 -0700 Subject: [PATCH 33/56] fix docgen tests + WrapManifest typing --- packages/cli/src/__tests__/e2e/docgen.spec.ts | 5 ++-- packages/cli/src/lib/SchemaComposer.ts | 4 +-- packages/js/manifests/wrap/package.json | 1 + .../js/manifests/wrap/scripts/generate.ts | 5 +++- .../wrap/src/formats/wrap.info/0.1.ts | 2 +- yarn.lock | 30 +++++++++---------- 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/cli/src/__tests__/e2e/docgen.spec.ts b/packages/cli/src/__tests__/e2e/docgen.spec.ts index 7504926859..ebf34612ea 100644 --- a/packages/cli/src/__tests__/e2e/docgen.spec.ts +++ b/packages/cli/src/__tests__/e2e/docgen.spec.ts @@ -14,7 +14,7 @@ Generate wrapper documentation Arguments: action - schema Generate GraphQL schema + schema Generate GraphQL schema docusaurus Generate Docusaurus markdown jsdoc Generate JSDoc markdown (choices: "schema", "docusaurus", "jsdoc") @@ -35,7 +35,7 @@ Options: describe("e2e tests for docgen command", () => { const testCaseRoot = path.join(GetPathToCliTestFiles(), "docgen"); - let testCases = fs + const testCases = fs .readdirSync(testCaseRoot, { withFileTypes: true }) .filter((dirent) => dirent.isDirectory()) .map((dirent) => dirent.name); @@ -185,7 +185,6 @@ describe("e2e tests for docgen command", () => { }); describe("test-cases", () => { - testCases = testCases.filter(n => n === "009-schema") for (let i = 0; i < testCases.length; ++i) { const testCaseName = testCases[i]; const testCaseDir = getTestCaseDir(i); diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index e9d28ca31e..70d1cb0485 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -82,14 +82,14 @@ export class SchemaComposer { const manifest = fs.readFileSync( path.join(this._config.project.getManifestDir(), redirect.info) ); - return (await deserializeWrapManifest(manifest)).abi as WrapAbi; + return (await deserializeWrapManifest(manifest)).abi; } } } try { const manifest = await this._client.getManifest(new Uri(uri)); - return manifest.abi as WrapAbi; + return manifest.abi; } catch (e) { gluegun.print.error(e); throw e; diff --git a/packages/js/manifests/wrap/package.json b/packages/js/manifests/wrap/package.json index 4178646e41..900fbcc3a5 100644 --- a/packages/js/manifests/wrap/package.json +++ b/packages/js/manifests/wrap/package.json @@ -10,6 +10,7 @@ "main": "./build/index.js", "scripts": { "build": "rimraf ./build && tsc --project tsconfig.build.json", + "prebuild": "ts-node ./scripts/generate.ts", "test": "jest --passWithNoTests --runInBand --verbose", "test:ci": "jest --passWithNoTests --runInBand --verbose", "test:watch": "jest --watch --passWithNoTests --verbose" diff --git a/packages/js/manifests/wrap/scripts/generate.ts b/packages/js/manifests/wrap/scripts/generate.ts index 341f48d690..2c11e4aba3 100644 --- a/packages/js/manifests/wrap/scripts/generate.ts +++ b/packages/js/manifests/wrap/scripts/generate.ts @@ -66,7 +66,10 @@ async function generateFormatTypes() { wrapSchemas.push(bundledSchema); // Convert it to a TypeScript interface - const tsFile = await compile(bundledSchema as any, wrapSchema.id, {additionalProperties: false}); + let tsFile = await compile(bundledSchema as any, wrapSchema.id, {additionalProperties: false}); + + // Hack: replace all instances of `abi: unknown;` with `abi: Abi;` + tsFile = tsFile.replace("abi: unknown;", "abi: Abi;"); // Emit the result const tsOutputPath = path.join(wrapOutputDir, `${wrapVersion}.ts`); diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts index 6b3001ad61..6c22a48547 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/0.1.ts @@ -103,7 +103,7 @@ export interface WrapManifest { * Wrapper Name */ name: string; - abi: unknown; + abi: Abi; } /** * Information of modules diff --git a/yarn.lock b/yarn.lock index b86e9a6a6d..8a942b416a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3670,9 +3670,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "18.7.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.2.tgz#22306626110c459aedd2cdf131c749ec781e3b34" - integrity sha512-ce7MIiaYWCFv6A83oEultwhBXb22fxwNOQf5DIxWA4WXvDQ7K+L0fbWl/YOfCzlR5B/uFkSnVBhPcOfOECcWvA== + version "18.7.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.3.tgz#432c89796eab539b7a30b7b8801a727b585238a4" + integrity sha512-LJgzOEwWuMTBxHzgBR/fhhBOWrvBjvO+zPteUgbbuQi80rYIZHrk1mNbRUqPZqSLP2H7Rwt1EFLL/tNLD1Xx/w== "@types/node@12.12.26": version "12.12.26" @@ -5620,9 +5620,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001375" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz#8e73bc3d1a4c800beb39f3163bf0190d7e5d7672" - integrity sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw== + version "1.0.30001376" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz#af2450833e5a06873fbb030a9556ca9461a2736d" + integrity sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig== capture-exit@^2.0.0: version "2.0.0" @@ -6832,9 +6832,9 @@ decamelize@^1.1.0, decamelize@^1.2.0: integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== + version "10.4.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.0.tgz#97a7448873b01e92e5ff9117d89a7bca8e63e0fe" + integrity sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg== decode-uri-component@^0.2.0: version "0.2.0" @@ -7290,9 +7290,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.202: - version "1.4.218" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.218.tgz#d6b817b5454499a92c85888b42dc2ad075e4493a" - integrity sha512-INDylKH//YIf2w67D+IjkfVnGVrZ/D94DAU/FPPm6T4jEPbEDQvo9r2wTj0ncFdtJH8+V8BggZTaN8Rzk5wkgw== + version "1.4.219" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.219.tgz#a7a672304b6aa4f376918d3f63a47f2c3906009a" + integrity sha512-zoQJsXOUw0ZA0YxbjkmzBumAJRtr6je5JySuL/bAoFs0DuLiLJ+5FzRF7/ZayihxR2QcewlRZVm5QZdUhwjOgA== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -14012,9 +14012,9 @@ pnp-webpack-plugin@1.6.4: ts-pnp "^1.1.6" portfinder@^1.0.25: - version "1.0.29" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.29.tgz#d06ff886f4ff91274ed3e25c7e6b0c68d2a0735a" - integrity sha512-Z5+DarHWCKlufshB9Z1pN95oLtANoY5Wn9X3JGELGyQ6VhEcBfT2t+1fGUBq7MwUant6g/mqowH+4HifByPbiQ== + version "1.0.32" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81" + integrity sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg== dependencies: async "^2.6.4" debug "^3.2.7" From b0bb995955fa56ebd674373b3ee344eb76de007a Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 00:09:47 -0700 Subject: [PATCH 34/56] minor formatting changes --- packages/cli/src/lib/helpers/wrap.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 5c8b0eb9a3..48d084cdb4 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -7,11 +7,12 @@ import { latestWrapManifestVersion, validateWrapManifest, WrapManifest, + WrapAbi } from "@polywrap/wrap-manifest-types-js"; import { normalizePath, writeFileSync } from "@polywrap/os-js"; const run = async ( - abi: unknown, + abi: WrapAbi, name: string, type: "interface" | "wasm" | "plugin", path: string @@ -20,12 +21,12 @@ const run = async ( version: latestWrapManifestVersion, name, type, - /// TODO(cbrzn): Change this to WrapAbi - abi: abi as never, + abi, }; // One last sanity check await validateWrapManifest(info); + const parsedInfo = JSON.parse(JSON.stringify(info)); writeFileSync(path, msgpackEncode(parsedInfo), { encoding: "binary", From 1cd0b9319adbf4e37b36fb0245ac82056da1e4e0 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 00:27:52 -0700 Subject: [PATCH 35/56] move wrap serialization logic --- packages/cli/src/lib/helpers/wrap.ts | 15 +++++---------- packages/js/manifests/wrap/scripts/generate.ts | 5 +++-- .../wrap/scripts/templates/index-ts.mustache | 1 + .../scripts/templates/serialize-ts.mustache | 18 ++++++++++++++++++ packages/js/manifests/wrap/src/deserialize.ts | 3 --- .../wrap/src/formats/wrap.info/index.ts | 1 + .../wrap/src/formats/wrap.info/serialize.ts | 18 ++++++++++++++++++ packages/js/manifests/wrap/src/index.ts | 2 +- packages/js/manifests/wrap/src/types.ts | 7 +++++++ 9 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache delete mode 100644 packages/js/manifests/wrap/src/deserialize.ts create mode 100644 packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts create mode 100644 packages/js/manifests/wrap/src/types.ts diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 48d084cdb4..116b02a126 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -2,10 +2,9 @@ import { withSpinner } from "./spinner"; import { intlMsg } from "../intl"; import { displayPath } from "../system"; -import { msgpackEncode } from "@polywrap/msgpack-js"; import { + serializeWrapManifest, latestWrapManifestVersion, - validateWrapManifest, WrapManifest, WrapAbi } from "@polywrap/wrap-manifest-types-js"; @@ -17,24 +16,20 @@ const run = async ( type: "interface" | "wasm" | "plugin", path: string ): Promise => { - const info: WrapManifest = { + const manifest: WrapManifest = { version: latestWrapManifestVersion, name, type, abi, }; - // One last sanity check - await validateWrapManifest(info); + const bytes = serializeWrapManifest(manifest); - const parsedInfo = JSON.parse(JSON.stringify(info)); - writeFileSync(path, msgpackEncode(parsedInfo), { - encoding: "binary", - }); + writeFileSync(path, bytes, { encoding: "binary" }); }; export const generateWrapFile = async ( - abi: unknown, + abi: WrapAbi, name: string, type: "interface" | "wasm" | "plugin", path: string, diff --git a/packages/js/manifests/wrap/scripts/generate.ts b/packages/js/manifests/wrap/scripts/generate.ts index 2c11e4aba3..0f345557d2 100644 --- a/packages/js/manifests/wrap/scripts/generate.ts +++ b/packages/js/manifests/wrap/scripts/generate.ts @@ -145,11 +145,12 @@ async function generateFormatTypes() { renderTemplate("migrate", migrateContext); // Generate a deserialize.ts file that exports a deserialization function for the latest format version - const deserializeContext = { + const serializeContext = { type: migrateContext.latest.type, }; - renderTemplate("deserialize", deserializeContext); + renderTemplate("deserialize", serializeContext); + renderTemplate("serialize", serializeContext); // Generate a validate.ts file that validates the manifest against the JSON schema const validateFormats = wrapModules.map((module) => { diff --git a/packages/js/manifests/wrap/scripts/templates/index-ts.mustache b/packages/js/manifests/wrap/scripts/templates/index-ts.mustache index ea7177577f..716256dc3c 100644 --- a/packages/js/manifests/wrap/scripts/templates/index-ts.mustache +++ b/packages/js/manifests/wrap/scripts/templates/index-ts.mustache @@ -64,4 +64,5 @@ export type AnyWrapAbi = export { migrateWrapManifest } from "./migrate"; export { deserializeWrapManifest } from "./deserialize"; +export { serializeWrapManifest } from "./serialize"; export { validateWrapManifest } from "./validate"; diff --git a/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache b/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache new file mode 100644 index 0000000000..08a9735d5e --- /dev/null +++ b/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache @@ -0,0 +1,18 @@ +import { + AnyWrapManifest, + validateWrapManifest +} from "."; +import { SerializeManifestOptions } from "../../"; + +import { msgpackEncode } from "@polywrap/msgpack-js"; + +export async function serializeWrapManifest( + manifest: AnyWrapManifest, + options?: SerializeManifestOptions +): Promise { + if (!options || !options.noValidate) { + await validateWrapManifest(manifest); + } + + return msgpackEncode(manifest); +} diff --git a/packages/js/manifests/wrap/src/deserialize.ts b/packages/js/manifests/wrap/src/deserialize.ts deleted file mode 100644 index 6f411a2b97..0000000000 --- a/packages/js/manifests/wrap/src/deserialize.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface DeserializeManifestOptions { - noValidate?: boolean; -} \ No newline at end of file diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/index.ts b/packages/js/manifests/wrap/src/formats/wrap.info/index.ts index a26080885a..a137a85ac3 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/index.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/index.ts @@ -50,4 +50,5 @@ export const latestWrapAbiVersion = "0.1"; export { migrateWrapManifest } from "./migrate"; export { deserializeWrapManifest } from "./deserialize"; +export { serializeWrapManifest } from "./serialize"; export { validateWrapManifest } from "./validate"; diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts b/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts new file mode 100644 index 0000000000..08a9735d5e --- /dev/null +++ b/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts @@ -0,0 +1,18 @@ +import { + AnyWrapManifest, + validateWrapManifest +} from "."; +import { SerializeManifestOptions } from "../../"; + +import { msgpackEncode } from "@polywrap/msgpack-js"; + +export async function serializeWrapManifest( + manifest: AnyWrapManifest, + options?: SerializeManifestOptions +): Promise { + if (!options || !options.noValidate) { + await validateWrapManifest(manifest); + } + + return msgpackEncode(manifest); +} diff --git a/packages/js/manifests/wrap/src/index.ts b/packages/js/manifests/wrap/src/index.ts index 041f37b508..fbd606d0ca 100644 --- a/packages/js/manifests/wrap/src/index.ts +++ b/packages/js/manifests/wrap/src/index.ts @@ -1,2 +1,2 @@ export * from "./formats"; -export * from "./deserialize"; +export * from "./types"; diff --git a/packages/js/manifests/wrap/src/types.ts b/packages/js/manifests/wrap/src/types.ts new file mode 100644 index 0000000000..2a2366e0fe --- /dev/null +++ b/packages/js/manifests/wrap/src/types.ts @@ -0,0 +1,7 @@ +export interface DeserializeManifestOptions { + noValidate?: boolean; +} + +export interface SerializeManifestOptions { + noValidate?: boolean; +} From 302cd346032f32a9e3e8aedcf271d819c554769a Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 00:42:49 -0700 Subject: [PATCH 36/56] fixup import_redirects typing --- packages/cli/src/lib/project/Project.ts | 12 ++---- .../polywrap/src/formats/polywrap.app/0.2.ts | 23 +++++----- .../src/formats/polywrap.plugin/0.2.ts | 21 ++++----- .../polywrap/src/formats/polywrap/0.2.ts | 25 +++++------ .../polywrap/formats/polywrap.app/0.2.json | 43 +++++++++++-------- .../polywrap/formats/polywrap.plugin/0.2.json | 41 ++++++++++-------- .../polywrap/formats/polywrap/0.2.json | 43 +++++++++++-------- 7 files changed, 111 insertions(+), 97 deletions(-) diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index 3565a1f8c8..6ad68200a7 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -6,21 +6,17 @@ import { CacheDirectoryConfig, } from "../"; +import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { BindOutput } from "@polywrap/schema-bind"; import { Abi } from "@polywrap/schema-parse"; +export type ImportRedirects = PolywrapManifest["import_redirects"]; + export interface ProjectConfig { rootDir: string; quiet?: boolean; } -export interface ImportRedirect { - uri: string; - info: string; -} - -export type ImportRedirects = Array; - export abstract class Project { protected _cache: CacheDirectory; @@ -67,7 +63,7 @@ export abstract class Project { public abstract getSchemaNamedPath(): Promise; - public abstract getImportRedirects(): Promise; + public abstract getImportRedirects(): Promise; public abstract generateSchemaBindings( abi: Abi, diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts index e43a117e7a..449105b63d 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts @@ -24,17 +24,18 @@ export interface AppManifest { */ schema: string; /** - * Redirects for the manifest's imports. + * Redirects source URI to local wrapper or plugin. */ - import_redirects?: { - /** - * Import URI to be redirected. - */ - uri: string; - /** - * Path to a WRAP Manifest to be used for the import. - */ - info: string; - }[]; + import_redirects?: ImportRedirect[]; __type: "AppManifest"; } +export interface ImportRedirect { + /** + * Source URI that needs to be redirected. + */ + uri: string; + /** + * Path to Wrap Manifest of the module to which URI will be redirected. + */ + info: string; +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts index 39ca0e70df..fb3b4eebe8 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts @@ -30,15 +30,16 @@ export interface PluginManifest { /** * Redirects source URI to local wrapper or plugin. */ - import_redirects?: { - /** - * Source URI that needs to be redirected. - */ - uri: string; - /** - * Path to Wrap Manifest of the module to which URI will be redirected. - */ - info: string; - }[]; + import_redirects?: ImportRedirect[]; __type: "PluginManifest"; } +export interface ImportRedirect { + /** + * Source URI that needs to be redirected. + */ + uri: string; + /** + * Path to Wrap Manifest of the module to which URI will be redirected. + */ + info: string; +} diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts index ce4679e102..b0bb2b2f8a 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts @@ -40,17 +40,18 @@ export interface PolywrapManifest { */ schema: string; /** - * Redirects for the schema's imports. - */ - import_redirects?: { - /** - * Import URI to be redirected. - */ - uri: string; - /** - * Path to a WRAP manifest to be used for the import. - */ - info: string; - }[]; + * Redirects source URI to local wrapper or plugin. + */ + import_redirects?: ImportRedirect[]; __type: "PolywrapManifest"; } +export interface ImportRedirect { + /** + * Source URI that needs to be redirected. + */ + uri: string; + /** + * Path to Wrap Manifest of the module to which URI will be redirected. + */ + info: string; +} diff --git a/packages/manifests/polywrap/formats/polywrap.app/0.2.json b/packages/manifests/polywrap/formats/polywrap.app/0.2.json index faa82b4d25..1c4fd630d2 100644 --- a/packages/manifests/polywrap/formats/polywrap.app/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap.app/0.2.json @@ -30,28 +30,33 @@ "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*$" }, "import_redirects": { - "description": "Redirects for the manifest's imports.", + "description": "Redirects source URI to local wrapper or plugin.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "uri": { - "description": "Import URI to be redirected.", - "type": "string", - "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" - }, - "info": { - "description": "Path to a WRAP Manifest to be used for the import.", - "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" - } - }, - "required": [ - "uri", - "info" - ] + "$ref": "#/definitions/import_redirect" } } + }, + "definitions": { + "import_redirect": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Source URI that needs to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } } } diff --git a/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json b/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json index 581ce2765f..e0bdfaa605 100644 --- a/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json @@ -38,25 +38,30 @@ "description": "Redirects source URI to local wrapper or plugin.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "uri": { - "description": "Source URI that needs to be redirected.", - "type": "string", - "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" - }, - "info": { - "description": "Path to Wrap Manifest of the module to which URI will be redirected.", - "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" - } - }, - "required": [ - "uri", - "info" - ] + "$ref": "#/definitions/import_redirect" } } + }, + "definitions": { + "import_redirect": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Source URI that needs to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } } } diff --git a/packages/manifests/polywrap/formats/polywrap/0.2.json b/packages/manifests/polywrap/formats/polywrap/0.2.json index d2c885f79f..3ee0762233 100644 --- a/packages/manifests/polywrap/formats/polywrap/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap/0.2.json @@ -50,28 +50,33 @@ "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.graphql$" }, "import_redirects": { - "description": "Redirects for the schema's imports.", + "description": "Redirects source URI to local wrapper or plugin.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "uri": { - "description": "Import URI to be redirected.", - "type": "string", - "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" - }, - "info": { - "description": "Path to a WRAP manifest to be used for the import.", - "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" - } - }, - "required": [ - "uri", - "info" - ] + "$ref": "#/definitions/import_redirect" } } + }, + "definitions": { + "import_redirect": { + "type": "object", + "additionalProperties": false, + "properties": { + "uri": { + "description": "Source URI that needs to be redirected.", + "type": "string", + "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" + }, + "info": { + "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "type": "string", + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + } + }, + "required": [ + "uri", + "info" + ] + } } } From 19cbac1d90fc91c6fd3a2458685f97678b1738d1 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 00:47:52 -0700 Subject: [PATCH 37/56] fix client context ID tracking --- packages/js/client/src/PolywrapClient.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/js/client/src/PolywrapClient.ts b/packages/js/client/src/PolywrapClient.ts index 09669f59b6..217a79834a 100644 --- a/packages/js/client/src/PolywrapClient.ts +++ b/packages/js/client/src/PolywrapClient.ts @@ -175,8 +175,8 @@ export class PolywrapClient implements Client { uri: TUri, options: GetManifestOptions = {} ): Promise { - const wrapper = await this._loadWrapper(this._toUri(uri), undefined); - const client = contextualizeClient(this, undefined); + const wrapper = await this._loadWrapper(this._toUri(uri), options); + const client = contextualizeClient(this, options.contextId); return await wrapper.getManifest(options, client); } @@ -846,10 +846,13 @@ const contextualizeClient = ( uri: TUri, options: GetFileOptions ) => { - return client.getFile(uri, options); + return client.getFile(uri, { ...options, contextId }); }, - getManifest: (uri: TUri) => { - return client.getManifest(uri); + getManifest: ( + uri: TUri, + options: GetManifestOptions = {} + ) => { + return client.getManifest(uri, { ...options, contextId }); }, getImplementations: ( uri: TUri, From 465de13fcf6fba0d473408e9372b3142fd596163 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 01:05:49 -0700 Subject: [PATCH 38/56] remove needless abi copy --- packages/schema/bind/src/bindings/typescript/app/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/bind/src/bindings/typescript/app/index.ts b/packages/schema/bind/src/bindings/typescript/app/index.ts index b45d8b531c..4a3a71bd8a 100644 --- a/packages/schema/bind/src/bindings/typescript/app/index.ts +++ b/packages/schema/bind/src/bindings/typescript/app/index.ts @@ -29,7 +29,7 @@ export const generateBinding: GenerateBindingFn = ( output.entries = renderTemplates( path.join(__dirname, "./templates"), - { ...abi }, + abi, {} ); From 6b7608e3f624ba960857045008966f4850913e6d Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 19:08:42 -0700 Subject: [PATCH 39/56] fix ABI definition factory methods --- .../src/bindings/typescript/plugin/index.ts | 19 +- .../parse/src/__tests__/test-cases.spec.ts | 19 +- packages/schema/parse/src/abi/definitions.ts | 395 +- .../parse/src/extract/imported-env-types.ts | 1 - .../src/extract/imported-module-types.ts | 6 - .../parse/src/extract/utils/map-utils.ts | 10 +- .../parse/src/extract/utils/property-utils.ts | 7 +- .../bind/sanity/output/plugin-ts/wrap.info.ts | 3554 ++++++++--------- .../imports-ext/test-interface.eth/module.ts | 3 +- .../cases/parse/map-type/input.graphql | 18 + .../cases/parse/map-type/output.json | 357 ++ .../test-cases/cases/parse/map-type/output.ts | 113 + .../cases/parse/map-type/result.json | 262 ++ .../test-cases/cases/parse/sanity/output.ts | 3 +- 14 files changed, 2708 insertions(+), 2059 deletions(-) create mode 100644 packages/test-cases/cases/parse/map-type/input.graphql create mode 100644 packages/test-cases/cases/parse/map-type/output.json create mode 100644 packages/test-cases/cases/parse/map-type/output.ts create mode 100644 packages/test-cases/cases/parse/map-type/result.json diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index 0e73c9a5ce..7ec3b91b71 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -20,6 +20,22 @@ export { Functions }; const templatePath = (subpath: string) => path.join(__dirname, "./templates", subpath); +const sort = (obj: any) => Object + .keys(obj) + .sort() + .reduce((map: any, key) => { + if (typeof obj[key] === "object") { + map[key] = sort(obj[key]); + + if (Array.isArray(obj[key])) { + map[key] = Object.values(map[key]); + } + } else { + map[key] = obj[key]; + } + return map + }, {}); + export const generateBinding: GenerateBindingFn = ( options: BindOptions ): BindOutput => { @@ -38,8 +54,9 @@ export const generateBinding: GenerateBindingFn = ( name: options.projectName, type: "plugin", version: latestWrapManifestVersion, - abi: JSON.stringify(options.abi, null, 2), + abi: JSON.stringify(sort(options.abi), null, 2), }; + output.entries = renderTemplates( templatePath(""), { ...abi, wrapManifest }, diff --git a/packages/schema/parse/src/__tests__/test-cases.spec.ts b/packages/schema/parse/src/__tests__/test-cases.spec.ts index fc06209eaa..a0b0775b55 100644 --- a/packages/schema/parse/src/__tests__/test-cases.spec.ts +++ b/packages/schema/parse/src/__tests__/test-cases.spec.ts @@ -13,7 +13,24 @@ describe("Polywrap Schema Parser Test Cases", () => { } const result = parseSchema(testCase.input); - expect(result).toMatchObject(testCase.output); + + const sort = (obj: any) => Object + .keys(obj) + .sort() + .reduce((map: any, key) => { + if (typeof obj[key] === "object") { + map[key] = sort(obj[key]); + + if (Array.isArray(obj[key])) { + map[key] = Object.values(map[key]); + } + } else { + map[key] = obj[key]; + } + return map + }, {}); + + expect(sort(result)).toMatchObject(sort(testCase.output)); }); } }); diff --git a/packages/schema/parse/src/abi/definitions.ts b/packages/schema/parse/src/abi/definitions.ts index b0a7da7d51..405091390f 100644 --- a/packages/schema/parse/src/abi/definitions.ts +++ b/packages/schema/parse/src/abi/definitions.ts @@ -2,8 +2,6 @@ import { isMapKeyType, isModuleType, isScalarType, - MapKeyType, - ScalarType, } from "./utils"; import { @@ -30,6 +28,7 @@ import { ScalarDefinition, UnresolvedObjectOrEnumRef, WithKind, + WithComment, } from "@polywrap/wrap-manifest-types-js"; export enum DefinitionKind { @@ -60,151 +59,102 @@ export function isKind(type: WithKind, kind: DefinitionKind): boolean { return (type.kind & kind) === kind; } -export function createGenericDefinition(args: { - type: string; - name?: string; - required?: boolean; -}): GenericDefinition { +export function createGenericDefinition( + args: Omit +): GenericDefinition { return { - type: args.type, - name: args.name, - required: args.required, + ...args, kind: DefinitionKind.Generic, }; } -export function createObjectDefinition(args: { - type: string; - name?: string; - required?: boolean; - properties?: PropertyDefinition[]; - interfaces?: InterfaceImplementedDefinition[]; - comment?: string; -}): ObjectDefinition { +export function createObjectDefinition( + args: Omit +): ObjectDefinition { return { - ...createGenericDefinition(args), - properties: args.properties, - interfaces: args.interfaces, - comment: args.comment, + ...args, kind: DefinitionKind.Object, }; } -export function createObjectRef(args: { - type: string; - name?: string; - required?: boolean; -}): ObjectRef { +export function createObjectRef( + args: Omit +): ObjectRef { return { - ...createGenericDefinition(args), + ...args, kind: DefinitionKind.ObjectRef, }; } -export function createAnyDefinition(args: { - type: string; - name?: string; - required?: boolean; - array?: ArrayDefinition; - map?: MapDefinition; - scalar?: ScalarDefinition; - object?: ObjectRef; - enum?: EnumRef; - unresolvedObjectOrEnum?: UnresolvedObjectOrEnumRef; -}): AnyDefinition { +export function createAnyDefinition( + args: Omit +): AnyDefinition { return { - ...createGenericDefinition(args), - array: args.array, - map: args.map, - scalar: args.scalar, - object: args.object, - enum: args.enum, - unresolvedObjectOrEnum: args.unresolvedObjectOrEnum, + ...args, kind: DefinitionKind.Any, }; } -export function createMapKeyDefinition(args: { - type: string; - name?: string; - required?: boolean; -}): MapKeyDefinition { +export function createMapKeyDefinition( + args: Omit +): MapKeyDefinition { if (!isMapKeyType(args.type)) { throw Error( `createMapKeyDefinition: Unrecognized Map key type provided "${args.type}"` ); } return { - ...createGenericDefinition(args), - type: args.type as MapKeyType, + ...args, kind: DefinitionKind.Scalar, }; } -export function createScalarDefinition(args: { - type: string; - name?: string; - required?: boolean; -}): ScalarDefinition { +export function createScalarDefinition( + args: Omit +): ScalarDefinition { if (!isScalarType(args.type)) { throw Error( `createScalarDefinition: Unrecognized scalar type provided "${args.type}"` ); } return { - ...createGenericDefinition(args), - type: args.type as ScalarType, + ...args, kind: DefinitionKind.Scalar, }; } -export function createEnumDefinition(args: { - type: string; - name?: string; - required?: boolean; - constants?: string[]; - comment?: string; -}): EnumDefinition { +export function createEnumDefinition( + args: Omit +): EnumDefinition { return { - ...createGenericDefinition(args), - type: args.type, + ...args, kind: DefinitionKind.Enum, - constants: args.constants, - comment: args.comment, }; } -export function createEnumRef(args: { - type: string; - name?: string; - required?: boolean; -}): EnumRef { +export function createEnumRef( + args: Omit +): EnumRef { return { - ...createGenericDefinition(args), + ...args, kind: DefinitionKind.EnumRef, }; } -export function createUnresolvedObjectOrEnumRef(args: { - type: string; - name?: string; - required?: boolean; -}): UnresolvedObjectOrEnumRef { +export function createUnresolvedObjectOrEnumRef( + args: Omit +): UnresolvedObjectOrEnumRef { return { - ...createGenericDefinition(args), - type: args.type, + ...args, kind: DefinitionKind.UnresolvedObjectOrEnum, }; } -export function createMapDefinition(args: { - type: string; - name?: string; - required?: boolean; - key?: MapKeyDefinition; - value?: GenericDefinition; -}): MapDefinition { +export function createMapDefinition( + args: Omit +): MapDefinition { return { + ...args, ...createAnyDefinition({ ...args, array: @@ -232,19 +182,15 @@ export function createMapDefinition(args: { ? (args.value as UnresolvedObjectOrEnumRef) : undefined, }), - key: args.key, - value: args.value, kind: DefinitionKind.Map, }; } -export function createArrayDefinition(args: { - type: string; - name?: string; - required?: boolean; - item?: GenericDefinition; -}): ArrayDefinition { +export function createArrayDefinition( + args: Omit +): ArrayDefinition { return { + ...args, ...createAnyDefinition({ ...args, array: @@ -272,167 +218,126 @@ export function createArrayDefinition(args: { ? (args.item as UnresolvedObjectOrEnumRef) : undefined, }), - item: args.item, kind: DefinitionKind.Array, }; } -export function createPropertyDefinition(args: { - type: string; - name?: string; - required?: boolean; - array?: ArrayDefinition; - map?: MapDefinition; - scalar?: ScalarDefinition; - object?: ObjectRef; - enum?: EnumRef; - comment?: string; -}): PropertyDefinition { +export function createPropertyDefinition( + args: Omit +): PropertyDefinition { return { - ...createAnyDefinition(args), - comment: args.comment, + ...args, kind: DefinitionKind.Property, }; } -export function createInterfaceImplementedDefinition(args: { - type: string; - name?: string; - required?: boolean; - array?: ArrayDefinition; - map?: MapDefinition; - scalar?: ScalarDefinition; - object?: ObjectDefinition; - enum?: EnumDefinition; -}): InterfaceImplementedDefinition { +export function createInterfaceImplementedDefinition( + args: Omit +): InterfaceImplementedDefinition { return { - ...createAnyDefinition(args), + ...args, kind: DefinitionKind.InterfaceImplemented, }; } -export function createArrayPropertyDefinition(args: { - type: string; - name?: string; - required?: boolean; - item?: GenericDefinition; - comment?: string; -}): PropertyDefinition { - return createPropertyDefinition({ - ...args, +export function createArrayPropertyDefinition( + args: Omit & WithComment +): PropertyDefinition { + const comment = args.comment; + delete args.comment; + const result = createPropertyDefinition({ + name: args.name, + type: args.type, array: createArrayDefinition(args), }); + return comment ? { ...result, comment } : result; } -export function createMapPropertyDefinition(args: { - type: string; - name?: string; - required?: boolean; - key: MapKeyDefinition; - value?: GenericDefinition; - comment?: string; -}): PropertyDefinition { - return createPropertyDefinition({ - ...args, +export function createMapPropertyDefinition( + args: Omit & WithComment +): PropertyDefinition { + const comment = args.comment; + delete args.comment; + const result = createPropertyDefinition({ + name: args.name, + type: args.type, map: createMapDefinition(args), }); + return comment ? { ...result, comment } : result; } -export function createScalarPropertyDefinition(args: { - type: ScalarDefinition["type"]; - name?: string; - required?: boolean; - comment?: string; -}): PropertyDefinition { - return createPropertyDefinition({ - ...args, +export function createScalarPropertyDefinition( + args: Omit & WithComment +): PropertyDefinition { + const comment = args.comment; + delete args.comment; + const result = createPropertyDefinition({ + name: args.name, + type: args.type, scalar: createScalarDefinition(args), }); + return comment ? { ...result, comment } : result; } -export function createEnumPropertyDefinition(args: { - type: string; - name?: string; - required?: boolean; - constants?: string[]; - comment?: string; -}): PropertyDefinition { - return createPropertyDefinition({ - ...args, +export function createEnumPropertyDefinition( + args: Omit & WithComment +): PropertyDefinition { + const comment = args.comment; + delete args.comment; + const result = createPropertyDefinition({ + name: args.name, + type: args.type, enum: createEnumRef(args), }); + return comment ? { ...result, comment } : result; } -export function createObjectPropertyDefinition(args: { - type: string; - name?: string; - required?: boolean; - properties?: PropertyDefinition[]; - comment?: string; -}): PropertyDefinition { - return createPropertyDefinition({ - ...args, +export function createObjectPropertyDefinition( + args: Omit & WithComment +): PropertyDefinition { + const comment = args.comment; + delete args.comment; + const result = createPropertyDefinition({ + name: args.name, + type: args.type, object: createObjectRef(args), }); + return comment ? { ...result, comment } : result; } -export function createMethodDefinition(args: { - name: string; - arguments?: PropertyDefinition[]; - env?: { - required: boolean; - }; - return: PropertyDefinition; - comment?: string; -}): MethodDefinition { +export function createMethodDefinition( + args: Omit, "type"> +): MethodDefinition { return { + ...args, ...createGenericDefinition({ ...args, type: "Method", }), required: true, - arguments: args.arguments, - return: args.return, - comment: args.comment, kind: DefinitionKind.Method, }; } -export function createModuleDefinition(args: { - imports?: { type: ModuleDefinition["type"] }[]; - interfaces?: InterfaceImplementedDefinition[]; - required?: boolean; - comment?: string; -}): ModuleDefinition { +export function createModuleDefinition( + args: Omit, "type"> +): ModuleDefinition { return { + ...args, ...createGenericDefinition({ ...args, type: "Module", }), - methods: [], - imports: args.imports, - interfaces: args.interfaces, - comment: args.comment, kind: DefinitionKind.Module, }; } -export function createImportedEnumDefinition(args: { - type: string; - constants?: string[]; - name?: string; - required?: boolean; - uri: string; - namespace: string; - nativeType: string; - comment?: string; -}): ImportedEnumDefinition { +export function createImportedEnumDefinition( + args: Omit +): ImportedEnumDefinition { return { + ...args, ...createEnumDefinition(args), - uri: args.uri, - namespace: args.namespace, - nativeType: args.nativeType, - comment: args.comment, kind: DefinitionKind.ImportedEnum, }; } @@ -451,32 +356,20 @@ export function createCapability(args: { }; } -export function createInterfaceDefinition(args: { - type: string; - required?: boolean; - namespace: string; - uri: string; - capabilities: CapabilityDefinition; -}): InterfaceDefinition { +export function createInterfaceDefinition( + args: Omit, "nativeType"> +): InterfaceDefinition { return { + ...args, ...createGenericDefinition(args), - namespace: args.namespace, - uri: args.uri, nativeType: "Interface", - capabilities: args.capabilities, kind: DefinitionKind.Interface, }; } -export function createImportedModuleDefinition(args: { - required?: boolean; - uri: string; - namespace: string; - nativeType: string; - isInterface?: boolean; - interfaces?: InterfaceImplementedDefinition[]; - comment?: string; -}): ImportedModuleDefinition { +export function createImportedModuleDefinition( + args: Omit, "type"> +): ImportedModuleDefinition { if (!isModuleType(args.nativeType)) { throw Error( `createImportedModuleDefinition: Unrecognized module type provided "${args.nativeType}"` @@ -484,72 +377,44 @@ export function createImportedModuleDefinition(args: { } return { + ...args, ...createGenericDefinition({ ...args, type: `${args.namespace}_${args.nativeType}`, }), - methods: [], - uri: args.uri, - namespace: args.namespace, - nativeType: args.nativeType, - comment: args.comment, - isInterface: args.isInterface, kind: DefinitionKind.ImportedModule, }; } -export function createImportedObjectDefinition(args: { - type: string; - name?: string; - required?: boolean; - uri: string; - namespace: string; - nativeType: string; - interfaces?: InterfaceImplementedDefinition[]; - comment?: string; -}): ImportedObjectDefinition { +export function createImportedObjectDefinition( + args: Omit +): ImportedObjectDefinition { return { + ...args, ...createObjectDefinition(args), - uri: args.uri, - namespace: args.namespace, - nativeType: args.nativeType, - comment: args.comment, kind: DefinitionKind.ImportedObject, }; } -export function createEnvDefinition(args: { - name?: string; - required?: boolean; - properties?: PropertyDefinition[]; - interfaces?: InterfaceImplementedDefinition[]; - comment?: string; -}): EnvDefinition { +export function createEnvDefinition( + args: Omit, "type"> +): EnvDefinition { return { + ...args, ...createObjectDefinition({ ...args, type: "Env" }), kind: DefinitionKind.Env, }; } -export function createImportedEnvDefinition(args: { - type: string; - name?: string; - required?: boolean; - uri: string; - namespace: string; - nativeType: string; - interfaces?: InterfaceImplementedDefinition[]; - comment?: string; -}): ImportedEnvDefinition { +export function createImportedEnvDefinition( + args: Omit, "type"> +): ImportedEnvDefinition { return { + ...args, ...createObjectDefinition({ ...args, type: `${args.namespace}_Env`, }), - uri: args.uri, - namespace: args.namespace, - nativeType: args.nativeType, - comment: args.comment, kind: DefinitionKind.ImportedEnv, }; } diff --git a/packages/schema/parse/src/extract/imported-env-types.ts b/packages/schema/parse/src/extract/imported-env-types.ts index 4dd8f681f7..276292d113 100644 --- a/packages/schema/parse/src/extract/imported-env-types.ts +++ b/packages/schema/parse/src/extract/imported-env-types.ts @@ -39,7 +39,6 @@ const visitorEnter = ( ); const importedType = createImportedEnvDefinition({ - type: node.name.value, uri: imported.uri, namespace: imported.namespace, nativeType: imported.nativeType, diff --git a/packages/schema/parse/src/extract/imported-module-types.ts b/packages/schema/parse/src/extract/imported-module-types.ts index 731f753acf..e29e5cf6ec 100644 --- a/packages/schema/parse/src/extract/imported-module-types.ts +++ b/packages/schema/parse/src/extract/imported-module-types.ts @@ -1,6 +1,5 @@ import { createImportedModuleDefinition, - createInterfaceImplementedDefinition, createMethodDefinition, createPropertyDefinition, } from ".."; @@ -45,16 +44,11 @@ const visitorEnter = ( node.directives.find((dir) => dir.name.value === "enabled_interface"); const isInterface = dir ? true : false; - const interfaces = node.interfaces?.map((x) => - createInterfaceImplementedDefinition({ type: x.name.value }) - ); - const importedType = createImportedModuleDefinition({ uri: imported.uri, namespace: imported.namespace, nativeType: imported.nativeType, isInterface: isInterface, - interfaces: interfaces?.length ? interfaces : undefined, comment: node.description?.value, }); importedModuleTypes.push(importedType); diff --git a/packages/schema/parse/src/extract/utils/map-utils.ts b/packages/schema/parse/src/extract/utils/map-utils.ts index 9e0d679163..a67aea47dd 100644 --- a/packages/schema/parse/src/extract/utils/map-utils.ts +++ b/packages/schema/parse/src/extract/utils/map-utils.ts @@ -8,7 +8,11 @@ import { isScalarType, } from "../.."; -import { GenericDefinition } from "@polywrap/wrap-manifest-types-js"; +import { + GenericDefinition, + MapKeyDefinition, + ScalarDefinition +} from "@polywrap/wrap-manifest-types-js"; type CurrentAbi = { currentType: string; @@ -115,7 +119,7 @@ const _parseMapType = ( if (isScalarType(currentType)) { return createScalarDefinition({ name: name, - type: currentType, + type: currentType as ScalarDefinition["type"], required: required, }); } @@ -162,7 +166,7 @@ const _parseMapType = ( name: name, key: createMapKeyDefinition({ name: name, - type: keyType, + type: keyType as MapKeyDefinition["type"], required: keyRequired, }), value: _parseMapType(rootType, valType, name), diff --git a/packages/schema/parse/src/extract/utils/property-utils.ts b/packages/schema/parse/src/extract/utils/property-utils.ts index 077e7b5737..ac0c3129ef 100644 --- a/packages/schema/parse/src/extract/utils/property-utils.ts +++ b/packages/schema/parse/src/extract/utils/property-utils.ts @@ -5,7 +5,10 @@ import { isScalarType, } from "../.."; -import { PropertyDefinition } from "@polywrap/wrap-manifest-types-js"; +import { + PropertyDefinition, + ScalarDefinition +} from "@polywrap/wrap-manifest-types-js"; const toBoolean = (val: unknown) => !!val; @@ -20,7 +23,7 @@ export function setPropertyType( if (isScalarType(type.type)) { property.scalar = createScalarDefinition({ name: name, - type: type.type, + type: type.type as ScalarDefinition["type"], required: type.required, }); return; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index 719c71bfce..ab1ab0e52d 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -7,2080 +7,2080 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - "objectTypes": [ + "enumTypes": [ { - "type": "CustomType", - "kind": 1, - "properties": [ - { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "optStr", - "kind": 34, - "scalar": { - "type": "String", - "name": "optStr", - "kind": 4 - } - }, - { - "type": "UInt", - "name": "u", + "constants": [ + "STRING", + "BYTES" + ], + "kind": 8, + "type": "CustomEnum" + } + ], + "envType": { + "kind": 65536, + "properties": [ + { + "kind": 34, + "name": "prop", + "required": true, + "scalar": { + "kind": 4, + "name": "prop", "required": true, - "kind": 34, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - } + "type": "String" }, - { - "type": "UInt", - "name": "optU", - "kind": 34, - "scalar": { - "type": "UInt", - "name": "optU", - "kind": 4 - } - }, - { - "type": "UInt8", - "name": "u8", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt8", - "name": "u8", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt16", - "name": "u16", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt16", - "name": "u16", - "required": true, - "kind": 4 - } + "type": "String" + }, + { + "kind": 34, + "name": "optProp", + "scalar": { + "kind": 4, + "name": "optProp", + "type": "String" }, - { - "type": "UInt32", - "name": "u32", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "u32", + "type": "String" + }, + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "optMap", "required": true, - "kind": 4 - } - }, - { - "type": "Int", - "name": "i", - "required": true, - "kind": 34, + "type": "String" + }, + "kind": 262146, + "name": "optMap", "scalar": { - "type": "Int", - "name": "i", - "required": true, - "kind": 4 + "kind": 4, + "name": "optMap", + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "optMap", + "type": "Int" } }, + "name": "optMap", + "type": "Map" + } + ], + "type": "Env" + }, + "importedEnumTypes": [ + { + "constants": [ + "STRING", + "BYTES" + ], + "kind": 520, + "namespace": "TestImport", + "nativeType": "Enum", + "type": "TestImport_Enum", + "uri": "testimport.uri.eth" + } + ], + "importedEnvTypes": [ + { + "kind": 524288, + "namespace": "TestImport", + "nativeType": "Env", + "properties": [ { - "type": "Int8", - "name": "i8", - "required": true, "kind": 34, - "scalar": { - "type": "Int8", - "name": "i8", - "required": true, - "kind": 4 - } - }, - { - "type": "Int16", - "name": "i16", + "name": "enviroProp", "required": true, - "kind": 34, "scalar": { - "type": "Int16", - "name": "i16", + "kind": 4, + "name": "enviroProp", "required": true, - "kind": 4 - } - }, + "type": "String" + }, + "type": "String" + } + ], + "type": "TestImport_Env", + "uri": "testimport.uri.eth" + } + ], + "importedModuleTypes": [ + { + "isInterface": true, + "kind": 256, + "methods": [ { - "type": "Int32", - "name": "i32", + "arguments": [ + { + "kind": 34, + "name": "str", + "required": true, + "scalar": { + "kind": 4, + "name": "str", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "optStr", + "scalar": { + "kind": 4, + "name": "optStr", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "u", + "required": true, + "scalar": { + "kind": 4, + "name": "u", + "required": true, + "type": "UInt" + }, + "type": "UInt" + }, + { + "kind": 34, + "name": "optU", + "scalar": { + "kind": 4, + "name": "optU", + "type": "UInt" + }, + "type": "UInt" + }, + { + "array": { + "array": { + "item": { + "kind": 4, + "name": "uArrayArray", + "type": "UInt" + }, + "kind": 18, + "name": "uArrayArray", + "scalar": { + "kind": 4, + "name": "uArrayArray", + "type": "UInt" + }, + "type": "[UInt]" + }, + "item": { + "item": { + "kind": 4, + "name": "uArrayArray", + "type": "UInt" + }, + "kind": 18, + "name": "uArrayArray", + "scalar": { + "kind": 4, + "name": "uArrayArray", + "type": "UInt" + }, + "type": "[UInt]" + }, + "kind": 18, + "name": "uArrayArray", + "required": true, + "type": "[[UInt]]" + }, + "kind": 34, + "name": "uArrayArray", + "required": true, + "type": "[[UInt]]" + }, + { + "kind": 34, + "name": "object", + "object": { + "kind": 8192, + "name": "object", + "required": true, + "type": "TestImport_Object" + }, + "required": true, + "type": "TestImport_Object" + }, + { + "kind": 34, + "name": "optObject", + "object": { + "kind": 8192, + "name": "optObject", + "type": "TestImport_Object" + }, + "type": "TestImport_Object" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "objectArray", + "required": true, + "type": "TestImport_Object" + }, + "kind": 18, + "name": "objectArray", + "object": { + "kind": 8192, + "name": "objectArray", + "required": true, + "type": "TestImport_Object" + }, + "required": true, + "type": "[TestImport_Object]" + }, + "kind": 34, + "name": "objectArray", + "required": true, + "type": "[TestImport_Object]" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "optObjectArray", + "type": "TestImport_Object" + }, + "kind": 18, + "name": "optObjectArray", + "object": { + "kind": 8192, + "name": "optObjectArray", + "type": "TestImport_Object" + }, + "type": "[TestImport_Object]" + }, + "kind": 34, + "name": "optObjectArray", + "type": "[TestImport_Object]" + }, + { + "enum": { + "kind": 16384, + "name": "en", + "required": true, + "type": "TestImport_Enum" + }, + "kind": 34, + "name": "en", + "required": true, + "type": "TestImport_Enum" + }, + { + "enum": { + "kind": 16384, + "name": "optEnum", + "type": "TestImport_Enum" + }, + "kind": 34, + "name": "optEnum", + "type": "TestImport_Enum" + }, + { + "array": { + "enum": { + "kind": 16384, + "name": "enumArray", + "required": true, + "type": "TestImport_Enum" + }, + "item": { + "kind": 16384, + "name": "enumArray", + "required": true, + "type": "TestImport_Enum" + }, + "kind": 18, + "name": "enumArray", + "required": true, + "type": "[TestImport_Enum]" + }, + "kind": 34, + "name": "enumArray", + "required": true, + "type": "[TestImport_Enum]" + }, + { + "array": { + "enum": { + "kind": 16384, + "name": "optEnumArray", + "type": "TestImport_Enum" + }, + "item": { + "kind": 16384, + "name": "optEnumArray", + "type": "TestImport_Enum" + }, + "kind": 18, + "name": "optEnumArray", + "type": "[TestImport_Enum]" + }, + "kind": 34, + "name": "optEnumArray", + "type": "[TestImport_Enum]" + } + ], + "env": { + "required": true + }, + "kind": 64, + "name": "importedMethod", "required": true, - "kind": 34, - "scalar": { - "type": "Int32", - "name": "i32", - "required": true, - "kind": 4 - } + "return": { + "kind": 34, + "name": "importedMethod", + "object": { + "kind": 8192, + "name": "importedMethod", + "type": "TestImport_Object" + }, + "type": "TestImport_Object" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "bigint", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "arg", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "arg", + "required": true, + "scalar": { + "kind": 4, + "name": "arg", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "arg", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "anotherMethod", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "bigint", + "return": { + "kind": 34, + "name": "anotherMethod", "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "optBigint", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "optBigint", - "kind": 4 - } - }, + "scalar": { + "kind": 4, + "name": "anotherMethod", + "required": true, + "type": "Int32" + }, + "type": "Int32" + }, + "type": "Method" + } + ], + "namespace": "TestImport", + "nativeType": "Module", + "type": "TestImport_Module", + "uri": "testimport.uri.eth" + } + ], + "importedObjectTypes": [ + { + "kind": 1025, + "namespace": "TestImport", + "nativeType": "Object", + "properties": [ { - "type": "BigNumber", - "name": "bignumber", - "required": true, "kind": 34, - "scalar": { - "type": "BigNumber", - "name": "bignumber", + "name": "object", + "object": { + "kind": 8192, + "name": "object", "required": true, - "kind": 4 - } - }, - { - "type": "BigNumber", - "name": "optBignumber", - "kind": 34, - "scalar": { - "type": "BigNumber", - "name": "optBignumber", - "kind": 4 - } - }, - { - "type": "JSON", - "name": "json", + "type": "TestImport_AnotherObject" + }, "required": true, - "kind": 34, - "scalar": { - "type": "JSON", - "name": "json", - "required": true, - "kind": 4 - } + "type": "TestImport_AnotherObject" }, { - "type": "JSON", - "name": "optJson", "kind": 34, - "scalar": { - "type": "JSON", - "name": "optJson", - "kind": 4 - } + "name": "optObject", + "object": { + "kind": 8192, + "name": "optObject", + "type": "TestImport_AnotherObject" + }, + "type": "TestImport_AnotherObject" }, { - "type": "Bytes", - "name": "bytes", - "required": true, - "kind": 34, - "scalar": { - "type": "Bytes", - "name": "bytes", + "array": { + "item": { + "kind": 8192, + "name": "objectArray", + "required": true, + "type": "TestImport_AnotherObject" + }, + "kind": 18, + "name": "objectArray", + "object": { + "kind": 8192, + "name": "objectArray", + "required": true, + "type": "TestImport_AnotherObject" + }, "required": true, - "kind": 4 - } + "type": "[TestImport_AnotherObject]" + }, + "kind": 34, + "name": "objectArray", + "required": true, + "type": "[TestImport_AnotherObject]" }, { - "type": "Bytes", - "name": "optBytes", + "array": { + "item": { + "kind": 8192, + "name": "optObjectArray", + "type": "TestImport_AnotherObject" + }, + "kind": 18, + "name": "optObjectArray", + "object": { + "kind": 8192, + "name": "optObjectArray", + "type": "TestImport_AnotherObject" + }, + "type": "[TestImport_AnotherObject]" + }, "kind": 34, - "scalar": { - "type": "Bytes", - "name": "optBytes", - "kind": 4 - } + "name": "optObjectArray", + "type": "[TestImport_AnotherObject]" }, { - "type": "Boolean", - "name": "boolean", - "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "boolean", + "enum": { + "kind": 16384, + "name": "en", "required": true, - "kind": 4 - } + "type": "TestImport_Enum" + }, + "kind": 34, + "name": "en", + "required": true, + "type": "TestImport_Enum" }, { - "type": "Boolean", - "name": "optBoolean", + "enum": { + "kind": 16384, + "name": "optEnum", + "type": "TestImport_Enum" + }, "kind": 34, - "scalar": { - "type": "Boolean", - "name": "optBoolean", - "kind": 4 - } + "name": "optEnum", + "type": "TestImport_Enum" }, { - "type": "[UInt]", - "name": "uArray", - "required": true, - "kind": 34, "array": { - "type": "[UInt]", - "name": "uArray", - "required": true, - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uArray", + "enum": { + "kind": 16384, + "name": "enumArray", "required": true, - "kind": 4 + "type": "TestImport_Enum" }, "item": { - "type": "UInt", - "name": "uArray", + "kind": 16384, + "name": "enumArray", "required": true, - "kind": 4 - } - } + "type": "TestImport_Enum" + }, + "kind": 18, + "name": "enumArray", + "required": true, + "type": "[TestImport_Enum]" + }, + "kind": 34, + "name": "enumArray", + "required": true, + "type": "[TestImport_Enum]" }, { - "type": "[UInt]", - "name": "uOptArray", - "kind": 34, "array": { - "type": "[UInt]", - "name": "uOptArray", - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uOptArray", - "required": true, - "kind": 4 + "enum": { + "kind": 16384, + "name": "optEnumArray", + "type": "TestImport_Enum" }, "item": { - "type": "UInt", - "name": "uOptArray", - "required": true, - "kind": 4 - } - } - }, + "kind": 16384, + "name": "optEnumArray", + "type": "TestImport_Enum" + }, + "kind": 18, + "name": "optEnumArray", + "type": "[TestImport_Enum]" + }, + "kind": 34, + "name": "optEnumArray", + "type": "[TestImport_Enum]" + } + ], + "type": "TestImport_Object", + "uri": "testimport.uri.eth" + }, + { + "kind": 1025, + "namespace": "TestImport", + "nativeType": "AnotherObject", + "properties": [ { - "type": "[UInt]", - "name": "optUOptArray", "kind": 34, - "array": { - "type": "[UInt]", - "name": "optUOptArray", - "kind": 18, + "name": "prop", + "required": true, + "scalar": { + "kind": 4, + "name": "prop", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "type": "TestImport_AnotherObject", + "uri": "testimport.uri.eth" + } + ], + "interfaceTypes": [ + { + "capabilities": { + "getImplementations": { + "enabled": true + } + }, + "kind": 32768, + "namespace": "TestImport", + "nativeType": "Interface", + "type": "TestImport", + "uri": "testimport.uri.eth" + } + ], + "moduleType": { + "imports": [ + { + "type": "TestImport_Module" + }, + { + "type": "TestImport_Object" + }, + { + "type": "TestImport_AnotherObject" + }, + { + "type": "TestImport_Enum" + } + ], + "kind": 128, + "methods": [ + { + "arguments": [ + { + "kind": 34, + "name": "str", + "required": true, "scalar": { - "type": "UInt", - "name": "optUOptArray", - "kind": 4 + "kind": 4, + "name": "str", + "required": true, + "type": "String" }, - "item": { - "type": "UInt", - "name": "optUOptArray", - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "optStrOptArray", - "kind": 34, - "array": { - "type": "[String]", - "name": "optStrOptArray", - "kind": 18, + "type": "String" + }, + { + "kind": 34, + "name": "optStr", "scalar": { - "type": "String", - "name": "optStrOptArray", - "kind": 4 + "kind": 4, + "name": "optStr", + "type": "String" }, - "item": { - "type": "String", - "name": "optStrOptArray", - "kind": 4 - } - } - }, - { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt]]", - "name": "uArrayArray", + "type": "String" + }, + { + "enum": { + "kind": 16384, + "name": "en", + "required": true, + "type": "CustomEnum" + }, + "kind": 34, + "name": "en", "required": true, - "kind": 18, + "type": "CustomEnum" + }, + { + "enum": { + "kind": 16384, + "name": "optEnum", + "type": "CustomEnum" + }, + "kind": 34, + "name": "optEnum", + "type": "CustomEnum" + }, + { "array": { - "type": "[UInt]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uArrayArray", + "enum": { + "kind": 16384, + "name": "enumArray", "required": true, - "kind": 4 + "type": "CustomEnum" }, "item": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 - } - }, - "item": { - "type": "[UInt]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uArrayArray", + "kind": 16384, + "name": "enumArray", "required": true, - "kind": 4 + "type": "CustomEnum" }, - "item": { - "type": "UInt", - "name": "uArrayArray", - "required": true, - "kind": 4 - } - } - } - }, - { - "type": "[[UInt32]]", - "name": "uOptArrayOptArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt32]]", - "name": "uOptArrayOptArray", + "kind": 18, + "name": "enumArray", + "required": true, + "type": "[CustomEnum]" + }, + "kind": 34, + "name": "enumArray", "required": true, - "kind": 18, + "type": "[CustomEnum]" + }, + { "array": { - "type": "[UInt32]", - "name": "uOptArrayOptArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "kind": 4 + "enum": { + "kind": 16384, + "name": "optEnumArray", + "type": "CustomEnum" }, "item": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "kind": 4 - } - }, - "item": { - "type": "[UInt32]", - "name": "uOptArrayOptArray", + "kind": 16384, + "name": "optEnumArray", + "type": "CustomEnum" + }, "kind": 18, + "name": "optEnumArray", + "type": "[CustomEnum]" + }, + "kind": 34, + "name": "optEnumArray", + "type": "[CustomEnum]" + }, + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "map", + "required": true, "scalar": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "kind": 4 + "kind": 4, + "name": "map", + "required": true, + "type": "Int" }, - "item": { - "type": "UInt32", - "name": "uOptArrayOptArray", - "kind": 4 + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" } - } - } - }, - { - "type": "[[[UInt32]]]", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[[UInt32]]]", - "name": "uArrayOptArrayArray", + }, + "name": "map", "required": true, - "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "uArrayOptArrayArray", - "kind": 18, + "type": "Map" + }, + { + "kind": 34, + "map": { "array": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", - "required": true, + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, "kind": 18, + "name": "mapOfArr", + "required": true, "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "kind": 4, + "name": "mapOfArr", "required": true, - "kind": 4 + "type": "Int" }, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 - } + "type": "[Int]" }, - "item": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", + "key": { + "kind": 4, + "name": "mapOfArr", "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArr", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, "kind": 18, + "name": "mapOfArr", + "required": true, "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "kind": 4, + "name": "mapOfArr", "required": true, - "kind": 4 + "type": "Int" }, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", - "required": true, - "kind": 4 - } + "type": "[Int]" } }, - "item": { - "type": "[[UInt32]]", - "name": "uArrayOptArrayArray", - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", + "name": "mapOfArr", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "mapOfObj", "required": true, - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "type": "String" + }, + "kind": 262146, + "name": "mapOfObj", + "object": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "Map", + "value": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + } + }, + "name": "mapOfObj", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "array": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", "required": true, - "kind": 4 + "type": "AnotherType" }, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", "required": true, - "kind": 4 - } + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" }, - "item": { - "type": "[UInt32]", - "name": "uArrayOptArrayArray", + "key": { + "kind": 4, + "name": "mapOfArrOfObj", "required": true, - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "type": "String" + }, + "kind": 262146, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", "required": true, - "kind": 4 + "type": "AnotherType" }, - "item": { - "type": "UInt32", - "name": "uArrayOptArrayArray", + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", "required": true, - "kind": 4 - } + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" } - } + }, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map" } - }, - { - "type": "[[[[UInt32]]]]", - "name": "crazyArray", + ], + "kind": 64, + "name": "moduleMethod", + "required": true, + "return": { "kind": 34, - "array": { - "type": "[[[[UInt32]]]]", - "name": "crazyArray", - "kind": 18, + "name": "moduleMethod", + "required": true, + "scalar": { + "kind": 4, + "name": "moduleMethod", + "required": true, + "type": "Int" + }, + "type": "Int" + }, + "type": "Method" + }, + { + "arguments": [ + { + "kind": 34, + "name": "object", + "object": { + "kind": 8192, + "name": "object", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "AnotherType" + }, + { + "kind": 34, + "name": "optObject", + "object": { + "kind": 8192, + "name": "optObject", + "type": "AnotherType" + }, + "type": "AnotherType" + }, + { "array": { - "type": "[[[UInt32]]]", - "name": "crazyArray", + "item": { + "kind": 8192, + "name": "objectArray", + "required": true, + "type": "AnotherType" + }, "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "crazyArray", + "name": "objectArray", + "object": { + "kind": 8192, + "name": "objectArray", "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - }, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - } + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + }, + "kind": 34, + "name": "objectArray", + "required": true, + "type": "[AnotherType]" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "optObjectArray", + "type": "AnotherType" + }, + "kind": 18, + "name": "optObjectArray", + "object": { + "kind": 8192, + "name": "optObjectArray", + "type": "AnotherType" }, + "type": "[AnotherType]" + }, + "kind": 34, + "name": "optObjectArray", + "type": "[AnotherType]" + } + ], + "env": { + "required": true + }, + "kind": 64, + "name": "objectMethod", + "required": true, + "return": { + "kind": 34, + "name": "objectMethod", + "object": { + "kind": 8192, + "name": "objectMethod", + "type": "AnotherType" + }, + "type": "AnotherType" + }, + "type": "Method" + }, + { + "arguments": [ + { + "kind": 34, + "name": "object", + "object": { + "kind": 8192, + "name": "object", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "AnotherType" + }, + { + "kind": 34, + "name": "optObject", + "object": { + "kind": 8192, + "name": "optObject", + "type": "AnotherType" + }, + "type": "AnotherType" + }, + { + "array": { "item": { - "type": "[[UInt32]]", - "name": "crazyArray", + "kind": 8192, + "name": "objectArray", "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - }, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - } - } - }, - "item": { - "type": "[[[UInt32]]]", - "name": "crazyArray", + "type": "AnotherType" + }, "kind": 18, - "array": { - "type": "[[UInt32]]", - "name": "crazyArray", + "name": "objectArray", + "object": { + "kind": 8192, + "name": "objectArray", "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - }, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - } + "type": "AnotherType" }, + "required": true, + "type": "[AnotherType]" + }, + "kind": 34, + "name": "objectArray", + "required": true, + "type": "[AnotherType]" + }, + { + "array": { "item": { - "type": "[[UInt32]]", - "name": "crazyArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - }, - "item": { - "type": "[UInt32]", - "name": "crazyArray", - "kind": 18, - "scalar": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - }, - "item": { - "type": "UInt32", - "name": "crazyArray", - "required": true, - "kind": 4 - } - } - } - } + "kind": 8192, + "name": "optObjectArray", + "type": "AnotherType" + }, + "kind": 18, + "name": "optObjectArray", + "object": { + "kind": 8192, + "name": "optObjectArray", + "type": "AnotherType" + }, + "type": "[AnotherType]" + }, + "kind": 34, + "name": "optObjectArray", + "type": "[AnotherType]" } + ], + "env": { + "required": false }, + "kind": 64, + "name": "optionalEnvMethod", + "required": true, + "return": { + "kind": 34, + "name": "optionalEnvMethod", + "object": { + "kind": 8192, + "name": "optionalEnvMethod", + "type": "AnotherType" + }, + "type": "AnotherType" + }, + "type": "Method" + } + ], + "type": "Module" + }, + "objectTypes": [ + { + "kind": 1, + "properties": [ { - "type": "AnotherType", - "name": "object", + "kind": 34, + "name": "str", "required": true, + "scalar": { + "kind": 4, + "name": "str", + "required": true, + "type": "String" + }, + "type": "String" + }, + { "kind": 34, - "object": { - "type": "AnotherType", - "name": "object", + "name": "optStr", + "scalar": { + "kind": 4, + "name": "optStr", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "u", + "required": true, + "scalar": { + "kind": 4, + "name": "u", "required": true, - "kind": 8192 - } + "type": "UInt" + }, + "type": "UInt" }, { - "type": "AnotherType", - "name": "optObject", "kind": 34, - "object": { - "type": "AnotherType", - "name": "optObject", - "kind": 8192 - } + "name": "optU", + "scalar": { + "kind": 4, + "name": "optU", + "type": "UInt" + }, + "type": "UInt" }, { - "type": "[AnotherType]", - "name": "objectArray", + "kind": 34, + "name": "u8", "required": true, + "scalar": { + "kind": 4, + "name": "u8", + "required": true, + "type": "UInt8" + }, + "type": "UInt8" + }, + { "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "objectArray", + "name": "u16", + "required": true, + "scalar": { + "kind": 4, + "name": "u16", "required": true, - "kind": 18, - "object": { - "type": "AnotherType", - "name": "objectArray", - "required": true, - "kind": 8192 - }, - "item": { - "type": "AnotherType", - "name": "objectArray", - "required": true, - "kind": 8192 - } - } + "type": "UInt16" + }, + "type": "UInt16" }, { - "type": "[AnotherType]", - "name": "optObjectArray", "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "optObjectArray", - "kind": 18, - "object": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 - }, - "item": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 - } - } + "name": "u32", + "required": true, + "scalar": { + "kind": 4, + "name": "u32", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "CustomEnum", - "name": "en", + "kind": 34, + "name": "i", "required": true, + "scalar": { + "kind": 4, + "name": "i", + "required": true, + "type": "Int" + }, + "type": "Int" + }, + { "kind": 34, - "enum": { - "type": "CustomEnum", - "name": "en", + "name": "i8", + "required": true, + "scalar": { + "kind": 4, + "name": "i8", "required": true, - "kind": 16384 - } + "type": "Int8" + }, + "type": "Int8" }, { - "type": "CustomEnum", - "name": "optEnum", "kind": 34, - "enum": { - "type": "CustomEnum", - "name": "optEnum", - "kind": 16384 - } + "name": "i16", + "required": true, + "scalar": { + "kind": 4, + "name": "i16", + "required": true, + "type": "Int16" + }, + "type": "Int16" }, { - "type": "[CustomEnum]", - "name": "enumArray", + "kind": 34, + "name": "i32", "required": true, + "scalar": { + "kind": 4, + "name": "i32", + "required": true, + "type": "Int32" + }, + "type": "Int32" + }, + { "kind": 34, - "array": { - "type": "[CustomEnum]", - "name": "enumArray", + "name": "bigint", + "required": true, + "scalar": { + "kind": 4, + "name": "bigint", "required": true, - "kind": 18, - "enum": { - "type": "CustomEnum", - "name": "enumArray", - "required": true, - "kind": 16384 - }, - "item": { - "type": "CustomEnum", - "name": "enumArray", - "required": true, - "kind": 16384 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "[CustomEnum]", - "name": "optEnumArray", "kind": 34, - "array": { - "type": "[CustomEnum]", - "name": "optEnumArray", - "kind": 18, - "enum": { - "type": "CustomEnum", - "name": "optEnumArray", - "kind": 16384 - }, - "item": { - "type": "CustomEnum", - "name": "optEnumArray", - "kind": 16384 - } - } + "name": "optBigint", + "scalar": { + "kind": 4, + "name": "optBigint", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Map", - "name": "map", - "required": true, "kind": 34, - "map": { - "type": "Map", - "name": "map", + "name": "bignumber", + "required": true, + "scalar": { + "kind": 4, + "name": "bignumber", "required": true, - "kind": 262146, - "scalar": { - "type": "Int", - "name": "map", - "required": true, - "kind": 4 - }, - "key": { - "type": "String", - "name": "map", - "required": true, - "kind": 4 - }, - "value": { - "type": "Int", - "name": "map", - "required": true, - "kind": 4 - } - } + "type": "BigNumber" + }, + "type": "BigNumber" }, { - "type": "Map", - "name": "mapOfArr", - "required": true, "kind": 34, - "map": { - "type": "Map", - "name": "mapOfArr", - "required": true, - "kind": 262146, - "array": { - "type": "[Int]", - "name": "mapOfArr", - "required": true, - "kind": 18, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - } - }, - "key": { - "type": "String", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "value": { - "type": "[Int]", - "name": "mapOfArr", - "required": true, - "kind": 18, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - } - } - } + "name": "optBignumber", + "scalar": { + "kind": 4, + "name": "optBignumber", + "type": "BigNumber" + }, + "type": "BigNumber" }, { - "type": "Map", - "name": "mapOfObj", - "required": true, "kind": 34, - "map": { - "type": "Map", - "name": "mapOfObj", + "name": "json", + "required": true, + "scalar": { + "kind": 4, + "name": "json", "required": true, - "kind": 262146, - "object": { - "type": "AnotherType", - "name": "mapOfObj", - "required": true, - "kind": 8192 - }, - "key": { - "type": "String", - "name": "mapOfObj", - "required": true, - "kind": 4 - }, - "value": { - "type": "AnotherType", - "name": "mapOfObj", - "required": true, - "kind": 8192 - } - } + "type": "JSON" + }, + "type": "JSON" }, { - "type": "Map", - "name": "mapOfArrOfObj", - "required": true, "kind": 34, - "map": { - "type": "Map", - "name": "mapOfArrOfObj", + "name": "optJson", + "scalar": { + "kind": 4, + "name": "optJson", + "type": "JSON" + }, + "type": "JSON" + }, + { + "kind": 34, + "name": "bytes", + "required": true, + "scalar": { + "kind": 4, + "name": "bytes", "required": true, - "kind": 262146, - "array": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", - "required": true, - "kind": 18, - "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, - "kind": 8192 - }, - "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, - "kind": 8192 - } - }, - "key": { - "type": "String", - "name": "mapOfArrOfObj", - "required": true, - "kind": 4 - }, - "value": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", - "required": true, - "kind": 18, - "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, - "kind": 8192 - }, - "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, - "kind": 8192 - } - } - } - } - ] - }, - { - "type": "AnotherType", - "kind": 1, - "properties": [ + "type": "Bytes" + }, + "type": "Bytes" + }, { - "type": "String", - "name": "prop", "kind": 34, + "name": "optBytes", "scalar": { - "type": "String", - "name": "prop", - "kind": 4 - } + "kind": 4, + "name": "optBytes", + "type": "Bytes" + }, + "type": "Bytes" }, { - "type": "CustomType", - "name": "circular", "kind": 34, - "object": { - "type": "CustomType", - "name": "circular", - "kind": 8192 - } + "name": "boolean", + "required": true, + "scalar": { + "kind": 4, + "name": "boolean", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "String", - "name": "const", "kind": 34, + "name": "optBoolean", "scalar": { - "type": "String", - "name": "const", - "kind": 4 - } - } - ] - } - ], - "moduleType": { - "type": "Module", - "kind": 128, - "methods": [ - { - "type": "Method", - "name": "moduleMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "str", + "kind": 4, + "name": "optBoolean", + "type": "Boolean" + }, + "type": "Boolean" + }, + { + "array": { + "item": { + "kind": 4, + "name": "uArray", + "required": true, + "type": "UInt" + }, + "kind": 18, + "name": "uArray", "required": true, - "kind": 34, "scalar": { - "type": "String", - "name": "str", + "kind": 4, + "name": "uArray", "required": true, - "kind": 4 - } + "type": "UInt" + }, + "type": "[UInt]" }, - { - "type": "String", - "name": "optStr", - "kind": 34, + "kind": 34, + "name": "uArray", + "required": true, + "type": "[UInt]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "uOptArray", + "required": true, + "type": "UInt" + }, + "kind": 18, + "name": "uOptArray", "scalar": { - "type": "String", - "name": "optStr", - "kind": 4 - } - }, - { - "type": "CustomEnum", - "name": "en", - "required": true, - "kind": 34, - "enum": { - "type": "CustomEnum", - "name": "en", + "kind": 4, + "name": "uOptArray", "required": true, - "kind": 16384 - } + "type": "UInt" + }, + "type": "[UInt]" }, - { - "type": "CustomEnum", - "name": "optEnum", - "kind": 34, - "enum": { - "type": "CustomEnum", - "name": "optEnum", - "kind": 16384 - } + "kind": 34, + "name": "uOptArray", + "type": "[UInt]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "optUOptArray", + "type": "UInt" + }, + "kind": 18, + "name": "optUOptArray", + "scalar": { + "kind": 4, + "name": "optUOptArray", + "type": "UInt" + }, + "type": "[UInt]" }, - { - "type": "[CustomEnum]", - "name": "enumArray", - "required": true, - "kind": 34, + "kind": 34, + "name": "optUOptArray", + "type": "[UInt]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "optStrOptArray", + "type": "String" + }, + "kind": 18, + "name": "optStrOptArray", + "scalar": { + "kind": 4, + "name": "optStrOptArray", + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "optStrOptArray", + "type": "[String]" + }, + { + "array": { "array": { - "type": "[CustomEnum]", - "name": "enumArray", - "required": true, - "kind": 18, - "enum": { - "type": "CustomEnum", - "name": "enumArray", - "required": true, - "kind": 16384 - }, "item": { - "type": "CustomEnum", - "name": "enumArray", + "kind": 4, + "name": "uArrayArray", "required": true, - "kind": 16384 - } - } - }, - { - "type": "[CustomEnum]", - "name": "optEnumArray", - "kind": 34, - "array": { - "type": "[CustomEnum]", - "name": "optEnumArray", - "kind": 18, - "enum": { - "type": "CustomEnum", - "name": "optEnumArray", - "kind": 16384 + "type": "UInt" }, - "item": { - "type": "CustomEnum", - "name": "optEnumArray", - "kind": 16384 - } - } - }, - { - "type": "Map", - "name": "map", - "required": true, - "kind": 34, - "map": { - "type": "Map", - "name": "map", + "kind": 18, + "name": "uArrayArray", "required": true, - "kind": 262146, "scalar": { - "type": "Int", - "name": "map", + "kind": 4, + "name": "uArrayArray", "required": true, - "kind": 4 + "type": "UInt" }, - "key": { - "type": "String", - "name": "map", + "type": "[UInt]" + }, + "item": { + "item": { + "kind": 4, + "name": "uArrayArray", "required": true, - "kind": 4 + "type": "UInt" }, - "value": { - "type": "Int", - "name": "map", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Map", - "name": "mapOfArr", - "required": true, - "kind": 34, - "map": { - "type": "Map", - "name": "mapOfArr", + "kind": 18, + "name": "uArrayArray", "required": true, - "kind": 262146, - "array": { - "type": "[Int]", - "name": "mapOfArr", - "required": true, - "kind": 18, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - } - }, - "key": { - "type": "String", - "name": "mapOfArr", + "scalar": { + "kind": 4, + "name": "uArrayArray", "required": true, - "kind": 4 + "type": "UInt" }, - "value": { - "type": "[Int]", - "name": "mapOfArr", - "required": true, - "kind": 18, - "scalar": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - }, - "item": { - "type": "Int", - "name": "mapOfArr", - "required": true, - "kind": 4 - } - } - } - }, - { - "type": "Map", - "name": "mapOfObj", + "type": "[UInt]" + }, + "kind": 18, + "name": "uArrayArray", "required": true, - "kind": 34, - "map": { - "type": "Map", - "name": "mapOfObj", - "required": true, - "kind": 262146, - "object": { - "type": "AnotherType", - "name": "mapOfObj", - "required": true, - "kind": 8192 + "type": "[[UInt]]" + }, + "kind": 34, + "name": "uArrayArray", + "required": true, + "type": "[[UInt]]" + }, + { + "array": { + "array": { + "item": { + "kind": 4, + "name": "uOptArrayOptArray", + "type": "UInt32" }, - "key": { - "type": "String", - "name": "mapOfObj", - "required": true, - "kind": 4 + "kind": 18, + "name": "uOptArrayOptArray", + "scalar": { + "kind": 4, + "name": "uOptArrayOptArray", + "type": "UInt32" }, - "value": { - "type": "AnotherType", - "name": "mapOfObj", - "required": true, - "kind": 8192 - } - } - }, - { - "type": "Map", - "name": "mapOfArrOfObj", + "type": "[UInt32]" + }, + "item": { + "item": { + "kind": 4, + "name": "uOptArrayOptArray", + "type": "UInt32" + }, + "kind": 18, + "name": "uOptArrayOptArray", + "scalar": { + "kind": 4, + "name": "uOptArrayOptArray", + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "kind": 18, + "name": "uOptArrayOptArray", "required": true, - "kind": 34, - "map": { - "type": "Map", - "name": "mapOfArrOfObj", - "required": true, - "kind": 262146, + "type": "[[UInt32]]" + }, + "kind": 34, + "name": "uOptArrayOptArray", + "required": true, + "type": "[[UInt32]]" + }, + { + "array": { + "array": { "array": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", - "required": true, - "kind": 18, - "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", - "required": true, - "kind": 8192 - }, "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", + "kind": 4, + "name": "uArrayOptArrayArray", "required": true, - "kind": 8192 - } - }, - "key": { - "type": "String", - "name": "mapOfArrOfObj", - "required": true, - "kind": 4 - }, - "value": { - "type": "[AnotherType]", - "name": "mapOfArrOfObj", - "required": true, + "type": "UInt32" + }, "kind": 18, - "object": { - "type": "AnotherType", - "name": "mapOfArrOfObj", + "name": "uArrayOptArrayArray", + "required": true, + "scalar": { + "kind": 4, + "name": "uArrayOptArrayArray", "required": true, - "kind": 8192 + "type": "UInt32" }, + "type": "[UInt32]" + }, + "item": { "item": { - "type": "AnotherType", - "name": "mapOfArrOfObj", + "kind": 4, + "name": "uArrayOptArrayArray", "required": true, - "kind": 8192 - } - } - } - } - ], - "return": { - "type": "Int", - "name": "moduleMethod", - "required": true, - "kind": 34, - "scalar": { - "type": "Int", - "name": "moduleMethod", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Method", - "name": "objectMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 34, - "object": { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 8192 - } - }, - { - "type": "AnotherType", - "name": "optObject", - "kind": 34, - "object": { - "type": "AnotherType", - "name": "optObject", - "kind": 8192 - } - }, - { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "uArrayOptArrayArray", + "required": true, + "scalar": { + "kind": 4, + "name": "uArrayOptArrayArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, "kind": 18, - "object": { - "type": "AnotherType", - "name": "objectArray", + "name": "uArrayOptArrayArray", + "type": "[[UInt32]]" + }, + "item": { + "array": { + "item": { + "kind": 4, + "name": "uArrayOptArrayArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "uArrayOptArrayArray", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "uArrayOptArrayArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" }, "item": { - "type": "AnotherType", - "name": "objectArray", + "item": { + "kind": 4, + "name": "uArrayOptArrayArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "uArrayOptArrayArray", "required": true, - "kind": 8192 - } - } - }, - { - "type": "[AnotherType]", - "name": "optObjectArray", - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "optObjectArray", - "kind": 18, - "object": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 + "scalar": { + "kind": 4, + "name": "uArrayOptArrayArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" }, - "item": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 - } - } - } - ], - "return": { - "type": "AnotherType", - "name": "objectMethod", - "kind": 34, - "object": { - "type": "AnotherType", - "name": "objectMethod", - "kind": 8192 - } - }, - "env": { - "required": true - } - }, - { - "type": "Method", - "name": "optionalEnvMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "AnotherType", - "name": "object", + "kind": 18, + "name": "uArrayOptArrayArray", + "type": "[[UInt32]]" + }, + "kind": 18, + "name": "uArrayOptArrayArray", "required": true, - "kind": 34, - "object": { - "type": "AnotherType", - "name": "object", - "required": true, - "kind": 8192 - } - }, - { - "type": "AnotherType", - "name": "optObject", - "kind": 34, - "object": { - "type": "AnotherType", - "name": "optObject", - "kind": 8192 - } + "type": "[[[UInt32]]]" }, - { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, - "kind": 34, + "kind": 34, + "name": "uArrayOptArrayArray", + "required": true, + "type": "[[[UInt32]]]" + }, + { + "array": { "array": { - "type": "[AnotherType]", - "name": "objectArray", - "required": true, - "kind": 18, - "object": { - "type": "AnotherType", - "name": "objectArray", + "array": { + "array": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "item": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "kind": 18, + "name": "crazyArray", "required": true, - "kind": 8192 + "type": "[[UInt32]]" }, "item": { - "type": "AnotherType", - "name": "objectArray", + "array": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "item": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "kind": 18, + "name": "crazyArray", "required": true, - "kind": 8192 - } - } - }, - { - "type": "[AnotherType]", - "name": "optObjectArray", - "kind": 34, - "array": { - "type": "[AnotherType]", - "name": "optObjectArray", + "type": "[[UInt32]]" + }, "kind": 18, - "object": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 + "name": "crazyArray", + "type": "[[[UInt32]]]" + }, + "item": { + "array": { + "array": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "item": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "kind": 18, + "name": "crazyArray", + "required": true, + "type": "[[UInt32]]" }, "item": { - "type": "AnotherType", - "name": "optObjectArray", - "kind": 8192 - } - } - } - ], - "return": { - "type": "AnotherType", - "name": "optionalEnvMethod", - "kind": 34, - "object": { - "type": "AnotherType", - "name": "optionalEnvMethod", - "kind": 8192 - } - }, - "env": { - "required": false - } - } - ], - "imports": [ - { - "type": "TestImport_Module" - }, - { - "type": "TestImport_Object" - }, - { - "type": "TestImport_AnotherObject" - }, - { - "type": "TestImport_Enum" - } - ] - }, - "enumTypes": [ - { - "type": "CustomEnum", - "kind": 8, - "constants": [ - "STRING", - "BYTES" - ] - } - ], - "interfaceTypes": [ - { - "type": "TestImport", - "kind": 32768, - "namespace": "TestImport", - "uri": "testimport.uri.eth", - "nativeType": "Interface", - "capabilities": { - "getImplementations": { - "enabled": true - } - } - } - ], - "importedObjectTypes": [ - { - "type": "TestImport_Object", - "kind": 1025, - "properties": [ + "array": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "item": { + "item": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "kind": 18, + "name": "crazyArray", + "scalar": { + "kind": 4, + "name": "crazyArray", + "required": true, + "type": "UInt32" + }, + "type": "[UInt32]" + }, + "kind": 18, + "name": "crazyArray", + "required": true, + "type": "[[UInt32]]" + }, + "kind": 18, + "name": "crazyArray", + "type": "[[[UInt32]]]" + }, + "kind": 18, + "name": "crazyArray", + "type": "[[[[UInt32]]]]" + }, + "kind": 34, + "name": "crazyArray", + "type": "[[[[UInt32]]]]" + }, { - "type": "TestImport_AnotherObject", - "name": "object", - "required": true, "kind": 34, + "name": "object", "object": { - "type": "TestImport_AnotherObject", + "kind": 8192, "name": "object", "required": true, - "kind": 8192 - } + "type": "AnotherType" + }, + "required": true, + "type": "AnotherType" }, { - "type": "TestImport_AnotherObject", - "name": "optObject", "kind": 34, + "name": "optObject", "object": { - "type": "TestImport_AnotherObject", + "kind": 8192, "name": "optObject", - "kind": 8192 - } + "type": "AnotherType" + }, + "type": "AnotherType" }, { - "type": "[TestImport_AnotherObject]", - "name": "objectArray", - "required": true, - "kind": 34, "array": { - "type": "[TestImport_AnotherObject]", - "name": "objectArray", - "required": true, - "kind": 18, - "object": { - "type": "TestImport_AnotherObject", + "item": { + "kind": 8192, "name": "objectArray", "required": true, - "kind": 8192 + "type": "AnotherType" }, - "item": { - "type": "TestImport_AnotherObject", + "kind": 18, + "name": "objectArray", + "object": { + "kind": 8192, "name": "objectArray", "required": true, - "kind": 8192 - } - } + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + }, + "kind": 34, + "name": "objectArray", + "required": true, + "type": "[AnotherType]" }, { - "type": "[TestImport_AnotherObject]", - "name": "optObjectArray", - "kind": 34, "array": { - "type": "[TestImport_AnotherObject]", - "name": "optObjectArray", + "item": { + "kind": 8192, + "name": "optObjectArray", + "type": "AnotherType" + }, "kind": 18, + "name": "optObjectArray", "object": { - "type": "TestImport_AnotherObject", + "kind": 8192, "name": "optObjectArray", - "kind": 8192 + "type": "AnotherType" }, - "item": { - "type": "TestImport_AnotherObject", - "name": "optObjectArray", - "kind": 8192 - } - } + "type": "[AnotherType]" + }, + "kind": 34, + "name": "optObjectArray", + "type": "[AnotherType]" }, { - "type": "TestImport_Enum", - "name": "en", - "required": true, - "kind": 34, "enum": { - "type": "TestImport_Enum", + "kind": 16384, "name": "en", "required": true, - "kind": 16384 - } + "type": "CustomEnum" + }, + "kind": 34, + "name": "en", + "required": true, + "type": "CustomEnum" }, { - "type": "TestImport_Enum", - "name": "optEnum", - "kind": 34, "enum": { - "type": "TestImport_Enum", + "kind": 16384, "name": "optEnum", - "kind": 16384 - } + "type": "CustomEnum" + }, + "kind": 34, + "name": "optEnum", + "type": "CustomEnum" }, { - "type": "[TestImport_Enum]", - "name": "enumArray", - "required": true, - "kind": 34, "array": { - "type": "[TestImport_Enum]", - "name": "enumArray", - "required": true, - "kind": 18, "enum": { - "type": "TestImport_Enum", + "kind": 16384, "name": "enumArray", "required": true, - "kind": 16384 + "type": "CustomEnum" }, "item": { - "type": "TestImport_Enum", + "kind": 16384, "name": "enumArray", "required": true, - "kind": 16384 - } - } + "type": "CustomEnum" + }, + "kind": 18, + "name": "enumArray", + "required": true, + "type": "[CustomEnum]" + }, + "kind": 34, + "name": "enumArray", + "required": true, + "type": "[CustomEnum]" }, { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "kind": 34, "array": { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "kind": 18, "enum": { - "type": "TestImport_Enum", + "kind": 16384, "name": "optEnumArray", - "kind": 16384 + "type": "CustomEnum" }, "item": { - "type": "TestImport_Enum", + "kind": 16384, "name": "optEnumArray", - "kind": 16384 - } - } - } - ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Object" - }, - { - "type": "TestImport_AnotherObject", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "prop", - "required": true, + "type": "CustomEnum" + }, + "kind": 18, + "name": "optEnumArray", + "type": "[CustomEnum]" + }, "kind": 34, - "scalar": { - "type": "String", - "name": "prop", - "required": true, - "kind": 4 - } - } - ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "AnotherObject" - } - ], - "importedModuleTypes": [ - { - "type": "TestImport_Module", - "kind": 256, - "methods": [ + "name": "optEnumArray", + "type": "[CustomEnum]" + }, { - "type": "Method", - "name": "importedMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "str", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "str", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "optStr", - "kind": 34, - "scalar": { - "type": "String", - "name": "optStr", - "kind": 4 - } - }, - { - "type": "UInt", - "name": "u", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt", - "name": "optU", - "kind": 34, - "scalar": { - "type": "UInt", - "name": "optU", - "kind": 4 - } - }, - { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 34, - "array": { - "type": "[[UInt]]", - "name": "uArrayArray", - "required": true, - "kind": 18, - "array": { - "type": "[UInt]", - "name": "uArrayArray", - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "kind": 4 - }, - "item": { - "type": "UInt", - "name": "uArrayArray", - "kind": 4 - } - }, - "item": { - "type": "[UInt]", - "name": "uArrayArray", - "kind": 18, - "scalar": { - "type": "UInt", - "name": "uArrayArray", - "kind": 4 - }, - "item": { - "type": "UInt", - "name": "uArrayArray", - "kind": 4 - } - } - } - }, - { - "type": "TestImport_Object", - "name": "object", - "required": true, - "kind": 34, - "object": { - "type": "TestImport_Object", - "name": "object", - "required": true, - "kind": 8192 - } - }, - { - "type": "TestImport_Object", - "name": "optObject", - "kind": 34, - "object": { - "type": "TestImport_Object", - "name": "optObject", - "kind": 8192 - } - }, - { - "type": "[TestImport_Object]", - "name": "objectArray", + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", "required": true, - "kind": 34, - "array": { - "type": "[TestImport_Object]", - "name": "objectArray", - "required": true, - "kind": 18, - "object": { - "type": "TestImport_Object", - "name": "objectArray", - "required": true, - "kind": 8192 - }, - "item": { - "type": "TestImport_Object", - "name": "objectArray", - "required": true, - "kind": 8192 - } - } + "type": "String" }, - { - "type": "[TestImport_Object]", - "name": "optObjectArray", - "kind": 34, - "array": { - "type": "[TestImport_Object]", - "name": "optObjectArray", - "kind": 18, - "object": { - "type": "TestImport_Object", - "name": "optObjectArray", - "kind": 8192 - }, - "item": { - "type": "TestImport_Object", - "name": "optObjectArray", - "kind": 8192 - } - } + "kind": 262146, + "name": "map", + "required": true, + "scalar": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" }, - { - "type": "TestImport_Enum", - "name": "en", + "type": "Map", + "value": { + "kind": 4, + "name": "map", "required": true, - "kind": 34, - "enum": { - "type": "TestImport_Enum", - "name": "en", + "type": "Int" + } + }, + "name": "map", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "array": { + "item": { + "kind": 4, + "name": "mapOfArr", "required": true, - "kind": 16384 - } + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" }, - { - "type": "TestImport_Enum", - "name": "optEnum", - "kind": 34, - "enum": { - "type": "TestImport_Enum", - "name": "optEnum", - "kind": 16384 - } + "key": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "String" }, - { - "type": "[TestImport_Enum]", - "name": "enumArray", + "kind": 262146, + "name": "mapOfArr", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", "required": true, - "kind": 34, - "array": { - "type": "[TestImport_Enum]", - "name": "enumArray", + "scalar": { + "kind": 4, + "name": "mapOfArr", "required": true, - "kind": 18, - "enum": { - "type": "TestImport_Enum", - "name": "enumArray", - "required": true, - "kind": 16384 - }, - "item": { - "type": "TestImport_Enum", - "name": "enumArray", - "required": true, - "kind": 16384 - } - } - }, - { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "kind": 34, - "array": { - "type": "[TestImport_Enum]", - "name": "optEnumArray", - "kind": 18, - "enum": { - "type": "TestImport_Enum", - "name": "optEnumArray", - "kind": 16384 - }, - "item": { - "type": "TestImport_Enum", - "name": "optEnumArray", - "kind": 16384 - } - } + "type": "Int" + }, + "type": "[Int]" } - ], - "return": { - "type": "TestImport_Object", - "name": "importedMethod", - "kind": 34, + }, + "name": "mapOfArr", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "mapOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfObj", "object": { - "type": "TestImport_Object", - "name": "importedMethod", - "kind": 8192 + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "Map", + "value": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" } }, - "env": { - "required": true - } + "name": "mapOfObj", + "required": true, + "type": "Map" }, { - "type": "Method", - "name": "anotherMethod", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "arg", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "arg", + "kind": 34, + "map": { + "array": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "arg", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "Int32", - "name": "anotherMethod", + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + }, + "key": { + "kind": 4, + "name": "mapOfArrOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArrOfObj", "required": true, - "kind": 34, - "scalar": { - "type": "Int32", - "name": "anotherMethod", + "type": "Map", + "value": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, "required": true, - "kind": 4 + "type": "[AnotherType]" } - } + }, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map" } ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Module", - "isInterface": true - } - ], - "importedEnumTypes": [ - { - "type": "TestImport_Enum", - "kind": 520, - "constants": [ - "STRING", - "BYTES" - ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Enum" - } - ], - "importedEnvTypes": [ + "type": "CustomType" + }, { - "type": "TestImport_Env", - "kind": 524288, + "kind": 1, "properties": [ { - "type": "String", - "name": "enviroProp", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "enviroProp", - "required": true, - "kind": 4 - } - } - ], - "uri": "testimport.uri.eth", - "namespace": "TestImport", - "nativeType": "Env" - } - ], - "envType": { - "type": "Env", - "kind": 65536, - "properties": [ - { - "type": "String", - "name": "prop", - "required": true, - "kind": 34, - "scalar": { - "type": "String", "name": "prop", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "optProp", - "kind": 34, - "scalar": { - "type": "String", - "name": "optProp", - "kind": 4 - } - }, - { - "type": "Map", - "name": "optMap", - "kind": 34, - "map": { - "type": "Map", - "name": "optMap", - "kind": 262146, "scalar": { - "type": "Int", - "name": "optMap", - "kind": 4 + "kind": 4, + "name": "prop", + "type": "String" }, - "key": { - "type": "String", - "name": "optMap", - "required": true, - "kind": 4 + "type": "String" + }, + { + "kind": 34, + "name": "circular", + "object": { + "kind": 8192, + "name": "circular", + "type": "CustomType" }, - "value": { - "type": "Int", - "name": "optMap", - "kind": 4 - } + "type": "CustomType" + }, + { + "kind": 34, + "name": "const", + "scalar": { + "kind": 4, + "name": "const", + "type": "String" + }, + "type": "String" } - } - ] - } + ], + "type": "AnotherType" + } + ] } } diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts index 94ec0dbddb..50ec956d0c 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts @@ -28,7 +28,8 @@ export const abi: WrapAbi = { name: "uint8", required: true, kind: 4 - } + }, + comment: "uint8 comment" } ], interfaces: [ diff --git a/packages/test-cases/cases/parse/map-type/input.graphql b/packages/test-cases/cases/parse/map-type/input.graphql new file mode 100644 index 0000000000..dbef039428 --- /dev/null +++ b/packages/test-cases/cases/parse/map-type/input.graphql @@ -0,0 +1,18 @@ +scalar Map + +type CustomType { + map: Map! @annotate(type: "Map!") + mapOfArr: Map! @annotate(type: "Map!") + mapOfObj: Map! @annotate(type: "Map!") + mapOfArrOfObj: Map! @annotate(type: "Map!") +} + +type AnotherType { + prop: String +} + +type Module { + transformMap( + map: Map @annotate(type: "Map") + ): Map @annotate(type: "Map") +} diff --git a/packages/test-cases/cases/parse/map-type/output.json b/packages/test-cases/cases/parse/map-type/output.json new file mode 100644 index 0000000000..7f68ea1f6d --- /dev/null +++ b/packages/test-cases/cases/parse/map-type/output.json @@ -0,0 +1,357 @@ +{ + "moduleType": { + "kind": 128, + "methods": [ + { + "arguments": [ + { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "map", + "scalar": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" + } + }, + "name": "map", + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" + } + } + ], + "kind": 64, + "name": "transformMap", + "required": true, + "return": { + "key": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "transformMap", + "scalar": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "Int" + } + }, + "name": "transformMap", + "type": "Map", + "value": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "Int" + } + }, + "type": "Method" + } + ], + "type": "Module" + }, + "objectTypes": [ + { + "kind": 1, + "properties": [ + { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "map", + "required": true, + "scalar": { + "kind": 4, + "name": "map", + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "type": "Int" + } + }, + "name": "map", + "required": true, + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "type": "Int" + } + }, + { + "key": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "array": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" + }, + "key": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArr", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" + } + }, + "name": "mapOfArr", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" + } + }, + { + "key": { + "kind": 4, + "name": "mapOfObj", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "mapOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfObj", + "object": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "Map", + "value": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + } + }, + "name": "mapOfObj", + "required": true, + "type": "Map", + "value": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + } + }, + { + "key": { + "kind": 4, + "name": "mapOfArrOfObj", + "required": true, + "type": "String" + }, + "kind": 34, + "map": { + "array": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + }, + "key": { + "kind": 4, + "name": "mapOfArrOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + } + }, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + } + } + ], + "type": "CustomType" + }, + { + "kind": 1, + "properties": [ + { + "kind": 34, + "name": "prop", + "scalar": { + "kind": 4, + "name": "prop", + "type": "String" + }, + "type": "String" + } + ], + "type": "AnotherType" + } + ] +} \ No newline at end of file diff --git a/packages/test-cases/cases/parse/map-type/output.ts b/packages/test-cases/cases/parse/map-type/output.ts new file mode 100644 index 0000000000..6d7ab0e7a4 --- /dev/null +++ b/packages/test-cases/cases/parse/map-type/output.ts @@ -0,0 +1,113 @@ +import { + createArrayDefinition, + createMapKeyDefinition, + createMapPropertyDefinition, + createMethodDefinition, + createModuleDefinition, + createObjectDefinition, + createObjectRef, + createScalarDefinition, + createScalarPropertyDefinition, + WrapAbi, +} from "../../../../schema/parse/src/abi"; + +export const abi: WrapAbi = { + objectTypes: [ + { + ...createObjectDefinition({ + type: "CustomType", + }), + properties: [ + createMapPropertyDefinition({ + name: "map", + type: "Map", + key: createMapKeyDefinition({ name: "map", type: "String", required: true }), + value: createScalarDefinition({ name: "map", type: "Int" }), + required: true + }), + createMapPropertyDefinition({ + name: "mapOfArr", + type: "Map", + key: createMapKeyDefinition({ name: "mapOfArr", type: "String", required: true }), + value: createArrayDefinition({ + name: "mapOfArr", + type: "[Int]", + item: createScalarDefinition({ name: "mapOfArr", type: "Int", required: true }), + required: true + }), + required: true + }), + createMapPropertyDefinition({ + name: "mapOfObj", + type: "Map", + key: createMapKeyDefinition({ name: "mapOfObj", type: "String", required: true }), + value: createObjectRef({ name: "mapOfObj", type: "AnotherType", required: true }), + required: true + }), + createMapPropertyDefinition({ + name: "mapOfArrOfObj", + type: "Map", + key: createMapKeyDefinition({ name: "mapOfArrOfObj", type: "String", required: true }), + value: createArrayDefinition({ + name: "mapOfArrOfObj", + type: "[AnotherType]", + item: createObjectRef({ name: "mapOfArrOfObj", type: "AnotherType", required: true }), + required: true + }), + required: true + }), + ], + }, + { + ...createObjectDefinition({ + type: "AnotherType" + }), + properties: [ + createScalarPropertyDefinition({ + name: "prop", + type: "String" + }), + ], + }, + ], + moduleType: { + ...createModuleDefinition({}), + methods: [ + { + ...createMethodDefinition({ + name: "transformMap", + return: createMapPropertyDefinition({ + name: "transformMap", + type: "Map", + key: createMapKeyDefinition({ + name: "transformMap", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "transformMap", + type: "Int", + required: true, + }), + }), + }), + arguments: [ + createMapPropertyDefinition({ + name: "map", + type: "Map", + key: createMapKeyDefinition({ + name: "map", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "map", + type: "Int", + required: true, + }), + }), + ], + }, + ], + }, +}; diff --git a/packages/test-cases/cases/parse/map-type/result.json b/packages/test-cases/cases/parse/map-type/result.json new file mode 100644 index 0000000000..e21122de6e --- /dev/null +++ b/packages/test-cases/cases/parse/map-type/result.json @@ -0,0 +1,262 @@ +{ + "moduleType": { + "kind": 128, + "methods": [ + { + "arguments": [ + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "map", + "scalar": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "required": true, + "type": "Int" + } + }, + "name": "map", + "type": "Map" + } + ], + "kind": 64, + "name": "transformMap", + "required": true, + "return": { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "transformMap", + "scalar": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "transformMap", + "required": true, + "type": "Int" + } + }, + "name": "transformMap", + "type": "Map" + }, + "type": "Method" + } + ], + "type": "Module" + }, + "objectTypes": [ + { + "kind": 1, + "properties": [ + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "map", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "map", + "required": true, + "scalar": { + "kind": 4, + "name": "map", + "type": "Int" + }, + "type": "Map", + "value": { + "kind": 4, + "name": "map", + "type": "Int" + } + }, + "name": "map", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "array": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" + }, + "key": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArr", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "kind": 18, + "name": "mapOfArr", + "required": true, + "scalar": { + "kind": 4, + "name": "mapOfArr", + "required": true, + "type": "Int" + }, + "type": "[Int]" + } + }, + "name": "mapOfArr", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "key": { + "kind": 4, + "name": "mapOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfObj", + "object": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "Map", + "value": { + "kind": 8192, + "name": "mapOfObj", + "required": true, + "type": "AnotherType" + } + }, + "name": "mapOfObj", + "required": true, + "type": "Map" + }, + { + "kind": 34, + "map": { + "array": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + }, + "key": { + "kind": 4, + "name": "mapOfArrOfObj", + "required": true, + "type": "String" + }, + "kind": 262146, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map", + "value": { + "item": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "kind": 18, + "name": "mapOfArrOfObj", + "object": { + "kind": 8192, + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType" + }, + "required": true, + "type": "[AnotherType]" + } + }, + "name": "mapOfArrOfObj", + "required": true, + "type": "Map" + } + ], + "type": "CustomType" + }, + { + "kind": 1, + "properties": [ + { + "kind": 34, + "name": "prop", + "scalar": { + "kind": 4, + "name": "prop", + "type": "String" + }, + "type": "String" + } + ], + "type": "AnotherType" + } + ] +} \ No newline at end of file diff --git a/packages/test-cases/cases/parse/sanity/output.ts b/packages/test-cases/cases/parse/sanity/output.ts index 67c46ccf12..752fcd0b36 100644 --- a/packages/test-cases/cases/parse/sanity/output.ts +++ b/packages/test-cases/cases/parse/sanity/output.ts @@ -644,7 +644,7 @@ export const abi: WrapAbi = { ...createMethodDefinition({ name: "methodOptionalEnv", env: { - required: undefined, + required: false, }, return: createObjectPropertyDefinition({ name: "methodOptionalEnv", @@ -975,7 +975,6 @@ export const abi: WrapAbi = { ...createImportedEnvDefinition({ uri: "testimport.uri.eth", namespace: "TestImport", - type: "TestImport_Env", nativeType: "Env", comment: "TestImport_Env comment", }), From 8c2f151b15cb8304a3f3968fbdbb92676892ed3e Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Mon, 15 Aug 2022 19:11:07 -0700 Subject: [PATCH 40/56] lint fix --- packages/cli/src/lib/helpers/wrap.ts | 2 +- packages/cli/src/lib/project/Project.ts | 4 ++- .../src/bindings/typescript/plugin/index.ts | 28 +++++++++---------- packages/schema/parse/src/abi/definitions.ts | 16 +++-------- .../parse/src/extract/utils/map-utils.ts | 2 +- .../parse/src/extract/utils/property-utils.ts | 2 +- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index 116b02a126..f4d2ef10f4 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -6,7 +6,7 @@ import { serializeWrapManifest, latestWrapManifestVersion, WrapManifest, - WrapAbi + WrapAbi, } from "@polywrap/wrap-manifest-types-js"; import { normalizePath, writeFileSync } from "@polywrap/os-js"; diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index 6ad68200a7..0e88d85978 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -63,7 +63,9 @@ export abstract class Project { public abstract getSchemaNamedPath(): Promise; - public abstract getImportRedirects(): Promise; + public abstract getImportRedirects(): Promise< + PolywrapManifest["import_redirects"] + >; public abstract generateSchemaBindings( abi: Abi, diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index 7ec3b91b71..afe8bdfceb 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -20,21 +20,21 @@ export { Functions }; const templatePath = (subpath: string) => path.join(__dirname, "./templates", subpath); -const sort = (obj: any) => Object - .keys(obj) - .sort() - .reduce((map: any, key) => { - if (typeof obj[key] === "object") { - map[key] = sort(obj[key]); +const sort = (obj: Record) => + Object.keys(obj) + .sort() + .reduce((map: Record, key: string) => { + if (typeof obj[key] === "object") { + map[key] = sort(obj[key] as Record); - if (Array.isArray(obj[key])) { - map[key] = Object.values(map[key]); + if (Array.isArray(obj[key])) { + map[key] = Object.values(map[key] as Record); + } + } else { + map[key] = obj[key]; } - } else { - map[key] = obj[key]; - } - return map - }, {}); + return map; + }, {}); export const generateBinding: GenerateBindingFn = ( options: BindOptions @@ -54,7 +54,7 @@ export const generateBinding: GenerateBindingFn = ( name: options.projectName, type: "plugin", version: latestWrapManifestVersion, - abi: JSON.stringify(sort(options.abi), null, 2), + abi: JSON.stringify(sort(options.abi as Record), null, 2), }; output.entries = renderTemplates( diff --git a/packages/schema/parse/src/abi/definitions.ts b/packages/schema/parse/src/abi/definitions.ts index 405091390f..373e311470 100644 --- a/packages/schema/parse/src/abi/definitions.ts +++ b/packages/schema/parse/src/abi/definitions.ts @@ -1,8 +1,4 @@ -import { - isMapKeyType, - isModuleType, - isScalarType, -} from "./utils"; +import { isMapKeyType, isModuleType, isScalarType } from "./utils"; import { AnyDefinition, @@ -77,9 +73,7 @@ export function createObjectDefinition( }; } -export function createObjectRef( - args: Omit -): ObjectRef { +export function createObjectRef(args: Omit): ObjectRef { return { ...args, kind: DefinitionKind.ObjectRef, @@ -132,9 +126,7 @@ export function createEnumDefinition( }; } -export function createEnumRef( - args: Omit -): EnumRef { +export function createEnumRef(args: Omit): EnumRef { return { ...args, kind: DefinitionKind.EnumRef, @@ -187,7 +179,7 @@ export function createMapDefinition( } export function createArrayDefinition( - args: Omit + args: Omit ): ArrayDefinition { return { ...args, diff --git a/packages/schema/parse/src/extract/utils/map-utils.ts b/packages/schema/parse/src/extract/utils/map-utils.ts index a67aea47dd..cbc70f0efb 100644 --- a/packages/schema/parse/src/extract/utils/map-utils.ts +++ b/packages/schema/parse/src/extract/utils/map-utils.ts @@ -11,7 +11,7 @@ import { import { GenericDefinition, MapKeyDefinition, - ScalarDefinition + ScalarDefinition, } from "@polywrap/wrap-manifest-types-js"; type CurrentAbi = { diff --git a/packages/schema/parse/src/extract/utils/property-utils.ts b/packages/schema/parse/src/extract/utils/property-utils.ts index ac0c3129ef..2748c407d5 100644 --- a/packages/schema/parse/src/extract/utils/property-utils.ts +++ b/packages/schema/parse/src/extract/utils/property-utils.ts @@ -7,7 +7,7 @@ import { import { PropertyDefinition, - ScalarDefinition + ScalarDefinition, } from "@polywrap/wrap-manifest-types-js"; const toBoolean = (val: unknown) => !!val; From 275fd5444ffa201c8743c69a638779afa25a8439 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 16 Aug 2022 16:43:02 -0700 Subject: [PATCH 41/56] fix nested namespace issue + remove needless output/module.graphql test-case files --- packages/cli/src/lib/helpers/wrap.ts | 4 +- packages/js/msgpack/src/index.ts | 26 + .../graph-node/src/wrap-man/wrap.info.ts | 159 +-- .../js/plugins/http/src/wrap-man/wrap.info.ts | 137 +- .../js/plugins/ipfs/src/wrap-man/wrap.info.ts | 148 --- .../plugins/logger/src/wrap-man/wrap.info.ts | 44 - .../js/plugins/sha3/src/wrap-man/wrap.info.ts | 132 -- .../ens-resolver/src/wrap-man/wrap.info.ts | 1176 ----------------- .../src/wrap-man/wrap.info.ts | 208 +-- .../ipfs-resolver/src/wrap-man/wrap.info.ts | 175 +-- .../plugins/uts46/src/wrap-man/wrap.info.ts | 46 +- .../compose/src/__tests__/test-cases.spec.ts | 11 +- packages/schema/parse/src/validate/types.ts | 12 +- .../01-nested-objects/output/module.graphql | 62 - .../02-recursive/output/module.graphql | 66 - .../03-wild-card/output/module.graphql | 111 -- .../00-sanity/output/module.graphql | 90 -- .../output/module.graphql | 72 - .../02-wild-card/output/module.graphql | 99 -- .../imports-ext/external.eth/module.ts | 183 +++ .../input/module.graphql | 4 + .../output/module.ts | 149 +++ .../01-sanity/output/module.graphql | 75 -- .../00-sanity/output/module.graphql | 54 - .../01-inherited/output/module.graphql | 58 - .../output/module.graphql | 64 - .../03-external-import/output/module.graphql | 62 - .../output/module.graphql | 82 -- .../00-sanity/output/module.graphql | 76 -- .../01-inherited/output/module.graphql | 66 - .../output/module.graphql | 75 -- .../03-external-import/output/module.graphql | 74 -- .../output/module.graphql | 91 -- .../00-sanity/output/module.graphql | 60 - 34 files changed, 393 insertions(+), 3558 deletions(-) delete mode 100644 packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts create mode 100644 packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/input/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts delete mode 100644 packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql delete mode 100644 packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index f4d2ef10f4..cb7f2f57f1 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -20,10 +20,10 @@ const run = async ( version: latestWrapManifestVersion, name, type, - abi, + abi }; - const bytes = serializeWrapManifest(manifest); + const bytes = await serializeWrapManifest(manifest); writeFileSync(path, bytes, { encoding: "binary" }); }; diff --git a/packages/js/msgpack/src/index.ts b/packages/js/msgpack/src/index.ts index b571ef277e..f067d3967c 100644 --- a/packages/js/msgpack/src/index.ts +++ b/packages/js/msgpack/src/index.ts @@ -33,6 +33,28 @@ extensionCodec.register({ }, }); +function sanitizeObj(obj: Record): Record { + for (const key of Object.keys(obj)) { + if (typeof obj[key] === "function") { + delete obj[key]; + } else if (obj[key] === null || obj[key] === undefined) { + delete obj[key]; + } else if (typeof obj[key] === "object") { + const sanitized = sanitizeObj( + obj[key] as Record + ); + + if (Array.isArray(obj[key])) { + obj[key] = Object.values(sanitized); + } else { + obj[key] = sanitized; + } + } + } + + return obj; +} + export function msgpackEncode(object: unknown): Uint8Array { const encoder = new Encoder( extensionCodec, @@ -45,6 +67,10 @@ export function msgpackEncode(object: unknown): Uint8Array { undefined // forceIntegerToFloat ); + if (typeof object === "object") { + object = sanitizeObj(object as Record); + } + return encoder.encode(object); } diff --git a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts index 85adf5a393..914bf994d4 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts @@ -11,31 +11,22 @@ export const manifest: WrapManifest = { importedObjectTypes: [ { type: "HTTP_Request", - name: null, - required: null, kind: 1025, properties: [ { type: "[HTTP_Header]", name: "headers", - required: null, kind: 34, array: { type: "[HTTP_Header]", name: "headers", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Header", name: "headers", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "HTTP_Header", name: "headers", @@ -43,33 +34,21 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "[HTTP_UrlParam]", name: "urlParams", - required: null, kind: 34, array: { type: "[HTTP_UrlParam]", name: "urlParams", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "HTTP_UrlParam", name: "urlParams", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "HTTP_UrlParam", name: "urlParams", @@ -77,40 +56,24 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "HTTP_ResponseType", name: "responseType", required: true, kind: 34, - array: null, - map: null, - scalar: null, - object: null, enum: { type: "HTTP_ResponseType", name: "responseType", required: true, kind: 16384, }, - unresolvedObjectOrEnum: null, }, { type: "String", name: "body", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "body", kind: 4 }, }, ], interfaces: [], @@ -120,8 +83,6 @@ export const manifest: WrapManifest = { }, { type: "HTTP_Header", - name: null, - required: null, kind: 1025, properties: [ { @@ -129,24 +90,14 @@ export const manifest: WrapManifest = { name: "key", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], @@ -156,8 +107,6 @@ export const manifest: WrapManifest = { }, { type: "HTTP_UrlParam", - name: null, - required: null, kind: 1025, properties: [ { @@ -165,24 +114,14 @@ export const manifest: WrapManifest = { name: "key", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], @@ -192,8 +131,6 @@ export const manifest: WrapManifest = { }, { type: "HTTP_Response", - name: null, - required: null, kind: 1025, properties: [ { @@ -201,51 +138,34 @@ export const manifest: WrapManifest = { name: "status", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Int", name: "status", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "statusText", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "statusText", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "[HTTP_Header]", name: "headers", - required: null, kind: 34, array: { type: "[HTTP_Header]", name: "headers", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Header", name: "headers", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "HTTP_Header", name: "headers", @@ -253,23 +173,12 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "body", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "body", kind: 4 }, }, ], interfaces: [], @@ -281,8 +190,6 @@ export const manifest: WrapManifest = { importedModuleTypes: [ { type: "HTTP_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -296,52 +203,33 @@ export const manifest: WrapManifest = { name: "url", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "url", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "HTTP_Request", name: "request", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Request", name: "request", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "HTTP_Response", name: "get", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Response", name: "get", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -355,52 +243,33 @@ export const manifest: WrapManifest = { name: "url", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "url", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "HTTP_Request", name: "request", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Request", name: "request", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "HTTP_Response", name: "post", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "HTTP_Response", name: "post", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -413,8 +282,6 @@ export const manifest: WrapManifest = { importedEnumTypes: [ { type: "HTTP_ResponseType", - name: null, - required: null, kind: 520, constants: ["TEXT", "BINARY"], uri: "ens/http.polywrap.eth", @@ -425,8 +292,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -440,51 +305,36 @@ export const manifest: WrapManifest = { name: "subgraphAuthor", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "subgraphAuthor", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "subgraphName", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "subgraphName", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "query", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "query", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -492,17 +342,12 @@ export const manifest: WrapManifest = { name: "querySubgraph", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "querySubgraph", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], diff --git a/packages/js/plugins/http/src/wrap-man/wrap.info.ts b/packages/js/plugins/http/src/wrap-man/wrap.info.ts index 882da56abb..26c953c840 100644 --- a/packages/js/plugins/http/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/http/src/wrap-man/wrap.info.ts @@ -8,8 +8,6 @@ export const manifest: WrapManifest = { objectTypes: [ { type: "Header", - name: null, - required: null, kind: 1, properties: [ { @@ -17,32 +15,20 @@ export const manifest: WrapManifest = { name: "key", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], }, { type: "UrlParam", - name: null, - required: null, kind: 1, properties: [ { @@ -50,32 +36,20 @@ export const manifest: WrapManifest = { name: "key", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "key", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], }, { type: "Response", - name: null, - required: null, kind: 1, properties: [ { @@ -83,51 +57,34 @@ export const manifest: WrapManifest = { name: "status", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Int", name: "status", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "statusText", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "statusText", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "[Header]", name: "headers", - required: null, kind: 34, array: { type: "[Header]", name: "headers", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "Header", name: "headers", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "Header", name: "headers", @@ -135,54 +92,34 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "body", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "body", kind: 4 }, }, ], interfaces: [], }, { type: "Request", - name: null, - required: null, kind: 1, properties: [ { type: "[Header]", name: "headers", - required: null, kind: 34, array: { type: "[Header]", name: "headers", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "Header", name: "headers", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "Header", name: "headers", @@ -190,33 +127,21 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "[UrlParam]", name: "urlParams", - required: null, kind: 34, array: { type: "[UrlParam]", name: "urlParams", - required: null, kind: 18, - array: null, - map: null, - scalar: null, object: { type: "UrlParam", name: "urlParams", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, item: { type: "UrlParam", name: "urlParams", @@ -224,40 +149,24 @@ export const manifest: WrapManifest = { kind: 8192, }, }, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "ResponseType", name: "responseType", required: true, kind: 34, - array: null, - map: null, - scalar: null, - object: null, enum: { type: "ResponseType", name: "responseType", required: true, kind: 16384, }, - unresolvedObjectOrEnum: null, }, { type: "String", name: "body", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "body", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "body", kind: 4 }, }, ], interfaces: [], @@ -266,8 +175,6 @@ export const manifest: WrapManifest = { enumTypes: [ { type: "ResponseType", - name: null, - required: null, kind: 8, constants: ["TEXT", "BINARY"], }, @@ -279,8 +186,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -294,47 +199,28 @@ export const manifest: WrapManifest = { name: "url", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "url", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Request", name: "request", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Request", name: "request", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Response", name: "get", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Response", name: "get", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -348,47 +234,28 @@ export const manifest: WrapManifest = { name: "url", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "url", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Request", name: "request", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Request", name: "request", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Response", name: "post", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Response", name: "post", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], diff --git a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts index f025bbc8be..8a76f63e3c 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts @@ -11,63 +11,40 @@ export const manifest: WrapManifest = { importedObjectTypes: [ { type: "Ipfs_Options", - name: null, - required: null, kind: 1025, properties: [ { type: "UInt32", name: "timeout", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "UInt32", name: "timeout", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, comment: " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", }, { type: "String", name: "provider", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "provider", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, comment: "The IPFS provider to be used", }, { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, comment: "Disable querying providers in parallel when resolving URIs", }, @@ -79,8 +56,6 @@ export const manifest: WrapManifest = { }, { type: "Ipfs_ResolveResult", - name: null, - required: null, kind: 1025, properties: [ { @@ -88,29 +63,19 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "provider", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "provider", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], @@ -122,8 +87,6 @@ export const manifest: WrapManifest = { importedModuleTypes: [ { type: "Ipfs_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -137,34 +100,22 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -172,12 +123,7 @@ export const manifest: WrapManifest = { name: "cat", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -191,52 +137,33 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -250,17 +177,12 @@ export const manifest: WrapManifest = { name: "data", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "data", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -268,17 +190,12 @@ export const manifest: WrapManifest = { name: "addFile", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "addFile", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -292,26 +209,17 @@ export const manifest: WrapManifest = { importedEnvTypes: [], envType: { type: "Env", - name: null, - required: null, kind: 65536, properties: [ { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, comment: "Disable querying providers in parallel when resolving URIs", }, ], @@ -319,8 +227,6 @@ export const manifest: WrapManifest = { }, moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -334,29 +240,17 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -364,12 +258,7 @@ export const manifest: WrapManifest = { name: "cat", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -383,47 +272,28 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -437,12 +307,7 @@ export const manifest: WrapManifest = { name: "data", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -450,17 +315,12 @@ export const manifest: WrapManifest = { name: "addFile", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "addFile", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -472,15 +332,7 @@ export const manifest: WrapManifest = { interfaces: [ { type: "Ipfs_Module", - name: null, - required: null, kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], }, diff --git a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts index 2cba7baa14..6ff2cd8d31 100644 --- a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts @@ -12,8 +12,6 @@ export const manifest: WrapManifest = { importedModuleTypes: [ { type: "Logger_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -27,34 +25,24 @@ export const manifest: WrapManifest = { name: "level", required: true, kind: 34, - array: null, - map: null, - scalar: null, - object: null, enum: { type: "Logger_LogLevel", name: "level", required: true, kind: 16384, }, - unresolvedObjectOrEnum: null, }, { type: "String", name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -62,12 +50,7 @@ export const manifest: WrapManifest = { name: "log", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -80,8 +63,6 @@ export const manifest: WrapManifest = { importedEnumTypes: [ { type: "Logger_LogLevel", - name: null, - required: null, kind: 520, constants: ["DEBUG", "INFO", "WARN", "ERROR"], uri: "ens/logger.core.polywrap.eth", @@ -92,8 +73,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -107,34 +86,24 @@ export const manifest: WrapManifest = { name: "level", required: true, kind: 34, - array: null, - map: null, - scalar: null, - object: null, enum: { type: "Logger_LogLevel", name: "level", required: true, kind: 16384, }, - unresolvedObjectOrEnum: null, }, { type: "String", name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -142,12 +111,7 @@ export const manifest: WrapManifest = { name: "log", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "log", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -155,15 +119,7 @@ export const manifest: WrapManifest = { interfaces: [ { type: "Logger_Module", - name: null, - required: null, kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], } diff --git a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts index dcde1450d3..b5076a56a9 100644 --- a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts @@ -14,8 +14,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -29,17 +27,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -47,17 +40,12 @@ export const manifest: WrapManifest = { name: "sha3_512", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "sha3_512", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -71,17 +59,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -89,17 +72,12 @@ export const manifest: WrapManifest = { name: "sha3_384", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "sha3_384", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -113,17 +91,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -131,17 +104,12 @@ export const manifest: WrapManifest = { name: "sha3_256", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "sha3_256", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -155,17 +123,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -173,17 +136,12 @@ export const manifest: WrapManifest = { name: "sha3_224", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "sha3_224", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -197,17 +155,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -215,17 +168,12 @@ export const manifest: WrapManifest = { name: "keccak_512", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "keccak_512", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -239,17 +187,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -257,17 +200,12 @@ export const manifest: WrapManifest = { name: "keccak_384", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "keccak_384", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -281,17 +219,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -299,17 +232,12 @@ export const manifest: WrapManifest = { name: "keccak_256", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "keccak_256", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -323,17 +251,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -341,17 +264,12 @@ export const manifest: WrapManifest = { name: "keccak_224", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "keccak_224", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -365,17 +283,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -383,17 +296,12 @@ export const manifest: WrapManifest = { name: "hex_keccak_256", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "hex_keccak_256", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -407,17 +315,12 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -425,17 +328,12 @@ export const manifest: WrapManifest = { name: "buffer_keccak_256", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "buffer_keccak_256", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -449,34 +347,24 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Int", name: "outputBits", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Int", name: "outputBits", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -484,17 +372,12 @@ export const manifest: WrapManifest = { name: "shake_128", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "shake_128", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -508,34 +391,24 @@ export const manifest: WrapManifest = { name: "message", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "message", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Int", name: "outputBits", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Int", name: "outputBits", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -543,17 +416,12 @@ export const manifest: WrapManifest = { name: "shake_256", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "shake_256", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts index 89c834a54e..dbb20298cf 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts @@ -11,43 +11,27 @@ export const manifest: WrapManifest = { "importedObjectTypes": [ { "type": "UriResolver_MaybeUriOrManifest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "uri", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "uri", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Bytes", "name": "manifest", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "manifest", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -57,43 +41,27 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_Connection", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "node", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "node", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -103,60 +71,37 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_TxOverrides", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -166,8 +111,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_StaticTxResult", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -175,34 +118,24 @@ export const manifest: WrapManifest = { "name": "result", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "result", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Boolean", "name": "error", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "error", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -212,162 +145,97 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_TxRequest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "from", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "nonce", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "data", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "chainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -377,8 +245,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_TxReceipt", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -386,136 +252,94 @@ export const manifest: WrapManifest = { "name": "to", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "contractAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "contractAddress", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "root", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "root", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "logsBloom", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "logsBloom", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[Ethereum_Log]", @@ -527,17 +351,12 @@ export const manifest: WrapManifest = { "name": "logs", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Log", "name": "logs", @@ -545,147 +364,100 @@ export const manifest: WrapManifest = { "kind": 8192 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Boolean", "name": "byzantium", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "byzantium", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "type", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "status", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "status", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -695,8 +467,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_Log", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -704,102 +474,72 @@ export const manifest: WrapManifest = { "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Boolean", "name": "removed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "removed", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -811,17 +551,12 @@ export const manifest: WrapManifest = { "name": "topics", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "topics", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "topics", @@ -829,45 +564,30 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "logIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "logIndex", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -877,8 +597,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_EventNotification", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -886,51 +604,36 @@ export const manifest: WrapManifest = { "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -940,8 +643,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_Network", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -949,51 +650,34 @@ export const manifest: WrapManifest = { "name": "name", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "name", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "ensAddress", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "ensAddress", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -1003,8 +687,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_TxResponse", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1012,328 +694,211 @@ export const manifest: WrapManifest = { "name": "hash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "hash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "nonce", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "blockHash", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "raw", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "raw", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "r", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "r", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "s", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "s", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "v", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "v", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 34, "array": { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Access", "name": "accessList", @@ -1341,11 +906,6 @@ export const manifest: WrapManifest = { "kind": 8192 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -1355,8 +915,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_Access", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1364,17 +922,12 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -1386,17 +939,12 @@ export const manifest: WrapManifest = { "name": "storageKeys", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "storageKeys", @@ -1404,11 +952,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "interfaces": [], @@ -1420,8 +963,6 @@ export const manifest: WrapManifest = { "importedModuleTypes": [ { "type": "UriResolver_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1435,52 +976,35 @@ export const manifest: WrapManifest = { "name": "authority", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "authority", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "path", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "path", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { "type": "UriResolver_MaybeUriOrManifest", "name": "tryResolveUri", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "UriResolver_MaybeUriOrManifest", "name": "tryResolveUri", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -1494,35 +1018,23 @@ export const manifest: WrapManifest = { "name": "path", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "path", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { "type": "Bytes", "name": "getFile", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "getFile", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } } ], @@ -1533,8 +1045,6 @@ export const manifest: WrapManifest = { }, { "type": "Ethereum_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1548,56 +1058,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -1605,28 +1098,16 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -1634,17 +1115,12 @@ export const manifest: WrapManifest = { "name": "callContractView", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "callContractView", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -1658,56 +1134,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -1715,45 +1174,26 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -1761,17 +1201,12 @@ export const manifest: WrapManifest = { "name": "callContractStatic", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_StaticTxResult", "name": "callContractStatic", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -1785,51 +1220,32 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -1837,17 +1253,12 @@ export const manifest: WrapManifest = { "name": "getBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getBalance", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -1866,17 +1277,12 @@ export const manifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", @@ -1884,11 +1290,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -1900,17 +1301,12 @@ export const manifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", @@ -1918,11 +1314,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -1930,17 +1321,12 @@ export const manifest: WrapManifest = { "name": "encodeParams", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeParams", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -1954,39 +1340,27 @@ export const manifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -1994,11 +1368,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2006,17 +1375,12 @@ export const manifest: WrapManifest = { "name": "encodeFunction", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeFunction", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2035,17 +1399,12 @@ export const manifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", @@ -2053,11 +1412,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -2069,17 +1423,12 @@ export const manifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", @@ -2087,11 +1436,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2099,17 +1443,12 @@ export const manifest: WrapManifest = { "name": "solidityPack", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityPack", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2128,17 +1467,12 @@ export const manifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", @@ -2146,11 +1480,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -2162,17 +1491,12 @@ export const manifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", @@ -2180,11 +1504,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2192,17 +1511,12 @@ export const manifest: WrapManifest = { "name": "solidityKeccak256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityKeccak256", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2221,17 +1535,12 @@ export const manifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", @@ -2239,11 +1548,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -2255,17 +1559,12 @@ export const manifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", @@ -2273,11 +1572,6 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2285,17 +1579,12 @@ export const manifest: WrapManifest = { "name": "soliditySha256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "soliditySha256", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2307,19 +1596,12 @@ export const manifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2327,17 +1609,12 @@ export const manifest: WrapManifest = { "name": "getSignerAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "getSignerAddress", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2349,36 +1626,22 @@ export const manifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2386,17 +1649,12 @@ export const manifest: WrapManifest = { "name": "getSignerBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerBalance", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2408,36 +1666,22 @@ export const manifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2445,17 +1689,12 @@ export const manifest: WrapManifest = { "name": "getSignerTransactionCount", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerTransactionCount", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2467,19 +1706,12 @@ export const manifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2487,17 +1719,12 @@ export const manifest: WrapManifest = { "name": "getGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getGasPrice", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2511,34 +1738,22 @@ export const manifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2546,17 +1761,12 @@ export const manifest: WrapManifest = { "name": "estimateTransactionGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateTransactionGas", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2570,56 +1780,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -2627,45 +1820,26 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2673,17 +1847,12 @@ export const manifest: WrapManifest = { "name": "estimateContractCallGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateContractCallGas", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2697,17 +1866,12 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2715,17 +1879,12 @@ export const manifest: WrapManifest = { "name": "checkAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "checkAddress", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2739,17 +1898,12 @@ export const manifest: WrapManifest = { "name": "eth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "eth", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2757,17 +1911,12 @@ export const manifest: WrapManifest = { "name": "toWei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "toWei", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2781,17 +1930,12 @@ export const manifest: WrapManifest = { "name": "wei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "wei", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2799,17 +1943,12 @@ export const manifest: WrapManifest = { "name": "toEth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "toEth", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2823,68 +1962,46 @@ export const manifest: WrapManifest = { "name": "txHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "txHash", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "timeout", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -2892,17 +2009,12 @@ export const manifest: WrapManifest = { "name": "awaitTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "awaitTransaction", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -2916,56 +2028,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "event", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "event", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -2973,45 +2068,26 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "UInt32", "name": "timeout", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3019,17 +2095,12 @@ export const manifest: WrapManifest = { "name": "waitForEvent", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_EventNotification", "name": "waitForEvent", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3041,19 +2112,12 @@ export const manifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3061,17 +2125,12 @@ export const manifest: WrapManifest = { "name": "getNetwork", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Network", "name": "getNetwork", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3085,56 +2144,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -3142,45 +2184,26 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3188,17 +2211,12 @@ export const manifest: WrapManifest = { "name": "callContractMethod", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "callContractMethod", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3212,56 +2230,39 @@ export const manifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -3269,45 +2270,26 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3315,17 +2297,12 @@ export const manifest: WrapManifest = { "name": "callContractMethodAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "callContractMethodAndWait", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3339,34 +2316,22 @@ export const manifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3374,17 +2339,12 @@ export const manifest: WrapManifest = { "name": "sendTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "sendTransaction", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3398,34 +2358,22 @@ export const manifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3433,17 +2381,12 @@ export const manifest: WrapManifest = { "name": "sendTransactionAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "sendTransactionAndWait", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3457,56 +2400,39 @@ export const manifest: WrapManifest = { "name": "abi", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "abi", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "bytecode", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "bytecode", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", @@ -3514,28 +2440,16 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3543,17 +2457,12 @@ export const manifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3567,34 +2476,22 @@ export const manifest: WrapManifest = { "name": "message", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "message", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3602,17 +2499,12 @@ export const manifest: WrapManifest = { "name": "signMessage", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "signMessage", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3626,17 +2518,12 @@ export const manifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "[String]", @@ -3648,17 +2535,12 @@ export const manifest: WrapManifest = { "name": "params", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "params", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "params", @@ -3666,46 +2548,27 @@ export const manifest: WrapManifest = { "kind": 4 } }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { "type": "String", "name": "sendRPC", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "sendRPC", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } } ], @@ -3719,8 +2582,6 @@ export const manifest: WrapManifest = { "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -3734,52 +2595,35 @@ export const manifest: WrapManifest = { "name": "authority", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "authority", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null }, { "type": "String", "name": "path", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "path", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { "type": "UriResolver_MaybeUriOrManifest", "name": "tryResolveUri", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "UriResolver_MaybeUriOrManifest", "name": "tryResolveUri", - "required": null, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null } }, { @@ -3793,35 +2637,23 @@ export const manifest: WrapManifest = { "name": "path", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "path", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { "type": "Bytes", "name": "getFile", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "getFile", - "required": null, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } } ], @@ -3869,15 +2701,7 @@ export const manifest: WrapManifest = { "interfaces": [ { "type": "UriResolver_Module", - "name": null, - "required": null, "kind": 2048, - "array": null, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ] } diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts index 6403e006b0..3a1dcd0e41 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts @@ -11,33 +11,19 @@ export const manifest: WrapManifest = { importedObjectTypes: [ { type: "UriResolver_MaybeUriOrManifest", - name: null, - required: null, kind: 1025, properties: [ { type: "String", name: "uri", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "uri", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "uri", kind: 4 }, }, { type: "Bytes", name: "manifest", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "manifest", kind: 4 }, }, ], interfaces: [], @@ -49,8 +35,6 @@ export const manifest: WrapManifest = { importedModuleTypes: [ { type: "UriResolver_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -64,47 +48,30 @@ export const manifest: WrapManifest = { name: "authority", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "authority", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -118,25 +85,14 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Bytes", name: "getFile", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "getFile", kind: 4 }, }, }, ], @@ -147,8 +103,6 @@ export const manifest: WrapManifest = { }, { type: "FileSystem_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -162,12 +116,7 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -175,17 +124,12 @@ export const manifest: WrapManifest = { name: "readFile", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "readFile", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -199,29 +143,17 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "FileSystem_Encoding", name: "encoding", - required: null, kind: 34, - array: null, - map: null, - scalar: null, - object: null, enum: { type: "FileSystem_Encoding", name: "encoding", - required: null, kind: 16384, }, - unresolvedObjectOrEnum: null, }, ], return: { @@ -229,17 +161,12 @@ export const manifest: WrapManifest = { name: "readFileAsString", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "readFileAsString", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -253,12 +180,7 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -266,17 +188,12 @@ export const manifest: WrapManifest = { name: "exists", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "exists", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -290,42 +207,25 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Bytes", name: "data", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Boolean", name: "writeFile", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "writeFile", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -339,42 +239,24 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Boolean", name: "recursive", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "recursive", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Boolean", name: "mkdir", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "mkdir", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Boolean", name: "mkdir", kind: 4 }, }, }, { @@ -388,59 +270,34 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Boolean", name: "recursive", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "recursive", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Boolean", name: "force", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "force", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Boolean", name: "rm", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "rm", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Boolean", name: "rm", kind: 4 }, }, }, { @@ -454,25 +311,14 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Boolean", name: "rmdir", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Boolean", name: "rmdir", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Boolean", name: "rmdir", kind: 4 }, }, }, ], @@ -485,8 +331,6 @@ export const manifest: WrapManifest = { importedEnumTypes: [ { type: "FileSystem_Encoding", - name: null, - required: null, kind: 520, constants: [ "ASCII", @@ -507,8 +351,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -522,47 +364,30 @@ export const manifest: WrapManifest = { name: "authority", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "authority", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -576,25 +401,14 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Bytes", name: "getFile", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "getFile", kind: 4 }, }, }, ], @@ -607,15 +421,7 @@ export const manifest: WrapManifest = { interfaces: [ { type: "UriResolver_Module", - name: null, - required: null, kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], } diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts index bf0bb2a797..68d3738335 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts @@ -11,33 +11,19 @@ export const manifest: WrapManifest = { importedObjectTypes: [ { type: "UriResolver_MaybeUriOrManifest", - name: null, - required: null, kind: 1025, properties: [ { type: "String", name: "uri", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "uri", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "uri", kind: 4 }, }, { type: "Bytes", name: "manifest", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "manifest", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "manifest", kind: 4 }, }, ], interfaces: [], @@ -47,53 +33,32 @@ export const manifest: WrapManifest = { }, { type: "Ipfs_Options", - name: null, - required: null, kind: 1025, properties: [ { type: "UInt32", name: "timeout", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "UInt32", name: "timeout", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "UInt32", name: "timeout", kind: 4 }, comment: " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", }, { type: "String", name: "provider", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "provider", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "provider", kind: 4 }, comment: "The IPFS provider to be used", }, { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 34, - array: null, - map: null, scalar: { type: "Boolean", name: "disableParallelRequests", - required: null, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, comment: "Disable querying providers in parallel when resolving URIs", }, ], @@ -104,8 +69,6 @@ export const manifest: WrapManifest = { }, { type: "Ipfs_ResolveResult", - name: null, - required: null, kind: 1025, properties: [ { @@ -113,24 +76,14 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "provider", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "provider", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], @@ -142,8 +95,6 @@ export const manifest: WrapManifest = { importedModuleTypes: [ { type: "UriResolver_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -157,47 +108,30 @@ export const manifest: WrapManifest = { name: "authority", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "authority", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -211,25 +145,14 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Bytes", name: "getFile", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "getFile", kind: 4 }, }, }, ], @@ -240,8 +163,6 @@ export const manifest: WrapManifest = { }, { type: "Ipfs_Module", - name: null, - required: null, kind: 256, methods: [ { @@ -255,29 +176,17 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -285,12 +194,7 @@ export const manifest: WrapManifest = { name: "cat", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -304,47 +208,28 @@ export const manifest: WrapManifest = { name: "cid", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "cid", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "Ipfs_Options", name: "options", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_Options", name: "options", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "Ipfs_ResolveResult", name: "resolve", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -358,12 +243,7 @@ export const manifest: WrapManifest = { name: "data", required: true, kind: 34, - array: null, - map: null, scalar: { type: "Bytes", name: "data", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -371,17 +251,12 @@ export const manifest: WrapManifest = { name: "addFile", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "addFile", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], @@ -395,8 +270,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -410,47 +283,30 @@ export const manifest: WrapManifest = { name: "authority", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "authority", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, { type: "String", name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "UriResolver_MaybeUriOrManifest", name: "tryResolveUri", - required: null, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -464,25 +320,14 @@ export const manifest: WrapManifest = { name: "path", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "path", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { type: "Bytes", name: "getFile", - required: null, kind: 34, - array: null, - map: null, - scalar: { type: "Bytes", name: "getFile", required: null, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "Bytes", name: "getFile", kind: 4 }, }, }, ], @@ -496,15 +341,7 @@ export const manifest: WrapManifest = { interfaces: [ { type: "UriResolver_Module", - name: null, - required: null, kind: 2048, - array: null, - map: null, - scalar: null, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], } diff --git a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts index d89dd95907..e55582b4fd 100644 --- a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts @@ -8,8 +8,6 @@ export const manifest: WrapManifest = { objectTypes: [ { type: "ConvertResult", - name: null, - required: null, kind: 1, properties: [ { @@ -17,24 +15,14 @@ export const manifest: WrapManifest = { name: "IDN", required: true, kind: 34, - array: null, - map: null, - scalar: { type: "String", name: "IDN", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, + scalar: { type: "String", name: "IDN", required: true, kind: 4 } }, { type: "String", name: "PC", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "PC", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], interfaces: [], @@ -48,8 +36,6 @@ export const manifest: WrapManifest = { importedEnvTypes: [], moduleType: { type: "Module", - name: null, - required: null, kind: 128, methods: [ { @@ -63,12 +49,7 @@ export const manifest: WrapManifest = { name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -76,12 +57,7 @@ export const manifest: WrapManifest = { name: "toAscii", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "toAscii", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -95,12 +71,7 @@ export const manifest: WrapManifest = { name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -108,17 +79,12 @@ export const manifest: WrapManifest = { name: "toUnicode", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "toUnicode", required: true, kind: 4, }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, }, { @@ -132,12 +98,7 @@ export const manifest: WrapManifest = { name: "value", required: true, kind: 34, - array: null, - map: null, scalar: { type: "String", name: "value", required: true, kind: 4 }, - object: null, - enum: null, - unresolvedObjectOrEnum: null, }, ], return: { @@ -145,17 +106,12 @@ export const manifest: WrapManifest = { name: "convert", required: true, kind: 34, - array: null, - map: null, - scalar: null, object: { type: "ConvertResult", name: "convert", required: true, kind: 8192, }, - enum: null, - unresolvedObjectOrEnum: null, }, }, ], diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index f11c51f223..bd7f79b134 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -1,7 +1,7 @@ import { composeSchema } from "../"; import { fetchTestCases } from "./index"; -function removeFunctionProps(obj: unknown) { +function sanitizeObj(obj: unknown) { if (typeof obj !== "object") { return; } @@ -12,8 +12,10 @@ function removeFunctionProps(obj: unknown) { const typeOf = typeof (obj as any)[i]; if (typeOf === "object") { - removeFunctionProps((obj as any)[i]); - } else if (typeOf == "function") { + sanitizeObj((obj as any)[i]); + } else if (typeOf === "function") { + delete (obj as any)[i]; + } else if (typeOf === "undefined") { delete (obj as any)[i]; } } @@ -32,9 +34,10 @@ describe("Polywrap Schema Composer Test Cases", () => { } const result = await composeSchema(testCase.input); - removeFunctionProps(result); if (testCase.abi) { + sanitizeObj(result); + sanitizeObj(testCase.abi); expect(result).toMatchObject(testCase.abi); } }); diff --git a/packages/schema/parse/src/validate/types.ts b/packages/schema/parse/src/validate/types.ts index ba01c4f721..f332d38eb6 100644 --- a/packages/schema/parse/src/validate/types.ts +++ b/packages/schema/parse/src/validate/types.ts @@ -202,25 +202,21 @@ export const getPropertyTypesValidator = (): SchemaValidator => { }; export function getCircularDefinitionsValidator(): SchemaValidator { - const operationTypes: string[] = []; + const ignoreTypeNames: string[] = []; return { visitor: { enter: { ObjectTypeDefinition: (node: ObjectTypeDefinitionNode) => { - const isOperationType = operationTypeNames.some( - (name) => - node.name.value === name || node.name.value.endsWith(`_${name}`) - ); - if (isOperationType) { - operationTypes.push(node.name.value); + if (node.name.value === "Module" || node.name.value.endsWith("_Module")) { + ignoreTypeNames.push(node.name.value); } }, }, }, cleanup: (documentNode: DocumentNode) => { const { cycleStrings, foundCycle } = getSchemaCycles(documentNode, { - ignoreTypeNames: operationTypes, + ignoreTypeNames, allowOnNullableFields: true, }); diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql deleted file mode 100644 index ecfa54aa5c..0000000000 --- a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql +++ /dev/null @@ -1,62 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method: TypeA -} - -type TypeA { - prop: TypeB -} - -type TypeB { - prop: String -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql deleted file mode 100644 index 9b45b4d35e..0000000000 --- a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql +++ /dev/null @@ -1,66 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method: TypeA -} - -type TypeA { - prop: TypeB -} - -type TypeC { - prop: String -} - -type TypeB { - prop: TypeC -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql deleted file mode 100644 index 610524cfea..0000000000 --- a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql +++ /dev/null @@ -1,111 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method1( - str: String! - optStr: String - u: UInt! - uArrayArray: [[UInt]]! - ): String! - - method2( - arg: [String!]! - ): [Int32!]! -} - -type CustomModuleType { - str: String! - optStr: String - u: UInt! - optU: UInt - u8: UInt8! - i: Int! - i8: Int8! - bytes: Bytes! - uArray: [UInt!]! - uOptArray: [UInt!] - optStrOptArray: [String] - crazyArray: [[[[UInt32!]]!]] - commonType: CommonType! -} - -type AnotherModuleType { - prop: String -} - -type CommonType { - prop: UInt8! - nestedObject: NestedType! - objectArray: [[ArrayObject]]! - enum: CommonEnum! -} - -type NestedType { - prop: String! -} - -type ArrayObject { - prop: String! -} - -type IgnoredType1 { - prop: IgnoredType2 -} - -type IgnoredType2 { - prop: String -} - -enum CommonEnum { - STRING - BYTES -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql deleted file mode 100644 index a7898f4120..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql +++ /dev/null @@ -1,90 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Namespace_ExternalType", - "Namespace_Env", - "Namespace_Module" - ] -) { - method: Namespace_ExternalType -} - -### Imported Modules START ### - -type Namespace_Module @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Module" -) { - envMethod( - arg: String! - ): String! @env(required: true) - - optEnvMethod( - arg: String! - ): String! @env(required: false) -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Namespace_ExternalType @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType" -) { - str: String -} - -### Imported Objects END ### - -### Imported Envs START ### - -type Namespace_Env @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Env" -) { - externalProp: Namespace_ExternalType -} - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql deleted file mode 100644 index d96f349ca3..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql +++ /dev/null @@ -1,72 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Namespace_ExternalType" - ] -) { - method1: Namespace_ExternalType - - method2: LocalType -} - -type LocalType { - prop: Namespace_ExternalType -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -type Namespace_ExternalType @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType" -) { - str: String -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql deleted file mode 100644 index 04523a5111..0000000000 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql +++ /dev/null @@ -1,99 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Namespace_ExternalType", - "Namespace_ExternalType2", - "Namespace_Module", - "Namespace_Env" - ] -) { - method: Namespace_ExternalType -} - -### Imported Modules START ### - -type Namespace_Module @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Module" -) { - envMethod( - arg: String! - ): String! @env(required: true) - - optEnvMethod( - arg: String! - ): String! @env(required: false) -} - -### Imported Modules END ### - -### Imported Objects START ### - -type Namespace_ExternalType @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType" -) { - str: String -} - -type Namespace_ExternalType2 @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType2" -) { - foo: UInt32 -} - -### Imported Objects END ### - -### Imported Envs START ### - -type Namespace_Env @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Env" -) { - externalProp: Namespace_ExternalType -} - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts new file mode 100644 index 0000000000..d73c3bcdcb --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts @@ -0,0 +1,183 @@ +import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; + +export const abi: WrapAbi = { + objectTypes: [], + enumTypes: [], + interfaceTypes: [], + importedObjectTypes: [ + { + type: "Ipfs_Options", + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + kind: 34, + scalar: { + type: "UInt32", + name: "timeout", + kind: 4, + }, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + kind: 34, + scalar: { + type: "String", + name: "provider", + kind: 4, + }, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + kind: 34, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + kind: 4, + }, + comment: + "Disable querying providers in parallel when resolving URIs", + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Options", + }, + { + type: "Ipfs_ResolveResult", + kind: 1025, + properties: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + }, + { + type: "String", + name: "provider", + required: true, + kind: 34, + scalar: { + type: "String", + name: "provider", + required: true, + kind: 4, + }, + }, + ], + interfaces: [], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "ResolveResult", + }, + ], + importedModuleTypes: [ + { + type: "Ipfs_Module", + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + scalar: { + type: "String", + name: "cid", + required: true, + kind: 4, + }, + }, + { + type: "Ipfs_Options", + name: "options", + kind: 34, + object: { + type: "Ipfs_Options", + name: "options", + kind: 8192, + }, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + }, + }, + ], + uri: "ens/ipfs.polywrap.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ], + importedEnumTypes: [], + importedEnvTypes: [], + moduleType: { + type: "Module", + kind: 128, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + }, + { + type: "Ipfs_Options", + name: "options", + kind: 34, + object: { + type: "Ipfs_Options", + name: "options", + kind: 8192, + }, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + }, + }, + ], + imports: [ + { type: "Ipfs_Module" }, + { type: "Ipfs_Options" }, + { type: "Ipfs_ResolveResult" }, + ], + interfaces: [ + { + type: "Ipfs_Module", + kind: 2048, + }, + ], + }, +}; diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/input/module.graphql b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/input/module.graphql new file mode 100644 index 0000000000..6550603247 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/input/module.graphql @@ -0,0 +1,4 @@ +#import { Module } into Ipfs from "external.eth" + +type Module implements Ipfs_Module { +} diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts new file mode 100644 index 0000000000..4747bd9558 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts @@ -0,0 +1,149 @@ +import { + WrapAbi, +} from "@polywrap/schema-parse"; + +export const abi: WrapAbi = { + moduleType: { + type: "Module", + kind: 128, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + scalar: { type: "String", name: "cid", required: true, kind: 4 }, + }, + { + type: "Ipfs_Ipfs_Options", + name: "options", + kind: 34, + object: { + type: "Ipfs_Ipfs_Options", + name: "options", + kind: 8192, + }, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + }, + }, + ], + imports: [ + { type: "Ipfs_Module" }, + { type: "Ipfs_Ipfs_Options" } + ], + interfaces: [ + { + type: "Ipfs_Module", + kind: 2048, + }, + ], + }, + importedObjectTypes: [ + { + type: "Ipfs_Ipfs_Options", + kind: 1025, + properties: [ + { + type: "UInt32", + name: "timeout", + kind: 34, + scalar: { + type: "UInt32", + name: "timeout", + kind: 4, + }, + comment: + " Timeout (in ms) for the operation.\nFallback providers are used if timeout is reached.", + }, + { + type: "String", + name: "provider", + kind: 34, + scalar: { + type: "String", + name: "provider", + kind: 4, + }, + comment: "The IPFS provider to be used", + }, + { + type: "Boolean", + name: "disableParallelRequests", + kind: 34, + scalar: { + type: "Boolean", + name: "disableParallelRequests", + kind: 4, + }, + comment: + "Disable querying providers in parallel when resolving URIs", + }, + ], + uri: "external.eth", + namespace: "Ipfs", + nativeType: "Ipfs_Options", + }, + ], + importedModuleTypes: [ + { + type: "Ipfs_Module", + kind: 256, + methods: [ + { + type: "Method", + name: "cat", + required: true, + kind: 64, + arguments: [ + { + type: "String", + name: "cid", + required: true, + kind: 34, + scalar: { + type: "String", + name: "cid", + required: true, + kind: 4, + }, + }, + { + type: "Ipfs_Ipfs_Options", + name: "options", + kind: 34, + object: { + type: "Ipfs_Ipfs_Options", + name: "options", + kind: 8192, + }, + }, + ], + return: { + type: "Bytes", + name: "cat", + required: true, + kind: 34, + scalar: { type: "Bytes", name: "cat", required: true, kind: 4 }, + }, + }, + ], + uri: "external.eth", + namespace: "Ipfs", + nativeType: "Module", + isInterface: false, + }, + ] +}; diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql deleted file mode 100644 index d070136a78..0000000000 --- a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql +++ /dev/null @@ -1,75 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method1: DerivedType1 - - method2: DerivedType2 -} - -type BaseType1 { - str: String -} - -type DerivedType1 implements BaseType1 { - prop: Int - str: String -} - -type BaseType2 { - uint: UInt -} - -type DerivedType2 implements BaseType1 & BaseType2 { - prop: Int - str: String - uint: UInt -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql deleted file mode 100644 index be279a378b..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql +++ /dev/null @@ -1,54 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module - -type CustomType - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql deleted file mode 100644 index 69e079704a..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql +++ /dev/null @@ -1,58 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method: DerivedType -} - -type BaseType - -type DerivedType implements BaseType - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql deleted file mode 100644 index ecac203949..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql +++ /dev/null @@ -1,64 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method1: DerivedType - - method2: ImportedDerivedType -} - -type BaseType - -type DerivedType implements BaseType - -type ImportedDerivedType implements ImportedBaseType - -type ImportedBaseType - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql deleted file mode 100644 index 19a1c9e5f6..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql +++ /dev/null @@ -1,62 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module implements Namespace_Module @imports( - types: [ - "Namespace_Module" - ] -) - -### Imported Modules START ### - -type Namespace_Module @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Module" -) - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql deleted file mode 100644 index 7c5f6090f9..0000000000 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql +++ /dev/null @@ -1,82 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Base_ImportedBaseType", - "Derived_ImportedDerivedType", - "Derived_ImportedBaseType" - ] -) { - method1: Derived_ImportedDerivedType - - method2: CustomType -} - -type CustomType implements Base_ImportedBaseType - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -type Base_ImportedBaseType @imported( - uri: "base.eth", - namespace: "Base", - nativeType: "ImportedBaseType" -) - -type Derived_ImportedDerivedType implements Derived_ImportedBaseType @imported( - uri: "derived.eth", - namespace: "Derived", - nativeType: "ImportedDerivedType" -) - -type Derived_ImportedBaseType @imported( - uri: "derived.eth", - namespace: "Derived", - nativeType: "ImportedBaseType" -) - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql deleted file mode 100644 index 96697cd4c7..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql +++ /dev/null @@ -1,76 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - requiredMapArgs( - map: Map! @annotate(type: "Map!") - ): Map! @annotate(type: "Map!") - - optionalMapArgs( - map: Map @annotate(type: "Map") - ): Map @annotate(type: "Map") - - optionalValueArgs( - map: Map! @annotate(type: "Map!") - ): Map! @annotate(type: "Map!") -} - -type SimpleType { - requiredMap: Map! @annotate(type: "Map!") - optionalMap: Map @annotate(type: "Map") - optionalValueMap: Map @annotate(type: "Map") - optionalKeyMap: Map! @annotate(type: "Map!") -} - -type RecursiveType { - mapOfValueArr: Map! @annotate(type: "Map!") - mapOfMap: Map! @annotate(type: "Map!>!") -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql deleted file mode 100644 index be781be754..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql +++ /dev/null @@ -1,66 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - map: Map! @annotate(type: "Map!") - other: InheritedType! - ): Map! @annotate(type: "Map!") -} - -type BaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -type InheritedType implements BaseType { - mapOfValueArr: Map! @annotate(type: "Map!") - requiredMap: Map! @annotate(type: "Map!") -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql deleted file mode 100644 index e645d3a224..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql +++ /dev/null @@ -1,75 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - args: DerivedType! - importedArgs: ImportedDerivedType! - ): Map! @annotate(type: "Map!") -} - -type BaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -type DerivedType implements BaseType { - mapOfValueArr: Map! @annotate(type: "Map!") - requiredMap: Map! @annotate(type: "Map!") -} - -type ImportedDerivedType implements ImportedBaseType { - mapOfValueArr: Map! @annotate(type: "Map!") - requiredMap: Map! @annotate(type: "Map!") -} - -type ImportedBaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql deleted file mode 100644 index b1a3331759..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql +++ /dev/null @@ -1,74 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module implements Namespace_Module @imports( - types: [ - "Namespace_Module" - ] -) { - getMap: Map! @annotate(type: "Map!") - - updateMap( - map: Map! @annotate(type: "Map!") - ): Map! @annotate(type: "Map!") -} - -### Imported Modules START ### - -type Namespace_Module @imported( - uri: "external.eth", - namespace: "Namespace", - nativeType: "Module" -) { - getMap: Map! @annotate(type: "Map!") - - updateMap( - map: Map! @annotate(type: "Map!") - ): Map! @annotate(type: "Map!") -} - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql deleted file mode 100644 index 42f98b9b30..0000000000 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql +++ /dev/null @@ -1,91 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module @imports( - types: [ - "Base_ImportedBaseType", - "Derived_ImportedDerivedType", - "Derived_ImportedBaseType" - ] -) { - method1: Derived_ImportedDerivedType - - method2: CustomType -} - -type CustomType implements Base_ImportedBaseType { - requiredMap: Map! @annotate(type: "Map!") -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -type Base_ImportedBaseType @imported( - uri: "base.eth", - namespace: "Base", - nativeType: "ImportedBaseType" -) { - requiredMap: Map! @annotate(type: "Map!") -} - -type Derived_ImportedDerivedType implements Derived_ImportedBaseType @imported( - uri: "derived.eth", - namespace: "Derived", - nativeType: "ImportedDerivedType" -) { - mapOfValueArr: Map! @annotate(type: "Map!") - requiredMap: Map! @annotate(type: "Map!") -} - -type Derived_ImportedBaseType @imported( - uri: "derived.eth", - namespace: "Derived", - nativeType: "ImportedBaseType" -) { - requiredMap: Map! @annotate(type: "Map!") -} - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql deleted file mode 100644 index ab881a1b02..0000000000 --- a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql +++ /dev/null @@ -1,60 +0,0 @@ -### Polywrap Header START ### -scalar UInt -scalar UInt8 -scalar UInt16 -scalar UInt32 -scalar Int -scalar Int8 -scalar Int16 -scalar Int32 -scalar Bytes -scalar BigInt -scalar BigNumber -scalar JSON -scalar Map - -directive @imported( - uri: String! - namespace: String! - nativeType: String! -) on OBJECT | ENUM - -directive @imports( - types: [String!]! -) on OBJECT - -directive @capability( - type: String! - uri: String! - namespace: String! -) repeatable on OBJECT - -directive @enabled_interface on OBJECT - -directive @annotate(type: String!) on FIELD - -directive @env(required: Boolean!) on FIELD_DEFINITION - -### Polywrap Header END ### - -type Module { - method( - str: String! - ): String! -} - -type Env { - prop: String! -} - -### Imported Modules START ### - -### Imported Modules END ### - -### Imported Objects START ### - -### Imported Objects END ### - -### Imported Envs START ### - -### Imported Envs END ### From e2d6de1e842b6d632e3e8b25cb8edf3ff5b9be1b Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 16 Aug 2022 16:52:30 -0700 Subject: [PATCH 42/56] fix mock plugins --- .../app/codegen/004-custom-config/config.ts | 30 +---- .../cli/docgen/002-custom-config/config.ts | 30 +---- packages/test-cases/index.ts | 115 ------------------ 3 files changed, 8 insertions(+), 167 deletions(-) diff --git a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts index c3456947a2..5e3ab1002e 100644 --- a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts @@ -56,8 +56,6 @@ export const mockPluginManifest: WrapManifest = { "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -71,17 +69,12 @@ export const mockPluginManifest: WrapManifest = { "name": "getData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "getData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -95,17 +88,12 @@ export const mockPluginManifest: WrapManifest = { "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -113,17 +101,12 @@ export const mockPluginManifest: WrapManifest = { "name": "setData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "setData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -137,17 +120,12 @@ export const mockPluginManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts index ddca3ff127..f0ef343d4e 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts @@ -56,8 +56,6 @@ export const mockPluginManifest: WrapManifest = { "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -71,17 +69,12 @@ export const mockPluginManifest: WrapManifest = { "name": "getData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "getData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -95,17 +88,12 @@ export const mockPluginManifest: WrapManifest = { "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Int", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -113,17 +101,12 @@ export const mockPluginManifest: WrapManifest = { "name": "setData", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "setData", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -137,17 +120,12 @@ export const mockPluginManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 568b7ad279..59d9122979 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -65,118 +65,3 @@ function getFilePath( return path.join(directory, file); } } - -export const mockPluginManifest: WrapManifest = { - name: "mock", - type: "plugin", - version: latestWrapManifestVersion, - abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], - "moduleType": { - "type": "Module", - "name": null, - "required": null, - "kind": 128, - "methods": [ - { - "type": "Method", - "name": "getData", - "required": true, - "kind": 64, - "arguments": [], - "return": { - "type": "Int", - "name": "getData", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "getData", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "setData", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Int", - "name": "value", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Int", - "name": "value", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - ], - "return": { - "type": "Boolean", - "name": "setData", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "Boolean", - "name": "setData", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - }, - { - "type": "Method", - "name": "deployContract", - "required": true, - "kind": 64, - "arguments": [], - "return": { - "type": "String", - "name": "deployContract", - "required": true, - "kind": 34, - "array": null, - "map": null, - "scalar": { - "type": "String", - "name": "deployContract", - "required": true, - "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null - } - } - ], - "imports": [], - "interfaces": [] - } - } -} From 9cf84fd4bdd30c2b30c7ccd8b73326c2160872b3 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 16 Aug 2022 16:53:15 -0700 Subject: [PATCH 43/56] fix imports --- packages/test-cases/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/test-cases/index.ts b/packages/test-cases/index.ts index 59d9122979..1276af9e9e 100644 --- a/packages/test-cases/index.ts +++ b/packages/test-cases/index.ts @@ -2,7 +2,6 @@ import path from "path"; import { readFileSync, existsSync } from "fs"; import { normalizeLineEndings } from "@polywrap/os-js"; -import { latestWrapManifestVersion, WrapManifest } from "@polywrap/wrap-manifest-types-js"; export const GetPathToBindTestFiles = () => `${__dirname}/cases/bind` export const GetPathToComposeTestFiles = () => `${__dirname}/cases/compose` From c275a709a9c55574b2afc547827bcf1b8189a1b3 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Tue, 16 Aug 2022 17:03:28 -0700 Subject: [PATCH 44/56] lint fix --- packages/cli/src/lib/helpers/wrap.ts | 2 +- packages/js/msgpack/src/index.ts | 4 +-- packages/schema/parse/src/validate/types.ts | 5 ++- yarn.lock | 36 ++++++++++----------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/cli/src/lib/helpers/wrap.ts b/packages/cli/src/lib/helpers/wrap.ts index cb7f2f57f1..5a19533100 100644 --- a/packages/cli/src/lib/helpers/wrap.ts +++ b/packages/cli/src/lib/helpers/wrap.ts @@ -20,7 +20,7 @@ const run = async ( version: latestWrapManifestVersion, name, type, - abi + abi, }; const bytes = await serializeWrapManifest(manifest); diff --git a/packages/js/msgpack/src/index.ts b/packages/js/msgpack/src/index.ts index f067d3967c..90885f8862 100644 --- a/packages/js/msgpack/src/index.ts +++ b/packages/js/msgpack/src/index.ts @@ -40,9 +40,7 @@ function sanitizeObj(obj: Record): Record { } else if (obj[key] === null || obj[key] === undefined) { delete obj[key]; } else if (typeof obj[key] === "object") { - const sanitized = sanitizeObj( - obj[key] as Record - ); + const sanitized = sanitizeObj(obj[key] as Record); if (Array.isArray(obj[key])) { obj[key] = Object.values(sanitized); diff --git a/packages/schema/parse/src/validate/types.ts b/packages/schema/parse/src/validate/types.ts index f332d38eb6..908bbfd9c2 100644 --- a/packages/schema/parse/src/validate/types.ts +++ b/packages/schema/parse/src/validate/types.ts @@ -208,7 +208,10 @@ export function getCircularDefinitionsValidator(): SchemaValidator { visitor: { enter: { ObjectTypeDefinition: (node: ObjectTypeDefinitionNode) => { - if (node.name.value === "Module" || node.name.value.endsWith("_Module")) { + if ( + node.name.value === "Module" || + node.name.value.endsWith("_Module") + ) { ignoreTypeNames.push(node.name.value); } }, diff --git a/yarn.lock b/yarn.lock index 8a942b416a..6eb2a3f10e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3650,9 +3650,9 @@ integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== "@types/lodash@^4.14.182": - version "4.14.182" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" - integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== + version "4.14.183" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.183.tgz#1173e843e858cff5b997c234df2789a4a54c2374" + integrity sha512-UXavyuxzXKMqJPEpFPri6Ku5F9af6ZJXUneHhvQJxavrEjuHkFp2YnDWHcxJiG7hk8ZkWqjcyNeW1s/smZv5cw== "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.5" @@ -3670,9 +3670,9 @@ integrity sha512-wH6Tu9mbiOt0n5EvdoWy0VGQaJMHfLIxY/6wS0xLC7CV1taM6gESEzcYy0ZlWvxxiiljYvfDIvz4hHbUUDRlhw== "@types/node@*": - version "18.7.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.3.tgz#432c89796eab539b7a30b7b8801a727b585238a4" - integrity sha512-LJgzOEwWuMTBxHzgBR/fhhBOWrvBjvO+zPteUgbbuQi80rYIZHrk1mNbRUqPZqSLP2H7Rwt1EFLL/tNLD1Xx/w== + version "18.7.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83" + integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A== "@types/node@12.12.26": version "12.12.26" @@ -5620,9 +5620,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001376" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz#af2450833e5a06873fbb030a9556ca9461a2736d" - integrity sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig== + version "1.0.30001377" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001377.tgz#fa446cef27f25decb0c7420759c9ea17a2221a70" + integrity sha512-I5XeHI1x/mRSGl96LFOaSk528LA/yZG3m3iQgImGujjO8gotd/DL8QaI1R1h1dg5ATeI2jqPblMpKq4Tr5iKfQ== capture-exit@^2.0.0: version "2.0.0" @@ -7290,9 +7290,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.3.378, electron-to-chromium@^1.4.202: - version "1.4.219" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.219.tgz#a7a672304b6aa4f376918d3f63a47f2c3906009a" - integrity sha512-zoQJsXOUw0ZA0YxbjkmzBumAJRtr6je5JySuL/bAoFs0DuLiLJ+5FzRF7/ZayihxR2QcewlRZVm5QZdUhwjOgA== + version "1.4.222" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.222.tgz#2ba24bef613fc1985dbffea85df8f62f2dec6448" + integrity sha512-gEM2awN5HZknWdLbngk4uQCVfhucFAfFzuchP3wM3NN6eow1eDU0dFy2kts43FB20ZfhVFF0jmFSTb1h5OhyIg== elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" @@ -13312,9 +13312,9 @@ object-visit@^1.0.0: isobject "^3.0.0" object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f" - integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA== + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: call-bind "^1.0.2" define-properties "^1.1.4" @@ -17437,9 +17437,9 @@ typescript@^4.0: integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== uglify-js@^3.1.4: - version "3.16.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d" - integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw== + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== uid-number@0.0.6: version "0.0.6" From 3e49294a10fdf57ae6022e636961bd264c5998f6 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 17 Aug 2022 23:39:16 -0700 Subject: [PATCH 45/56] fix tests --- .../ens-resolver/src/schema.graphql | 2 +- packages/schema/bind/src/fail.json | 2743 +++++++++++++++++ packages/schema/bind/src/sanity.json | 2077 +++++++++++++ packages/schema/compose/package.json | 1 + .../schema/compose/src/__tests__/index.ts | 5 + .../compose/src/__tests__/test-cases.spec.ts | 29 +- packages/schema/compose/src/render.ts | 14 +- .../compose/src/templates/schema.mustache.ts | 8 +- packages/schema/parse/src/abi/definitions.ts | 5 + .../00-sanity/output/module.graphql | 103 + .../01-nested-objects/output/module.graphql | 62 + .../02-recursive/output/module.graphql | 66 + .../03-wild-card/output/module.graphql | 111 + .../00-sanity/output/module.graphql | 90 + .../00-sanity/output/module.ts | 114 +- .../output/module.graphql | 72 + .../02-wild-card/output/module.graphql | 99 + .../02-wild-card/output/module.ts | 127 +- .../output/module.graphql | 93 + .../01-sanity/output/module.graphql | 75 + .../00-sanity/output/module.graphql | 54 + .../01-inherited/output/module.graphql | 58 + .../output/module.graphql | 64 + .../03-external-import/output/module.graphql | 62 + .../output/module.graphql | 82 + .../00-sanity/output/module.graphql | 76 + .../005-map-types/00-sanity/output/module.ts | 376 ++- .../01-inherited/output/module.graphql | 66 + .../output/module.graphql | 75 + .../03-external-import/output/module.graphql | 74 + .../output/module.graphql | 91 + .../00-sanity/output/module.graphql | 60 + .../compose/sanity/output/module.graphql | 461 +++ .../cases/compose/sanity/output/module.ts | 510 ++- yarn.lock | 53 +- 35 files changed, 7421 insertions(+), 637 deletions(-) create mode 100644 packages/schema/bind/src/fail.json create mode 100644 packages/schema/bind/src/sanity.json create mode 100644 packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql create mode 100644 packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql create mode 100644 packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql create mode 100644 packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.graphql create mode 100644 packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql create mode 100644 packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql create mode 100644 packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql create mode 100644 packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql create mode 100644 packages/test-cases/cases/compose/sanity/output/module.graphql diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/schema.graphql b/packages/js/plugins/uri-resolvers/ens-resolver/src/schema.graphql index 25518256f7..94c2d9f698 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/schema.graphql +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/schema.graphql @@ -1,4 +1,4 @@ #import { Module, MaybeUriOrManifest } into UriResolver from "ens/uri-resolver.core.polywrap.eth" #import { Module } into Ethereum from "ens/ethereum.polywrap.eth" -type Module implements UriResolver_Module { } \ No newline at end of file +type Module implements UriResolver_Module { } diff --git a/packages/schema/bind/src/fail.json b/packages/schema/bind/src/fail.json new file mode 100644 index 0000000000..bff631af64 --- /dev/null +++ b/packages/schema/bind/src/fail.json @@ -0,0 +1,2743 @@ +{ + "moduleType": { + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], + "type": "Module", + "kind": 128, + "methods": [ + { + "name": "getData", + "return": { + "type": "Int", + "name": "getData", + "required": true, + "kind": 34, + "scalar": { + "name": "getData", + "type": "Int", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "tryGetData", + "return": { + "type": "String", + "name": "tryGetData", + "required": true, + "kind": 34, + "scalar": { + "name": "tryGetData", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "throwGetData", + "return": { + "type": "String", + "name": "throwGetData", + "required": true, + "kind": 34, + "scalar": { + "name": "throwGetData", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "setData", + "return": { + "type": "String", + "name": "setData", + "required": true, + "kind": 34, + "scalar": { + "name": "setData", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Int", + "name": "value", + "required": true, + "kind": 34, + "scalar": { + "name": "value", + "type": "Int", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "deployContract", + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "scalar": { + "name": "deployContract", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + } + ] + }, + "importedObjectTypes": [ + { + "type": "Ethereum_Connection", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Connection", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "node", + "kind": 34, + "scalar": { + "name": "node", + "type": "String", + "kind": 4 + } + }, + { + "type": "String", + "name": "networkNameOrChainId", + "kind": 34, + "scalar": { + "name": "networkNameOrChainId", + "type": "String", + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_TxOverrides", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxOverrides", + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "gasLimit", + "kind": 34, + "scalar": { + "name": "gasLimit", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasPrice", + "kind": 34, + "scalar": { + "name": "gasPrice", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "value", + "kind": 34, + "scalar": { + "name": "value", + "type": "BigInt", + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_StaticTxResult", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "StaticTxResult", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "result", + "required": true, + "kind": 34, + "scalar": { + "name": "result", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Boolean", + "name": "error", + "required": true, + "kind": 34, + "scalar": { + "name": "error", + "type": "Boolean", + "required": true, + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_TxRequest", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxRequest", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "kind": 34, + "scalar": { + "name": "to", + "type": "String", + "kind": 4 + } + }, + { + "type": "String", + "name": "from", + "kind": 34, + "scalar": { + "name": "from", + "type": "String", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "nonce", + "kind": 34, + "scalar": { + "name": "nonce", + "type": "UInt32", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasLimit", + "kind": 34, + "scalar": { + "name": "gasLimit", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasPrice", + "kind": 34, + "scalar": { + "name": "gasPrice", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "String", + "name": "data", + "kind": 34, + "scalar": { + "name": "data", + "type": "String", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "value", + "kind": 34, + "scalar": { + "name": "value", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "chainId", + "kind": 34, + "scalar": { + "name": "chainId", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "type", + "kind": 34, + "scalar": { + "name": "type", + "type": "UInt32", + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_TxReceipt", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxReceipt", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "to", + "required": true, + "kind": 34, + "scalar": { + "name": "to", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "scalar": { + "name": "from", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "contractAddress", + "required": true, + "kind": 34, + "scalar": { + "name": "contractAddress", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "scalar": { + "name": "transactionIndex", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "root", + "kind": 34, + "scalar": { + "name": "root", + "type": "String", + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasUsed", + "required": true, + "kind": 34, + "scalar": { + "name": "gasUsed", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "logsBloom", + "required": true, + "kind": 34, + "scalar": { + "name": "logsBloom", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "scalar": { + "name": "transactionHash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[Ethereum_Log]", + "name": "logs", + "required": true, + "kind": 34, + "array": { + "name": "logs", + "type": "[Ethereum_Log]", + "required": true, + "object": { + "name": "logs", + "required": true, + "type": "Ethereum_Log", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "logs", + "required": true, + "type": "Ethereum_Log", + "kind": 8192 + } + } + }, + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "scalar": { + "name": "blockNumber", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "scalar": { + "name": "blockHash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "scalar": { + "name": "confirmations", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "cumulativeGasUsed", + "required": true, + "kind": 34, + "scalar": { + "name": "cumulativeGasUsed", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "effectiveGasPrice", + "required": true, + "kind": 34, + "scalar": { + "name": "effectiveGasPrice", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "Boolean", + "name": "byzantium", + "required": true, + "kind": 34, + "scalar": { + "name": "byzantium", + "type": "Boolean", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "type", + "required": true, + "kind": 34, + "scalar": { + "name": "type", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "status", + "kind": 34, + "scalar": { + "name": "status", + "type": "UInt32", + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_Log", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Log", + "kind": 1025, + "properties": [ + { + "type": "BigInt", + "name": "blockNumber", + "required": true, + "kind": 34, + "scalar": { + "name": "blockNumber", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "blockHash", + "required": true, + "kind": 34, + "scalar": { + "name": "blockHash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "transactionIndex", + "required": true, + "kind": 34, + "scalar": { + "name": "transactionIndex", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "Boolean", + "name": "removed", + "required": true, + "kind": 34, + "scalar": { + "name": "removed", + "type": "Boolean", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "scalar": { + "name": "data", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "topics", + "required": true, + "kind": 34, + "array": { + "name": "topics", + "type": "[String]", + "required": true, + "scalar": { + "name": "topics", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "topics", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "String", + "name": "transactionHash", + "required": true, + "kind": 34, + "scalar": { + "name": "transactionHash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "logIndex", + "required": true, + "kind": 34, + "scalar": { + "name": "logIndex", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_EventNotification", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "EventNotification", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "scalar": { + "name": "data", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Log", + "name": "log", + "required": true, + "kind": 34, + "object": { + "name": "log", + "required": true, + "type": "Ethereum_Log", + "kind": 8192 + } + } + ] + }, + { + "type": "Ethereum_Network", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Network", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "name", + "required": true, + "kind": 34, + "scalar": { + "name": "name", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "scalar": { + "name": "chainId", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "ensAddress", + "kind": 34, + "scalar": { + "name": "ensAddress", + "type": "String", + "kind": 4 + } + } + ] + }, + { + "type": "Ethereum_TxResponse", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "TxResponse", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "hash", + "required": true, + "kind": 34, + "scalar": { + "name": "hash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "to", + "kind": 34, + "scalar": { + "name": "to", + "type": "String", + "kind": 4 + } + }, + { + "type": "String", + "name": "from", + "required": true, + "kind": 34, + "scalar": { + "name": "from", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "nonce", + "required": true, + "kind": 34, + "scalar": { + "name": "nonce", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasLimit", + "required": true, + "kind": 34, + "scalar": { + "name": "gasLimit", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "gasPrice", + "kind": 34, + "scalar": { + "name": "gasPrice", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "String", + "name": "data", + "required": true, + "kind": 34, + "scalar": { + "name": "data", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "value", + "required": true, + "kind": 34, + "scalar": { + "name": "value", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "chainId", + "required": true, + "kind": 34, + "scalar": { + "name": "chainId", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "blockNumber", + "kind": 34, + "scalar": { + "name": "blockNumber", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "String", + "name": "blockHash", + "kind": 34, + "scalar": { + "name": "blockHash", + "type": "String", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "timestamp", + "kind": 34, + "scalar": { + "name": "timestamp", + "type": "UInt32", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "scalar": { + "name": "confirmations", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "raw", + "kind": 34, + "scalar": { + "name": "raw", + "type": "String", + "kind": 4 + } + }, + { + "type": "String", + "name": "r", + "kind": 34, + "scalar": { + "name": "r", + "type": "String", + "kind": 4 + } + }, + { + "type": "String", + "name": "s", + "kind": 34, + "scalar": { + "name": "s", + "type": "String", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "v", + "kind": 34, + "scalar": { + "name": "v", + "type": "UInt32", + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "type", + "kind": 34, + "scalar": { + "name": "type", + "type": "UInt32", + "kind": 4 + } + }, + { + "type": "[Ethereum_Access]", + "name": "accessList", + "kind": 34, + "array": { + "name": "accessList", + "type": "[Ethereum_Access]", + "object": { + "name": "accessList", + "required": true, + "type": "Ethereum_Access", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "accessList", + "required": true, + "type": "Ethereum_Access", + "kind": 8192 + } + } + } + ] + }, + { + "type": "Ethereum_Access", + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Access", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "storageKeys", + "required": true, + "kind": 34, + "array": { + "name": "storageKeys", + "type": "[String]", + "required": true, + "scalar": { + "name": "storageKeys", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "storageKeys", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + } + ], + "importedModuleTypes": [ + { + "uri": "wrap://ens/ethereum.polywrap.eth", + "namespace": "Ethereum", + "nativeType": "Module", + "isInterface": false, + "type": "Ethereum_Module", + "kind": 256, + "methods": [ + { + "name": "callContractView", + "return": { + "type": "String", + "name": "callContractView", + "required": true, + "kind": 34, + "scalar": { + "name": "callContractView", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "callContractStatic", + "return": { + "type": "Ethereum_StaticTxResult", + "name": "callContractStatic", + "required": true, + "kind": 34, + "object": { + "name": "callContractStatic", + "required": true, + "type": "Ethereum_StaticTxResult", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "kind": 34, + "object": { + "name": "txOverrides", + "type": "Ethereum_TxOverrides", + "kind": 8192 + } + } + ] + }, + { + "name": "getBalance", + "return": { + "type": "BigInt", + "name": "getBalance", + "required": true, + "kind": 34, + "scalar": { + "name": "getBalance", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "blockTag", + "kind": 34, + "scalar": { + "name": "blockTag", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "encodeParams", + "return": { + "type": "String", + "name": "encodeParams", + "required": true, + "kind": 34, + "scalar": { + "name": "encodeParams", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "name": "types", + "type": "[String]", + "required": true, + "scalar": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "name": "values", + "type": "[String]", + "required": true, + "scalar": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + }, + { + "name": "encodeFunction", + "return": { + "type": "String", + "name": "encodeFunction", + "required": true, + "kind": 34, + "scalar": { + "name": "encodeFunction", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + }, + { + "name": "solidityPack", + "return": { + "type": "String", + "name": "solidityPack", + "required": true, + "kind": 34, + "scalar": { + "name": "solidityPack", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "name": "types", + "type": "[String]", + "required": true, + "scalar": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "name": "values", + "type": "[String]", + "required": true, + "scalar": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + }, + { + "name": "solidityKeccak256", + "return": { + "type": "String", + "name": "solidityKeccak256", + "required": true, + "kind": 34, + "scalar": { + "name": "solidityKeccak256", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "name": "types", + "type": "[String]", + "required": true, + "scalar": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "name": "values", + "type": "[String]", + "required": true, + "scalar": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + }, + { + "name": "soliditySha256", + "return": { + "type": "String", + "name": "soliditySha256", + "required": true, + "kind": 34, + "scalar": { + "name": "soliditySha256", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "[String]", + "name": "types", + "required": true, + "kind": 34, + "array": { + "name": "types", + "type": "[String]", + "required": true, + "scalar": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "types", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[String]", + "name": "values", + "required": true, + "kind": 34, + "array": { + "name": "values", + "type": "[String]", + "required": true, + "scalar": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "values", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + }, + { + "name": "getSignerAddress", + "return": { + "type": "String", + "name": "getSignerAddress", + "required": true, + "kind": 34, + "scalar": { + "name": "getSignerAddress", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "getSignerBalance", + "return": { + "type": "BigInt", + "name": "getSignerBalance", + "required": true, + "kind": 34, + "scalar": { + "name": "getSignerBalance", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "kind": 34, + "scalar": { + "name": "blockTag", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "getSignerTransactionCount", + "return": { + "type": "BigInt", + "name": "getSignerTransactionCount", + "required": true, + "kind": 34, + "scalar": { + "name": "getSignerTransactionCount", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "BigInt", + "name": "blockTag", + "kind": 34, + "scalar": { + "name": "blockTag", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "getGasPrice", + "return": { + "type": "BigInt", + "name": "getGasPrice", + "required": true, + "kind": 34, + "scalar": { + "name": "getGasPrice", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "estimateTransactionGas", + "return": { + "type": "BigInt", + "name": "estimateTransactionGas", + "required": true, + "kind": 34, + "scalar": { + "name": "estimateTransactionGas", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "object": { + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest", + "kind": 8192 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "estimateContractCallGas", + "return": { + "type": "BigInt", + "name": "estimateContractCallGas", + "required": true, + "kind": 34, + "scalar": { + "name": "estimateContractCallGas", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "kind": 34, + "object": { + "name": "txOverrides", + "type": "Ethereum_TxOverrides", + "kind": 8192 + } + } + ] + }, + { + "name": "checkAddress", + "return": { + "type": "Boolean", + "name": "checkAddress", + "required": true, + "kind": 34, + "scalar": { + "name": "checkAddress", + "type": "Boolean", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + } + ] + }, + { + "name": "toWei", + "return": { + "type": "BigInt", + "name": "toWei", + "required": true, + "kind": 34, + "scalar": { + "name": "toWei", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "eth", + "required": true, + "kind": 34, + "scalar": { + "name": "eth", + "type": "String", + "required": true, + "kind": 4 + } + } + ] + }, + { + "name": "toEth", + "return": { + "type": "String", + "name": "toEth", + "required": true, + "kind": 34, + "scalar": { + "name": "toEth", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "BigInt", + "name": "wei", + "required": true, + "kind": 34, + "scalar": { + "name": "wei", + "type": "BigInt", + "required": true, + "kind": 4 + } + } + ] + }, + { + "name": "awaitTransaction", + "return": { + "type": "Ethereum_TxReceipt", + "name": "awaitTransaction", + "required": true, + "kind": 34, + "object": { + "name": "awaitTransaction", + "required": true, + "type": "Ethereum_TxReceipt", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "txHash", + "required": true, + "kind": 34, + "scalar": { + "name": "txHash", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "confirmations", + "required": true, + "kind": 34, + "scalar": { + "name": "confirmations", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "timeout", + "required": true, + "kind": 34, + "scalar": { + "name": "timeout", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "waitForEvent", + "return": { + "type": "Ethereum_EventNotification", + "name": "waitForEvent", + "required": true, + "kind": 34, + "object": { + "name": "waitForEvent", + "required": true, + "type": "Ethereum_EventNotification", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "event", + "required": true, + "kind": 34, + "scalar": { + "name": "event", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "UInt32", + "name": "timeout", + "kind": 34, + "scalar": { + "name": "timeout", + "type": "UInt32", + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "getNetwork", + "return": { + "type": "Ethereum_Network", + "name": "getNetwork", + "required": true, + "kind": 34, + "object": { + "name": "getNetwork", + "required": true, + "type": "Ethereum_Network", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "requestAccounts", + "return": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "kind": 34, + "array": { + "type": "[String]", + "name": "requestAccounts", + "required": true, + "scalar": { + "name": "requestAccounts", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "requestAccounts", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "callContractMethod", + "return": { + "type": "Ethereum_TxResponse", + "name": "callContractMethod", + "required": true, + "kind": 34, + "object": { + "name": "callContractMethod", + "required": true, + "type": "Ethereum_TxResponse", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "kind": 34, + "object": { + "name": "txOverrides", + "type": "Ethereum_TxOverrides", + "kind": 8192 + } + } + ] + }, + { + "name": "callContractMethodAndWait", + "return": { + "type": "Ethereum_TxReceipt", + "name": "callContractMethodAndWait", + "required": true, + "kind": 34, + "object": { + "name": "callContractMethodAndWait", + "required": true, + "type": "Ethereum_TxReceipt", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "address", + "required": true, + "kind": 34, + "scalar": { + "name": "address", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + }, + { + "type": "Ethereum_TxOverrides", + "name": "txOverrides", + "kind": 34, + "object": { + "name": "txOverrides", + "type": "Ethereum_TxOverrides", + "kind": 8192 + } + } + ] + }, + { + "name": "sendTransaction", + "return": { + "type": "Ethereum_TxResponse", + "name": "sendTransaction", + "required": true, + "kind": 34, + "object": { + "name": "sendTransaction", + "required": true, + "type": "Ethereum_TxResponse", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "object": { + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest", + "kind": 8192 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "sendTransactionAndWait", + "return": { + "type": "Ethereum_TxReceipt", + "name": "sendTransactionAndWait", + "required": true, + "kind": 34, + "object": { + "name": "sendTransactionAndWait", + "required": true, + "type": "Ethereum_TxReceipt", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "Ethereum_TxRequest", + "name": "tx", + "required": true, + "kind": 34, + "object": { + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest", + "kind": 8192 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "deployContract", + "return": { + "type": "String", + "name": "deployContract", + "required": true, + "kind": 34, + "scalar": { + "name": "deployContract", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "abi", + "required": true, + "kind": 34, + "scalar": { + "name": "abi", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "bytecode", + "required": true, + "kind": 34, + "scalar": { + "name": "bytecode", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "args", + "kind": 34, + "array": { + "name": "args", + "type": "[String]", + "scalar": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "args", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "signMessage", + "return": { + "type": "String", + "name": "signMessage", + "required": true, + "kind": 34, + "scalar": { + "name": "signMessage", + "type": "String", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "message", + "required": true, + "kind": 34, + "scalar": { + "name": "message", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + }, + { + "name": "sendRPC", + "return": { + "type": "String", + "name": "sendRPC", + "kind": 34, + "scalar": { + "name": "sendRPC", + "type": "String", + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "method", + "required": true, + "kind": 34, + "scalar": { + "name": "method", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "[String]", + "name": "params", + "required": true, + "kind": 34, + "array": { + "name": "params", + "type": "[String]", + "required": true, + "scalar": { + "name": "params", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "params", + "type": "String", + "required": true, + "kind": 4 + } + } + }, + { + "type": "Ethereum_Connection", + "name": "connection", + "kind": 34, + "object": { + "name": "connection", + "type": "Ethereum_Connection", + "kind": 8192 + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/schema/bind/src/sanity.json b/packages/schema/bind/src/sanity.json new file mode 100644 index 0000000000..aca9817d66 --- /dev/null +++ b/packages/schema/bind/src/sanity.json @@ -0,0 +1,2077 @@ +{ + "objectTypes": [ + { + "type": "CustomType", + "kind": 1, + "properties": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "scalar": { + "name": "str", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "optStr", + "kind": 34, + "scalar": { + "name": "optStr", + "type": "String", + "kind": 4 + } + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "scalar": { + "name": "u", + "type": "UInt", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt", + "name": "optU", + "kind": 34, + "scalar": { + "name": "optU", + "type": "UInt", + "kind": 4 + } + }, + { + "type": "UInt8", + "name": "u8", + "required": true, + "kind": 34, + "scalar": { + "name": "u8", + "type": "UInt8", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt16", + "name": "u16", + "required": true, + "kind": 34, + "scalar": { + "name": "u16", + "type": "UInt16", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt32", + "name": "u32", + "required": true, + "kind": 34, + "scalar": { + "name": "u32", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + { + "type": "Int", + "name": "i", + "required": true, + "kind": 34, + "scalar": { + "name": "i", + "type": "Int", + "required": true, + "kind": 4 + } + }, + { + "type": "Int8", + "name": "i8", + "required": true, + "kind": 34, + "scalar": { + "name": "i8", + "type": "Int8", + "required": true, + "kind": 4 + } + }, + { + "type": "Int16", + "name": "i16", + "required": true, + "kind": 34, + "scalar": { + "name": "i16", + "type": "Int16", + "required": true, + "kind": 4 + } + }, + { + "type": "Int32", + "name": "i32", + "required": true, + "kind": 34, + "scalar": { + "name": "i32", + "type": "Int32", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "bigint", + "required": true, + "kind": 34, + "scalar": { + "name": "bigint", + "type": "BigInt", + "required": true, + "kind": 4 + } + }, + { + "type": "BigInt", + "name": "optBigint", + "kind": 34, + "scalar": { + "name": "optBigint", + "type": "BigInt", + "kind": 4 + } + }, + { + "type": "BigNumber", + "name": "bignumber", + "required": true, + "kind": 34, + "scalar": { + "name": "bignumber", + "type": "BigNumber", + "required": true, + "kind": 4 + } + }, + { + "type": "BigNumber", + "name": "optBignumber", + "kind": 34, + "scalar": { + "name": "optBignumber", + "type": "BigNumber", + "kind": 4 + } + }, + { + "type": "JSON", + "name": "json", + "required": true, + "kind": 34, + "scalar": { + "name": "json", + "type": "JSON", + "required": true, + "kind": 4 + } + }, + { + "type": "JSON", + "name": "optJson", + "kind": 34, + "scalar": { + "name": "optJson", + "type": "JSON", + "kind": 4 + } + }, + { + "type": "Bytes", + "name": "bytes", + "required": true, + "kind": 34, + "scalar": { + "name": "bytes", + "type": "Bytes", + "required": true, + "kind": 4 + } + }, + { + "type": "Bytes", + "name": "optBytes", + "kind": 34, + "scalar": { + "name": "optBytes", + "type": "Bytes", + "kind": 4 + } + }, + { + "type": "Boolean", + "name": "boolean", + "required": true, + "kind": 34, + "scalar": { + "name": "boolean", + "type": "Boolean", + "required": true, + "kind": 4 + } + }, + { + "type": "Boolean", + "name": "optBoolean", + "kind": 34, + "scalar": { + "name": "optBoolean", + "type": "Boolean", + "kind": 4 + } + }, + { + "type": "[UInt]", + "name": "uArray", + "required": true, + "kind": 34, + "array": { + "name": "uArray", + "type": "[UInt]", + "required": true, + "scalar": { + "name": "uArray", + "type": "UInt", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArray", + "type": "UInt", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[UInt]", + "name": "uOptArray", + "kind": 34, + "array": { + "name": "uOptArray", + "type": "[UInt]", + "scalar": { + "name": "uOptArray", + "type": "UInt", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uOptArray", + "type": "UInt", + "required": true, + "kind": 4 + } + } + }, + { + "type": "[UInt]", + "name": "optUOptArray", + "kind": 34, + "array": { + "name": "optUOptArray", + "type": "[UInt]", + "scalar": { + "name": "optUOptArray", + "type": "UInt", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "optUOptArray", + "type": "UInt", + "kind": 4 + } + } + }, + { + "type": "[String]", + "name": "optStrOptArray", + "kind": 34, + "array": { + "name": "optStrOptArray", + "type": "[String]", + "scalar": { + "name": "optStrOptArray", + "type": "String", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "optStrOptArray", + "type": "String", + "kind": 4 + } + } + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "name": "uArrayArray", + "type": "[[UInt]]", + "required": true, + "array": { + "name": "uArrayArray", + "type": "[UInt]", + "required": true, + "scalar": { + "name": "uArrayArray", + "type": "UInt", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "UInt", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "[UInt]", + "required": true, + "scalar": { + "name": "uArrayArray", + "type": "UInt", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "UInt", + "required": true, + "kind": 4 + } + } + } + }, + { + "type": "[[UInt32]]", + "name": "uOptArrayOptArray", + "required": true, + "kind": 34, + "array": { + "name": "uOptArrayOptArray", + "type": "[[UInt32]]", + "required": true, + "array": { + "name": "uOptArrayOptArray", + "type": "[UInt32]", + "scalar": { + "name": "uOptArrayOptArray", + "type": "UInt32", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uOptArrayOptArray", + "type": "UInt32", + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "uOptArrayOptArray", + "type": "[UInt32]", + "scalar": { + "name": "uOptArrayOptArray", + "type": "UInt32", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uOptArrayOptArray", + "type": "UInt32", + "kind": 4 + } + } + } + }, + { + "type": "[[[UInt32]]]", + "name": "uArrayOptArrayArray", + "required": true, + "kind": 34, + "array": { + "name": "uArrayOptArrayArray", + "type": "[[[UInt32]]]", + "required": true, + "array": { + "name": "uArrayOptArrayArray", + "type": "[[UInt32]]", + "array": { + "name": "uArrayOptArrayArray", + "type": "[UInt32]", + "required": true, + "scalar": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "[UInt32]", + "required": true, + "scalar": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "[[UInt32]]", + "array": { + "name": "uArrayOptArrayArray", + "type": "[UInt32]", + "required": true, + "scalar": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "[UInt32]", + "required": true, + "scalar": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayOptArrayArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + } + } + }, + { + "type": "[[[[UInt32]]]]", + "name": "crazyArray", + "kind": 34, + "array": { + "name": "crazyArray", + "type": "[[[[UInt32]]]]", + "array": { + "name": "crazyArray", + "type": "[[[UInt32]]]", + "array": { + "name": "crazyArray", + "type": "[[UInt32]]", + "required": true, + "array": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[[UInt32]]", + "required": true, + "array": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[[[UInt32]]]", + "array": { + "name": "crazyArray", + "type": "[[UInt32]]", + "required": true, + "array": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[[UInt32]]", + "required": true, + "array": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "[UInt32]", + "scalar": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "crazyArray", + "type": "UInt32", + "required": true, + "kind": 4 + } + } + } + } + } + }, + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "object": { + "name": "object", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "AnotherType", + "name": "optObject", + "kind": 34, + "object": { + "name": "optObject", + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "name": "objectArray", + "type": "[AnotherType]", + "required": true, + "object": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + } + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 34, + "array": { + "name": "optObjectArray", + "type": "[AnotherType]", + "object": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + } + } + }, + { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 34, + "enum": { + "name": "en", + "required": true, + "type": "CustomEnum", + "kind": 16384 + } + }, + { + "type": "CustomEnum", + "name": "optEnum", + "kind": 34, + "enum": { + "name": "optEnum", + "type": "CustomEnum", + "kind": 16384 + } + }, + { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "name": "enumArray", + "type": "[CustomEnum]", + "required": true, + "enum": { + "name": "enumArray", + "required": true, + "type": "CustomEnum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "enumArray", + "required": true, + "type": "CustomEnum", + "kind": 16384 + } + } + }, + { + "type": "[CustomEnum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "name": "optEnumArray", + "type": "[CustomEnum]", + "enum": { + "name": "optEnumArray", + "type": "CustomEnum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "optEnumArray", + "type": "CustomEnum", + "kind": 16384 + } + } + }, + { + "type": "Map", + "name": "map", + "map": { + "type": "Map", + "scalar": { + "name": "map", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 262146, + "name": "map", + "key": { + "name": "map", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "map", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfArr", + "map": { + "type": "Map", + "array": { + "name": "mapOfArr", + "type": "[Int]", + "item": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true, + "scalar": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 18 + }, + "kind": 262146, + "name": "mapOfArr", + "key": { + "name": "mapOfArr", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfArr", + "type": "[Int]", + "item": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true, + "scalar": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 18 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfObj", + "map": { + "type": "Map", + "object": { + "name": "mapOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 262146, + "name": "mapOfObj", + "key": { + "name": "mapOfObj", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfArrOfObj", + "map": { + "type": "Map", + "array": { + "name": "mapOfArrOfObj", + "type": "[AnotherType]", + "item": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true, + "object": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18 + }, + "kind": 262146, + "name": "mapOfArrOfObj", + "key": { + "name": "mapOfArrOfObj", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfArrOfObj", + "type": "[AnotherType]", + "item": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true, + "object": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18 + }, + "required": true + }, + "required": true, + "kind": 34 + } + ] + }, + { + "type": "AnotherType", + "kind": 1, + "properties": [ + { + "type": "String", + "name": "prop", + "kind": 34, + "scalar": { + "name": "prop", + "type": "String", + "kind": 4 + } + }, + { + "type": "CustomType", + "name": "circular", + "kind": 34, + "object": { + "name": "circular", + "type": "CustomType", + "kind": 8192 + } + }, + { + "type": "String", + "name": "const", + "kind": 34, + "scalar": { + "name": "const", + "type": "String", + "kind": 4 + } + } + ] + } + ], + "moduleType": { + "imports": [ + { + "type": "TestImport_Module" + }, + { + "type": "TestImport_Object" + }, + { + "type": "TestImport_AnotherObject" + }, + { + "type": "TestImport_Enum" + } + ], + "type": "Module", + "kind": 128, + "methods": [ + { + "name": "moduleMethod", + "return": { + "type": "Int", + "name": "moduleMethod", + "required": true, + "kind": 34, + "scalar": { + "name": "moduleMethod", + "type": "Int", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "scalar": { + "name": "str", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "optStr", + "kind": 34, + "scalar": { + "name": "optStr", + "type": "String", + "kind": 4 + } + }, + { + "type": "CustomEnum", + "name": "en", + "required": true, + "kind": 34, + "enum": { + "name": "en", + "required": true, + "type": "CustomEnum", + "kind": 16384 + } + }, + { + "type": "CustomEnum", + "name": "optEnum", + "kind": 34, + "enum": { + "name": "optEnum", + "type": "CustomEnum", + "kind": 16384 + } + }, + { + "type": "[CustomEnum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "name": "enumArray", + "type": "[CustomEnum]", + "required": true, + "enum": { + "name": "enumArray", + "required": true, + "type": "CustomEnum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "enumArray", + "required": true, + "type": "CustomEnum", + "kind": 16384 + } + } + }, + { + "type": "[CustomEnum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "name": "optEnumArray", + "type": "[CustomEnum]", + "enum": { + "name": "optEnumArray", + "type": "CustomEnum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "optEnumArray", + "type": "CustomEnum", + "kind": 16384 + } + } + }, + { + "type": "Map", + "name": "map", + "map": { + "type": "Map", + "scalar": { + "name": "map", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 262146, + "name": "map", + "key": { + "name": "map", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "map", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfArr", + "map": { + "type": "Map", + "array": { + "name": "mapOfArr", + "type": "[Int]", + "item": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true, + "scalar": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 18 + }, + "kind": 262146, + "name": "mapOfArr", + "key": { + "name": "mapOfArr", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfArr", + "type": "[Int]", + "item": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "required": true, + "scalar": { + "name": "mapOfArr", + "type": "Int", + "required": true, + "kind": 4 + }, + "kind": 18 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfObj", + "map": { + "type": "Map", + "object": { + "name": "mapOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 262146, + "name": "mapOfObj", + "key": { + "name": "mapOfObj", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true + }, + "required": true, + "kind": 34 + }, + { + "type": "Map", + "name": "mapOfArrOfObj", + "map": { + "type": "Map", + "array": { + "name": "mapOfArrOfObj", + "type": "[AnotherType]", + "item": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true, + "object": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18 + }, + "kind": 262146, + "name": "mapOfArrOfObj", + "key": { + "name": "mapOfArrOfObj", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "mapOfArrOfObj", + "type": "[AnotherType]", + "item": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "required": true, + "object": { + "name": "mapOfArrOfObj", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18 + }, + "required": true + }, + "required": true, + "kind": 34 + } + ] + }, + { + "name": "objectMethod", + "return": { + "type": "AnotherType", + "name": "objectMethod", + "kind": 34, + "object": { + "name": "objectMethod", + "type": "AnotherType", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "env": { + "required": true + }, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "object": { + "name": "object", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "AnotherType", + "name": "optObject", + "kind": 34, + "object": { + "name": "optObject", + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "name": "objectArray", + "type": "[AnotherType]", + "required": true, + "object": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + } + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 34, + "array": { + "name": "optObjectArray", + "type": "[AnotherType]", + "object": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + } + } + } + ] + }, + { + "name": "optionalEnvMethod", + "return": { + "type": "AnotherType", + "name": "optionalEnvMethod", + "kind": 34, + "object": { + "name": "optionalEnvMethod", + "type": "AnotherType", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "env": { + "required": false + }, + "arguments": [ + { + "type": "AnotherType", + "name": "object", + "required": true, + "kind": 34, + "object": { + "name": "object", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "AnotherType", + "name": "optObject", + "kind": 34, + "object": { + "name": "optObject", + "type": "AnotherType", + "kind": 8192 + } + }, + { + "type": "[AnotherType]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "name": "objectArray", + "type": "[AnotherType]", + "required": true, + "object": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "objectArray", + "required": true, + "type": "AnotherType", + "kind": 8192 + } + } + }, + { + "type": "[AnotherType]", + "name": "optObjectArray", + "kind": 34, + "array": { + "name": "optObjectArray", + "type": "[AnotherType]", + "object": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "optObjectArray", + "type": "AnotherType", + "kind": 8192 + } + } + } + ] + } + ] + }, + "enumTypes": [ + { + "type": "CustomEnum", + "constants": [ + "STRING", + "BYTES" + ], + "kind": 8 + } + ], + "interfaceTypes": [ + { + "type": "TestImport", + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "capabilities": { + "getImplementations": { + "enabled": true + } + }, + "kind": 32768, + "nativeType": "Interface" + } + ], + "importedObjectTypes": [ + { + "type": "TestImport_Object", + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Object", + "kind": 1025, + "properties": [ + { + "type": "TestImport_AnotherObject", + "name": "object", + "required": true, + "kind": 34, + "object": { + "name": "object", + "required": true, + "type": "TestImport_AnotherObject", + "kind": 8192 + } + }, + { + "type": "TestImport_AnotherObject", + "name": "optObject", + "kind": 34, + "object": { + "name": "optObject", + "type": "TestImport_AnotherObject", + "kind": 8192 + } + }, + { + "type": "[TestImport_AnotherObject]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "name": "objectArray", + "type": "[TestImport_AnotherObject]", + "required": true, + "object": { + "name": "objectArray", + "required": true, + "type": "TestImport_AnotherObject", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "objectArray", + "required": true, + "type": "TestImport_AnotherObject", + "kind": 8192 + } + } + }, + { + "type": "[TestImport_AnotherObject]", + "name": "optObjectArray", + "kind": 34, + "array": { + "name": "optObjectArray", + "type": "[TestImport_AnotherObject]", + "object": { + "name": "optObjectArray", + "type": "TestImport_AnotherObject", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "optObjectArray", + "type": "TestImport_AnotherObject", + "kind": 8192 + } + } + }, + { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 34, + "enum": { + "name": "en", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + } + }, + { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 34, + "enum": { + "name": "optEnum", + "type": "TestImport_Enum", + "kind": 16384 + } + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "name": "enumArray", + "type": "[TestImport_Enum]", + "required": true, + "enum": { + "name": "enumArray", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "enumArray", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + } + } + }, + { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "name": "optEnumArray", + "type": "[TestImport_Enum]", + "enum": { + "name": "optEnumArray", + "type": "TestImport_Enum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "optEnumArray", + "type": "TestImport_Enum", + "kind": 16384 + } + } + } + ] + }, + { + "type": "TestImport_AnotherObject", + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "AnotherObject", + "kind": 1025, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "scalar": { + "name": "prop", + "type": "String", + "required": true, + "kind": 4 + } + } + ] + } + ], + "importedModuleTypes": [ + { + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Module", + "isInterface": true, + "type": "TestImport_Module", + "kind": 256, + "methods": [ + { + "name": "importedMethod", + "return": { + "type": "TestImport_Object", + "name": "importedMethod", + "kind": 34, + "object": { + "name": "importedMethod", + "type": "TestImport_Object", + "kind": 8192 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "env": { + "required": true + }, + "arguments": [ + { + "type": "String", + "name": "str", + "required": true, + "kind": 34, + "scalar": { + "name": "str", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "optStr", + "kind": 34, + "scalar": { + "name": "optStr", + "type": "String", + "kind": 4 + } + }, + { + "type": "UInt", + "name": "u", + "required": true, + "kind": 34, + "scalar": { + "name": "u", + "type": "UInt", + "required": true, + "kind": 4 + } + }, + { + "type": "UInt", + "name": "optU", + "kind": 34, + "scalar": { + "name": "optU", + "type": "UInt", + "kind": 4 + } + }, + { + "type": "[[UInt]]", + "name": "uArrayArray", + "required": true, + "kind": 34, + "array": { + "name": "uArrayArray", + "type": "[[UInt]]", + "required": true, + "array": { + "name": "uArrayArray", + "type": "[UInt]", + "scalar": { + "name": "uArrayArray", + "type": "UInt", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "UInt", + "kind": 4 + } + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "[UInt]", + "scalar": { + "name": "uArrayArray", + "type": "UInt", + "kind": 4 + }, + "kind": 18, + "item": { + "name": "uArrayArray", + "type": "UInt", + "kind": 4 + } + } + } + }, + { + "type": "TestImport_Object", + "name": "object", + "required": true, + "kind": 34, + "object": { + "name": "object", + "required": true, + "type": "TestImport_Object", + "kind": 8192 + } + }, + { + "type": "TestImport_Object", + "name": "optObject", + "kind": 34, + "object": { + "name": "optObject", + "type": "TestImport_Object", + "kind": 8192 + } + }, + { + "type": "[TestImport_Object]", + "name": "objectArray", + "required": true, + "kind": 34, + "array": { + "name": "objectArray", + "type": "[TestImport_Object]", + "required": true, + "object": { + "name": "objectArray", + "required": true, + "type": "TestImport_Object", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "objectArray", + "required": true, + "type": "TestImport_Object", + "kind": 8192 + } + } + }, + { + "type": "[TestImport_Object]", + "name": "optObjectArray", + "kind": 34, + "array": { + "name": "optObjectArray", + "type": "[TestImport_Object]", + "object": { + "name": "optObjectArray", + "type": "TestImport_Object", + "kind": 8192 + }, + "kind": 18, + "item": { + "name": "optObjectArray", + "type": "TestImport_Object", + "kind": 8192 + } + } + }, + { + "type": "TestImport_Enum", + "name": "en", + "required": true, + "kind": 34, + "enum": { + "name": "en", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + } + }, + { + "type": "TestImport_Enum", + "name": "optEnum", + "kind": 34, + "enum": { + "name": "optEnum", + "type": "TestImport_Enum", + "kind": 16384 + } + }, + { + "type": "[TestImport_Enum]", + "name": "enumArray", + "required": true, + "kind": 34, + "array": { + "name": "enumArray", + "type": "[TestImport_Enum]", + "required": true, + "enum": { + "name": "enumArray", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "enumArray", + "required": true, + "type": "TestImport_Enum", + "kind": 16384 + } + } + }, + { + "type": "[TestImport_Enum]", + "name": "optEnumArray", + "kind": 34, + "array": { + "name": "optEnumArray", + "type": "[TestImport_Enum]", + "enum": { + "name": "optEnumArray", + "type": "TestImport_Enum", + "kind": 16384 + }, + "kind": 18, + "item": { + "name": "optEnumArray", + "type": "TestImport_Enum", + "kind": 16384 + } + } + } + ] + }, + { + "name": "anotherMethod", + "return": { + "type": "Int32", + "name": "anotherMethod", + "required": true, + "kind": 34, + "scalar": { + "name": "anotherMethod", + "type": "Int32", + "required": true, + "kind": 4 + } + }, + "type": "Method", + "kind": 64, + "required": true, + "arguments": [ + { + "type": "[String]", + "name": "arg", + "required": true, + "kind": 34, + "array": { + "name": "arg", + "type": "[String]", + "required": true, + "scalar": { + "name": "arg", + "type": "String", + "required": true, + "kind": 4 + }, + "kind": 18, + "item": { + "name": "arg", + "type": "String", + "required": true, + "kind": 4 + } + } + } + ] + } + ] + } + ], + "importedEnumTypes": [ + { + "type": "TestImport_Enum", + "constants": [ + "STRING", + "BYTES" + ], + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Enum", + "kind": 520 + } + ], + "importedEnvTypes": [ + { + "uri": "testimport.uri.eth", + "namespace": "TestImport", + "nativeType": "Env", + "type": "TestImport_Env", + "kind": 524288, + "properties": [ + { + "type": "String", + "name": "enviroProp", + "required": true, + "kind": 34, + "scalar": { + "name": "enviroProp", + "type": "String", + "required": true, + "kind": 4 + } + } + ] + } + ], + "envType": { + "type": "Env", + "kind": 65536, + "properties": [ + { + "type": "String", + "name": "prop", + "required": true, + "kind": 34, + "scalar": { + "name": "prop", + "type": "String", + "required": true, + "kind": 4 + } + }, + { + "type": "String", + "name": "optProp", + "kind": 34, + "scalar": { + "name": "optProp", + "type": "String", + "kind": 4 + } + }, + { + "type": "Map", + "name": "optMap", + "map": { + "type": "Map", + "scalar": { + "name": "optMap", + "type": "Int", + "kind": 4 + }, + "kind": 262146, + "name": "optMap", + "key": { + "name": "optMap", + "type": "String", + "required": true, + "kind": 4 + }, + "value": { + "name": "optMap", + "type": "Int", + "kind": 4 + } + }, + "kind": 34 + } + ] + } +} \ No newline at end of file diff --git a/packages/schema/compose/package.json b/packages/schema/compose/package.json index 0c671e3c29..c6db2425a2 100644 --- a/packages/schema/compose/package.json +++ b/packages/schema/compose/package.json @@ -30,6 +30,7 @@ "@types/mustache": "4.0.1", "@types/prettier": "2.6.0", "jest": "26.6.3", + "jest-diff": "28.1.3", "rimraf": "3.0.2", "ts-jest": "26.5.4", "ts-node": "8.10.2", diff --git a/packages/schema/compose/src/__tests__/index.ts b/packages/schema/compose/src/__tests__/index.ts index 26f57c1026..2ec585d1e0 100644 --- a/packages/schema/compose/src/__tests__/index.ts +++ b/packages/schema/compose/src/__tests__/index.ts @@ -16,6 +16,7 @@ export interface TestCase { name: string; input: ComposerOptions; abi: Abi; + schema: string | undefined; } type TestCases = { @@ -75,6 +76,9 @@ async function importCase( // Fetch the output abi const moduleAbi = await readNamedExportIfExists("abi", "output/module.ts", directory); + // Fetch the output schema + const moduleSchema = readFileIfExists("output/module.graphql", directory); + const resolveExternal = async (uri: string): Promise => { let abi = createAbi() const generatedAbi = await readNamedExportIfExists("abi", `imports-ext/${uri}/module.ts`, directory) @@ -120,5 +124,6 @@ async function importCase( name, input, abi: moduleAbi as Abi, + schema: moduleSchema }; } diff --git a/packages/schema/compose/src/__tests__/test-cases.spec.ts b/packages/schema/compose/src/__tests__/test-cases.spec.ts index bd7f79b134..b6d9797022 100644 --- a/packages/schema/compose/src/__tests__/test-cases.spec.ts +++ b/packages/schema/compose/src/__tests__/test-cases.spec.ts @@ -1,6 +1,8 @@ -import { composeSchema } from "../"; +import { composeSchema, renderSchema } from "../"; import { fetchTestCases } from "./index"; +import { diff } from "jest-diff"; + function sanitizeObj(obj: unknown) { if (typeof obj !== "object") { return; @@ -9,10 +11,11 @@ function sanitizeObj(obj: unknown) { for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; - const typeOf = typeof (obj as any)[i]; + const prop = (obj as any)[i]; + const typeOf = typeof prop; if (typeOf === "object") { - sanitizeObj((obj as any)[i]); + sanitizeObj(prop); } else if (typeOf === "function") { delete (obj as any)[i]; } else if (typeOf === "undefined") { @@ -35,11 +38,23 @@ describe("Polywrap Schema Composer Test Cases", () => { const result = await composeSchema(testCase.input); - if (testCase.abi) { - sanitizeObj(result); - sanitizeObj(testCase.abi); - expect(result).toMatchObject(testCase.abi); + // Check result with output ABI + sanitizeObj(result); + sanitizeObj(testCase.abi); + expect(result).toMatchObject(testCase.abi); + + // Check rendered result schema with output schema + const resultSchema = renderSchema(result, true); + + if (testCase.schema) { + expect(diff(testCase.schema, resultSchema)) + .toContain("Compared values have no visual difference"); } + + // Check rendering between result ABI and output ABI + const testCaseSchema = renderSchema(testCase.abi, true); + expect(diff(testCaseSchema, resultSchema)) + .toContain("Compared values have no visual difference"); }); } }); diff --git a/packages/schema/compose/src/render.ts b/packages/schema/compose/src/render.ts index f28c70a9c2..9d61751ff6 100644 --- a/packages/schema/compose/src/render.ts +++ b/packages/schema/compose/src/render.ts @@ -9,7 +9,11 @@ import { moduleCapabilities, addAnnotations, } from "@polywrap/schema-parse"; -import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; +import { + GenericDefinition, + WrapAbi +} from "@polywrap/wrap-manifest-types-js"; + // Remove mustache's built-in HTML escaping Mustache.escape = (value) => value; @@ -19,6 +23,14 @@ export function renderSchema(abi: WrapAbi, header: boolean): string { abi = transformAbi(abi, toGraphQLType); abi = transformAbi(abi, moduleCapabilities()); abi = transformAbi(abi, addAnnotations); + abi = transformAbi(abi, { + enter: { + GenericDefinition: (def: GenericDefinition) => { + const comment = (def as any).comment || null; + return { ...def, comment }; + } + } + }); let schema = Mustache.render(schemaTemplate, { abi, diff --git a/packages/schema/compose/src/templates/schema.mustache.ts b/packages/schema/compose/src/templates/schema.mustache.ts index 440612736a..69803ae9ab 100644 --- a/packages/schema/compose/src/templates/schema.mustache.ts +++ b/packages/schema/compose/src/templates/schema.mustache.ts @@ -34,7 +34,7 @@ type {{type}}{{#interfaces.length}} implements{{#interfaces}} {{type}}{{^last}} {{/last}} {{/methods}} -}{{/methods.length}} +}{{/methods.length}}{{^methods.length}} { }{{/methods.length}} {{/moduleType}} {{#envType}}{{#comment}} @@ -66,7 +66,7 @@ type {{type}}{{#interfaces.length}} implements{{#interfaces}} {{type}}{{^last}} {{/comment}} {{name}}: {{toGraphQLType}} {{/properties}} -}{{/properties.length}} +}{{/properties.length}}{{^properties.length}} { }{{/properties.length}} {{/objectTypes}} {{#enumTypes}}{{#comment}} @@ -111,7 +111,7 @@ type {{type}}{{#interfaces.length}} implements{{#interfaces}} {{type}}{{^last}} {{/last}} {{/methods}} -}{{/methods.length}} +}{{/methods.length}}{{^methods.length}} { }{{/methods.length}} {{/importedModuleTypes}} ### Imported Modules END ### @@ -135,7 +135,7 @@ type {{type}}{{#interfaces.length}} implements{{#interfaces}} {{type}}{{^last}} {{/comment}} {{name}}: {{toGraphQLType}} {{/properties}} -}{{/properties.length}} +}{{/properties.length}}{{^properties.length}} { }{{/properties.length}} {{/importedObjectTypes}} diff --git a/packages/schema/parse/src/abi/definitions.ts b/packages/schema/parse/src/abi/definitions.ts index 373e311470..2e5a815b2f 100644 --- a/packages/schema/parse/src/abi/definitions.ts +++ b/packages/schema/parse/src/abi/definitions.ts @@ -240,6 +240,7 @@ export function createArrayPropertyDefinition( const result = createPropertyDefinition({ name: args.name, type: args.type, + required: args.required, array: createArrayDefinition(args), }); return comment ? { ...result, comment } : result; @@ -253,6 +254,7 @@ export function createMapPropertyDefinition( const result = createPropertyDefinition({ name: args.name, type: args.type, + required: args.required, map: createMapDefinition(args), }); return comment ? { ...result, comment } : result; @@ -266,6 +268,7 @@ export function createScalarPropertyDefinition( const result = createPropertyDefinition({ name: args.name, type: args.type, + required: args.required, scalar: createScalarDefinition(args), }); return comment ? { ...result, comment } : result; @@ -279,6 +282,7 @@ export function createEnumPropertyDefinition( const result = createPropertyDefinition({ name: args.name, type: args.type, + required: args.required, enum: createEnumRef(args), }); return comment ? { ...result, comment } : result; @@ -292,6 +296,7 @@ export function createObjectPropertyDefinition( const result = createPropertyDefinition({ name: args.name, type: args.type, + required: args.required, object: createObjectRef(args), }); return comment ? { ...result, comment } : result; diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql new file mode 100644 index 0000000000..48da4a8361 --- /dev/null +++ b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.graphql @@ -0,0 +1,103 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method1( + str: String! + optStr: String + u: UInt! + uArrayArray: [[UInt]]! + ): String! + + method2( + arg: [String!]! + ): [Int32!]! +} + +type CustomModuleType { + str: String! + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + i: Int! + i8: Int8! + bytes: Bytes! + uArray: [UInt!]! + uOptArray: [UInt!] + optStrOptArray: [String] + crazyArray: [[[[UInt32!]]!]] + commonType: CommonType! +} + +type AnotherModuleType { + prop: String +} + +type CommonType { + prop: UInt8! + nestedObject: NestedType! + objectArray: [[ArrayObject]]! + enum: CommonEnum! +} + +type NestedType { + prop: String! +} + +type ArrayObject { + prop: String! +} + +enum CommonEnum { + STRING + BYTES +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql new file mode 100644 index 0000000000..ecfa54aa5c --- /dev/null +++ b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.graphql @@ -0,0 +1,62 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method: TypeA +} + +type TypeA { + prop: TypeB +} + +type TypeB { + prop: String +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql new file mode 100644 index 0000000000..9b45b4d35e --- /dev/null +++ b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.graphql @@ -0,0 +1,66 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method: TypeA +} + +type TypeA { + prop: TypeB +} + +type TypeC { + prop: String +} + +type TypeB { + prop: TypeC +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql new file mode 100644 index 0000000000..610524cfea --- /dev/null +++ b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.graphql @@ -0,0 +1,111 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method1( + str: String! + optStr: String + u: UInt! + uArrayArray: [[UInt]]! + ): String! + + method2( + arg: [String!]! + ): [Int32!]! +} + +type CustomModuleType { + str: String! + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + i: Int! + i8: Int8! + bytes: Bytes! + uArray: [UInt!]! + uOptArray: [UInt!] + optStrOptArray: [String] + crazyArray: [[[[UInt32!]]!]] + commonType: CommonType! +} + +type AnotherModuleType { + prop: String +} + +type CommonType { + prop: UInt8! + nestedObject: NestedType! + objectArray: [[ArrayObject]]! + enum: CommonEnum! +} + +type NestedType { + prop: String! +} + +type ArrayObject { + prop: String! +} + +type IgnoredType1 { + prop: IgnoredType2 +} + +type IgnoredType2 { + prop: String +} + +enum CommonEnum { + STRING + BYTES +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql new file mode 100644 index 0000000000..a7898f4120 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.graphql @@ -0,0 +1,90 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Namespace_ExternalType", + "Namespace_Env", + "Namespace_Module" + ] +) { + method: Namespace_ExternalType +} + +### Imported Modules START ### + +type Namespace_Module @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Module" +) { + envMethod( + arg: String! + ): String! @env(required: true) + + optEnvMethod( + arg: String! + ): String! @env(required: false) +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Namespace_ExternalType @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType" +) { + str: String +} + +### Imported Objects END ### + +### Imported Envs START ### + +type Namespace_Env @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Env" +) { + externalProp: Namespace_ExternalType +} + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts index d57605ae12..3f394c9758 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts @@ -10,42 +10,35 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { - moduleType: { - ...createModuleDefinition({}), - imports: [ - { type: "Namespace_ExternalType" }, - { type: "Namespace_Env" }, - { type: "Namespace_Module" } - ], - methods: [ - { - ...createMethodDefinition({ - name: "method", - return: createObjectPropertyDefinition({ - name: "method", - type: "Namespace_ExternalType", - }), - }), - }, - ], - }, + moduleType: createModuleDefinition({ + imports: [ + { type: "Namespace_ExternalType" }, + { type: "Namespace_Env" }, + { type: "Namespace_Module" } + ], + methods: [ + createMethodDefinition({ + name: "method", + return: createObjectPropertyDefinition({ + name: "method", + type: "Namespace_ExternalType", + }) + }) + ] + }), importedModuleTypes: [ - { - ...createImportedModuleDefinition({ - uri: "external.eth", - namespace: "Namespace", - isInterface: false, - nativeType: "Module", - }), + createImportedModuleDefinition({ + uri: "external.eth", + namespace: "Namespace", + isInterface: false, + nativeType: "Module", methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "envMethod", + return: createScalarPropertyDefinition({ name: "envMethod", - return: createScalarPropertyDefinition({ - name: "envMethod", - type: "String", - required: true, - }), + type: "String", + required: true, }), arguments: [ createScalarPropertyDefinition({ @@ -54,15 +47,16 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createMethodDefinition({ + env: { + required: true + } + }), + createMethodDefinition({ + name: "optEnvMethod", + return: createScalarPropertyDefinition({ name: "optEnvMethod", - return: createScalarPropertyDefinition({ - name: "optEnvMethod", - type: "String", - required: true, - }), + type: "String", + required: true, }), arguments: [ createScalarPropertyDefinition({ @@ -71,40 +65,38 @@ export const abi: WrapAbi = { required: true, }), ], - }, - ], - } + env: { + required: false + } + }), + ] + }) ], importedObjectTypes: [ - { - ...createImportedObjectDefinition({ - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType", - type: "Namespace_ExternalType" - }), + createImportedObjectDefinition({ + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType", + type: "Namespace_ExternalType", properties: [ createScalarPropertyDefinition({ name: "str", type: "String" }) ], - }, + }), ], importedEnvTypes: [ - { - ...createImportedEnvDefinition({ - uri: "external.eth", - namespace: "Namespace", - nativeType: "Env", - type: "Namespace_Env" - }), + createImportedEnvDefinition({ + uri: "external.eth", + namespace: "Namespace", + nativeType: "Env", properties: [ createObjectPropertyDefinition({ name: "externalProp", type: "Namespace_ExternalType" }) - ], - }, + ] + }) ] }; diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql new file mode 100644 index 0000000000..d96f349ca3 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.graphql @@ -0,0 +1,72 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Namespace_ExternalType" + ] +) { + method1: Namespace_ExternalType + + method2: LocalType +} + +type LocalType { + prop: Namespace_ExternalType +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +type Namespace_ExternalType @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType" +) { + str: String +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql new file mode 100644 index 0000000000..04523a5111 --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.graphql @@ -0,0 +1,99 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Namespace_ExternalType", + "Namespace_ExternalType2", + "Namespace_Module", + "Namespace_Env" + ] +) { + method: Namespace_ExternalType +} + +### Imported Modules START ### + +type Namespace_Module @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Module" +) { + envMethod( + arg: String! + ): String! @env(required: true) + + optEnvMethod( + arg: String! + ): String! @env(required: false) +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Namespace_ExternalType @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType" +) { + str: String +} + +type Namespace_ExternalType2 @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType2" +) { + foo: UInt32 +} + +### Imported Objects END ### + +### Imported Envs START ### + +type Namespace_Env @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Env" +) { + externalProp: Namespace_ExternalType +} + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts index 3e0ad04e90..5490a88555 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts @@ -10,44 +10,36 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { - moduleType: - { - ...createModuleDefinition({}), - imports: [ - { type: "Namespace_ExternalType" }, - { type: "Namespace_ExternalType2" }, - { type: "Namespace_Module" }, - { type: "Namespace_Env" }, - ], - methods: [ - { - ...createMethodDefinition({ - name: "method", - return: createObjectPropertyDefinition({ - name: "method", - type: "Namespace_ExternalType", - }), - }), - }, - ], - }, - importedModuleTypes: [ - { - ...createImportedModuleDefinition({ - uri: "external.eth", - namespace: "Namespace", - isInterface: false, - nativeType: "Module", + moduleType: createModuleDefinition({ + imports: [ + { type: "Namespace_ExternalType" }, + { type: "Namespace_ExternalType2" }, + { type: "Namespace_Module" }, + { type: "Namespace_Env" }, + ], + methods: [ + createMethodDefinition({ + name: "method", + return: createObjectPropertyDefinition({ + name: "method", + type: "Namespace_ExternalType", + }), }), + ], + }), + importedModuleTypes: [ + createImportedModuleDefinition({ + uri: "external.eth", + namespace: "Namespace", + isInterface: false, + nativeType: "Module", methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "envMethod", + return: createScalarPropertyDefinition({ name: "envMethod", - return: createScalarPropertyDefinition({ - name: "envMethod", - type: "String", - required: true, - }), + type: "String", + required: true, }), arguments: [ createScalarPropertyDefinition({ @@ -56,15 +48,16 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createMethodDefinition({ + env: { + required: true, + }, + }), + createMethodDefinition({ + name: "optEnvMethod", + return: createScalarPropertyDefinition({ name: "optEnvMethod", - return: createScalarPropertyDefinition({ - name: "optEnvMethod", - type: "String", - required: true, - }), + type: "String", + required: true, }), arguments: [ createScalarPropertyDefinition({ @@ -73,54 +66,50 @@ export const abi: WrapAbi = { required: true, }), ], - }, + env: { + required: false, + }, + }), ], - } + }), ], importedObjectTypes: [ - { - ...createImportedObjectDefinition({ - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType", - type: "Namespace_ExternalType" - }), + createImportedObjectDefinition({ + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType", + type: "Namespace_ExternalType", properties: [ createScalarPropertyDefinition({ name: "str", type: "String" }) ], - }, - { - ...createImportedObjectDefinition({ - uri: "external.eth", - namespace: "Namespace", - nativeType: "ExternalType2", - type: "Namespace_ExternalType2" - }), + }), + createImportedObjectDefinition({ + uri: "external.eth", + namespace: "Namespace", + nativeType: "ExternalType2", + type: "Namespace_ExternalType2", properties: [ createScalarPropertyDefinition({ name: "foo", type: "UInt32" }) ], - }, + }), ], importedEnvTypes: [ - { - ...createImportedEnvDefinition({ - uri: "external.eth", - namespace: "Namespace", - nativeType: "Env", - type: "Namespace_Env" - }), + createImportedEnvDefinition({ + uri: "external.eth", + namespace: "Namespace", + nativeType: "Env", properties: [ createObjectPropertyDefinition({ name: "externalProp", type: "Namespace_ExternalType" }) ], - }, + }), ] }; diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.graphql b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.graphql new file mode 100644 index 0000000000..d26490c34a --- /dev/null +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.graphql @@ -0,0 +1,93 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module implements Ipfs_Module @imports( + types: [ + "Ipfs_Module", + "Ipfs_Ipfs_Options" + ] +) { + cat( + cid: String! + options: Ipfs_Ipfs_Options + ): Bytes! +} + +### Imported Modules START ### + +type Ipfs_Module @imported( + uri: "external.eth", + namespace: "Ipfs", + nativeType: "Module" +) { + cat( + cid: String! + options: Ipfs_Ipfs_Options + ): Bytes! +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Ipfs_Ipfs_Options @imported( + uri: "external.eth", + namespace: "Ipfs", + nativeType: "Ipfs_Options" +) { + """ + Timeout (in ms) for the operation. +Fallback providers are used if timeout is reached. + """ + timeout: UInt32 + """ + The IPFS provider to be used + """ + provider: String + """ + Disable querying providers in parallel when resolving URIs + """ + disableParallelRequests: Boolean +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql new file mode 100644 index 0000000000..d070136a78 --- /dev/null +++ b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.graphql @@ -0,0 +1,75 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method1: DerivedType1 + + method2: DerivedType2 +} + +type BaseType1 { + str: String +} + +type DerivedType1 implements BaseType1 { + prop: Int + str: String +} + +type BaseType2 { + uint: UInt +} + +type DerivedType2 implements BaseType1 & BaseType2 { + prop: Int + str: String + uint: UInt +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql new file mode 100644 index 0000000000..f120768f14 --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.graphql @@ -0,0 +1,54 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { } + +type CustomType { } + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql new file mode 100644 index 0000000000..7b97c504c8 --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.graphql @@ -0,0 +1,58 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method: DerivedType +} + +type BaseType { } + +type DerivedType implements BaseType { } + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql new file mode 100644 index 0000000000..252733d296 --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.graphql @@ -0,0 +1,64 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method1: DerivedType + + method2: ImportedDerivedType +} + +type BaseType { } + +type DerivedType implements BaseType { } + +type ImportedDerivedType implements ImportedBaseType { } + +type ImportedBaseType { } + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql new file mode 100644 index 0000000000..1b14bbed88 --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.graphql @@ -0,0 +1,62 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module implements Namespace_Module @imports( + types: [ + "Namespace_Module" + ] +) { } + +### Imported Modules START ### + +type Namespace_Module @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Module" +) { } + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql new file mode 100644 index 0000000000..38882757a3 --- /dev/null +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.graphql @@ -0,0 +1,82 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Base_ImportedBaseType", + "Derived_ImportedDerivedType", + "Derived_ImportedBaseType" + ] +) { + method1: Derived_ImportedDerivedType + + method2: CustomType +} + +type CustomType implements Base_ImportedBaseType { } + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +type Base_ImportedBaseType @imported( + uri: "base.eth", + namespace: "Base", + nativeType: "ImportedBaseType" +) { } + +type Derived_ImportedDerivedType implements Derived_ImportedBaseType @imported( + uri: "derived.eth", + namespace: "Derived", + nativeType: "ImportedDerivedType" +) { } + +type Derived_ImportedBaseType @imported( + uri: "derived.eth", + namespace: "Derived", + nativeType: "ImportedBaseType" +) { } + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql new file mode 100644 index 0000000000..96697cd4c7 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.graphql @@ -0,0 +1,76 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + requiredMapArgs( + map: Map! @annotate(type: "Map!") + ): Map! @annotate(type: "Map!") + + optionalMapArgs( + map: Map @annotate(type: "Map") + ): Map @annotate(type: "Map") + + optionalValueArgs( + map: Map! @annotate(type: "Map!") + ): Map! @annotate(type: "Map!") +} + +type SimpleType { + requiredMap: Map! @annotate(type: "Map!") + optionalMap: Map @annotate(type: "Map") + optionalValueMap: Map @annotate(type: "Map") + optionalKeyMap: Map! @annotate(type: "Map!") +} + +type RecursiveType { + mapOfValueArr: Map! @annotate(type: "Map!") + mapOfMap: Map! @annotate(type: "Map!>!") +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts index 69e060ca28..d97c0aa054 100644 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts @@ -12,252 +12,222 @@ import { export const abi: WrapAbi = { objectTypes: [ - { - ...createObjectDefinition({ - type: "SimpleType", - }), + createObjectDefinition({ + type: "SimpleType", properties: [ - { - ...createMapPropertyDefinition({ + createMapPropertyDefinition({ + name: "requiredMap", + type: "Map", + key: createMapKeyDefinition({ name: "requiredMap", - type: "Map", - key: createMapKeyDefinition({ - name: "requiredMap", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "requiredMap", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "requiredMap", + type: "Int", + required: true, + }), + required: true, + }), + createMapPropertyDefinition({ + name: "optionalMap", + type: "Map", + key: createMapKeyDefinition({ + name: "optionalMap", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "optionalMap", + type: "Int", + required: true, + }), + }), + createMapPropertyDefinition({ + name: "optionalValueMap", + type: "Map", + key: createMapKeyDefinition({ + name: "optionalValueMap", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "optionalValueMap", + type: "Int", + }), + }), + createMapPropertyDefinition({ + name: "optionalKeyMap", + type: "Map", + key: createMapKeyDefinition({ + name: "optionalKeyMap", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "optionalKeyMap", + type: "Int", + required: true, + }), + required: true, + }), + ], + }), + createObjectDefinition({ + type: "RecursiveType", + properties: [ + createMapPropertyDefinition({ + name: "mapOfValueArr", + type: "Map", + key: createMapKeyDefinition({ + name: "mapOfValueArr", + type: "String", + required: true, + }), + value: createArrayDefinition({ + name: "mapOfValueArr", + type: "[Int]", + item: createScalarDefinition({ + name: "mapOfValueArr", type: "Int", required: true, }), required: true, }), - }, - { - ...createMapPropertyDefinition({ - name: "optionalMap", + required: true, + }), + createMapPropertyDefinition({ + name: "mapOfMap", + type: "Map>", + key: createMapKeyDefinition({ + name: "mapOfMap", + type: "String", + required: true, + }), + value: createMapDefinition({ + name: "mapOfMap", type: "Map", key: createMapKeyDefinition({ - name: "optionalMap", + name: "mapOfMap", type: "String", required: true, }), value: createScalarDefinition({ - name: "optionalMap", + name: "mapOfMap", type: "Int", required: true, }), + required: true, }), - }, - { - ...createMapPropertyDefinition({ - name: "optionalValueMap", + required: true + }), + ], + }), + ], + moduleType: createModuleDefinition({ + methods: [ + createMethodDefinition({ + name: "requiredMapArgs", + return: createMapPropertyDefinition({ + name: "requiredMapArgs", + type: "Map", + key: createMapKeyDefinition({ + name: "requiredMapArgs", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "requiredMapArgs", + type: "Int", + required: true, + }), + required: true, + }), + arguments: [ + createMapPropertyDefinition({ + name: "map", type: "Map", key: createMapKeyDefinition({ - name: "optionalValueMap", + name: "map", type: "String", required: true, }), value: createScalarDefinition({ - name: "optionalValueMap", + name: "map", type: "Int", + required: true, }), + required: true, }), - }, - { - ...createMapPropertyDefinition({ - name: "optionalKeyMap", + ], + }), + createMethodDefinition({ + name: "optionalMapArgs", + return: createMapPropertyDefinition({ + name: "optionalMapArgs", + type: "Map", + key: createMapKeyDefinition({ + name: "optionalMapArgs", + type: "String", + required: true, + }), + value: createScalarDefinition({ + name: "optionalMapArgs", + type: "Int", + required: true, + }), + }), + arguments: [ + createMapPropertyDefinition({ + name: "map", type: "Map", key: createMapKeyDefinition({ - name: "optionalKeyMap", + name: "map", type: "String", required: true, }), value: createScalarDefinition({ - name: "optionalKeyMap", + name: "map", type: "Int", required: true, }), - required: true, }), - }, - ], - }, - { - ...createObjectDefinition({ - type: "RecursiveType", + ], }), - properties: [ - { - ...createMapPropertyDefinition({ - name: "mapOfValueArr", - type: "Map", - key: createMapKeyDefinition({ - name: "mapOfValueArr", - type: "String", - required: true, - }), - value: createArrayDefinition({ - name: "mapOfValueArr", - type: "[Int]", - item: createScalarDefinition({ - name: "mapOfValueArr", - type: "Int", - required: true, - }), - required: true, - }), + createMethodDefinition({ + name: "optionalValueArgs", + return: createMapPropertyDefinition({ + name: "optionalValueArgs", + type: "Map", + key: createMapKeyDefinition({ + name: "optionalValueArgs", + type: "String", required: true, }), - }, - { - ...createMapPropertyDefinition({ - name: "mapOfMap", - type: "Map>", + value: createScalarDefinition({ + name: "optionalValueArgs", + type: "Int", + }), + required: true, + }), + arguments: [ + createMapPropertyDefinition({ + name: "map", + type: "Map", key: createMapKeyDefinition({ - name: "mapOfMap", + name: "map", type: "String", required: true, }), - value: createMapDefinition({ - name: "mapOfMap", - type: "Map", - key: createMapKeyDefinition({ - name: "mapOfMap", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "mapOfMap", - type: "Int", - required: true, - }), - required: true, - }), - required: true - }), - }, - ], - }, - ], - moduleType: - { - ...createModuleDefinition({}), - methods: [ - { - ...createMethodDefinition({ - name: "requiredMapArgs", - return: createMapPropertyDefinition({ - name: "requiredMapArgs", - type: "Map", - key: createMapKeyDefinition({ - name: "requiredMapArgs", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "requiredMapArgs", - type: "Int", - required: true, - }), - required: true, - }), - arguments: [ - { - ...createMapPropertyDefinition({ - name: "map", - type: "Map", - key: createMapKeyDefinition({ - name: "map", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "map", - type: "Int", - required: true, - }), - required: true, - }), - }, - ], - }), - }, - { - ...createMethodDefinition({ - name: "optionalMapArgs", - return: createMapPropertyDefinition({ - name: "optionalMapArgs", - type: "Map", - key: createMapKeyDefinition({ - name: "optionalMapArgs", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "optionalMapArgs", - type: "Int", - required: true, - }), - }), - arguments: [ - { - ...createMapPropertyDefinition({ - name: "map", - type: "Map", - key: createMapKeyDefinition({ - name: "map", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "map", - type: "Int", - required: true, - }), - }), - }, - ], - }), - }, - { - ...createMethodDefinition({ - name: "optionalValueArgs", - return: createMapPropertyDefinition({ - name: "optionalValueArgs", - type: "Map", - key: createMapKeyDefinition({ - name: "optionalValueArgs", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "optionalValueArgs", - type: "Int", - }), - required: true, + value: createScalarDefinition({ + name: "map", + type: "Int", }), - arguments: [ - { - ...createMapPropertyDefinition({ - name: "map", - type: "Map", - key: createMapKeyDefinition({ - name: "map", - type: "String", - required: true, - }), - value: createScalarDefinition({ - name: "map", - type: "Int", - }), - required: true, - }), - }, - ], + required: true, }), - }, - ], - }, + ], + }), + ], + }), }; diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql new file mode 100644 index 0000000000..be781be754 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.graphql @@ -0,0 +1,66 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method( + map: Map! @annotate(type: "Map!") + other: InheritedType! + ): Map! @annotate(type: "Map!") +} + +type BaseType { + requiredMap: Map! @annotate(type: "Map!") +} + +type InheritedType implements BaseType { + mapOfValueArr: Map! @annotate(type: "Map!") + requiredMap: Map! @annotate(type: "Map!") +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql new file mode 100644 index 0000000000..e645d3a224 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.graphql @@ -0,0 +1,75 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method( + args: DerivedType! + importedArgs: ImportedDerivedType! + ): Map! @annotate(type: "Map!") +} + +type BaseType { + requiredMap: Map! @annotate(type: "Map!") +} + +type DerivedType implements BaseType { + mapOfValueArr: Map! @annotate(type: "Map!") + requiredMap: Map! @annotate(type: "Map!") +} + +type ImportedDerivedType implements ImportedBaseType { + mapOfValueArr: Map! @annotate(type: "Map!") + requiredMap: Map! @annotate(type: "Map!") +} + +type ImportedBaseType { + requiredMap: Map! @annotate(type: "Map!") +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql new file mode 100644 index 0000000000..b1a3331759 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.graphql @@ -0,0 +1,74 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module implements Namespace_Module @imports( + types: [ + "Namespace_Module" + ] +) { + getMap: Map! @annotate(type: "Map!") + + updateMap( + map: Map! @annotate(type: "Map!") + ): Map! @annotate(type: "Map!") +} + +### Imported Modules START ### + +type Namespace_Module @imported( + uri: "external.eth", + namespace: "Namespace", + nativeType: "Module" +) { + getMap: Map! @annotate(type: "Map!") + + updateMap( + map: Map! @annotate(type: "Map!") + ): Map! @annotate(type: "Map!") +} + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql new file mode 100644 index 0000000000..42f98b9b30 --- /dev/null +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.graphql @@ -0,0 +1,91 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module @imports( + types: [ + "Base_ImportedBaseType", + "Derived_ImportedDerivedType", + "Derived_ImportedBaseType" + ] +) { + method1: Derived_ImportedDerivedType + + method2: CustomType +} + +type CustomType implements Base_ImportedBaseType { + requiredMap: Map! @annotate(type: "Map!") +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +type Base_ImportedBaseType @imported( + uri: "base.eth", + namespace: "Base", + nativeType: "ImportedBaseType" +) { + requiredMap: Map! @annotate(type: "Map!") +} + +type Derived_ImportedDerivedType implements Derived_ImportedBaseType @imported( + uri: "derived.eth", + namespace: "Derived", + nativeType: "ImportedDerivedType" +) { + mapOfValueArr: Map! @annotate(type: "Map!") + requiredMap: Map! @annotate(type: "Map!") +} + +type Derived_ImportedBaseType @imported( + uri: "derived.eth", + namespace: "Derived", + nativeType: "ImportedBaseType" +) { + requiredMap: Map! @annotate(type: "Map!") +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql new file mode 100644 index 0000000000..ab881a1b02 --- /dev/null +++ b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.graphql @@ -0,0 +1,60 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +type Module { + method( + str: String! + ): String! +} + +type Env { + prop: String! +} + +### Imported Modules START ### + +### Imported Modules END ### + +### Imported Objects START ### + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/sanity/output/module.graphql b/packages/test-cases/cases/compose/sanity/output/module.graphql new file mode 100644 index 0000000000..92196a669d --- /dev/null +++ b/packages/test-cases/cases/compose/sanity/output/module.graphql @@ -0,0 +1,461 @@ +### Polywrap Header START ### +scalar UInt +scalar UInt8 +scalar UInt16 +scalar UInt32 +scalar Int +scalar Int8 +scalar Int16 +scalar Int32 +scalar Bytes +scalar BigInt +scalar BigNumber +scalar JSON +scalar Map + +directive @imported( + uri: String! + namespace: String! + nativeType: String! +) on OBJECT | ENUM + +directive @imports( + types: [String!]! +) on OBJECT + +directive @capability( + type: String! + uri: String! + namespace: String! +) repeatable on OBJECT + +directive @enabled_interface on OBJECT + +directive @annotate(type: String!) on FIELD + +directive @env(required: Boolean!) on FIELD_DEFINITION + +### Polywrap Header END ### + +""" +Module comment +""" +type Module implements Interface_Module @imports( + types: [ + "Namespace_Module", + "Namespace_NestedObjectType", + "Namespace_ObjectType", + "Namespace_Imported_NestedObjectType", + "Namespace_Imported_ObjectType", + "Namespace_CustomType", + "Namespace_CustomEnum", + "Namespace_Imported_Enum", + "JustModule_Module", + "Interface_InterfaceObject1", + "Interface_InterfaceObject2", + "Interface_Object", + "Interface_NestedInterfaceObject", + "Interface_Module", + "Interface_ModuleInterfaceArgument", + "Interface_NestedModuleInterfaceArgument" + ] +) @capability( + type: "getImplementations", + uri: "test.eth", + namespace: "Namespace" +) { + """ + method1 comment + """ + method1( + """ + str comment + """ + str: String! + """ + optStr comment + """ + optStr: String + u: UInt! + """ + uArrayArray comment + """ + uArrayArray: [[UInt]]! + """ + implObject comment + """ + implObject: LocalImplementationObject! + """ + Map comment + """ + map: Map! @annotate(type: "Map!") + ): String! + + """ + method2 comment + """ + method2( + arg: [String!]! + ): [Int32!]! + + abstractModuleMethod( + arg: Interface_ModuleInterfaceArgument! + ): Interface_InterfaceObject2! +} + +type Env { + foo: String! +} + +""" +CustomModuleType multi-line comment +line 2 +""" +type CustomModuleType { + """ + str comment + """ + str: String! + """ + optStr comment + """ + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + i: Int! + i8: Int8! + bytes: Bytes! + uArray: [UInt!]! + uOptArray: [UInt!] + optStrOptArray: [String] + """ + crazyArray comment + """ + crazyArray: [[[[UInt32!]]!]] + commonType: CommonType! + optMap: Map @annotate(type: "Map") + """ + customType comment + """ + customType: Namespace_CustomType! +} + +type AnotherModuleType { + prop: String +} + +type TypeFromInterface implements AnotherModuleType { + prop2: UInt32! + prop: String +} + +""" +ImplementationObject comment +""" +type ImplementationObject implements Interface_InterfaceObject1 & Interface_InterfaceObject2 { + """ + anotherProp comment + """ + anotherProp: String + str: String! + uint8: UInt8! + str2: String! + object: Interface_Object +} + +type LocalImplementationObject implements LocalInterfaceObject { + uint8: UInt8! + str: String! +} + +type LocalInterfaceObject { + str: String! +} + +""" +CommonType comment +""" +type CommonType { + prop: UInt8! + nestedObject: NestedType! + """ + objectArray comment + """ + objectArray: [[ArrayObject]]! + anotherLocal: AnotherLocal! +} + +""" +NestedType comment +""" +type NestedType { + prop: String! +} + +""" +ArrayObject comment +""" +type ArrayObject { + prop: String! +} + +type AnotherLocal { + prop: String! +} + +### Imported Modules START ### + +""" +Module comment +""" +type Namespace_Module @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "Module" +) @enabled_interface { + method1( + str: String! + optStr: String + u: UInt! + optU: UInt + uArrayArray: [[UInt]]! + ): String! + + """ + method2 comment + """ + method2( + """ + arg comment + """ + arg: [String!]! + ): [Int32!]! + + localObjects( + nestedLocalObject: Namespace_NestedObjectType + localObjectArray: [Namespace_NestedObjectType!] + ): Namespace_NestedObjectType + + importedObjects( + nestedLocalObject: Namespace_Imported_NestedObjectType + localObjectArray: [Namespace_Imported_NestedObjectType!] + ): Namespace_Imported_NestedObjectType +} + +type JustModule_Module @imported( + uri: "just.module.eth", + namespace: "JustModule", + nativeType: "Module" +) { + method( + arg: [String!]! + ): [Int32!]! +} + +""" +Module comment +""" +type Interface_Module @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "Module" +) { + """ + abstractModuleMethod comment + """ + abstractModuleMethod( + """ + arg comment + """ + arg: Interface_ModuleInterfaceArgument! + ): Interface_InterfaceObject2! +} + +### Imported Modules END ### + +### Imported Objects START ### + +type Namespace_NestedObjectType @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "NestedObjectType" +) { + nestedObject: Namespace_ObjectType! +} + +type Namespace_ObjectType @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "ObjectType" +) { + prop: String! +} + +""" +Imported_NestedObjectType comment +""" +type Namespace_Imported_NestedObjectType @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_NestedObjectType" +) { + nestedObject: Namespace_Imported_ObjectType! +} + +type Namespace_Imported_ObjectType @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_ObjectType" +) { + prop: String! +} + +""" +CustomType comment +""" +type Namespace_CustomType @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "CustomType" +) { + str: String! + optStr: String + u: UInt! + optU: UInt + u8: UInt8! + u16: UInt16! + u32: UInt32! + i: Int! + i8: Int8! + i16: Int16! + i32: Int32! + bytes: Bytes! + uArray: [UInt!]! + uOptArray: [UInt!] + optUOptArray: [UInt] + optStrOptArray: [String] + uArrayArray: [[UInt!]!]! + uOptArrayOptArray: [[UInt32]]! + uArrayOptArrayArray: [[[UInt32!]!]]! + crazyArray: [[[[UInt32!]]!]] + object: Namespace_ObjectType! + optObject: Namespace_ObjectType + nestedObject: Namespace_NestedObjectType! + optNestedObject: Namespace_NestedObjectType + optNestedObjectArray: [Namespace_NestedObjectType]! + importedNestedObject: Namespace_Imported_NestedObjectType! + optImportedNestedObjectArray: [Namespace_Imported_NestedObjectType]! + enum: Namespace_CustomEnum! + optEnum: Namespace_CustomEnum + importedEnum: Namespace_Imported_Enum! + """ + optImportedEnum comment + """ + optImportedEnum: Namespace_Imported_Enum +} + +""" +InterfaceObject1 comment +""" +type Interface_InterfaceObject1 @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "InterfaceObject1" +) { + str: String! + """ + InterfaceObject1_uint8 comment + """ + uint8: UInt8! +} + +""" +InterfaceObject2 comment +""" +type Interface_InterfaceObject2 implements Interface_NestedInterfaceObject @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "InterfaceObject2" +) { + str2: String! + object: Interface_Object +} + +""" +Object comment +""" +type Interface_Object @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "Object" +) { + uint8: UInt8! +} + +""" +NestedInterfaceObject comment +""" +type Interface_NestedInterfaceObject @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "NestedInterfaceObject" +) { + """ + object comment + """ + object: Interface_Object +} + +""" +ModuleInterfaceArgument comment +""" +type Interface_ModuleInterfaceArgument implements Interface_NestedModuleInterfaceArgument @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "ModuleInterfaceArgument" +) { + str: String! + """ + uint8 comment + """ + uint8: UInt8! +} + +""" +NestedModuleInterfaceArgument comment +""" +type Interface_NestedModuleInterfaceArgument @imported( + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "NestedModuleInterfaceArgument" +) { + uint8: UInt8! +} + +enum Namespace_CustomEnum @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "CustomEnum" +) { + STRING + BYTES +} + +""" +Imported_Enum comment +""" +enum Namespace_Imported_Enum @imported( + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_Enum" +) { + STRING + BYTES +} + +### Imported Objects END ### + +### Imported Envs START ### + +### Imported Envs END ### diff --git a/packages/test-cases/cases/compose/sanity/output/module.ts b/packages/test-cases/cases/compose/sanity/output/module.ts index 03489d0589..99f10b8874 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.ts +++ b/packages/test-cases/cases/compose/sanity/output/module.ts @@ -42,8 +42,8 @@ export const abi: WrapAbi = { }, }), ], - moduleType: { - ...createModuleDefinition({ comment: "Module comment" }), + moduleType: createModuleDefinition({ + comment: "Module comment", imports: [ { type: "Namespace_Module" }, { type: "Namespace_NestedObjectType" }, @@ -66,16 +66,14 @@ export const abi: WrapAbi = { createInterfaceImplementedDefinition({ type: "Interface_Module" }), ], methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "method1", + return: createScalarPropertyDefinition({ name: "method1", - return: createScalarPropertyDefinition({ - name: "method1", - type: "String", - required: true, - }), - comment: "method1 comment", + type: "String", + required: true, }), + comment: "method1 comment", arguments: [ createScalarPropertyDefinition({ name: "str", @@ -130,20 +128,18 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createMethodDefinition({ + }), + createMethodDefinition({ + name: "method2", + comment: "method2 comment", + return: createArrayPropertyDefinition({ name: "method2", - comment: "method2 comment", - return: createArrayPropertyDefinition({ + type: "[Int32]", + required: true, + item: createScalarDefinition({ name: "method2", - type: "[Int32]", required: true, - item: createScalarDefinition({ - name: "method2", - required: true, - type: "Int32", - }), + type: "Int32", }), }), arguments: [ @@ -158,15 +154,13 @@ export const abi: WrapAbi = { }), }), ], - }, - { - ...createMethodDefinition({ + }), + createMethodDefinition({ + name: "abstractModuleMethod", + return: createObjectPropertyDefinition({ name: "abstractModuleMethod", - return: createObjectPropertyDefinition({ - name: "abstractModuleMethod", - type: "Interface_InterfaceObject2", - required: true, - }), + type: "Interface_InterfaceObject2", + required: true, }), arguments: [ createObjectPropertyDefinition({ @@ -175,15 +169,13 @@ export const abi: WrapAbi = { type: "Interface_ModuleInterfaceArgument", }), ], - }, + }), ], - }, + }), objectTypes: [ - { - ...createObjectDefinition({ - type: "CustomModuleType", - comment: "CustomModuleType multi-line comment\nline 2", - }), + createObjectDefinition({ + type: "CustomModuleType", + comment: "CustomModuleType multi-line comment\nline 2", properties: [ createScalarPropertyDefinition({ name: "str", @@ -300,15 +292,15 @@ export const abi: WrapAbi = { comment: "customType comment", }), ], - }, - { - ...createObjectDefinition({ type: "AnotherModuleType" }), + }), + createObjectDefinition({ + type: "AnotherModuleType", properties: [ createScalarPropertyDefinition({ name: "prop", type: "String" }), ], - }, - { - ...createObjectDefinition({ type: "TypeFromInterface" }), + }), + createObjectDefinition({ + type: "TypeFromInterface", interfaces: [ createInterfaceImplementedDefinition({ type: "AnotherModuleType" }), ], @@ -320,20 +312,18 @@ export const abi: WrapAbi = { }), createScalarPropertyDefinition({ name: "prop", type: "String" }), ], - }, - { - ...createObjectDefinition({ - type: "ImplementationObject", - interfaces: [ - createInterfaceImplementedDefinition({ - type: "Interface_InterfaceObject1", - }), - createInterfaceImplementedDefinition({ - type: "Interface_InterfaceObject2", - }), - ], - comment: "ImplementationObject comment", - }), + }), + createObjectDefinition({ + type: "ImplementationObject", + interfaces: [ + createInterfaceImplementedDefinition({ + type: "Interface_InterfaceObject1", + }), + createInterfaceImplementedDefinition({ + type: "Interface_InterfaceObject2", + }), + ], + comment: "ImplementationObject comment", properties: [ createScalarPropertyDefinition({ name: "anotherProp", @@ -360,16 +350,14 @@ export const abi: WrapAbi = { type: "Interface_Object", }), ], - }, - { - ...createObjectDefinition({ - type: "LocalImplementationObject", - interfaces: [ - createInterfaceImplementedDefinition({ - type: "LocalInterfaceObject", - }), - ], - }), + }), + createObjectDefinition({ + type: "LocalImplementationObject", + interfaces: [ + createInterfaceImplementedDefinition({ + type: "LocalInterfaceObject", + }), + ], properties: [ createScalarPropertyDefinition({ name: "uint8", @@ -382,11 +370,9 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createObjectDefinition({ - type: "LocalInterfaceObject", - }), + }), + createObjectDefinition({ + type: "LocalInterfaceObject", properties: [ createScalarPropertyDefinition({ name: "str", @@ -394,12 +380,10 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createObjectDefinition({ - type: "CommonType", - comment: "CommonType comment", - }), + }), + createObjectDefinition({ + type: "CommonType", + comment: "CommonType comment", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -431,12 +415,10 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createObjectDefinition({ - type: "NestedType", - comment: "NestedType comment", - }), + }), + createObjectDefinition({ + type: "NestedType", + comment: "NestedType comment", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -444,12 +426,10 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createObjectDefinition({ - type: "ArrayObject", - comment: "ArrayObject comment", - }), + }), + createObjectDefinition({ + type: "ArrayObject", + comment: "ArrayObject comment", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -457,11 +437,9 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createObjectDefinition({ - type: "AnotherLocal", - }), + }), + createObjectDefinition({ + type: "AnotherLocal", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -469,26 +447,22 @@ export const abi: WrapAbi = { required: true, }), ], - }, + }), ], importedModuleTypes: [ - { - ...createImportedModuleDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "Module", - isInterface: true, - comment: "Module comment", - }), + createImportedModuleDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "Module", + isInterface: true, + comment: "Module comment", methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "method1", + return: createScalarPropertyDefinition({ name: "method1", - return: createScalarPropertyDefinition({ - name: "method1", - type: "String", - required: true, - }), + type: "String", + required: true, }), arguments: [ createScalarPropertyDefinition({ @@ -523,20 +497,18 @@ export const abi: WrapAbi = { }), }), ], - }, - { - ...createMethodDefinition({ + }), + createMethodDefinition({ + name: "method2", + comment: "method2 comment", + return: createArrayPropertyDefinition({ name: "method2", - comment: "method2 comment", - return: createArrayPropertyDefinition({ + type: "[Int32]", + required: true, + item: createScalarDefinition({ name: "method2", - type: "[Int32]", required: true, - item: createScalarDefinition({ - name: "method2", - required: true, - type: "Int32", - }), + type: "Int32", }), }), arguments: [ @@ -552,14 +524,12 @@ export const abi: WrapAbi = { }), }), ], - }, - { - ...createMethodDefinition({ + }), + createMethodDefinition({ + name: "localObjects", + return: createObjectPropertyDefinition({ name: "localObjects", - return: createObjectPropertyDefinition({ - name: "localObjects", - type: "Namespace_NestedObjectType", - }), + type: "Namespace_NestedObjectType", }), arguments: [ createObjectPropertyDefinition({ @@ -576,14 +546,12 @@ export const abi: WrapAbi = { }), }), ], - }, - { - ...createMethodDefinition({ + }), + createMethodDefinition({ + name: "importedObjects", + return: createObjectPropertyDefinition({ name: "importedObjects", - return: createObjectPropertyDefinition({ - name: "importedObjects", - type: "Namespace_Imported_NestedObjectType", - }), + type: "Namespace_Imported_NestedObjectType", }), arguments: [ createObjectPropertyDefinition({ @@ -600,29 +568,25 @@ export const abi: WrapAbi = { }), }), ], - }, + }), ], - }, - { - ...createImportedModuleDefinition({ - uri: "just.module.eth", - namespace: "JustModule", - isInterface: false, - nativeType: "Module", - }), + }), + createImportedModuleDefinition({ + uri: "just.module.eth", + namespace: "JustModule", + isInterface: false, + nativeType: "Module", methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "method", + return: createArrayPropertyDefinition({ name: "method", - return: createArrayPropertyDefinition({ + type: "[Int32]", + required: true, + item: createScalarDefinition({ name: "method", - type: "[Int32]", + type: "Int32", required: true, - item: createScalarDefinition({ - name: "method", - type: "Int32", - required: true, - }), }), }), arguments: [ @@ -637,27 +601,23 @@ export const abi: WrapAbi = { }), }), ], - }, + }), ], - }, - { - ...createImportedModuleDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "Module", - isInterface: false, - comment: "Module comment", - }), + }), + createImportedModuleDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "Module", + isInterface: false, + comment: "Module comment", methods: [ - { - ...createMethodDefinition({ + createMethodDefinition({ + name: "abstractModuleMethod", + comment: "abstractModuleMethod comment", + return: createObjectPropertyDefinition({ name: "abstractModuleMethod", - comment: "abstractModuleMethod comment", - return: createObjectPropertyDefinition({ - name: "abstractModuleMethod", - type: "Interface_InterfaceObject2", - required: true, - }), + type: "Interface_InterfaceObject2", + required: true, }), arguments: [ createObjectPropertyDefinition({ @@ -667,18 +627,16 @@ export const abi: WrapAbi = { type: "Interface_ModuleInterfaceArgument", }), ], - }, + }), ], - }, + }), ], importedObjectTypes: [ - { - ...createImportedObjectDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "NestedObjectType", - type: "Namespace_NestedObjectType", - }), + createImportedObjectDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "NestedObjectType", + type: "Namespace_NestedObjectType", properties: [ createObjectPropertyDefinition({ name: "nestedObject", @@ -686,14 +644,12 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "ObjectType", - type: "Namespace_ObjectType", - }), + }), + createImportedObjectDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "ObjectType", + type: "Namespace_ObjectType", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -701,15 +657,13 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_NestedObjectType", - type: "Namespace_Imported_NestedObjectType", - comment: "Imported_NestedObjectType comment", - }), + }), + createImportedObjectDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_NestedObjectType", + type: "Namespace_Imported_NestedObjectType", + comment: "Imported_NestedObjectType comment", properties: [ createObjectPropertyDefinition({ name: "nestedObject", @@ -717,14 +671,12 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_ObjectType", - type: "Namespace_Imported_ObjectType", - }), + }), + createImportedObjectDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_ObjectType", + type: "Namespace_Imported_ObjectType", properties: [ createScalarPropertyDefinition({ name: "prop", @@ -732,15 +684,13 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "CustomType", - type: "Namespace_CustomType", - comment: "CustomType comment", - }), + }), + createImportedObjectDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "CustomType", + type: "Namespace_CustomType", + comment: "CustomType comment", properties: [ createScalarPropertyDefinition({ name: "str", @@ -965,15 +915,13 @@ export const abi: WrapAbi = { comment: "optImportedEnum comment", }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "InterfaceObject1", - type: "Interface_InterfaceObject1", - comment: "InterfaceObject1 comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "InterfaceObject1", + type: "Interface_InterfaceObject1", + comment: "InterfaceObject1 comment", properties: [ createScalarPropertyDefinition({ name: "str", @@ -987,15 +935,13 @@ export const abi: WrapAbi = { comment: "InterfaceObject1_uint8 comment", }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "InterfaceObject2", - type: "Interface_InterfaceObject2", - comment: "InterfaceObject2 comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "InterfaceObject2", + type: "Interface_InterfaceObject2", + comment: "InterfaceObject2 comment", interfaces: [ createInterfaceImplementedDefinition({ type: "Interface_NestedInterfaceObject", @@ -1012,15 +958,13 @@ export const abi: WrapAbi = { type: "Interface_Object", }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "Object", - type: "Interface_Object", - comment: "Object comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "Object", + type: "Interface_Object", + comment: "Object comment", properties: [ createScalarPropertyDefinition({ name: "uint8", @@ -1028,15 +972,13 @@ export const abi: WrapAbi = { required: true, }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "NestedInterfaceObject", - type: "Interface_NestedInterfaceObject", - comment: "NestedInterfaceObject comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "NestedInterfaceObject", + type: "Interface_NestedInterfaceObject", + comment: "NestedInterfaceObject comment", properties: [ createObjectPropertyDefinition({ name: "object", @@ -1044,15 +986,13 @@ export const abi: WrapAbi = { comment: "object comment", }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "ModuleInterfaceArgument", - type: "Interface_ModuleInterfaceArgument", - comment: "ModuleInterfaceArgument comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "ModuleInterfaceArgument", + type: "Interface_ModuleInterfaceArgument", + comment: "ModuleInterfaceArgument comment", interfaces: [ createInterfaceImplementedDefinition({ type: "Interface_NestedModuleInterfaceArgument", @@ -1071,15 +1011,13 @@ export const abi: WrapAbi = { comment: "uint8 comment", }), ], - }, - { - ...createImportedObjectDefinition({ - uri: "test-interface.eth", - namespace: "Interface", - nativeType: "NestedModuleInterfaceArgument", - type: "Interface_NestedModuleInterfaceArgument", - comment: "NestedModuleInterfaceArgument comment", - }), + }), + createImportedObjectDefinition({ + uri: "test-interface.eth", + namespace: "Interface", + nativeType: "NestedModuleInterfaceArgument", + type: "Interface_NestedModuleInterfaceArgument", + comment: "NestedModuleInterfaceArgument comment", properties: [ createScalarPropertyDefinition({ name: "uint8", @@ -1087,27 +1025,23 @@ export const abi: WrapAbi = { required: true, }), ], - }, + }), ], importedEnumTypes: [ - { - ...createImportedEnumDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "CustomEnum", - type: "Namespace_CustomEnum", - constants: ["STRING", "BYTES"], - }), - }, - { - ...createImportedEnumDefinition({ - uri: "test.eth", - namespace: "Namespace", - nativeType: "Imported_Enum", - type: "Namespace_Imported_Enum", - constants: ["STRING", "BYTES"], - comment: "Imported_Enum comment", - }), - }, + createImportedEnumDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "CustomEnum", + type: "Namespace_CustomEnum", + constants: ["STRING", "BYTES"], + }), + createImportedEnumDefinition({ + uri: "test.eth", + namespace: "Namespace", + nativeType: "Imported_Enum", + type: "Namespace_Imported_Enum", + constants: ["STRING", "BYTES"], + comment: "Imported_Enum comment", + }), ], }; diff --git a/yarn.lock b/yarn.lock index 6eb2a3f10e..1f5691a023 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2102,6 +2102,13 @@ optionalDependencies: node-notifier "^8.0.0" +"@jest/schemas@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" + integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== + dependencies: + "@sinclair/typebox" "^0.24.1" + "@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" @@ -3299,6 +3306,11 @@ "@opentelemetry/semantic-conventions" "0.20.0" "@opentelemetry/tracing" "0.20.0" +"@sinclair/typebox@^0.24.1": + version "0.24.28" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.28.tgz#15aa0b416f82c268b1573ab653e4413c965fe794" + integrity sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow== + "@sinonjs/commons@^1.7.0": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -5620,9 +5632,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001377" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001377.tgz#fa446cef27f25decb0c7420759c9ea17a2221a70" - integrity sha512-I5XeHI1x/mRSGl96LFOaSk528LA/yZG3m3iQgImGujjO8gotd/DL8QaI1R1h1dg5ATeI2jqPblMpKq4Tr5iKfQ== + version "1.0.30001378" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001378.tgz#3d2159bf5a8f9ca093275b0d3ecc717b00f27b67" + integrity sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA== capture-exit@^2.0.0: version "2.0.0" @@ -7030,6 +7042,11 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -10614,6 +10631,16 @@ jest-config@^26.6.3: micromatch "^4.0.2" pretty-format "^26.6.2" +jest-diff@28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" + integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== + dependencies: + chalk "^4.0.0" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" + jest-diff@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" @@ -10770,6 +10797,11 @@ jest-get-type@^27.5.1: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== +jest-get-type@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== + jest-haste-map@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" @@ -14766,6 +14798,16 @@ pretty-format@^27.0.0, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-format@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" + integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== + dependencies: + "@jest/schemas" "^28.1.3" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^18.0.0" + process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" @@ -15165,6 +15207,11 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + react-lottie@1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/react-lottie/-/react-lottie-1.2.3.tgz#8544b96939e088658072eea5e12d912cdaa3acc1" From 4f7f74bb7b015b05821f751d95a64472d5b125a6 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Wed, 17 Aug 2022 23:44:34 -0700 Subject: [PATCH 46/56] lint fix --- packages/schema/compose/src/render.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/schema/compose/src/render.ts b/packages/schema/compose/src/render.ts index 9d61751ff6..3f43a07e56 100644 --- a/packages/schema/compose/src/render.ts +++ b/packages/schema/compose/src/render.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any */ import { template as schemaTemplate } from "./templates/schema.mustache"; import { addHeader } from "./templates/header.mustache"; @@ -9,10 +10,7 @@ import { moduleCapabilities, addAnnotations, } from "@polywrap/schema-parse"; -import { - GenericDefinition, - WrapAbi -} from "@polywrap/wrap-manifest-types-js"; +import { GenericDefinition, WrapAbi } from "@polywrap/wrap-manifest-types-js"; // Remove mustache's built-in HTML escaping Mustache.escape = (value) => value; @@ -28,8 +26,8 @@ export function renderSchema(abi: WrapAbi, header: boolean): string { GenericDefinition: (def: GenericDefinition) => { const comment = (def as any).comment || null; return { ...def, comment }; - } - } + }, + }, }); let schema = Mustache.render(schemaTemplate, { From 3c9aeea325d9e9c3b04444f5c9c324d3217aa0f4 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 03:57:38 -0700 Subject: [PATCH 47/56] import_redirects refactor --- packages/cli/package.json | 6 +- packages/cli/src/lib/Compiler.ts | 16 +- packages/cli/src/lib/SchemaComposer.ts | 66 +- packages/cli/src/lib/project/AppProject.ts | 6 +- packages/cli/src/lib/project/PluginProject.ts | 6 +- .../cli/src/lib/project/PolywrapProject.ts | 6 +- packages/cli/src/lib/project/Project.ts | 6 +- .../js/core/src/__tests__/resolveUri.spec.ts | 4 +- .../polywrap/src/formats/polywrap.app/0.2.ts | 12 +- .../polywrap.app/migrators/0.1_to_0.2.ts | 18 +- .../src/formats/polywrap.plugin/0.2.ts | 12 +- .../polywrap.plugin/migrators/0.1_to_0.2.ts | 19 +- .../polywrap/src/formats/polywrap/0.2.ts | 12 +- .../formats/polywrap/migrators/0.1_to_0.2.ts | 22 +- .../scripts/templates/serialize-ts.mustache | 2 +- .../wrap/src/__tests__/WrapManifest.spec.ts | 12 +- .../wrap/src/formats/wrap.info/serialize.ts | 2 +- packages/js/msgpack/src/index.ts | 23 +- .../src/__tests__/integration/polywrap.yaml | 4 +- .../ethereum/src/wrap-man/wrap.info.ts | 20 +- .../plugins/file-system/polywrap.plugin.yaml | 4 +- .../file-system/src/wrap-man/wrap.info.ts | 1 + .../plugins/graph-node/polywrap.plugin.yaml | 4 +- .../graph-node/src/wrap-man/wrap.info.ts | 10 +- .../__tests__/e2e/integration/polywrap.yaml | 4 +- .../js/plugins/http/src/wrap-man/wrap.info.ts | 12 +- packages/js/plugins/ipfs/polywrap.plugin.yaml | 4 +- .../js/plugins/ipfs/src/wrap-man/wrap.info.ts | 9 +- .../js/plugins/logger/polywrap.plugin.yaml | 4 +- .../plugins/logger/src/wrap-man/wrap.info.ts | 6 +- .../js/plugins/sha3/src/wrap-man/wrap.info.ts | 10 +- .../ens-resolver/polywrap.plugin.yaml | 6 +- .../ens-resolver/src/wrap-man/wrap.info.ts | 17 +- .../file-system-resolver/polywrap.plugin.yaml | 6 +- .../src/wrap-man/wrap.info.ts | 6 +- .../ipfs-resolver/polywrap.plugin.yaml | 6 +- .../ipfs-resolver/src/wrap-man/wrap.info.ts | 9 +- .../plugins/uts46/src/wrap-man/wrap.info.ts | 10 +- .../polywrap/formats/polywrap.app/0.2.json | 18 +- .../polywrap/formats/polywrap.plugin/0.2.json | 18 +- .../polywrap/formats/polywrap/0.2.json | 18 +- .../src/bindings/typescript/plugin/index.ts | 6 +- packages/schema/compose/src/resolve.ts | 1 + .../parse/src/__tests__/transforms.spec.ts | 2 + packages/schema/parse/src/abi/index.ts | 1 + packages/schema/parse/src/index.ts | 1 + .../src/__tests__/types/polywrap.app.yaml | 4 +- .../src/__tests__/types/polywrap.app.yaml | 4 +- .../bind/sanity/output/plugin-ts/wrap.info.ts | 1 + .../codegen/002-with-plugin/polywrap.app.yaml | 4 +- .../003-multi-import/polywrap.app.yaml | 6 +- .../app/codegen/004-custom-config/config.ts | 14 +- .../cli/docgen/002-custom-config/config.ts | 14 +- .../cli/docgen/004-app/polywrap.app.yaml | 6 +- .../001-sanity/expected/wrap/wrap.info.ts | 1547 ++--------------- .../expected/wrap/wrap.info.ts | 1533 ++-------------- .../003-env/expected/wrap/wrap.info.ts | 40 +- .../expected/wrap/wrap.info.ts | 40 +- .../expected/wrap/wrap.info.ts | 1547 ++--------------- .../expected/wrap/wrap.info.ts | 1545 ++-------------- .../wasm/codegen/004-custom-config/config.ts | 1 + .../00-sanity/output/module.ts | 1 + .../01-nested-objects/output/module.ts | 1 + .../02-recursive/output/module.ts | 1 + .../03-wild-card/output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../00-sanity/output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../02-wild-card/output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../output/module.ts | 1 + .../01-sanity/output/module.ts | 1 + .../00-sanity/output/module.ts | 1 + .../01-inherited/output/module.ts | 1 + .../02-imported-inherited/output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../03-external-import/output/module.ts | 1 + .../imports-ext/base.eth/module.ts | 1 + .../imports-ext/derived.eth/module.ts | 1 + .../output/module.ts | 1 + .../005-map-types/00-sanity/output/module.ts | 1 + .../01-inherited/output/module.ts | 1 + .../02-imported-inherited/output/module.ts | 1 + .../imports-ext/external.eth/module.ts | 1 + .../03-external-import/output/module.ts | 1 + .../imports-ext/base.eth/module.ts | 1 + .../imports-ext/derived.eth/module.ts | 1 + .../output/module.ts | 1 + .../006-env-types/00-sanity/output/module.ts | 1 + .../imports-ext/just.module.eth/module.ts | 1 + .../imports-ext/test-interface.eth/module.ts | 1 + .../sanity/imports-ext/test.eth/module.ts | 1 + .../cases/compose/sanity/output/module.ts | 1 + .../test-cases/cases/parse/map-type/output.ts | 1 + .../parse/recursive-properties/output.ts | 1 + .../test-cases/cases/parse/sanity/output.ts | 1 + .../asyncify/abis/memory-storage.graphql | 5 + .../wasm-as/asyncify/plugin.wrap.info | 1 - .../wrappers/wasm-as/asyncify/polywrap.yaml | 4 +- .../wasm-as/env-types/main/polywrap.yaml | 4 +- .../test-use-getImpl/polywrap.yaml | 4 +- .../test-wrapper/polywrap.yaml | 4 +- .../test-implementation/polywrap.yaml | 4 +- .../test-wrapper/polywrap.yaml | 4 +- .../wasm-as/simple-fs-resolver/polywrap.yaml | 4 +- .../wasm-as/simple-memory/polywrap.yaml | 4 +- .../simple-redirect-resolver/polywrap.yaml | 4 +- .../wasm-as/simple-storage/polywrap.yaml | 4 +- .../wrappers/wasm-rs/asyncify/polywrap.yaml | 4 +- .../wasm-rs/env-types/main/polywrap.yaml | 4 +- .../test-use-getImpl/polywrap.yaml | 4 +- .../test-wrapper/polywrap.yaml | 4 +- 114 files changed, 1053 insertions(+), 5819 deletions(-) create mode 100644 packages/test-cases/cases/wrappers/wasm-as/asyncify/abis/memory-storage.graphql delete mode 100644 packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info diff --git a/packages/cli/package.json b/packages/cli/package.json index 648a164f75..a07c2fbd6f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -16,7 +16,8 @@ "polywrap": "bin/polywrap" }, "scripts": { - "build": "rimraf ./build && tsc --project tsconfig.build.json && yarn build:build-images && yarn build:deploy-modules && yarn build:infra-modules && yarn build:docgen-templates", + "build": "yarn build:intl && yarn build:fast", + "build:fast": "rimraf ./build && tsc --project tsconfig.build.json && yarn build:build-images && yarn build:deploy-modules && yarn build:infra-modules && yarn build:docgen-templates", "build:build-images": "copyfiles ./src/lib/defaults/build-images/**/**/* ./build/lib/defaults/build-images/ -u 4", "build:deploy-modules": "copyfiles ./src/lib/defaults/deploy-modules/**/polywrap.deploy.ext.json ./build/lib/defaults/deploy-modules -u 4", "build:infra-modules": "ts-node ./scripts/copyfiles ./src/lib/defaults/infra-modules ./build/lib/defaults/infra-modules", @@ -24,8 +25,7 @@ "build:docgen-templates:docusaurus": "ts-node ./scripts/copyfiles ./src/lib/docgen/docusaurus/templates ./build/lib/docgen/docusaurus/templates", "build:docgen-templates:jsdoc": "ts-node ./scripts/copyfiles ./src/lib/docgen/jsdoc/templates ./build/lib/docgen/jsdoc/templates", "build:docgen-templates:schema": "ts-node ./scripts/copyfiles ./src/lib/docgen/schema/templates ./build/lib/docgen/schema/templates", - "prebuild": "ts-node ./scripts/generateIntlTypes.ts", - "build:fast": "rimraf ./build && tsc --project tsconfig.build.json", + "build:intl": "ts-node ./scripts/generateIntlTypes.ts", "lint": "eslint --color -c ../../.eslintrc.js .", "test": "cross-env TEST=true jest --passWithNoTests --runInBand --verbose", "test:ci": "cross-env TEST=true jest --passWithNoTests --runInBand --verbose", diff --git a/packages/cli/src/lib/Compiler.ts b/packages/cli/src/lib/Compiler.ts index 1f4a809c0d..2b806329c4 100644 --- a/packages/cli/src/lib/Compiler.ts +++ b/packages/cli/src/lib/Compiler.ts @@ -330,22 +330,8 @@ export class Compiler { const manifest = await project.getManifest(); - const abi: WrapAbi = { - ...state.abi, - }; - - const filteredAbi: Record = { ...abi }; - - Object.keys(filteredAbi).forEach((key) => { - const value = filteredAbi[key]; - - if (value === null || value === undefined) { - delete filteredAbi[key]; - } - }); - const type = (await this._isInterface()) ? "interface" : "wasm"; - await generateWrapFile(filteredAbi, manifest.name, type, manifestPath); + await generateWrapFile(state.abi, manifest.name, type, manifestPath); }; if (quiet) { diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 70d1cb0485..43221d07f1 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { Project, AnyProjectManifest, ImportRedirects } from "./"; +import { Project, AnyProjectManifest } from "./"; import { Uri, PolywrapClient } from "@polywrap/client-js"; import { @@ -12,7 +12,9 @@ import { import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; +import YAML from "js-yaml"; import { deserializeWrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { WrapAbi } from "@polywrap/schema-parse"; export interface SchemaComposerConfig { @@ -36,7 +38,7 @@ export class SchemaComposer { const { project } = this._config; const schemaNamedPath = await project.getSchemaNamedPath(); - const import_redirects = await project.getImportRedirects(); + const import_abis = await project.getImportAbis(); const getSchemaFile = (schemaPath?: string): SchemaFile | undefined => schemaPath @@ -54,8 +56,7 @@ export class SchemaComposer { const options: ComposerOptions = { schema: schemaFile, resolvers: { - external: (uri: string) => - this._fetchExternalAbi(uri, import_redirects), + external: (uri: string) => this._fetchExternalAbi(uri, import_abis), local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), }, }; @@ -70,19 +71,60 @@ export class SchemaComposer { private async _fetchExternalAbi( uri: string, - import_redirects?: ImportRedirects + import_abis?: PolywrapManifest["import_abis"] ): Promise { // Check to see if we have any import redirects that match - if (import_redirects) { - for (const redirect of import_redirects) { - const redirectUri = new Uri(redirect.uri); + if (import_abis) { + for (const import_abi of import_abis) { + const redirectUri = new Uri(import_abi.uri); const uriParsed = new Uri(uri); - if (Uri.equals(redirectUri, uriParsed)) { - const manifest = fs.readFileSync( - path.join(this._config.project.getManifestDir(), redirect.info) - ); + if (!Uri.equals(redirectUri, uriParsed)) { + continue; + } + + const abiPath = path.join( + this._config.project.getManifestDir(), + import_abi.abi + ); + + if (!fs.existsSync(abiPath)) { + throw Error("TODO file not found"); + } + + if (abiPath.endsWith(".info")) { + const manifest = fs.readFileSync(abiPath); return (await deserializeWrapManifest(manifest)).abi; + } else if (abiPath.endsWith(".graphql")) { + const schema = fs.readFileSync(abiPath, "utf-8"); + const options: ComposerOptions = { + schema: { + schema: schema, + absolutePath: abiPath, + }, + resolvers: { + external: (uri: string) => + this._fetchExternalAbi(uri, import_abis), + local: (path: string) => + Promise.resolve(this._fetchLocalSchema(path)), + }, + }; + + return await composeSchema(options); + } else if (abiPath.endsWith(".json")) { + const json = fs.readFileSync(abiPath, "utf-8"); + // TODO: need to validate structure of ABI object + return JSON.parse(json); + } else if (abiPath.endsWith(".yaml")) { + const yaml = fs.readFileSync(abiPath, "utf-8"); + const result = YAML.safeLoad(yaml); + if (!result) { + throw Error("TODO invalid"); + } + // TODO: need to validate structure of ABI object + return result as WrapAbi; + } else { + throw Error("TODO intl type here"); } } } diff --git a/packages/cli/src/lib/project/AppProject.ts b/packages/cli/src/lib/project/AppProject.ts index eb69ba0fa9..007eba9c17 100644 --- a/packages/cli/src/lib/project/AppProject.ts +++ b/packages/cli/src/lib/project/AppProject.ts @@ -1,4 +1,4 @@ -import { ImportRedirects, Project, ProjectConfig } from "."; +import { Project, ProjectConfig } from "."; import { AppManifestLanguage, appManifestLanguages, @@ -94,9 +94,9 @@ export class AppProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise { + public async getImportAbis(): Promise { const manifest = await this.getManifest(); - return manifest.import_redirects || []; + return manifest.import_abis || []; } public async generateSchemaBindings( diff --git a/packages/cli/src/lib/project/PluginProject.ts b/packages/cli/src/lib/project/PluginProject.ts index c6e8795938..1aa8f90159 100644 --- a/packages/cli/src/lib/project/PluginProject.ts +++ b/packages/cli/src/lib/project/PluginProject.ts @@ -1,4 +1,4 @@ -import { ProjectConfig, Project, ImportRedirects } from "."; +import { ProjectConfig, Project } from "."; import { loadPluginManifest, PluginManifestLanguage, @@ -94,9 +94,9 @@ export class PluginProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise { + public async getImportAbis(): Promise { const manifest = await this.getManifest(); - return manifest.import_redirects || []; + return manifest.import_abis || []; } public async generateSchemaBindings( diff --git a/packages/cli/src/lib/project/PolywrapProject.ts b/packages/cli/src/lib/project/PolywrapProject.ts index 02938efa70..b6bdd8d300 100644 --- a/packages/cli/src/lib/project/PolywrapProject.ts +++ b/packages/cli/src/lib/project/PolywrapProject.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/naming-convention */ -import { ImportRedirects, Project, ProjectConfig } from "."; +import { Project, ProjectConfig } from "."; import { isPolywrapManifestLanguage, loadBuildManifest, @@ -135,9 +135,9 @@ export class PolywrapProject extends Project { return path.join(dir, manifest.schema); } - public async getImportRedirects(): Promise { + public async getImportAbis(): Promise { const manifest = await this.getManifest(); - return manifest.import_redirects || []; + return manifest.import_abis || []; } public async generateSchemaBindings( diff --git a/packages/cli/src/lib/project/Project.ts b/packages/cli/src/lib/project/Project.ts index 0e88d85978..e211f97313 100644 --- a/packages/cli/src/lib/project/Project.ts +++ b/packages/cli/src/lib/project/Project.ts @@ -10,8 +10,6 @@ import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { BindOutput } from "@polywrap/schema-bind"; import { Abi } from "@polywrap/schema-parse"; -export type ImportRedirects = PolywrapManifest["import_redirects"]; - export interface ProjectConfig { rootDir: string; quiet?: boolean; @@ -63,9 +61,7 @@ export abstract class Project { public abstract getSchemaNamedPath(): Promise; - public abstract getImportRedirects(): Promise< - PolywrapManifest["import_redirects"] - >; + public abstract getImportAbis(): Promise; public abstract generateSchemaBindings( abi: Abi, diff --git a/packages/js/core/src/__tests__/resolveUri.spec.ts b/packages/js/core/src/__tests__/resolveUri.spec.ts index 987d1c0ff4..839a95892c 100644 --- a/packages/js/core/src/__tests__/resolveUri.spec.ts +++ b/packages/js/core/src/__tests__/resolveUri.spec.ts @@ -156,7 +156,7 @@ describe("resolveUri", () => { return { manifest: args.authority === "ipfs" ? - msgpackEncode(testManifest) : + msgpackEncode(testManifest, true) : undefined, }; } @@ -170,7 +170,7 @@ describe("resolveUri", () => { return { manifest: args.authority === "my" ? - msgpackEncode(testManifest) : + msgpackEncode(testManifest, true) : undefined, }; }, diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts index 449105b63d..7338a99169 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/0.2.ts @@ -24,18 +24,18 @@ export interface AppManifest { */ schema: string; /** - * Redirects source URI to local wrapper or plugin. + * Specify ABIs to be used for the import URIs within your schema. */ - import_redirects?: ImportRedirect[]; + import_abis?: ImportAbis[]; __type: "AppManifest"; } -export interface ImportRedirect { +export interface ImportAbis { /** - * Source URI that needs to be redirected. + * One of the schema's import URI. */ uri: string; /** - * Path to Wrap Manifest of the module to which URI will be redirected. + * Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml] */ - info: string; + abi: string; } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1_to_0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1_to_0.2.ts index 19d2d5bfde..def8fcadb6 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1_to_0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.1_to_0.2.ts @@ -3,8 +3,18 @@ import { AppManifest as OldManifest } from "../0.1"; import { AppManifest as NewManifest } from "../0.2"; -export function migrate(_: OldManifest): NewManifest { - throw new Error( - "Polywrap App Manifest file is deprecated. Please update to 0.2" - ); +export function migrate(oldFormat: OldManifest): NewManifest { + return { + __type: "AppManifest", + format: "0.2", + name: oldFormat.name, + language: oldFormat.language, + schema: oldFormat.schema, + import_abis: oldFormat.import_redirects?.map( + (redirect) => ({ + uri: redirect.uri, + abi: redirect.schema + }) + ) + }; } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts index fb3b4eebe8..df234293be 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.2.ts @@ -28,18 +28,18 @@ export interface PluginManifest { */ schema: string; /** - * Redirects source URI to local wrapper or plugin. + * Specify ABIs to be used for the import URIs within your schema. */ - import_redirects?: ImportRedirect[]; + import_abis?: ImportAbis[]; __type: "PluginManifest"; } -export interface ImportRedirect { +export interface ImportAbis { /** - * Source URI that needs to be redirected. + * One of the schema's import URI. */ uri: string; /** - * Path to Wrap Manifest of the module to which URI will be redirected. + * Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml] */ - info: string; + abi: string; } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1_to_0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1_to_0.2.ts index 4736cb69f8..e0e817330e 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1_to_0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap.plugin/migrators/0.1_to_0.2.ts @@ -3,8 +3,19 @@ import { PluginManifest as OldManifest } from "../0.1"; import { PluginManifest as NewManifest } from "../0.2"; -export function migrate(_: OldManifest): NewManifest { - throw new Error( - "Plugin Polywrap manifest file is deprecated. Please update to 0.2" - ); +export function migrate(oldFormat: OldManifest): NewManifest { + return { + __type: "PluginManifest", + format: "0.2", + name: oldFormat.name, + language: oldFormat.language, + module: oldFormat.module, + schema: oldFormat.schema, + import_abis: oldFormat.import_redirects?.map( + (redirect) => ({ + uri: redirect.uri, + abi: redirect.schema + }) + ) + }; } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts index b0bb2b2f8a..91ce0dd6c3 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/0.2.ts @@ -40,18 +40,18 @@ export interface PolywrapManifest { */ schema: string; /** - * Redirects source URI to local wrapper or plugin. + * Specify ABIs to be used for the import URIs within your schema. */ - import_redirects?: ImportRedirect[]; + import_abis?: ImportAbis[]; __type: "PolywrapManifest"; } -export interface ImportRedirect { +export interface ImportAbis { /** - * Source URI that needs to be redirected. + * One of the schema's import URI. */ uri: string; /** - * Path to Wrap Manifest of the module to which URI will be redirected. + * Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml] */ - info: string; + abi: string; } diff --git a/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1_to_0.2.ts b/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1_to_0.2.ts index dcd6654dd0..ad9aae6a35 100644 --- a/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1_to_0.2.ts +++ b/packages/js/manifests/polywrap/src/formats/polywrap/migrators/0.1_to_0.2.ts @@ -3,8 +3,22 @@ import { PolywrapManifest as OldManifest } from "../0.1"; import { PolywrapManifest as NewManifest } from "../0.2"; -export function migrate(_: OldManifest): NewManifest { - throw new Error( - "Polywrap manifest file is deprecated. Please update to 0.2" - ); +export function migrate(oldFormat: OldManifest): NewManifest { + return { + __type: "PolywrapManifest", + format: "0.2", + name: oldFormat.name, + build: oldFormat.build, + meta: oldFormat.meta, + deploy: oldFormat.deploy, + language: oldFormat.language, + module: oldFormat.module, + schema: oldFormat.schema, + import_abis: oldFormat.import_redirects?.map( + (redirect) => ({ + uri: redirect.uri, + abi: redirect.schema + }) + ) + }; } diff --git a/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache b/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache index 08a9735d5e..ba50dd48a4 100644 --- a/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache +++ b/packages/js/manifests/wrap/scripts/templates/serialize-ts.mustache @@ -14,5 +14,5 @@ export async function serializeWrapManifest( await validateWrapManifest(manifest); } - return msgpackEncode(manifest); + return msgpackEncode(manifest, true); } diff --git a/packages/js/manifests/wrap/src/__tests__/WrapManifest.spec.ts b/packages/js/manifests/wrap/src/__tests__/WrapManifest.spec.ts index 8947aba80f..4c2628db7f 100644 --- a/packages/js/manifests/wrap/src/__tests__/WrapManifest.spec.ts +++ b/packages/js/manifests/wrap/src/__tests__/WrapManifest.spec.ts @@ -78,7 +78,7 @@ const testManifest: WrapManifest = { describe("Polywrap Manifest Validation", () => { it("Should succeed", async () => { - const manifest = msgpackEncode(testManifest); + const manifest = msgpackEncode(testManifest, true); expect(await deserializeWrapManifest(manifest)).toMatchObject(testManifest); }); @@ -86,7 +86,7 @@ describe("Polywrap Manifest Validation", () => { const manifest = msgpackEncode({ ...testManifest, version: "bad-str", - }); + }, true); await expect(() => deserializeWrapManifest(manifest)).rejects.toThrow( /Unrecognized WrapManifest schema version/ @@ -97,7 +97,7 @@ describe("Polywrap Manifest Validation", () => { const manifest = msgpackEncode({ ...testManifest, not_accepted_field: "not_accepted_field", - }); + }, true); await expect(() => deserializeWrapManifest(manifest)).rejects.toThrow( /not allowed to have the additional property "not_accepted_field"/ @@ -108,7 +108,7 @@ describe("Polywrap Manifest Validation", () => { const manifest = msgpackEncode({ ...testManifest, name: undefined, - }); + }, true); await expect(() => deserializeWrapManifest(manifest)).rejects.toThrow( /instance requires property "name"/ @@ -119,7 +119,7 @@ describe("Polywrap Manifest Validation", () => { const manifest = msgpackEncode({ ...testManifest, name: "foo bar baz $%##$@#$@#$@#$#$", - }); + }, true); await expect(() => deserializeWrapManifest(manifest)).rejects.toThrow( /instance.name does not match pattern/ @@ -130,7 +130,7 @@ describe("Polywrap Manifest Validation", () => { const manifest = msgpackEncode({ ...testManifest, abi: true, - }); + }, true); await expect(() => deserializeWrapManifest(manifest)).rejects.toThrow( /instance.abi is not of a type\(s\) object/ diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts b/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts index 08a9735d5e..ba50dd48a4 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/serialize.ts @@ -14,5 +14,5 @@ export async function serializeWrapManifest( await validateWrapManifest(manifest); } - return msgpackEncode(manifest); + return msgpackEncode(manifest, true); } diff --git a/packages/js/msgpack/src/index.ts b/packages/js/msgpack/src/index.ts index 90885f8862..50d83089bc 100644 --- a/packages/js/msgpack/src/index.ts +++ b/packages/js/msgpack/src/index.ts @@ -33,15 +33,21 @@ extensionCodec.register({ }, }); -function sanitizeObj(obj: Record): Record { +const shouldIgnore = (obj: unknown) => + obj instanceof ArrayBuffer || ArrayBuffer.isView(obj) || obj instanceof Map; + +function sanitize(obj: Record): Record { + if (shouldIgnore(obj)) { + return obj; + } + for (const key of Object.keys(obj)) { if (typeof obj[key] === "function") { delete obj[key]; } else if (obj[key] === null || obj[key] === undefined) { delete obj[key]; } else if (typeof obj[key] === "object") { - const sanitized = sanitizeObj(obj[key] as Record); - + const sanitized = sanitize(obj[key] as Record); if (Array.isArray(obj[key])) { obj[key] = Object.values(sanitized); } else { @@ -49,11 +55,13 @@ function sanitizeObj(obj: Record): Record { } } } - return obj; } -export function msgpackEncode(object: unknown): Uint8Array { +export function msgpackEncode( + object: unknown, + sanitizeObj = false +): Uint8Array { const encoder = new Encoder( extensionCodec, undefined, // context @@ -65,8 +73,9 @@ export function msgpackEncode(object: unknown): Uint8Array { undefined // forceIntegerToFloat ); - if (typeof object === "object") { - object = sanitizeObj(object as Record); + if (sanitizeObj && typeof object === "object" && !shouldIgnore(object)) { + const deepClone = JSON.parse(JSON.stringify(object)); + object = sanitize(deepClone); } return encoder.encode(object); diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml index e493d0e639..c35d29dbb6 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml @@ -4,7 +4,7 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/ethereum.polywrap.eth" - info: ../../../build/wrap.info + abi: ../../../build/wrap.info diff --git a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts index e8f4466fc3..254bc9f56f 100644 --- a/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ethereum/src/wrap-man/wrap.info.ts @@ -1,6 +1,7 @@ import { WrapManifest, WrapAbi } from "@polywrap/wrap-manifest-types-js"; const abi: WrapAbi = { + version: "0.1", objectTypes: [ { type: "TxReceipt", @@ -219,7 +220,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "TxResponse", @@ -444,7 +444,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "TxRequest", @@ -541,7 +540,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "TxOverrides", @@ -578,7 +576,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "StaticTxResult", @@ -609,7 +606,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "Log", @@ -736,7 +732,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "EventNotification", @@ -779,7 +774,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "Access", @@ -822,7 +816,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "Connection", @@ -849,7 +842,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, { type: "Network", @@ -890,15 +882,8 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, ], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, @@ -2470,8 +2455,6 @@ const abi: WrapAbi = { }, }, ], - imports: [], - interfaces: [], }, envType: { type: "Env", @@ -2488,7 +2471,6 @@ const abi: WrapAbi = { }, }, ], - interfaces: [], }, }; diff --git a/packages/js/plugins/file-system/polywrap.plugin.yaml b/packages/js/plugins/file-system/polywrap.plugin.yaml index 664f2722cd..56d55a49b4 100644 --- a/packages/js/plugins/file-system/polywrap.plugin.yaml +++ b/packages/js/plugins/file-system/polywrap.plugin.yaml @@ -3,6 +3,6 @@ language: plugin/typescript name: FileSystem module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/fs.polywrap.eth" - info: ../../../interfaces/file-system/build-man/wrap.info + abi: ../../../interfaces/file-system/build-man/wrap.info diff --git a/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts b/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts index 3083ddb370..62bbaed220 100644 --- a/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/file-system/src/wrap-man/wrap.info.ts @@ -1,6 +1,7 @@ import { WrapManifest, WrapAbi } from "@polywrap/wrap-manifest-types-js"; const abi: WrapAbi = { + version: "0.1", objectTypes: [], enumTypes: [], interfaceTypes: [], diff --git a/packages/js/plugins/graph-node/polywrap.plugin.yaml b/packages/js/plugins/graph-node/polywrap.plugin.yaml index b0f97d4799..a2e1babae7 100644 --- a/packages/js/plugins/graph-node/polywrap.plugin.yaml +++ b/packages/js/plugins/graph-node/polywrap.plugin.yaml @@ -3,6 +3,6 @@ language: plugin/typescript name: GraphNode module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/http.polywrap.eth" - info: ../http/build/wrap.info + abi: ../http/build/wrap.info diff --git a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts index 914bf994d4..58d40c3401 100644 --- a/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/graph-node/src/wrap-man/wrap.info.ts @@ -5,9 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], + version: "0.1", importedObjectTypes: [ { type: "HTTP_Request", @@ -76,7 +74,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "body", kind: 4 }, }, ], - interfaces: [], uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Request", @@ -100,7 +97,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "value", required: true, kind: 4 }, }, ], - interfaces: [], uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Header", @@ -124,7 +120,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "value", required: true, kind: 4 }, }, ], - interfaces: [], uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "UrlParam", @@ -181,7 +176,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "body", kind: 4 }, }, ], - interfaces: [], uri: "ens/http.polywrap.eth", namespace: "HTTP", nativeType: "Response", @@ -289,7 +283,6 @@ export const manifest: WrapManifest = { nativeType: "ResponseType", }, ], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, @@ -359,7 +352,6 @@ export const manifest: WrapManifest = { { type: "HTTP_ResponseType" }, { type: "HTTP_Response" }, ], - interfaces: [], }, }, }; diff --git a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml index 231afdd6ae..b04d41f04d 100644 --- a/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml +++ b/packages/js/plugins/http/src/__tests__/e2e/integration/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "wrap://ens/http.polywrap.eth" - info: ../../../../build/wrap.info \ No newline at end of file + abi: ../../../../build/wrap.info diff --git a/packages/js/plugins/http/src/wrap-man/wrap.info.ts b/packages/js/plugins/http/src/wrap-man/wrap.info.ts index 26c953c840..767ceee328 100644 --- a/packages/js/plugins/http/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/http/src/wrap-man/wrap.info.ts @@ -5,6 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + version: "0.1", objectTypes: [ { type: "Header", @@ -25,7 +26,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "value", required: true, kind: 4 }, }, ], - interfaces: [], }, { type: "UrlParam", @@ -46,7 +46,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "value", required: true, kind: 4 }, }, ], - interfaces: [], }, { type: "Response", @@ -100,7 +99,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "body", kind: 4 }, }, ], - interfaces: [], }, { type: "Request", @@ -169,7 +167,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "body", kind: 4 }, }, ], - interfaces: [], }, ], enumTypes: [ @@ -179,11 +176,6 @@ export const manifest: WrapManifest = { constants: ["TEXT", "BINARY"], }, ], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, @@ -259,8 +251,6 @@ export const manifest: WrapManifest = { }, }, ], - imports: [], - interfaces: [], }, }, }; diff --git a/packages/js/plugins/ipfs/polywrap.plugin.yaml b/packages/js/plugins/ipfs/polywrap.plugin.yaml index b7946e763d..4c5efc6d59 100644 --- a/packages/js/plugins/ipfs/polywrap.plugin.yaml +++ b/packages/js/plugins/ipfs/polywrap.plugin.yaml @@ -3,6 +3,6 @@ name: Ipfs language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/ipfs.polywrap.eth" - info: ../../../interfaces/ipfs/build-man/wrap.info + abi: ../../../interfaces/ipfs/build-man/wrap.info diff --git a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts index 8a76f63e3c..3be2e648fd 100644 --- a/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/ipfs/src/wrap-man/wrap.info.ts @@ -5,9 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], + version: "0.1", importedObjectTypes: [ { type: "Ipfs_Options", @@ -49,7 +47,6 @@ export const manifest: WrapManifest = { "Disable querying providers in parallel when resolving URIs", }, ], - interfaces: [], uri: "ens/ipfs.polywrap.eth", namespace: "Ipfs", nativeType: "Options", @@ -78,7 +75,6 @@ export const manifest: WrapManifest = { }, }, ], - interfaces: [], uri: "ens/ipfs.polywrap.eth", namespace: "Ipfs", nativeType: "ResolveResult", @@ -205,8 +201,6 @@ export const manifest: WrapManifest = { isInterface: false, }, ], - importedEnumTypes: [], - importedEnvTypes: [], envType: { type: "Env", kind: 65536, @@ -223,7 +217,6 @@ export const manifest: WrapManifest = { comment: "Disable querying providers in parallel when resolving URIs", }, ], - interfaces: [], }, moduleType: { type: "Module", diff --git a/packages/js/plugins/logger/polywrap.plugin.yaml b/packages/js/plugins/logger/polywrap.plugin.yaml index 1142300bf0..37b503ee05 100644 --- a/packages/js/plugins/logger/polywrap.plugin.yaml +++ b/packages/js/plugins/logger/polywrap.plugin.yaml @@ -3,6 +3,6 @@ name: Logger language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/logger.core.polywrap.eth" - info: ../../../interfaces/logger/build-man/wrap.info + abi: ../../../interfaces/logger/build-man/wrap.info diff --git a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts index 6ff2cd8d31..da5624a0e8 100644 --- a/packages/js/plugins/logger/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/logger/src/wrap-man/wrap.info.ts @@ -5,10 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], + version: "0.1", importedModuleTypes: [ { type: "Logger_Module", @@ -70,7 +67,6 @@ export const manifest: WrapManifest = { nativeType: "LogLevel", }, ], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, diff --git a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts index b5076a56a9..ece55b9806 100644 --- a/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/sha3/src/wrap-man/wrap.info.ts @@ -5,13 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], + version: "0.1", moduleType: { type: "Module", kind: 128, @@ -425,8 +419,6 @@ export const manifest: WrapManifest = { }, }, ], - imports: [], - interfaces: [], } } }; diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml index e198498f1b..3050945754 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ens-resolver/polywrap.plugin.yaml @@ -3,8 +3,8 @@ language: plugin/typescript name: EnsUriResolver module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/uri-resolver.core.polywrap.eth" - info: ../../../../interfaces/uri-resolver/build-man/wrap.info + abi: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/ethereum.polywrap.eth" - info: ../../ethereum/build/wrap.info + abi: ../../ethereum/build/wrap.info diff --git a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts index dbb20298cf..41911ade76 100644 --- a/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ens-resolver/src/wrap-man/wrap.info.ts @@ -5,9 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], + "version": "0.1", "importedObjectTypes": [ { "type": "UriResolver_MaybeUriOrManifest", @@ -34,7 +32,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/uri-resolver.core.polywrap.eth", "namespace": "UriResolver", "nativeType": "MaybeUriOrManifest" @@ -64,7 +61,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Connection" @@ -104,7 +100,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxOverrides" @@ -138,7 +133,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "StaticTxResult" @@ -238,7 +232,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxRequest" @@ -460,7 +453,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxReceipt" @@ -590,7 +582,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Log" @@ -636,7 +627,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "EventNotification" @@ -680,7 +670,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Network" @@ -908,7 +897,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxResponse" @@ -954,7 +942,6 @@ export const manifest: WrapManifest = { }, } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Access" @@ -2578,8 +2565,6 @@ export const manifest: WrapManifest = { "isInterface": false } ], - "importedEnumTypes": [], - "importedEnvTypes": [], "moduleType": { "type": "Module", "kind": 128, diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml index 022cae0919..7f3780487c 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/polywrap.plugin.yaml @@ -3,8 +3,8 @@ name: FileSystemResolver language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/uri-resolver.core.polywrap.eth" - info: ../../../../interfaces/uri-resolver/build-man/wrap.info + abi: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/fs.polywrap.eth" - info: ../../../../interfaces/file-system/build-man/wrap.info \ No newline at end of file + abi: ../../../../interfaces/file-system/build-man/wrap.info \ No newline at end of file diff --git a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts index 3a1dcd0e41..628c0f4818 100644 --- a/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/file-system-resolver/src/wrap-man/wrap.info.ts @@ -5,9 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], + version: "0.1", importedObjectTypes: [ { type: "UriResolver_MaybeUriOrManifest", @@ -26,7 +24,6 @@ export const manifest: WrapManifest = { scalar: { type: "Bytes", name: "manifest", kind: 4 }, }, ], - interfaces: [], uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "MaybeUriOrManifest", @@ -348,7 +345,6 @@ export const manifest: WrapManifest = { nativeType: "Encoding", }, ], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml index 7529597309..2e294e9626 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/polywrap.plugin.yaml @@ -3,8 +3,8 @@ name: IpfsResolver language: plugin/typescript module: ./src/index.ts schema: ./src/schema.graphql -import_redirects: +import_abis: - uri: "ens/uri-resolver.core.polywrap.eth" - info: ../../../../interfaces/uri-resolver/build-man/wrap.info + abi: ../../../../interfaces/uri-resolver/build-man/wrap.info - uri: "ens/ipfs.polywrap.eth" - info: ../../ipfs/build/wrap.info + abi: ../../ipfs/build/wrap.info diff --git a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts index 68d3738335..f4d2a3d9f7 100644 --- a/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uri-resolvers/ipfs-resolver/src/wrap-man/wrap.info.ts @@ -5,9 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - objectTypes: [], - enumTypes: [], - interfaceTypes: [], + version: "0.1", importedObjectTypes: [ { type: "UriResolver_MaybeUriOrManifest", @@ -26,7 +24,6 @@ export const manifest: WrapManifest = { scalar: { type: "Bytes", name: "manifest", kind: 4 }, }, ], - interfaces: [], uri: "ens/uri-resolver.core.polywrap.eth", namespace: "UriResolver", nativeType: "MaybeUriOrManifest", @@ -62,7 +59,6 @@ export const manifest: WrapManifest = { comment: "Disable querying providers in parallel when resolving URIs", }, ], - interfaces: [], uri: "ens/ipfs.polywrap.eth", namespace: "Ipfs", nativeType: "Options", @@ -86,7 +82,6 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "provider", required: true, kind: 4 }, }, ], - interfaces: [], uri: "ens/ipfs.polywrap.eth", namespace: "Ipfs", nativeType: "ResolveResult", @@ -266,8 +261,6 @@ export const manifest: WrapManifest = { isInterface: false, }, ], - importedEnumTypes: [], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, diff --git a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts index e55582b4fd..b3c85bebad 100644 --- a/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/uts46/src/wrap-man/wrap.info.ts @@ -5,6 +5,7 @@ export const manifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + version: "0.1", objectTypes: [ { type: "ConvertResult", @@ -25,15 +26,8 @@ export const manifest: WrapManifest = { scalar: { type: "String", name: "PC", required: true, kind: 4 }, }, ], - interfaces: [], }, ], - enumTypes: [], - interfaceTypes: [], - importedObjectTypes: [], - importedModuleTypes: [], - importedEnumTypes: [], - importedEnvTypes: [], moduleType: { type: "Module", kind: 128, @@ -115,8 +109,6 @@ export const manifest: WrapManifest = { }, }, ], - imports: [], - interfaces: [], } } }; diff --git a/packages/manifests/polywrap/formats/polywrap.app/0.2.json b/packages/manifests/polywrap/formats/polywrap.app/0.2.json index 1c4fd630d2..2a60be3a12 100644 --- a/packages/manifests/polywrap/formats/polywrap.app/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap.app/0.2.json @@ -29,33 +29,33 @@ "type": "string", "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.?[\\w\\-\\.]*$" }, - "import_redirects": { - "description": "Redirects source URI to local wrapper or plugin.", + "import_abis": { + "description": "Specify ABIs to be used for the import URIs within your schema.", "type": "array", "items": { - "$ref": "#/definitions/import_redirect" + "$ref": "#/definitions/import_abis" } } }, "definitions": { - "import_redirect": { + "import_abis": { "type": "object", "additionalProperties": false, "properties": { "uri": { - "description": "Source URI that needs to be redirected.", + "description": "One of the schema's import URI.", "type": "string", "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" }, - "info": { - "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "abi": { + "description": "Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml]", "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.(info|graphql|json|yaml)$" } }, "required": [ "uri", - "info" + "abi" ] } } diff --git a/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json b/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json index e0bdfaa605..e56bf2c858 100644 --- a/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap.plugin/0.2.json @@ -34,33 +34,33 @@ "type": "string", "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.graphql$" }, - "import_redirects": { - "description": "Redirects source URI to local wrapper or plugin.", + "import_abis": { + "description": "Specify ABIs to be used for the import URIs within your schema.", "type": "array", "items": { - "$ref": "#/definitions/import_redirect" + "$ref": "#/definitions/import_abis" } } }, "definitions": { - "import_redirect": { + "import_abis": { "type": "object", "additionalProperties": false, "properties": { "uri": { - "description": "Source URI that needs to be redirected.", + "description": "One of the schema's import URI.", "type": "string", "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" }, - "info": { - "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "abi": { + "description": "Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml]", "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.(info|graphql|json|yaml)$" } }, "required": [ "uri", - "info" + "abi" ] } } diff --git a/packages/manifests/polywrap/formats/polywrap/0.2.json b/packages/manifests/polywrap/formats/polywrap/0.2.json index 3ee0762233..8a023e7d29 100644 --- a/packages/manifests/polywrap/formats/polywrap/0.2.json +++ b/packages/manifests/polywrap/formats/polywrap/0.2.json @@ -49,33 +49,33 @@ "type": "string", "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.graphql$" }, - "import_redirects": { - "description": "Redirects source URI to local wrapper or plugin.", + "import_abis": { + "description": "Specify ABIs to be used for the import URIs within your schema.", "type": "array", "items": { - "$ref": "#/definitions/import_redirect" + "$ref": "#/definitions/import_abis" } } }, "definitions": { - "import_redirect": { + "import_abis": { "type": "object", "additionalProperties": false, "properties": { "uri": { - "description": "Source URI that needs to be redirected.", + "description": "One of the schema's import URI.", "type": "string", "pattern": "^[wrap://]*[a-z\\-\\_0-9]+\\/.+$" }, - "info": { - "description": "Path to Wrap Manifest of the module to which URI will be redirected.", + "abi": { + "description": "Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml]", "type": "string", - "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.info$" + "pattern": "^\\.?\\.?\\/?((\\/[\\w\\-\\.]+|\\/\\.\\.|\\/\\.)+\\/)?[\\w\\-\\.]+\\.(info|graphql|json|yaml)$" } }, "required": [ "uri", - "info" + "abi" ] } } diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index afe8bdfceb..25935154cc 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -54,7 +54,11 @@ export const generateBinding: GenerateBindingFn = ( name: options.projectName, type: "plugin", version: latestWrapManifestVersion, - abi: JSON.stringify(sort(options.abi as Record), null, 2), + abi: JSON.stringify( + sort((options.abi as unknown) as Record), + null, + 2 + ), }; output.entries = renderTemplates( diff --git a/packages/schema/compose/src/resolve.ts b/packages/schema/compose/src/resolve.ts index 14450b561f..79380fe340 100644 --- a/packages/schema/compose/src/resolve.ts +++ b/packages/schema/compose/src/resolve.ts @@ -169,6 +169,7 @@ export async function resolveImportsAndParseSchemas( ); const subAbi: WrapAbi = { + version: "0.1", objectTypes: [], enumTypes: [], interfaceTypes: [], diff --git a/packages/schema/parse/src/__tests__/transforms.spec.ts b/packages/schema/parse/src/__tests__/transforms.spec.ts index 84195662dc..0883968e9d 100644 --- a/packages/schema/parse/src/__tests__/transforms.spec.ts +++ b/packages/schema/parse/src/__tests__/transforms.spec.ts @@ -74,6 +74,7 @@ describe("Polywrap Schema Abi Transformations", () => { transforms: [addFirstLast], }); const expected: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "MyType" }), @@ -279,6 +280,7 @@ describe("Polywrap Schema Abi Transformations", () => { ], }); const expected: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "MyType" }), diff --git a/packages/schema/parse/src/abi/index.ts b/packages/schema/parse/src/abi/index.ts index cfb2e27155..6ad712a5a4 100644 --- a/packages/schema/parse/src/abi/index.ts +++ b/packages/schema/parse/src/abi/index.ts @@ -7,6 +7,7 @@ export * from "./utils"; export function createAbi(): Abi { return { + version: "0.1", objectTypes: [], enumTypes: [], interfaceTypes: [], diff --git a/packages/schema/parse/src/index.ts b/packages/schema/parse/src/index.ts index 1ec67c4da4..43f84b99e3 100644 --- a/packages/schema/parse/src/index.ts +++ b/packages/schema/parse/src/index.ts @@ -51,6 +51,7 @@ export function parseSchema( } return { + version: "0.1", objectTypes: info.objectTypes?.length ? info.objectTypes : undefined, moduleType: info.moduleType ? info.moduleType : undefined, enumTypes: info.enumTypes?.length ? info.enumTypes : undefined, diff --git a/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml b/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml index 180b62205d..840729db91 100644 --- a/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml +++ b/packages/templates/wasm/assemblyscript/src/__tests__/types/polywrap.app.yaml @@ -2,6 +2,6 @@ format: "0.2" name: sample-typescript-type-generation language: app/typescript schema: ./schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/sample.eth" - info: "../../../build/wrap.info" + abi: "../../../build/wrap.info" diff --git a/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml b/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml index 180b62205d..840729db91 100644 --- a/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml +++ b/packages/templates/wasm/rust/src/__tests__/types/polywrap.app.yaml @@ -2,6 +2,6 @@ format: "0.2" name: sample-typescript-type-generation language: app/typescript schema: ./schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/sample.eth" - info: "../../../build/wrap.info" + abi: "../../../build/wrap.info" diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index ab1ab0e52d..86e107b52a 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -7,6 +7,7 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + "version": "0.1", "enumTypes": [ { "constants": [ diff --git a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml index ba4150c22b..f14f431745 100644 --- a/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/002-with-plugin/polywrap.app.yaml @@ -2,6 +2,6 @@ format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/plugin.eth" - info: "./../../../../../../js/plugins/http/build/wrap.info" + abi: "./../../../../../../js/plugins/http/build/wrap.info" diff --git a/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml index 3165e82f0a..737280d0ae 100644 --- a/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/app/codegen/003-multi-import/polywrap.app.yaml @@ -2,8 +2,8 @@ format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/ethereum.polywrap.eth" - info: "./../../../../../../js/plugins/ethereum/build/wrap.info" + abi: "./../../../../../../js/plugins/ethereum/build/wrap.info" - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" - info: "./../../../../../../js/plugins/logger/build/wrap.info" + abi: "./../../../../../../js/plugins/logger/build/wrap.info" diff --git a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts index 5e3ab1002e..0fa0a5a83b 100644 --- a/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/app/codegen/004-custom-config/config.ts @@ -47,13 +47,7 @@ export const mockPluginManifest: WrapManifest = { type: "plugin", version: latestWrapManifestVersion, abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], + "version": "0.1", "moduleType": { "type": "Module", "kind": 128, @@ -63,7 +57,6 @@ export const mockPluginManifest: WrapManifest = { "name": "getData", "required": true, "kind": 64, - "arguments": [], "return": { "type": "Int", "name": "getData", @@ -114,7 +107,6 @@ export const mockPluginManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 64, - "arguments": [], "return": { "type": "String", "name": "deployContract", @@ -128,9 +120,7 @@ export const mockPluginManifest: WrapManifest = { } } } - ], - "imports": [], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts index f0ef343d4e..cd5b1b6220 100644 --- a/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts +++ b/packages/test-cases/cases/cli/docgen/002-custom-config/config.ts @@ -47,13 +47,7 @@ export const mockPluginManifest: WrapManifest = { type: "plugin", version: latestWrapManifestVersion, abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], + "version": "0.1", "moduleType": { "type": "Module", "kind": 128, @@ -63,7 +57,6 @@ export const mockPluginManifest: WrapManifest = { "name": "getData", "required": true, "kind": 64, - "arguments": [], "return": { "type": "Int", "name": "getData", @@ -114,7 +107,6 @@ export const mockPluginManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 64, - "arguments": [], "return": { "type": "String", "name": "deployContract", @@ -128,9 +120,7 @@ export const mockPluginManifest: WrapManifest = { } } } - ], - "imports": [], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml b/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml index 66042d083c..a4a7aa5802 100644 --- a/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml +++ b/packages/test-cases/cases/cli/docgen/004-app/polywrap.app.yaml @@ -2,8 +2,8 @@ format: "0.2" name: test-app language: app/typescript schema: ./schema.graphql -import_redirects: +import_abis: - uri: "wrap://ens/ethereum.polywrap.eth" - info: "./../../../../../js/plugins/ethereum/build/wrap.info" + abi: "./../../../../../js/plugins/ethereum/build/wrap.info" - uri: "wrap://ipfs/QmVGwj3FtvhiErJ1wWbmRuHpvEQ3t1BPNESvEiMJM57p2y" - info: "./../../../../../js/plugins/logger/build/wrap.info" + abi: "./../../../../../js/plugins/logger/build/wrap.info" diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts index 83b1567175..c886edc957 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts @@ -7,11 +7,10 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + "version": "0.1", "objectTypes": [ { "type": "Object", - "name": null, - "required": null, "kind": 1, "properties": [ { @@ -19,17 +18,12 @@ export const wrapManifest: WrapManifest = { "name": "u", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "u", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Boolean]", @@ -41,167 +35,104 @@ export const wrapManifest: WrapManifest = { "name": "array", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "array", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Boolean", "name": "array", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "bytes", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "bytes", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [], - "interfaceTypes": [], "importedObjectTypes": [ { "type": "Ethereum_Connection", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "node", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "node", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Connection" }, { "type": "Ethereum_TxOverrides", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxOverrides" }, { "type": "Ethereum_StaticTxResult", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -209,210 +140,131 @@ export const wrapManifest: WrapManifest = { "name": "result", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "result", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "error", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "error", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "StaticTxResult" }, { "type": "Ethereum_TxRequest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxRequest" }, { "type": "Ethereum_TxReceipt", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -420,136 +272,94 @@ export const wrapManifest: WrapManifest = { "name": "to", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "contractAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "contractAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "root", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "root", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "logsBloom", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "logsBloom", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Log]", @@ -561,176 +371,121 @@ export const wrapManifest: WrapManifest = { "name": "logs", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "byzantium", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "byzantium", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "status", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "status", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxReceipt" }, { "type": "Ethereum_Log", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -738,102 +493,72 @@ export const wrapManifest: WrapManifest = { "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "removed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "removed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -845,74 +570,51 @@ export const wrapManifest: WrapManifest = { "name": "topics", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "topics", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "topics", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "logIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "logIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Log" }, { "type": "Ethereum_EventNotification", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -920,62 +622,44 @@ export const wrapManifest: WrapManifest = { "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "EventNotification" }, { "type": "Ethereum_Network", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -983,62 +667,42 @@ export const wrapManifest: WrapManifest = { "name": "name", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "name", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "ensAddress", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "ensAddress", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Network" }, { "type": "Ethereum_TxResponse", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1046,351 +710,226 @@ export const wrapManifest: WrapManifest = { "name": "hash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "hash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "raw", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "raw", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "r", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "r", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "s", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "s", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "v", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "v", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 34, "array": { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxResponse" }, { "type": "Ethereum_Access", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1398,17 +937,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1420,32 +954,21 @@ export const wrapManifest: WrapManifest = { "name": "storageKeys", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Access" @@ -1454,8 +977,6 @@ export const wrapManifest: WrapManifest = { "importedModuleTypes": [ { "type": "Ethereum_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1469,85 +990,56 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1555,17 +1047,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractView", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "callContractView", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1579,102 +1066,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1682,17 +1133,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractStatic", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_StaticTxResult", "name": "callContractStatic", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1706,51 +1152,32 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1758,17 +1185,12 @@ export const wrapManifest: WrapManifest = { "name": "getBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1787,29 +1209,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1821,29 +1233,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1851,17 +1253,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeParams", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeParams", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1875,51 +1272,34 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1927,17 +1307,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeFunction", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeFunction", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1956,29 +1331,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1990,29 +1355,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2020,17 +1375,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityPack", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityPack", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2049,29 +1399,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2083,29 +1423,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2113,17 +1443,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityKeccak256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityKeccak256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2142,29 +1467,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2176,29 +1491,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2206,17 +1511,12 @@ export const wrapManifest: WrapManifest = { "name": "soliditySha256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "soliditySha256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2228,19 +1528,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2248,17 +1541,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "getSignerAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2270,36 +1558,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2307,17 +1581,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2329,36 +1598,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2366,17 +1621,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerTransactionCount", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerTransactionCount", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2388,19 +1638,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2408,17 +1651,12 @@ export const wrapManifest: WrapManifest = { "name": "getGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2432,34 +1670,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2467,17 +1693,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateTransactionGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateTransactionGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2491,102 +1712,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2594,17 +1779,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateContractCallGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateContractCallGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2618,17 +1798,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2636,17 +1811,12 @@ export const wrapManifest: WrapManifest = { "name": "checkAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "checkAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2660,17 +1830,12 @@ export const wrapManifest: WrapManifest = { "name": "eth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "eth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2678,17 +1843,12 @@ export const wrapManifest: WrapManifest = { "name": "toWei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "toWei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2702,17 +1862,12 @@ export const wrapManifest: WrapManifest = { "name": "wei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "wei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2720,17 +1875,12 @@ export const wrapManifest: WrapManifest = { "name": "toEth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "toEth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2744,68 +1894,46 @@ export const wrapManifest: WrapManifest = { "name": "txHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "txHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2813,17 +1941,12 @@ export const wrapManifest: WrapManifest = { "name": "awaitTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "awaitTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2837,102 +1960,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "event", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "event", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2940,17 +2027,12 @@ export const wrapManifest: WrapManifest = { "name": "waitForEvent", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_EventNotification", "name": "waitForEvent", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2962,19 +2044,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2982,17 +2057,12 @@ export const wrapManifest: WrapManifest = { "name": "getNetwork", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Network", "name": "getNetwork", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3004,19 +2074,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3029,29 +2092,19 @@ export const wrapManifest: WrapManifest = { "name": "requestAccounts", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3065,102 +2118,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3168,17 +2185,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethod", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "callContractMethod", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3192,102 +2204,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3295,17 +2271,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethodAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "callContractMethodAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3319,34 +2290,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3354,17 +2313,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "sendTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3378,34 +2332,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3413,17 +2355,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransactionAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "sendTransactionAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3437,85 +2374,56 @@ export const wrapManifest: WrapManifest = { "name": "abi", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "abi", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "bytecode", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "bytecode", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3523,17 +2431,12 @@ export const wrapManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3547,34 +2450,22 @@ export const wrapManifest: WrapManifest = { "name": "message", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "message", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3582,17 +2473,12 @@ export const wrapManifest: WrapManifest = { "name": "signMessage", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "signMessage", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3606,17 +2492,12 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -3628,64 +2509,40 @@ export const wrapManifest: WrapManifest = { "name": "params", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "params", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "params", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { "type": "String", "name": "sendRPC", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "sendRPC", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3695,12 +2552,8 @@ export const wrapManifest: WrapManifest = { "isInterface": false } ], - "importedEnumTypes": [], - "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -3714,34 +2567,22 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optStr", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStr", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3749,17 +2590,12 @@ export const wrapManifest: WrapManifest = { "name": "methodOne", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Object", "name": "methodOne", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3773,17 +2609,12 @@ export const wrapManifest: WrapManifest = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3791,17 +2622,12 @@ export const wrapManifest: WrapManifest = { "name": "methodTwo", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "methodTwo", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3839,13 +2665,10 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Access" } - ], - "interfaces": [] + ] }, "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -3853,20 +2676,14 @@ export const wrapManifest: WrapManifest = { "name": "arg1", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg1", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/wrap.info.ts index 967348f882..387cdd4fd8 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/wrap/wrap.info.ts @@ -7,11 +7,10 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + "version": "0.1", "objectTypes": [ { "type": "Object", - "name": null, - "required": null, "kind": 1, "properties": [ { @@ -19,17 +18,12 @@ export const wrapManifest: WrapManifest = { "name": "u", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "u", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Boolean]", @@ -41,167 +35,104 @@ export const wrapManifest: WrapManifest = { "name": "array", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "array", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Boolean", "name": "array", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "bytes", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "bytes", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [], - "interfaceTypes": [], "importedObjectTypes": [ { "type": "Ethereum_Connection", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "node", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "node", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Connection" }, { "type": "Ethereum_TxOverrides", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxOverrides" }, { "type": "Ethereum_StaticTxResult", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -209,210 +140,131 @@ export const wrapManifest: WrapManifest = { "name": "result", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "result", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "error", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "error", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "StaticTxResult" }, { "type": "Ethereum_TxRequest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxRequest" }, { "type": "Ethereum_TxReceipt", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -420,136 +272,94 @@ export const wrapManifest: WrapManifest = { "name": "to", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "contractAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "contractAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "root", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "root", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "logsBloom", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "logsBloom", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Log]", @@ -561,176 +371,121 @@ export const wrapManifest: WrapManifest = { "name": "logs", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "byzantium", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "byzantium", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "status", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "status", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxReceipt" }, { "type": "Ethereum_Log", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -738,102 +493,72 @@ export const wrapManifest: WrapManifest = { "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "removed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "removed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -845,74 +570,51 @@ export const wrapManifest: WrapManifest = { "name": "topics", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "topics", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "topics", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "logIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "logIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Log" }, { "type": "Ethereum_EventNotification", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -920,62 +622,44 @@ export const wrapManifest: WrapManifest = { "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "EventNotification" }, { "type": "Ethereum_Network", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -983,62 +667,42 @@ export const wrapManifest: WrapManifest = { "name": "name", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "name", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "ensAddress", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "ensAddress", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Network" }, { "type": "Ethereum_TxResponse", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1046,351 +710,226 @@ export const wrapManifest: WrapManifest = { "name": "hash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "hash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "raw", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "raw", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "r", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "r", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "s", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "s", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "v", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "v", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 34, "array": { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxResponse" }, { "type": "Ethereum_Access", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1398,17 +937,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1420,32 +954,21 @@ export const wrapManifest: WrapManifest = { "name": "storageKeys", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Access" @@ -1454,8 +977,6 @@ export const wrapManifest: WrapManifest = { "importedModuleTypes": [ { "type": "Ethereum_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1469,85 +990,56 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1555,17 +1047,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractView", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "callContractView", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1579,102 +1066,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1682,17 +1133,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractStatic", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_StaticTxResult", "name": "callContractStatic", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1706,51 +1152,32 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1758,17 +1185,12 @@ export const wrapManifest: WrapManifest = { "name": "getBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1787,29 +1209,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1821,29 +1233,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1851,17 +1253,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeParams", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeParams", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1875,51 +1272,34 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1927,17 +1307,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeFunction", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeFunction", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1956,29 +1331,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1990,29 +1355,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2020,17 +1375,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityPack", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityPack", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2049,29 +1399,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2083,29 +1423,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2113,17 +1443,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityKeccak256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityKeccak256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2142,29 +1467,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2176,29 +1491,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2206,17 +1511,12 @@ export const wrapManifest: WrapManifest = { "name": "soliditySha256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "soliditySha256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2228,19 +1528,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2248,17 +1541,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "getSignerAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2270,36 +1558,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2307,17 +1581,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2329,36 +1598,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2366,17 +1621,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerTransactionCount", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerTransactionCount", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2388,19 +1638,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2408,17 +1651,12 @@ export const wrapManifest: WrapManifest = { "name": "getGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2432,34 +1670,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2467,17 +1693,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateTransactionGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateTransactionGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2491,102 +1712,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2594,17 +1779,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateContractCallGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateContractCallGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2618,17 +1798,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2636,17 +1811,12 @@ export const wrapManifest: WrapManifest = { "name": "checkAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "checkAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2660,17 +1830,12 @@ export const wrapManifest: WrapManifest = { "name": "eth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "eth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2678,17 +1843,12 @@ export const wrapManifest: WrapManifest = { "name": "toWei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "toWei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2702,17 +1862,12 @@ export const wrapManifest: WrapManifest = { "name": "wei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "wei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2720,17 +1875,12 @@ export const wrapManifest: WrapManifest = { "name": "toEth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "toEth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2744,68 +1894,46 @@ export const wrapManifest: WrapManifest = { "name": "txHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "txHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2813,17 +1941,12 @@ export const wrapManifest: WrapManifest = { "name": "awaitTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "awaitTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2837,102 +1960,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "event", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "event", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2940,17 +2027,12 @@ export const wrapManifest: WrapManifest = { "name": "waitForEvent", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_EventNotification", "name": "waitForEvent", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2962,19 +2044,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2982,17 +2057,12 @@ export const wrapManifest: WrapManifest = { "name": "getNetwork", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Network", "name": "getNetwork", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3004,19 +2074,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3029,29 +2092,19 @@ export const wrapManifest: WrapManifest = { "name": "requestAccounts", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3065,102 +2118,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3168,17 +2185,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethod", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "callContractMethod", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3192,102 +2204,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3295,17 +2271,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethodAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "callContractMethodAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3319,34 +2290,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3354,17 +2313,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "sendTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3378,34 +2332,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3413,17 +2355,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransactionAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "sendTransactionAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3437,85 +2374,56 @@ export const wrapManifest: WrapManifest = { "name": "abi", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "abi", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "bytecode", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "bytecode", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3523,17 +2431,12 @@ export const wrapManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3547,34 +2450,22 @@ export const wrapManifest: WrapManifest = { "name": "message", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "message", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3582,17 +2473,12 @@ export const wrapManifest: WrapManifest = { "name": "signMessage", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "signMessage", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3606,17 +2492,12 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -3628,64 +2509,40 @@ export const wrapManifest: WrapManifest = { "name": "params", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "params", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "params", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { "type": "String", "name": "sendRPC", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "sendRPC", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3695,12 +2552,8 @@ export const wrapManifest: WrapManifest = { "isInterface": false } ], - "importedEnumTypes": [], - "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -3714,34 +2567,22 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optStr", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStr", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3749,17 +2590,12 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Object", "name": "method", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3797,13 +2633,10 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Access" } - ], - "interfaces": [] + ] }, "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -3811,20 +2644,14 @@ export const wrapManifest: WrapManifest = { "name": "arg1", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg1", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts index 985b62d005..cb80f230a2 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts @@ -7,17 +7,9 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], + "version": "0.1", "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -25,25 +17,17 @@ export const wrapManifest: WrapManifest = { "name": "arg1", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg1", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -57,17 +41,12 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -75,22 +54,15 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } - ], - "imports": [], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts index 4286e221c3..1128a9c02d 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/wrap/wrap.info.ts @@ -7,17 +7,9 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - "objectTypes": [], - "enumTypes": [], - "interfaceTypes": [], - "importedObjectTypes": [], - "importedModuleTypes": [], - "importedEnumTypes": [], - "importedEnvTypes": [], + "version": "0.1", "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -25,25 +17,17 @@ export const wrapManifest: WrapManifest = { "name": "queryArg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "queryArg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] }, "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -57,17 +41,12 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -75,22 +54,15 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } - ], - "imports": [], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts index 83b1567175..c886edc957 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts @@ -7,11 +7,10 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + "version": "0.1", "objectTypes": [ { "type": "Object", - "name": null, - "required": null, "kind": 1, "properties": [ { @@ -19,17 +18,12 @@ export const wrapManifest: WrapManifest = { "name": "u", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "u", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Boolean]", @@ -41,167 +35,104 @@ export const wrapManifest: WrapManifest = { "name": "array", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "array", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Boolean", "name": "array", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "bytes", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "bytes", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [], - "interfaceTypes": [], "importedObjectTypes": [ { "type": "Ethereum_Connection", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "node", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "node", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Connection" }, { "type": "Ethereum_TxOverrides", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxOverrides" }, { "type": "Ethereum_StaticTxResult", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -209,210 +140,131 @@ export const wrapManifest: WrapManifest = { "name": "result", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "result", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "error", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "error", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "StaticTxResult" }, { "type": "Ethereum_TxRequest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxRequest" }, { "type": "Ethereum_TxReceipt", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -420,136 +272,94 @@ export const wrapManifest: WrapManifest = { "name": "to", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "contractAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "contractAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "root", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "root", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "logsBloom", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "logsBloom", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Log]", @@ -561,176 +371,121 @@ export const wrapManifest: WrapManifest = { "name": "logs", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "byzantium", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "byzantium", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "status", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "status", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxReceipt" }, { "type": "Ethereum_Log", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -738,102 +493,72 @@ export const wrapManifest: WrapManifest = { "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "removed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "removed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -845,74 +570,51 @@ export const wrapManifest: WrapManifest = { "name": "topics", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "topics", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "topics", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "logIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "logIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Log" }, { "type": "Ethereum_EventNotification", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -920,62 +622,44 @@ export const wrapManifest: WrapManifest = { "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "EventNotification" }, { "type": "Ethereum_Network", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -983,62 +667,42 @@ export const wrapManifest: WrapManifest = { "name": "name", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "name", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "ensAddress", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "ensAddress", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Network" }, { "type": "Ethereum_TxResponse", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1046,351 +710,226 @@ export const wrapManifest: WrapManifest = { "name": "hash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "hash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "raw", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "raw", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "r", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "r", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "s", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "s", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "v", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "v", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 34, "array": { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxResponse" }, { "type": "Ethereum_Access", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1398,17 +937,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1420,32 +954,21 @@ export const wrapManifest: WrapManifest = { "name": "storageKeys", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Access" @@ -1454,8 +977,6 @@ export const wrapManifest: WrapManifest = { "importedModuleTypes": [ { "type": "Ethereum_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1469,85 +990,56 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1555,17 +1047,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractView", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "callContractView", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1579,102 +1066,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1682,17 +1133,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractStatic", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_StaticTxResult", "name": "callContractStatic", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1706,51 +1152,32 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1758,17 +1185,12 @@ export const wrapManifest: WrapManifest = { "name": "getBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1787,29 +1209,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1821,29 +1233,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1851,17 +1253,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeParams", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeParams", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1875,51 +1272,34 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1927,17 +1307,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeFunction", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeFunction", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1956,29 +1331,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1990,29 +1355,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2020,17 +1375,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityPack", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityPack", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2049,29 +1399,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2083,29 +1423,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2113,17 +1443,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityKeccak256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityKeccak256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2142,29 +1467,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2176,29 +1491,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2206,17 +1511,12 @@ export const wrapManifest: WrapManifest = { "name": "soliditySha256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "soliditySha256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2228,19 +1528,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2248,17 +1541,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "getSignerAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2270,36 +1558,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2307,17 +1581,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2329,36 +1598,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2366,17 +1621,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerTransactionCount", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerTransactionCount", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2388,19 +1638,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2408,17 +1651,12 @@ export const wrapManifest: WrapManifest = { "name": "getGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2432,34 +1670,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2467,17 +1693,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateTransactionGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateTransactionGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2491,102 +1712,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2594,17 +1779,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateContractCallGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateContractCallGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2618,17 +1798,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2636,17 +1811,12 @@ export const wrapManifest: WrapManifest = { "name": "checkAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "checkAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2660,17 +1830,12 @@ export const wrapManifest: WrapManifest = { "name": "eth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "eth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2678,17 +1843,12 @@ export const wrapManifest: WrapManifest = { "name": "toWei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "toWei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2702,17 +1862,12 @@ export const wrapManifest: WrapManifest = { "name": "wei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "wei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2720,17 +1875,12 @@ export const wrapManifest: WrapManifest = { "name": "toEth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "toEth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2744,68 +1894,46 @@ export const wrapManifest: WrapManifest = { "name": "txHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "txHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2813,17 +1941,12 @@ export const wrapManifest: WrapManifest = { "name": "awaitTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "awaitTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2837,102 +1960,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "event", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "event", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2940,17 +2027,12 @@ export const wrapManifest: WrapManifest = { "name": "waitForEvent", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_EventNotification", "name": "waitForEvent", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2962,19 +2044,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2982,17 +2057,12 @@ export const wrapManifest: WrapManifest = { "name": "getNetwork", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Network", "name": "getNetwork", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3004,19 +2074,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3029,29 +2092,19 @@ export const wrapManifest: WrapManifest = { "name": "requestAccounts", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3065,102 +2118,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3168,17 +2185,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethod", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "callContractMethod", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3192,102 +2204,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3295,17 +2271,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethodAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "callContractMethodAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3319,34 +2290,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3354,17 +2313,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "sendTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3378,34 +2332,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3413,17 +2355,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransactionAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "sendTransactionAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3437,85 +2374,56 @@ export const wrapManifest: WrapManifest = { "name": "abi", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "abi", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "bytecode", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "bytecode", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3523,17 +2431,12 @@ export const wrapManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3547,34 +2450,22 @@ export const wrapManifest: WrapManifest = { "name": "message", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "message", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3582,17 +2473,12 @@ export const wrapManifest: WrapManifest = { "name": "signMessage", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "signMessage", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3606,17 +2492,12 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -3628,64 +2509,40 @@ export const wrapManifest: WrapManifest = { "name": "params", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "params", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "params", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { "type": "String", "name": "sendRPC", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "sendRPC", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3695,12 +2552,8 @@ export const wrapManifest: WrapManifest = { "isInterface": false } ], - "importedEnumTypes": [], - "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -3714,34 +2567,22 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optStr", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStr", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3749,17 +2590,12 @@ export const wrapManifest: WrapManifest = { "name": "methodOne", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Object", "name": "methodOne", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3773,17 +2609,12 @@ export const wrapManifest: WrapManifest = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "arg", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3791,17 +2622,12 @@ export const wrapManifest: WrapManifest = { "name": "methodTwo", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "methodTwo", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3839,13 +2665,10 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Access" } - ], - "interfaces": [] + ] }, "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -3853,20 +2676,14 @@ export const wrapManifest: WrapManifest = { "name": "arg1", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg1", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts index 83b1567175..2c0db74d91 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts @@ -7,11 +7,10 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { + "version": "0.1", "objectTypes": [ { "type": "Object", - "name": null, - "required": null, "kind": 1, "properties": [ { @@ -19,17 +18,12 @@ export const wrapManifest: WrapManifest = { "name": "u", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt", "name": "u", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Boolean]", @@ -41,167 +35,104 @@ export const wrapManifest: WrapManifest = { "name": "array", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "array", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Boolean", "name": "array", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Bytes", "name": "bytes", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Bytes", "name": "bytes", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } ], - "enumTypes": [], - "interfaceTypes": [], "importedObjectTypes": [ { "type": "Ethereum_Connection", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "node", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "node", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "networkNameOrChainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Connection" }, { "type": "Ethereum_TxOverrides", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxOverrides" }, { "type": "Ethereum_StaticTxResult", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -209,210 +140,131 @@ export const wrapManifest: WrapManifest = { "name": "result", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "result", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "error", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "error", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "StaticTxResult" }, { "type": "Ethereum_TxRequest", - "name": null, - "required": null, "kind": 1025, "properties": [ { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxRequest" }, { "type": "Ethereum_TxReceipt", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -420,136 +272,94 @@ export const wrapManifest: WrapManifest = { "name": "to", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "contractAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "contractAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "root", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "root", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "logsBloom", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "logsBloom", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Log]", @@ -561,176 +371,121 @@ export const wrapManifest: WrapManifest = { "name": "logs", "required": true, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Log", "name": "logs", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "cumulativeGasUsed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "effectiveGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "byzantium", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "byzantium", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "status", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "status", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxReceipt" }, { "type": "Ethereum_Log", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -738,102 +493,72 @@ export const wrapManifest: WrapManifest = { "name": "blockNumber", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "transactionIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Boolean", "name": "removed", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "removed", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -845,74 +570,51 @@ export const wrapManifest: WrapManifest = { "name": "topics", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "topics", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "topics", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "transactionHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "transactionHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "logIndex", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "logIndex", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Log" }, { "type": "Ethereum_EventNotification", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -920,62 +622,44 @@ export const wrapManifest: WrapManifest = { "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Log", "name": "log", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "EventNotification" }, { "type": "Ethereum_Network", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -983,62 +667,42 @@ export const wrapManifest: WrapManifest = { "name": "name", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "name", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "ensAddress", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "ensAddress", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Network" }, { "type": "Ethereum_TxResponse", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1046,351 +710,226 @@ export const wrapManifest: WrapManifest = { "name": "hash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "hash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "to", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "to", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "from", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "from", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "nonce", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "nonce", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasLimit", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "gasPrice", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "data", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "data", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "value", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "value", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "chainId", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "chainId", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockNumber", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "blockHash", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "blockHash", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timestamp", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "raw", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "raw", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "r", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "r", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "s", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "s", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "v", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "v", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "type", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "type", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 34, "array": { "type": "[Ethereum_Access]", "name": "accessList", - "required": null, "kind": 18, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 }, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "Ethereum_Access", "name": "accessList", "required": true, "kind": 8192 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "TxResponse" }, { "type": "Ethereum_Access", - "name": null, - "required": null, "kind": 1025, "properties": [ { @@ -1398,17 +937,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1420,32 +954,21 @@ export const wrapManifest: WrapManifest = { "name": "storageKeys", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "storageKeys", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], - "interfaces": [], "uri": "ens/ethereum.polywrap.eth", "namespace": "Ethereum", "nativeType": "Access" @@ -1454,8 +977,6 @@ export const wrapManifest: WrapManifest = { "importedModuleTypes": [ { "type": "Ethereum_Module", - "name": null, - "required": null, "kind": 256, "methods": [ { @@ -1469,85 +990,56 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1555,17 +1047,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractView", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "callContractView", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1579,102 +1066,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1682,17 +1133,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractStatic", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_StaticTxResult", "name": "callContractStatic", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1706,51 +1152,32 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1758,17 +1185,12 @@ export const wrapManifest: WrapManifest = { "name": "getBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1787,29 +1209,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1821,29 +1233,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1851,17 +1253,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeParams", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeParams", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1875,51 +1272,34 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -1927,17 +1307,12 @@ export const wrapManifest: WrapManifest = { "name": "encodeFunction", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "encodeFunction", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -1956,29 +1331,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -1990,29 +1355,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2020,17 +1375,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityPack", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityPack", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2049,29 +1399,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2083,29 +1423,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2113,17 +1443,12 @@ export const wrapManifest: WrapManifest = { "name": "solidityKeccak256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "solidityKeccak256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2142,29 +1467,19 @@ export const wrapManifest: WrapManifest = { "name": "types", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "types", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "types", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -2176,29 +1491,19 @@ export const wrapManifest: WrapManifest = { "name": "values", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "values", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "values", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2206,17 +1511,12 @@ export const wrapManifest: WrapManifest = { "name": "soliditySha256", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "soliditySha256", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2228,19 +1528,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2248,17 +1541,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "getSignerAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2270,36 +1558,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2307,17 +1581,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerBalance", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerBalance", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2329,36 +1598,22 @@ export const wrapManifest: WrapManifest = { { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "blockTag", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2366,17 +1621,12 @@ export const wrapManifest: WrapManifest = { "name": "getSignerTransactionCount", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getSignerTransactionCount", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2388,19 +1638,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2408,17 +1651,12 @@ export const wrapManifest: WrapManifest = { "name": "getGasPrice", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "getGasPrice", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2432,34 +1670,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2467,17 +1693,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateTransactionGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateTransactionGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2491,102 +1712,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2594,17 +1779,12 @@ export const wrapManifest: WrapManifest = { "name": "estimateContractCallGas", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "estimateContractCallGas", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2618,17 +1798,12 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2636,17 +1811,12 @@ export const wrapManifest: WrapManifest = { "name": "checkAddress", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "Boolean", "name": "checkAddress", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2660,17 +1830,12 @@ export const wrapManifest: WrapManifest = { "name": "eth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "eth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2678,17 +1843,12 @@ export const wrapManifest: WrapManifest = { "name": "toWei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "toWei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2702,17 +1862,12 @@ export const wrapManifest: WrapManifest = { "name": "wei", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "BigInt", "name": "wei", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2720,17 +1875,12 @@ export const wrapManifest: WrapManifest = { "name": "toEth", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "toEth", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2744,68 +1894,46 @@ export const wrapManifest: WrapManifest = { "name": "txHash", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "txHash", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "confirmations", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "confirmations", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2813,17 +1941,12 @@ export const wrapManifest: WrapManifest = { "name": "awaitTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "awaitTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2837,102 +1960,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "event", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "event", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "UInt32", "name": "timeout", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "timeout", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2940,17 +2027,12 @@ export const wrapManifest: WrapManifest = { "name": "waitForEvent", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_EventNotification", "name": "waitForEvent", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -2962,19 +2044,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -2982,17 +2057,12 @@ export const wrapManifest: WrapManifest = { "name": "getNetwork", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Network", "name": "getNetwork", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3004,19 +2074,12 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3029,29 +2092,19 @@ export const wrapManifest: WrapManifest = { "name": "requestAccounts", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "requestAccounts", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3065,102 +2118,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3168,17 +2185,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethod", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "callContractMethod", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3192,102 +2204,66 @@ export const wrapManifest: WrapManifest = { "name": "address", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "address", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxOverrides", "name": "txOverrides", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3295,17 +2271,12 @@ export const wrapManifest: WrapManifest = { "name": "callContractMethodAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "callContractMethodAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3319,34 +2290,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3354,17 +2313,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransaction", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxResponse", "name": "sendTransaction", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3378,34 +2332,22 @@ export const wrapManifest: WrapManifest = { "name": "tx", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxRequest", "name": "tx", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3413,17 +2355,12 @@ export const wrapManifest: WrapManifest = { "name": "sendTransactionAndWait", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_TxReceipt", "name": "sendTransactionAndWait", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3437,85 +2374,56 @@ export const wrapManifest: WrapManifest = { "name": "abi", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "abi", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "bytecode", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "bytecode", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", "name": "args", - "required": null, "kind": 34, "array": { "type": "[String]", "name": "args", - "required": null, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "args", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "args", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3523,17 +2431,12 @@ export const wrapManifest: WrapManifest = { "name": "deployContract", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "deployContract", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3547,34 +2450,22 @@ export const wrapManifest: WrapManifest = { "name": "message", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "message", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3582,17 +2473,12 @@ export const wrapManifest: WrapManifest = { "name": "signMessage", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "signMessage", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3606,17 +2492,12 @@ export const wrapManifest: WrapManifest = { "name": "method", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "method", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "[String]", @@ -3628,64 +2509,40 @@ export const wrapManifest: WrapManifest = { "name": "params", "required": true, "kind": 18, - "array": null, - "map": null, "scalar": { "type": "String", "name": "params", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null, "item": { "type": "String", "name": "params", "required": true, "kind": 4 } - }, - "map": null, - "scalar": null, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Ethereum_Connection", "name": "connection", - "required": null, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { "type": "String", "name": "sendRPC", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "sendRPC", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3695,12 +2552,8 @@ export const wrapManifest: WrapManifest = { "isInterface": false } ], - "importedEnumTypes": [], - "importedEnvTypes": [], "moduleType": { "type": "Module", - "name": null, - "required": null, "kind": 128, "methods": [ { @@ -3714,34 +2567,22 @@ export const wrapManifest: WrapManifest = { "name": "str", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "str", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } }, { "type": "String", "name": "optStr", - "required": null, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "optStr", - "required": null, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } ], "return": { @@ -3749,17 +2590,12 @@ export const wrapManifest: WrapManifest = { "name": "methodOne", "required": true, "kind": 34, - "array": null, - "map": null, - "scalar": null, "object": { "type": "Object", "name": "methodOne", "required": true, "kind": 8192 - }, - "enum": null, - "unresolvedObjectOrEnum": null + } } }, { @@ -3773,17 +2609,12 @@ export const wrapManifest: WrapManifest = { "name": "arg", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "UInt32", "name": "arg", "required": true, "kind": 4 }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null } ], "return": { @@ -3791,17 +2622,12 @@ export const wrapManifest: WrapManifest = { "name": "methodTwo", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "methodTwo", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } } ], @@ -3839,13 +2665,10 @@ export const wrapManifest: WrapManifest = { { "type": "Ethereum_Access" } - ], - "interfaces": [] + ] }, "envType": { "type": "Env", - "name": null, - "required": null, "kind": 65536, "properties": [ { @@ -3853,20 +2676,14 @@ export const wrapManifest: WrapManifest = { "name": "arg1", "required": true, "kind": 34, - "array": null, - "map": null, "scalar": { "type": "String", "name": "arg1", "required": true, "kind": 4 - }, - "object": null, - "enum": null, - "unresolvedObjectOrEnum": null + } } - ], - "interfaces": [] + ] } } } diff --git a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts index 4466a4b444..a98f365a7e 100644 --- a/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts +++ b/packages/test-cases/cases/cli/wasm/codegen/004-custom-config/config.ts @@ -48,6 +48,7 @@ export function getClientConfig(defaultConfigs: Partial) { } const abi: WrapAbi = { + version: "0.1", "moduleType": { "type": "Module", "kind": 128, diff --git a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts index 4553903bf3..2849cdb99a 100644 --- a/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/00-sanity/output/module.ts @@ -14,6 +14,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: { ...createModuleDefinition({}), diff --git a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts index 908a79b451..fe8481a554 100644 --- a/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/01-nested-objects/output/module.ts @@ -8,6 +8,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts index 009ef90883..f26d7581ed 100644 --- a/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/02-recursive/output/module.ts @@ -8,6 +8,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts index b48c222e32..9d599927f9 100644 --- a/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/001-local-imports/03-wild-card/output/module.ts @@ -15,6 +15,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "CustomModuleType" }), diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts index ce2aea1607..2494fc621e 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "objectTypes": [ { "type": "ExternalType", diff --git a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts index 3f394c9758..16abf085ad 100644 --- a/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/00-sanity/output/module.ts @@ -10,6 +10,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: createModuleDefinition({ imports: [ { type: "Namespace_ExternalType" }, diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts index e9da7d9665..ee83f0ffc9 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "objectTypes": [ { "type": "ExternalType", diff --git a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts index ab36c68b0f..8c22e4c868 100644 --- a/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/01-with-duplicate-local-type/output/module.ts @@ -9,6 +9,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "LocalType" }), diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts index de3a212c51..2c56ed5e42 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "objectTypes": [ { "type": "ExternalType", diff --git a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts index 5490a88555..5194a70377 100644 --- a/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/02-wild-card/output/module.ts @@ -10,6 +10,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: createModuleDefinition({ imports: [ { type: "Namespace_ExternalType" }, diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts index d73c3bcdcb..0f8b390790 100644 --- a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/wrap-manifest-types-js"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [], enumTypes: [], interfaceTypes: [], diff --git a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts index 4747bd9558..0d6f620440 100644 --- a/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts +++ b/packages/test-cases/cases/compose/002-external-imports/03-with-duplicate-namespace/output/module.ts @@ -3,6 +3,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: { type: "Module", kind: 128, diff --git a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts index 573b4fa073..ea117cc1b4 100644 --- a/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/003-inheritance/01-sanity/output/module.ts @@ -9,6 +9,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "BaseType1" }), diff --git a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts index a62e7bd747..78a428f684 100644 --- a/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/00-sanity/output/module.ts @@ -5,6 +5,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts index 7a0d637a8e..994df26943 100644 --- a/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/01-inherited/output/module.ts @@ -8,6 +8,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts index f1695fe734..7e88fcc764 100644 --- a/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/02-imported-inherited/output/module.ts @@ -8,6 +8,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts index 710caf9409..cf2161498c 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "moduleType": { "type": "Module", "kind": 128 diff --git a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts index be1b18df37..279d08529d 100644 --- a/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/03-external-import/output/module.ts @@ -6,6 +6,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: { ...createModuleDefinition({}), diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts index 3074c957af..9d09003fec 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "objectTypes": [ { "type": "ImportedBaseType", diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts index 3074c957af..9d09003fec 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "objectTypes": [ { "type": "ImportedBaseType", diff --git a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts index e5f5d3503e..8120a5a334 100644 --- a/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/004-empty-types/04-external-import-inherited/output/module.ts @@ -9,6 +9,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts index d97c0aa054..c7812a4a44 100644 --- a/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/00-sanity/output/module.ts @@ -11,6 +11,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ createObjectDefinition({ type: "SimpleType", diff --git a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts index 277d1572b9..7a6b084173 100644 --- a/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/01-inherited/output/module.ts @@ -12,6 +12,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts index 154fdf332f..8d589e5d55 100644 --- a/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/02-imported-inherited/output/module.ts @@ -12,6 +12,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts index 7417995143..bb2a3accd8 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/imports-ext/external.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", "moduleType": { "type": "Module", "kind": 128, diff --git a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts index d5eff57333..25c2b662ef 100644 --- a/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/03-external-import/output/module.ts @@ -10,6 +10,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: { ...createModuleDefinition({}), diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts index 7c0387dcde..5cb37201a9 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/base.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { type: "ImportedBaseType", diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts index a554c5229c..8dfcfb475c 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/imports-ext/derived.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { type: "ImportedBaseType", diff --git a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts index a0b4c81499..d699dc2a5c 100644 --- a/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts +++ b/packages/test-cases/cases/compose/005-map-types/04-external-import-inherited/output/module.ts @@ -13,6 +13,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts index 3084b631a6..5528bfb807 100644 --- a/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts +++ b/packages/test-cases/cases/compose/006-env-types/00-sanity/output/module.ts @@ -7,6 +7,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", envType: createEnvDefinition({ properties: [ createScalarPropertyDefinition({ name: "prop", type: "String", required: true }), diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts index 59c5df1fc2..37066bca30 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/just.module.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", moduleType: { type: "Module", kind: 128, diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts index 50ec956d0c..4da16fcd1c 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test-interface.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { type: "ModuleInterfaceArgument", diff --git a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts index c78cc0b36a..73761bdb04 100644 --- a/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts +++ b/packages/test-cases/cases/compose/sanity/imports-ext/test.eth/module.ts @@ -1,6 +1,7 @@ import { WrapAbi } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { type: "CustomType", diff --git a/packages/test-cases/cases/compose/sanity/output/module.ts b/packages/test-cases/cases/compose/sanity/output/module.ts index 99f10b8874..ea5605be51 100644 --- a/packages/test-cases/cases/compose/sanity/output/module.ts +++ b/packages/test-cases/cases/compose/sanity/output/module.ts @@ -21,6 +21,7 @@ import { } from "@polywrap/schema-parse"; export const abi: WrapAbi = { + version: "0.1", envType: createEnvDefinition({ properties: [ createScalarPropertyDefinition({ diff --git a/packages/test-cases/cases/parse/map-type/output.ts b/packages/test-cases/cases/parse/map-type/output.ts index 6d7ab0e7a4..09fe73b1fd 100644 --- a/packages/test-cases/cases/parse/map-type/output.ts +++ b/packages/test-cases/cases/parse/map-type/output.ts @@ -12,6 +12,7 @@ import { } from "../../../../schema/parse/src/abi"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ diff --git a/packages/test-cases/cases/parse/recursive-properties/output.ts b/packages/test-cases/cases/parse/recursive-properties/output.ts index 88f9ba2e0d..3a23078c58 100644 --- a/packages/test-cases/cases/parse/recursive-properties/output.ts +++ b/packages/test-cases/cases/parse/recursive-properties/output.ts @@ -7,6 +7,7 @@ import { } from "../../../../schema/parse/src/abi"; export const abi: WrapAbi = { + version: "0.1", objectTypes: [ { ...createObjectDefinition({ type: "Object" }), diff --git a/packages/test-cases/cases/parse/sanity/output.ts b/packages/test-cases/cases/parse/sanity/output.ts index 752fcd0b36..53e662e5ec 100644 --- a/packages/test-cases/cases/parse/sanity/output.ts +++ b/packages/test-cases/cases/parse/sanity/output.ts @@ -25,6 +25,7 @@ import { } from "../../../../schema/parse/src/abi"; export const abi: WrapAbi = { + version: "0.1", interfaceTypes: [ createInterfaceDefinition({ type: "TestImport", diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/abis/memory-storage.graphql b/packages/test-cases/cases/wrappers/wasm-as/asyncify/abis/memory-storage.graphql new file mode 100644 index 0000000000..c10ae67370 --- /dev/null +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/abis/memory-storage.graphql @@ -0,0 +1,5 @@ +type Module { + getData: Int32! + + setData(value: Int32!): Boolean! +} diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info b/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info deleted file mode 100644 index ce20b6b055..0000000000 --- a/packages/test-cases/cases/wrappers/wasm-as/asyncify/plugin.wrap.info +++ /dev/null @@ -1 +0,0 @@ -„¤name¦Plugin§version£0.1¤type¦plugin£abiˆ«objectTypes©enumTypes®interfaceTypes³importedObjectTypes³importedModuleTypes±importedEnumTypes°importedEnvTypesªmoduleType‡¤type¦Module¤nameÀ¨requiredÀ¤kindÌ€§methods’†¤type¦Method¤name§getData¨requiredäkind@©arguments¦returnŠ¤type£Int¤name§getData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name§getData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ†¤type¦Method¤name§setData¨requiredäkind@©arguments‘Š¤type£Int¤name¥value¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type£Int¤name¥value¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ¦returnŠ¤type§Boolean¤name§setData¨requiredäkind"¥arrayÀ£mapÀ¦scalar„¤type§Boolean¤name§setData¨requiredäkind¦objectÀ¤enumÀ¶unresolvedObjectOrEnumÀ§importsªinterfaces \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml index 08003a561d..9f77aeda05 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/asyncify/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "ens/memory-storage.polywrap.eth" - info: ./plugin.wrap.info \ No newline at end of file + abi: ./abis/memory-storage.graphql diff --git a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml index a72b26ceb8..429b2fe754 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/env-types/main/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/assemblyscript build: ./polywrap.build.yaml schema: ./src/schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "ens/externalenv.polywrap.eth" - info: ../external/build/wrap.info + abi: ../external/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml index 862abfc30c..6e491cda59 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-use-getImpl/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info \ No newline at end of file + abi: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml index cccb358160..e08c77953a 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/implementations/test-wrapper/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info + abi: ../test-interface/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml index 41b9a3e106..fc17190b9f 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-implementation/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info \ No newline at end of file + abi: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml index 9b7756742a..d3926f3e7f 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/interface-invoke/test-wrapper/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/assemblyscript schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info \ No newline at end of file + abi: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/polywrap.yaml index 9bc81febfc..b5fa83847f 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-fs-resolver/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/assemblyscript build: ./polywrap.build.yaml schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "ens/uri-resolver.core.polywrap.eth" - info: ../../../../../interfaces/uri-resolver/build-man/wrap.info \ No newline at end of file + abi: ../../../../../interfaces/uri-resolver/build-man/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-memory/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-memory/polywrap.yaml index 676afbc982..ff7158cd76 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-memory/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-memory/polywrap.yaml @@ -5,6 +5,6 @@ build: ./polywrap.build.yaml schema: ./schema.graphql module: ./src/index.ts meta: ./polywrap.meta.yaml -import_redirects: +import_abis: - uri: "ens/memory-storage.polywrap.eth" - info: ./plugin.wrap.info \ No newline at end of file + abi: ./plugin.wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/polywrap.yaml index af6a5cebb7..ef70fc18b1 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-redirect-resolver/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/assemblyscript build: ./polywrap.build.yaml schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "ens/uri-resolver.core.polywrap.eth" - info: ../../../../../interfaces/uri-resolver/build-man/wrap.info \ No newline at end of file + abi: ../../../../../interfaces/uri-resolver/build-man/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml index d0354535d5..495d66faa5 100644 --- a/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-as/simple-storage/polywrap.yaml @@ -5,6 +5,6 @@ build: ./polywrap.build.yaml meta: ./polywrap.meta.yaml schema: ./schema.graphql module: ./src/index.ts -import_redirects: +import_abis: - uri: "wrap://ens/ethereum.polywrap.eth" - info: ../../../../../js/plugins/ethereum/build/wrap.info + abi: ../../../../../js/plugins/ethereum/build/wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml index 63a05a68ca..d7c4f9592f 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/asyncify/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/rust build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml -import_redirects: +import_abis: - uri: "ens/memory-storage.polywrap.eth" - info: ./plugin.wrap.info \ No newline at end of file + abi: ./plugin.wrap.info diff --git a/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml index 83893ff576..64df57d42b 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/env-types/main/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/rust build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml -import_redirects: +import_abis: - uri: "ens/externalenv.polywrap.eth" - info: ../external/build/wrap.info \ No newline at end of file + abi: ../external/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml index c2cd141ef0..b8cf8f6700 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-use-getImpl/polywrap.yaml @@ -4,6 +4,6 @@ build: ./polywrap.build.yaml language: wasm/rust schema: ./schema.graphql module: ./Cargo.toml -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info \ No newline at end of file + abi: ../test-interface/build/wrap.info \ No newline at end of file diff --git a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml index 38c8476c5e..ec5f181511 100644 --- a/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml +++ b/packages/test-cases/cases/wrappers/wasm-rs/implementations/test-wrapper/polywrap.yaml @@ -4,6 +4,6 @@ language: wasm/rust build: ./polywrap.build.yaml schema: ./schema.graphql module: ./Cargo.toml -import_redirects: +import_abis: - uri: wrap://ens/interface.eth - info: ../test-interface/build/wrap.info + abi: ../test-interface/build/wrap.info From 816479bbdce87fa6c8a22c4543140a8888915afc Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 04:26:46 -0700 Subject: [PATCH 48/56] fix test --- .../plugins/ethereum/src/__tests__/integration/polywrap.yaml | 1 - .../cases/bind/sanity/output/plugin-ts/wrap.info.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml index c35d29dbb6..60e07843f7 100644 --- a/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml +++ b/packages/js/plugins/ethereum/src/__tests__/integration/polywrap.yaml @@ -7,4 +7,3 @@ schema: ./src/schema.graphql import_abis: - uri: "wrap://ens/ethereum.polywrap.eth" abi: ../../../build/wrap.info - diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index 86e107b52a..70ff3babb6 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -7,7 +7,6 @@ export const wrapManifest: WrapManifest = { type: "plugin", version: "0.1", abi: { - "version": "0.1", "enumTypes": [ { "constants": [ @@ -2082,6 +2081,7 @@ export const wrapManifest: WrapManifest = { ], "type": "AnotherType" } - ] + ], + "version": "0.1" } } From d5217fc6b0a39a093cb5769d02cf7f7eabc2f806 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 04:56:12 -0700 Subject: [PATCH 49/56] cleanup import_abis loading --- packages/cli/lang/en.json | 3 + packages/cli/lang/es.json | 3 + packages/cli/src/lib/SchemaComposer.ts | 123 +++++++++++++++++-------- 3 files changed, 91 insertions(+), 38 deletions(-) diff --git a/packages/cli/lang/en.json b/packages/cli/lang/en.json index 5483424ed9..509503158b 100644 --- a/packages/cli/lang/en.json +++ b/packages/cli/lang/en.json @@ -239,6 +239,9 @@ "lib_compiler_outputMetadataError": "Failed to output metadata", "lib_compiler_outputMetadataWarning": "Warnings writing metadata", "lib_compiler_outputMetadataFileText": "Metadata written to {path}", + "lib_schemaComposer_abi_not_found": "ABI not found at {path}", + "lib_schemaComposer_unknown_abi": "Unknown ABI type at {path}. Supported types: {types}", + "lib_schemaComposer_invalid_yaml": "Invalid YAML at {path}", "lib_generators_projectGenerator_fallback": "Falling back to the local Yarn cache.", "lib_generators_projectGenerator_offline": "You appear to be offline.", "lib_helpers_manifest_loadError": "Failed to load manifest from {path}", diff --git a/packages/cli/lang/es.json b/packages/cli/lang/es.json index ff6fdd15e7..0ad42a9e63 100644 --- a/packages/cli/lang/es.json +++ b/packages/cli/lang/es.json @@ -239,6 +239,9 @@ "lib_compiler_outputMetadataError": "Failed to output metadata", "lib_compiler_outputMetadataWarning": "Warnings writing metadata", "lib_compiler_outputMetadataFileText": "Metadata written to {path}", + "lib_schemaComposer_abi_not_found": "ABI not found at {path}", + "lib_schemaComposer_unknown_abi": "Unknown ABI type at {path}. Supported types: {types}", + "lib_schemaComposer_invalid_yaml": "Invalid YAML at {path}", "lib_generators_projectGenerator_fallback": "Falling back to the local Yarn cache.", "lib_generators_projectGenerator_offline": "You appear to be offline.", "lib_helpers_manifest_loadError": "Failed to load manifest from {path}", diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index 43221d07f1..d4abf84838 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { Project, AnyProjectManifest } from "./"; +import { Project, AnyProjectManifest, intlMsg } from "./"; import { Uri, PolywrapClient } from "@polywrap/client-js"; import { @@ -13,7 +13,7 @@ import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; import YAML from "js-yaml"; -import { deserializeWrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { deserializeWrapManifest, validateWrapManifest } from "@polywrap/wrap-manifest-types-js"; import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { WrapAbi } from "@polywrap/schema-parse"; @@ -69,6 +69,15 @@ export class SchemaComposer { this._abi = undefined; } + private _fetchLocalSchema(schemaPath: string) { + return fs.readFileSync( + path.isAbsolute(schemaPath) + ? schemaPath + : path.join(this._config.project.getManifestDir(), schemaPath), + "utf-8" + ); + } + private async _fetchExternalAbi( uri: string, import_abis?: PolywrapManifest["import_abis"] @@ -89,42 +98,24 @@ export class SchemaComposer { ); if (!fs.existsSync(abiPath)) { - throw Error("TODO file not found"); + throw Error(intlMsg.lib_schemaComposer_abi_not_found({ + path: abiPath + })); } if (abiPath.endsWith(".info")) { - const manifest = fs.readFileSync(abiPath); - return (await deserializeWrapManifest(manifest)).abi; + return await this._loadWrapAbi(abiPath); } else if (abiPath.endsWith(".graphql")) { - const schema = fs.readFileSync(abiPath, "utf-8"); - const options: ComposerOptions = { - schema: { - schema: schema, - absolutePath: abiPath, - }, - resolvers: { - external: (uri: string) => - this._fetchExternalAbi(uri, import_abis), - local: (path: string) => - Promise.resolve(this._fetchLocalSchema(path)), - }, - }; - - return await composeSchema(options); + return await this._loadGraphqlAbi(abiPath, import_abis); } else if (abiPath.endsWith(".json")) { - const json = fs.readFileSync(abiPath, "utf-8"); - // TODO: need to validate structure of ABI object - return JSON.parse(json); + return await this._loadJsonAbi(abiPath) } else if (abiPath.endsWith(".yaml")) { - const yaml = fs.readFileSync(abiPath, "utf-8"); - const result = YAML.safeLoad(yaml); - if (!result) { - throw Error("TODO invalid"); - } - // TODO: need to validate structure of ABI object - return result as WrapAbi; + return await this._loadYamlAbi(abiPath); } else { - throw Error("TODO intl type here"); + throw Error(intlMsg.lib_schemaComposer_unknown_abi({ + path: abiPath, + types: ["*.info", "*.graphql", "*.json", "*.yaml"].toString() + })); } } } @@ -138,12 +129,68 @@ export class SchemaComposer { } } - private _fetchLocalSchema(schemaPath: string) { - return fs.readFileSync( - path.isAbsolute(schemaPath) - ? schemaPath - : path.join(this._config.project.getManifestDir(), schemaPath), - "utf-8" - ); + private async _loadGraphqlAbi( + path: string, + import_abis: PolywrapManifest["import_abis"] + ): Promise { + const schema = fs.readFileSync(path, "utf-8"); + + return await composeSchema({ + schema: { + schema: schema, + absolutePath: path, + }, + resolvers: { + external: (uri: string) => + this._fetchExternalAbi(uri, import_abis), + local: (path: string) => + Promise.resolve(this._fetchLocalSchema(path)), + }, + }); + } + + private async _loadWrapAbi(path: string): Promise { + const manifest = fs.readFileSync(path); + return (await deserializeWrapManifest(manifest)).abi; + } + + private async _loadJsonAbi(path: string): Promise { + // Load the JSON ABI + const json = fs.readFileSync(path, "utf-8"); + const result = JSON.parse(json); + + // Validate the ABI's structure + await validateWrapManifest({ + version: "0.1", + type: "interface", + name: "temp", + abi: result + }); + + // Return ABI + return result as WrapAbi; + } + + private async _loadYamlAbi(path: string): Promise { + // Load the YAML ABI + const yaml = fs.readFileSync(path, "utf-8"); + const result = YAML.safeLoad(yaml); + + if (!result) { + throw Error(intlMsg.lib_schemaComposer_invalid_yaml({ + path: path + })); + } + + // Validate the ABI's structure + await validateWrapManifest({ + version: "0.1", + type: "interface", + name: "temp", + abi: result as WrapAbi + }); + + // Return ABI + return result as WrapAbi; } } From 53c31e546d72673450edab03694a7244db5eaf99 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 05:02:44 -0700 Subject: [PATCH 50/56] fix import --- packages/js/plugins/http/src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/plugins/http/src/util.ts b/packages/js/plugins/http/src/util.ts index 15ee505ce3..65461c8087 100644 --- a/packages/js/plugins/http/src/util.ts +++ b/packages/js/plugins/http/src/util.ts @@ -1,4 +1,4 @@ -import { Request, Response, ResponseTypeEnum } from "./wrap"; +import { Request, Response, ResponseTypeEnum } from "./wrap-man"; import { AxiosResponse, AxiosRequestConfig } from "axios"; From a0beef01e4fe70c39ed761de7cd0b37d0afe8fda Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 05:17:04 -0700 Subject: [PATCH 51/56] fix build --- .../js/plugins/http/src/wrap-man/types.ts | 15 +- .../js/plugins/http/src/wrap-man/wrap.info.ts | 130 ++++++++---------- 2 files changed, 60 insertions(+), 85 deletions(-) diff --git a/packages/js/plugins/http/src/wrap-man/types.ts b/packages/js/plugins/http/src/wrap-man/types.ts index f43de77bd7..febe292d7a 100644 --- a/packages/js/plugins/http/src/wrap-man/types.ts +++ b/packages/js/plugins/http/src/wrap-man/types.ts @@ -29,26 +29,17 @@ export type Boolean = boolean; /// Env END /// /// Objects START /// -export interface Header { - key: Types.String; - value: Types.String; -} - -export interface UrlParam { - key: Types.String; - value: Types.String; -} export interface Response { status: Types.Int; statusText: Types.String; - headers?: Array | null; + headers?: Map | null; body?: Types.String | null; } export interface Request { - headers?: Array | null; - urlParams?: Array | null; + headers?: Map | null; + urlParams?: Map | null; responseType: Types.ResponseType; body?: Types.String | null; } diff --git a/packages/js/plugins/http/src/wrap-man/wrap.info.ts b/packages/js/plugins/http/src/wrap-man/wrap.info.ts index 767ceee328..1fb93a44d3 100644 --- a/packages/js/plugins/http/src/wrap-man/wrap.info.ts +++ b/packages/js/plugins/http/src/wrap-man/wrap.info.ts @@ -7,46 +7,6 @@ export const manifest: WrapManifest = { abi: { version: "0.1", objectTypes: [ - { - type: "Header", - kind: 1, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - }, - ], - }, - { - type: "UrlParam", - kind: 1, - properties: [ - { - type: "String", - name: "key", - required: true, - kind: 34, - scalar: { type: "String", name: "key", required: true, kind: 4 }, - }, - { - type: "String", - name: "value", - required: true, - kind: 34, - scalar: { type: "String", name: "value", required: true, kind: 4 }, - }, - ], - }, { type: "Response", kind: 1, @@ -71,26 +31,34 @@ export const manifest: WrapManifest = { }, }, { - type: "[Header]", + type: "Map", name: "headers", - kind: 34, - array: { - type: "[Header]", + map: { + type: "Map", + scalar: { + name: "headers", + type: "String", + required: true, + kind: 4 + }, + kind: 262146, name: "headers", - kind: 18, - object: { - type: "Header", + key: { name: "headers", + type: "String", required: true, - kind: 8192, + kind: 4 }, - item: { - type: "Header", + value: { name: "headers", + type: "String", required: true, - kind: 8192, + kind: 4 }, + required: true }, + required: false, + kind: 34 }, { type: "String", @@ -105,48 +73,64 @@ export const manifest: WrapManifest = { kind: 1, properties: [ { - type: "[Header]", + type: "Map", name: "headers", - kind: 34, - array: { - type: "[Header]", + map: { + type: "Map", + scalar: { + name: "headers", + type: "String", + required: true, + kind: 4 + }, + kind: 262146, name: "headers", - kind: 18, - object: { - type: "Header", + key: { name: "headers", + type: "String", required: true, - kind: 8192, + kind: 4 }, - item: { - type: "Header", + value: { name: "headers", + type: "String", required: true, - kind: 8192, + kind: 4 }, + required: true }, + required: false, + kind: 34 }, { - type: "[UrlParam]", + type: "Map", name: "urlParams", - kind: 34, - array: { - type: "[UrlParam]", + map: { + type: "Map", + scalar: { + name: "urlParams", + type: "String", + required: true, + kind: 4 + }, + kind: 262146, name: "urlParams", - kind: 18, - object: { - type: "UrlParam", + key: { name: "urlParams", + type: "String", required: true, - kind: 8192, + kind: 4 }, - item: { - type: "UrlParam", + value: { name: "urlParams", + type: "String", required: true, - kind: 8192, + kind: 4 }, + required: true }, + required: false, + kind: 34 }, { type: "ResponseType", From 6e2d8bda4a113510e76ec699f09ddb3011cbcae7 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 05:18:35 -0700 Subject: [PATCH 52/56] lint fix --- packages/cli/src/lib/SchemaComposer.ts | 43 +++++++++++++++----------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/packages/cli/src/lib/SchemaComposer.ts b/packages/cli/src/lib/SchemaComposer.ts index d4abf84838..c13d0a4a60 100644 --- a/packages/cli/src/lib/SchemaComposer.ts +++ b/packages/cli/src/lib/SchemaComposer.ts @@ -13,7 +13,10 @@ import fs from "fs"; import path from "path"; import * as gluegun from "gluegun"; import YAML from "js-yaml"; -import { deserializeWrapManifest, validateWrapManifest } from "@polywrap/wrap-manifest-types-js"; +import { + deserializeWrapManifest, + validateWrapManifest, +} from "@polywrap/wrap-manifest-types-js"; import { PolywrapManifest } from "@polywrap/polywrap-manifest-types-js"; import { WrapAbi } from "@polywrap/schema-parse"; @@ -98,9 +101,11 @@ export class SchemaComposer { ); if (!fs.existsSync(abiPath)) { - throw Error(intlMsg.lib_schemaComposer_abi_not_found({ - path: abiPath - })); + throw Error( + intlMsg.lib_schemaComposer_abi_not_found({ + path: abiPath, + }) + ); } if (abiPath.endsWith(".info")) { @@ -108,14 +113,16 @@ export class SchemaComposer { } else if (abiPath.endsWith(".graphql")) { return await this._loadGraphqlAbi(abiPath, import_abis); } else if (abiPath.endsWith(".json")) { - return await this._loadJsonAbi(abiPath) + return await this._loadJsonAbi(abiPath); } else if (abiPath.endsWith(".yaml")) { return await this._loadYamlAbi(abiPath); } else { - throw Error(intlMsg.lib_schemaComposer_unknown_abi({ - path: abiPath, - types: ["*.info", "*.graphql", "*.json", "*.yaml"].toString() - })); + throw Error( + intlMsg.lib_schemaComposer_unknown_abi({ + path: abiPath, + types: ["*.info", "*.graphql", "*.json", "*.yaml"].toString(), + }) + ); } } } @@ -141,10 +148,8 @@ export class SchemaComposer { absolutePath: path, }, resolvers: { - external: (uri: string) => - this._fetchExternalAbi(uri, import_abis), - local: (path: string) => - Promise.resolve(this._fetchLocalSchema(path)), + external: (uri: string) => this._fetchExternalAbi(uri, import_abis), + local: (path: string) => Promise.resolve(this._fetchLocalSchema(path)), }, }); } @@ -164,7 +169,7 @@ export class SchemaComposer { version: "0.1", type: "interface", name: "temp", - abi: result + abi: result, }); // Return ABI @@ -177,9 +182,11 @@ export class SchemaComposer { const result = YAML.safeLoad(yaml); if (!result) { - throw Error(intlMsg.lib_schemaComposer_invalid_yaml({ - path: path - })); + throw Error( + intlMsg.lib_schemaComposer_invalid_yaml({ + path: path, + }) + ); } // Validate the ABI's structure @@ -187,7 +194,7 @@ export class SchemaComposer { version: "0.1", type: "interface", name: "temp", - abi: result as WrapAbi + abi: result as WrapAbi, }); // Return ABI From 08373c105984fd671e00990ecd87fe14c4b34706 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 05:42:45 -0700 Subject: [PATCH 53/56] improve wrap.info back-compat --- .../wrap/scripts/templates/deserialize-ts.mustache | 2 +- .../wrap/src/formats/wrap.info/deserialize.ts | 2 +- packages/js/msgpack/src/index.ts | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/js/manifests/wrap/scripts/templates/deserialize-ts.mustache b/packages/js/manifests/wrap/scripts/templates/deserialize-ts.mustache index 878d407f28..003f6b51b6 100644 --- a/packages/js/manifests/wrap/scripts/templates/deserialize-ts.mustache +++ b/packages/js/manifests/wrap/scripts/templates/deserialize-ts.mustache @@ -23,7 +23,7 @@ export async function deserializeWrapManifest( ): Promise { let anyWrapManifest: AnyWrapManifest | undefined; try { - anyWrapManifest = msgpackDecode(manifest) as AnyWrapManifest; + anyWrapManifest = msgpackDecode(manifest, true) as AnyWrapManifest; } catch (e) { throw Error(`Unable to parse WrapManifest: ${`[${new Uint8Array(manifest).toString()}]`}`); } diff --git a/packages/js/manifests/wrap/src/formats/wrap.info/deserialize.ts b/packages/js/manifests/wrap/src/formats/wrap.info/deserialize.ts index 878d407f28..003f6b51b6 100644 --- a/packages/js/manifests/wrap/src/formats/wrap.info/deserialize.ts +++ b/packages/js/manifests/wrap/src/formats/wrap.info/deserialize.ts @@ -23,7 +23,7 @@ export async function deserializeWrapManifest( ): Promise { let anyWrapManifest: AnyWrapManifest | undefined; try { - anyWrapManifest = msgpackDecode(manifest) as AnyWrapManifest; + anyWrapManifest = msgpackDecode(manifest, true) as AnyWrapManifest; } catch (e) { throw Error(`Unable to parse WrapManifest: ${`[${new Uint8Array(manifest).toString()}]`}`); } diff --git a/packages/js/msgpack/src/index.ts b/packages/js/msgpack/src/index.ts index 50d83089bc..97ee43341f 100644 --- a/packages/js/msgpack/src/index.ts +++ b/packages/js/msgpack/src/index.ts @@ -82,8 +82,15 @@ export function msgpackEncode( } export function msgpackDecode( - buffer: ArrayLike | BufferSource + buffer: ArrayLike | BufferSource, + sanitizeResult = false ): unknown { const decoder = new Decoder(extensionCodec); - return decoder.decode(buffer); + const result = decoder.decode(buffer); + + if (sanitizeResult && typeof result === "object" && !shouldIgnore(result)) { + return sanitize(result as Record); + } else { + return result; + } } From 21aedc87c35780f0e66bb160c02e2574dee88038 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 05:57:56 -0700 Subject: [PATCH 54/56] fix codegen --- .../src/bindings/typescript/plugin/index.ts | 4 +- .../plugin/templates/wrap.info-ts.mustache | 6 +- .../templates/plugin/typescript/src/index.ts | 2 +- .../bind/sanity/output/plugin-ts/wrap.info.ts | 2 +- .../expected/build-artifacts/wrap.info | Bin 34295 -> 22450 bytes .../001-sanity/expected/wrap/wrap.info.ts | 4552 ++++++++-------- .../expected/build-artifacts/wrap.info | Bin 33946 -> 22201 bytes .../expected/wrap/wrap.info.ts | 4488 ++++++++-------- .../expected/build-artifacts/wrap.info | Bin 770 -> 448 bytes .../003-env/expected/wrap/wrap.info.ts | 54 +- .../expected/build-artifacts/wrap.info | Bin 778 -> 456 bytes .../expected/wrap/wrap.info.ts | 54 +- .../expected/build-artifacts/wrap.info | Bin 34295 -> 22450 bytes .../expected/wrap/wrap.info.ts | 4552 ++++++++-------- .../expected/build-artifacts/wrap.info | Bin 34295 -> 22450 bytes .../expected/wrap/wrap.info.ts | 4554 ++++++++--------- 16 files changed, 9134 insertions(+), 9134 deletions(-) diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index 25935154cc..7e1f3c58ee 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -50,7 +50,7 @@ export const generateBinding: GenerateBindingFn = ( outputDirAbs: options.outputDirAbs, }; const output = result.output; - const wrapManifest = { + const manifest = { name: options.projectName, type: "plugin", version: latestWrapManifestVersion, @@ -63,7 +63,7 @@ export const generateBinding: GenerateBindingFn = ( output.entries = renderTemplates( templatePath(""), - { ...abi, wrapManifest }, + { ...abi, manifest }, {} ); diff --git a/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache b/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache index b816a9bb04..32296868a0 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache +++ b/packages/schema/bind/src/bindings/typescript/plugin/templates/wrap.info-ts.mustache @@ -2,11 +2,11 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -{{#wrapManifest}} -export const wrapManifest: WrapManifest = { +{{#manifest}} +export const manifest: WrapManifest = { name: "{{name}}", type: "{{type}}", version: "{{version}}", abi: {{abi}} } -{{/wrapManifest}} +{{/manifest}} diff --git a/packages/templates/plugin/typescript/src/index.ts b/packages/templates/plugin/typescript/src/index.ts index 4601141f95..57ae5b5643 100644 --- a/packages/templates/plugin/typescript/src/index.ts +++ b/packages/templates/plugin/typescript/src/index.ts @@ -20,7 +20,7 @@ export const samplePlugin: PluginFactory = ( ) => { return { factory: () => new SamplePlugin(config), - manifest, + manifest: manifest }; }; diff --git a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts index 70ff3babb6..fbe9e614f8 100644 --- a/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts +++ b/packages/test-cases/cases/bind/sanity/output/plugin-ts/wrap.info.ts @@ -2,7 +2,7 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest: WrapManifest = { +export const manifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/build-artifacts/wrap.info index cddc4cc209ed9722486e1cd29131565fbbe1786a..d79a2831a29d5aac720faea92b7c534af49b7e69 100644 GIT binary patch literal 22450 zcmeHPOLH8z5vHp62a;TKaOnpqu~W%8B8yH`mME1)#|Kr)HJk;P6YkEeXRxH0Q&N_d zv*hI9I7 z(a&$ZJx-%O8?Ui~kNNI^O$NPTH%Uj)dh(dUjk!tnTmTPX+b&xZRs`*@h-tn(j0U!N3l)Qj>*YPiB%z(r(r@L(y+dMrwR z4+MKro=3YD^g4chOc21fqOAyw>5&ewQ#DP6gyk;6KYu(Nry87>*rhUdYvrh384dMX*_ioB2Ipf1TMZ=mX6P7+uK`ixOpP=od>b)@V9O4cy z-da#=f>pqpeqFIWi1O~RFJw_XRqMFV^CazpIgARPS5P3;_JS*r0OXET7I+aYZ$em3 zvH=(WYw$wb(<86}MFG}lh;3~rGsQ-DD|rZrwGMO96)d#$c0zligeC*bFWy0+35f>h z9|-_*M=A@v_!W8>>!22;*A;(%3>1|eR(>@a=E-xG7C#gE1y8&&$a=dwc{I2oz8pw< zDh5%^_E*&SVJZxMn@PTh6&ujVi$xkepStQBr&))2l!xCP)wvA5PSLMc#j@_^%bQV> z-s*T5`f<(#C>C!}nME!~Bsh5l^O@S$Qqt9lWxpF0x08OtJ$tFfVEu{;Y}?Q1UY^80 zDN9B;)`HRAcGMgCxTpb#1rLIQi9a6_Zynt&%``wA*K>#>aDcH9$F;kTn?Hl+M@In zXyZJ~d`S$yJLa#{N6ddJlGFzU>sV8ni_{=o8&X>YS`frF4|-X*Sn6e2-@=;AD_9FT z6ZWS>&cBU{&EO<9xOu9R2f70LNE}G;{5Y07vge`4M*skCi@YK-&IC3?sW9UpgkC5P z1u`JhgJf$;SLH|Ry)52Z9ro8*IIU9P1yv7IG-~Cbgf;79LR{>h!kageybnh~Mfj3X5 zt0O3^4%T=77^OTJHuz@=1OA$YwKgq2q9uS^Fmnrlz*YNoqH--^Iw?fAVOW65G&6M~ zRU;7e6oopGI&L*fiX4e>fNp6VzdnBx9nHy3L3KLlkZMs}+M2*1r#b6q+fBJhfq=Ir zx0a=ikz|W$)FSa~5Uv}kn^{8%YQeN=V&esiRFaJ?v|8`}1Dq0*&4g!zBzB@3O*aYx z%Pom3-bNs#SXFLSNQ{8+Pnu*}&?u`XlD1Q=HH#@38{9(jBpB?AeB4}Ol_+HHk2F|K z2Re?kgp6~if9VMzs{3t}!txLklwV8BqD-}s2l;AHvp&pnMfR^oLMsk)+6lD)PIN}$ zytRNjahkldXkw}w#VzG8x8rPuUO_)dJlgTB6+YK(n8@y#?~Y4+Y(wfhj673Ui)sq0 zF(R91+nyzhkB(Sf4FSeOjo)h+oL4;!y#K^X^Du(T(A$Z)$_LBA8uL>~Zgfzxb$J*a z4FV^+mW0mTtDH*Scgla$s`KJ3FnQS%%#ye!>V6p3Xq@vrcOSY~A{z!V8uhmZQIoO= zyvKl}f@gWuW$&@w;8}p;V2-8(fkV*tRM3{Nycxy&^)+Dw#go6xq!r|JloaA3kL4TU zp7h_a*Gl!|F8{@~1$~+Sa^a_VFMTGSkMzVfD)fSXm$04M>uCpRDNDy{%%~1Jq-Gqu zBkp@MyiE1p@c-4#o7#qgOVOav3S8C`eCH74tS}+Q7^q6q!}3_%psN^31Irjb%g9i| z4Tq`5+Ztvg1+K0ta>;$Vtn?2>TTwlKQIQo-EvkGbqjJ?=HY%o}v3*I64KGyr0UB;KhlRa_sY}h_M5fe<%ga{6;2cY<(X}*tubh5)l?%GK1Z$=>tIWciT^RTd2w(*+U#+fMI?M|jyx~TZ>@S#xttACZrUN)SUpKl>h)wl zVDTRb@#~jpwF0N0pol4OcA?JO-MHO1VPQz5zVfet8S{i8-TtSc9<+Z zxWAx%b(;KW>i!<6?9LhOQp~gTKEW8467X|Uex=U&@g|G6e8rf42?-v3OktKpb+X5M zD+397(2OjyMO0GLrIr4LC21GxhN;EST!#jQOaVo($FmPvQX6=2I5-zVaHd)6D$ia= z;!ZC(w*<7>;|kw2_edlvHXw$B^B^QN6OOgjCn>Q;J1hy#Ede3vq8`tpohacXof_LU zGYtM9N&1vS<*bBet`OSIW8`N~ZGVOBxuc!%hmF5`P?(T<)KwUHEMmTnarRBSt0oku z@js+-r>x8D~F&aQSK*U z^S+Cdmz}Hl>wCkRo#)VC!vyW^|mAh{J_bBFlAUlXk2$&}^ z(-Li{Eg=1i3MqxQl*X;0JweD-oNoSwh`}hE0?52oVZ1!S#Tgb`U0;*e;4+ze2yNXM zZwteCDI4!p7qa8|M&GOFEwB0Wmgn?|7ux>KwDX}TMGP0HD`)G;gO1ROO!|Xw-Ya*2 zzXFD@o2za@8TpOSUX8bXR?$c?x4IZ7@^=-!r~brg!O~9Mna&%WM@B8G66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME diff --git a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts index c886edc957..80f300e7ad 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/001-sanity/expected/wrap/wrap.info.ts @@ -2,2688 +2,2688 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest: WrapManifest = { +export const manifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", abi: { - "version": "0.1", - "objectTypes": [ - { - "type": "Object", - "kind": 1, - "properties": [ - { - "type": "UInt", - "name": "u", + "envType": { + "kind": 65536, + "properties": [ + { + "kind": 34, + "name": "arg1", + "required": true, + "scalar": { + "kind": 4, + "name": "arg1", "required": true, - "kind": 34, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - } + "type": "String" }, + "type": "String" + } + ], + "type": "Env" + }, + "importedModuleTypes": [ + { + "isInterface": false, + "kind": 256, + "methods": [ { - "type": "[Boolean]", - "name": "array", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "callContractView", "required": true, - "kind": 34, - "array": { - "type": "[Boolean]", - "name": "array", + "return": { + "kind": 34, + "name": "callContractView", "required": true, - "kind": 18, "scalar": { - "type": "Boolean", - "name": "array", + "kind": 4, + "name": "callContractView", "required": true, - "kind": 4 + "type": "String" }, - "item": { - "type": "Boolean", - "name": "array", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "Method" }, { - "type": "Bytes", - "name": "bytes", - "kind": 34, - "scalar": { - "type": "Bytes", - "name": "bytes", - "kind": 4 - } - } - ] - } - ], - "importedObjectTypes": [ - { - "type": "Ethereum_Connection", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "node", - "kind": 34, - "scalar": { - "type": "String", - "name": "node", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractStatic", + "required": true, + "return": { + "kind": 34, + "name": "callContractStatic", + "object": { + "kind": 8192, + "name": "callContractStatic", + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "type": "Method" }, { - "type": "String", - "name": "networkNameOrChainId", - "kind": 34, - "scalar": { - "type": "String", - "name": "networkNameOrChainId", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Connection" - }, - { - "type": "Ethereum_TxOverrides", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getBalance", + "required": true, + "return": { + "kind": 34, + "name": "getBalance", + "required": true, + "scalar": { + "kind": 4, + "name": "getBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeParams", + "required": true, + "return": { + "kind": 34, + "name": "encodeParams", + "required": true, + "scalar": { + "kind": 4, + "name": "encodeParams", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "result", + "arguments": [ + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeFunction", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "result", + "return": { + "kind": 34, + "name": "encodeFunction", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "encodeFunction", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "error", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityPack", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "error", + "return": { + "kind": 34, + "name": "solidityPack", "required": true, - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "StaticTxResult" - }, - { - "type": "Ethereum_TxRequest", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", - "kind": 34, - "scalar": { - "type": "String", - "name": "to", - "kind": 4 - } - }, - { - "type": "String", - "name": "from", - "kind": 34, - "scalar": { - "type": "String", - "name": "from", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "nonce", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "nonce", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } - }, - { - "type": "String", - "name": "data", - "kind": 34, - "scalar": { - "type": "String", - "name": "data", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "chainId", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityPack", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxRequest" - }, - { - "type": "Ethereum_TxReceipt", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityKeccak256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "to", + "return": { + "kind": 34, + "name": "solidityKeccak256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityKeccak256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "from", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "soliditySha256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "from", + "return": { + "kind": 34, + "name": "soliditySha256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "soliditySha256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "contractAddress", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "contractAddress", + "return": { + "kind": 34, + "name": "getSignerAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerAddress", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerBalance", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "getSignerBalance", "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "root", - "kind": 34, - "scalar": { - "type": "String", - "name": "root", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasUsed", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerTransactionCount", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasUsed", + "return": { + "kind": 34, + "name": "getSignerTransactionCount", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerTransactionCount", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "logsBloom", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "logsBloom", + "return": { + "kind": 34, + "name": "getGasPrice", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getGasPrice", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "transactionHash", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "estimateTransactionGas", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "transactionHash", + "return": { + "kind": 34, + "name": "estimateTransactionGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateTransactionGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 34, - "array": { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 18, - "object": { - "type": "Ethereum_Log", - "name": "logs", + "arguments": [ + { + "kind": 34, + "name": "address", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" }, - "item": { - "type": "Ethereum_Log", - "name": "logs", + { + "kind": 34, + "name": "method", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" } - } - }, - { - "type": "BigInt", - "name": "blockNumber", + ], + "kind": 64, + "name": "estimateContractCallGas", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "kind": 34, + "name": "estimateContractCallGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateContractCallGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "checkAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "checkAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "checkAddress", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "confirmations", + "arguments": [ + { + "kind": 34, + "name": "eth", + "required": true, + "scalar": { + "kind": 4, + "name": "eth", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "toWei", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", + "return": { + "kind": 34, + "name": "toWei", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toWei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "cumulativeGasUsed", + "arguments": [ + { + "kind": 34, + "name": "wei", + "required": true, + "scalar": { + "kind": 4, + "name": "wei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + } + ], + "kind": 64, + "name": "toEth", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "cumulativeGasUsed", + "return": { + "kind": 34, + "name": "toEth", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toEth", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "effectiveGasPrice", + "arguments": [ + { + "kind": 34, + "name": "txHash", + "required": true, + "scalar": { + "kind": 4, + "name": "txHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "confirmations", + "required": true, + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "timeout", + "required": true, + "scalar": { + "kind": 4, + "name": "timeout", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "awaitTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "effectiveGasPrice", + "return": { + "kind": 34, + "name": "awaitTransaction", + "object": { + "kind": 8192, + "name": "awaitTransaction", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "byzantium", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "event", + "required": true, + "scalar": { + "kind": 4, + "name": "event", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "timeout", + "scalar": { + "kind": 4, + "name": "timeout", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "waitForEvent", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "byzantium", + "return": { + "kind": 34, + "name": "waitForEvent", + "object": { + "kind": 8192, + "name": "waitForEvent", + "required": true, + "type": "Ethereum_EventNotification" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_EventNotification" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getNetwork", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", + "return": { + "kind": 34, + "name": "getNetwork", + "object": { + "kind": 8192, + "name": "getNetwork", + "required": true, + "type": "Ethereum_Network" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_Network" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "status", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "status", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxReceipt" - }, - { - "type": "Ethereum_Log", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "blockNumber", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "requestAccounts", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "array": { + "item": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "requestAccounts", + "required": true, + "scalar": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "requestAccounts", "required": true, - "kind": 4 - } + "type": "[String]" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethod", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "callContractMethod", + "object": { + "kind": 8192, + "name": "callContractMethod", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethodAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "callContractMethodAndWait", + "object": { + "kind": 8192, + "name": "callContractMethodAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "removed", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "removed", + "return": { + "kind": 34, + "name": "sendTransaction", + "object": { + "kind": 8192, + "name": "sendTransaction", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "String", - "name": "address", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransactionAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", + "return": { + "kind": 34, + "name": "sendTransactionAndWait", + "object": { + "kind": 8192, + "name": "sendTransactionAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "String", - "name": "data", + "arguments": [ + { + "kind": 34, + "name": "abi", + "required": true, + "scalar": { + "kind": 4, + "name": "abi", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "bytecode", + "required": true, + "scalar": { + "kind": 4, + "name": "bytecode", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "deployContract", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "data", + "return": { + "kind": 34, + "name": "deployContract", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "deployContract", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "[String]", - "name": "topics", + "arguments": [ + { + "kind": 34, + "name": "message", + "required": true, + "scalar": { + "kind": 4, + "name": "message", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "signMessage", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "topics", + "return": { + "kind": 34, + "name": "signMessage", "required": true, - "kind": 18, "scalar": { - "type": "String", - "name": "topics", + "kind": 4, + "name": "signMessage", "required": true, - "kind": 4 + "type": "String" }, - "item": { - "type": "String", - "name": "topics", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "transactionHash", + "arguments": [ + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "params", + "required": true, + "scalar": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "params", + "required": true, + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendRPC", "required": true, + "return": { + "kind": 34, + "name": "sendRPC", + "scalar": { + "kind": 4, + "name": "sendRPC", + "type": "String" + }, + "type": "String" + }, + "type": "Method" + } + ], + "namespace": "Ethereum", + "nativeType": "Module", + "type": "Ethereum_Module", + "uri": "ens/ethereum.polywrap.eth" + } + ], + "importedObjectTypes": [ + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Connection", + "properties": [ + { "kind": 34, + "name": "node", "scalar": { - "type": "String", - "name": "transactionHash", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "node", + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "logIndex", - "required": true, "kind": 34, + "name": "networkNameOrChainId", "scalar": { - "type": "UInt32", - "name": "logIndex", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "networkNameOrChainId", + "type": "String" + }, + "type": "String" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Log" + "type": "Ethereum_Connection", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_EventNotification", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxOverrides", "properties": [ { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "String", - "name": "data", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasLimit", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "address", - "required": true, "kind": 34, + "name": "gasPrice", "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Ethereum_Log", - "name": "log", - "required": true, "kind": 34, - "object": { - "type": "Ethereum_Log", - "name": "log", - "required": true, - "kind": 8192 - } + "name": "value", + "scalar": { + "kind": 4, + "name": "value", + "type": "BigInt" + }, + "type": "BigInt" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "EventNotification" + "type": "Ethereum_TxOverrides", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_Network", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "StaticTxResult", "properties": [ { - "type": "String", - "name": "name", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "name", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", + "name": "result", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "chainId", + "kind": 4, + "name": "result", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "ensAddress", "kind": 34, + "name": "error", + "required": true, "scalar": { - "type": "String", - "name": "ensAddress", - "kind": 4 - } + "kind": 4, + "name": "error", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Network" + "type": "Ethereum_StaticTxResult", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_TxResponse", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxRequest", "properties": [ { - "type": "String", - "name": "hash", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "hash", - "required": true, - "kind": 4 - } - }, - { - "type": "String", "name": "to", - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "to", - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "from", - "required": true, "kind": 34, + "name": "from", "scalar": { - "type": "String", + "kind": 4, "name": "from", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "nonce", - "required": true, "kind": 34, + "name": "nonce", "scalar": { - "type": "UInt32", + "kind": 4, "name": "nonce", - "required": true, - "kind": 4 - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "BigInt", - "name": "gasLimit", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasLimit", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "gasPrice", "kind": 34, + "name": "gasPrice", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasPrice", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "data", "scalar": { - "type": "String", + "kind": 4, "name": "data", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "BigInt", - "name": "value", - "required": true, "kind": 34, + "name": "value", "scalar": { - "type": "BigInt", + "kind": 4, "name": "value", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "chainId", - "required": true, "kind": 34, + "name": "chainId", "scalar": { - "type": "BigInt", + "kind": 4, "name": "chainId", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockNumber", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "blockHash", "kind": 34, + "name": "type", "scalar": { - "type": "String", - "name": "blockHash", - "kind": 4 - } - }, + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxRequest", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxReceipt", + "properties": [ { - "type": "UInt32", - "name": "timestamp", "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timestamp", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", + "name": "to", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", - "name": "confirmations", + "kind": 4, + "name": "to", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "raw", "kind": 34, + "name": "from", + "required": true, "scalar": { - "type": "String", - "name": "raw", - "kind": 4 - } + "kind": 4, + "name": "from", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "r", "kind": 34, + "name": "contractAddress", + "required": true, "scalar": { - "type": "String", - "name": "r", - "kind": 4 - } + "kind": 4, + "name": "contractAddress", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "s", "kind": 34, + "name": "transactionIndex", + "required": true, "scalar": { - "type": "String", - "name": "s", - "kind": 4 - } + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "UInt32", - "name": "v", "kind": 34, + "name": "root", "scalar": { - "type": "UInt32", - "name": "v", - "kind": 4 - } + "kind": 4, + "name": "root", + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "type", "kind": 34, + "name": "gasUsed", + "required": true, "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } + "kind": 4, + "name": "gasUsed", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "[Ethereum_Access]", - "name": "accessList", "kind": 34, - "array": { - "type": "[Ethereum_Access]", - "name": "accessList", - "kind": 18, - "object": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - }, - "item": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxResponse" - }, - { - "type": "Ethereum_Access", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "address", + "name": "logsBloom", "required": true, - "kind": 34, "scalar": { - "type": "String", - "name": "address", + "kind": 4, + "name": "logsBloom", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "[String]", - "name": "storageKeys", - "required": true, "kind": 34, - "array": { - "type": "[String]", - "name": "storageKeys", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Access" - } - ], - "importedModuleTypes": [ - { - "type": "Ethereum_Module", - "kind": 256, - "methods": [ - { - "type": "Method", - "name": "callContractView", + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "callContractView", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "callContractView", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractStatic", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", + "array": { + "item": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "type": "Ethereum_Log" }, - { - "type": "String", - "name": "method", + "kind": 18, + "name": "logs", + "object": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } + "type": "Ethereum_Log" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", - "required": true, - "kind": 8192 - } - } + "type": "[Ethereum_Log]" + }, + "kind": 34, + "name": "logs", + "required": true, + "type": "[Ethereum_Log]" }, { - "type": "Method", - "name": "getBalance", + "kind": 34, + "name": "blockNumber", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getBalance", + "scalar": { + "kind": 4, + "name": "blockNumber", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getBalance", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "encodeParams", + "kind": 34, + "name": "blockHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeParams", + "scalar": { + "kind": 4, + "name": "blockHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeParams", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "encodeFunction", + "kind": 34, + "name": "confirmations", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeFunction", + "scalar": { + "kind": 4, + "name": "confirmations", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeFunction", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "solidityPack", + "kind": 34, + "name": "cumulativeGasUsed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityPack", + "scalar": { + "kind": 4, + "name": "cumulativeGasUsed", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityPack", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "solidityKeccak256", + "kind": 34, + "name": "effectiveGasPrice", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityKeccak256", + "scalar": { + "kind": 4, + "name": "effectiveGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityKeccak256", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "soliditySha256", + "kind": 34, + "name": "byzantium", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "soliditySha256", + "scalar": { + "kind": 4, + "name": "byzantium", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "soliditySha256", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerAddress", + "kind": 34, + "name": "type", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "getSignerAddress", + "scalar": { + "kind": 4, + "name": "type", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "getSignerAddress", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "status", + "scalar": { + "kind": 4, + "name": "status", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxReceipt", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Log", + "properties": [ + { + "kind": 34, + "name": "blockNumber", + "required": true, + "scalar": { + "kind": 4, + "name": "blockNumber", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "required": true, + "scalar": { + "kind": 4, + "name": "blockHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "transactionIndex", + "required": true, + "scalar": { + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "getSignerBalance", + "kind": 34, + "name": "removed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerBalance", + "scalar": { + "kind": 4, + "name": "removed", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerBalance", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerTransactionCount", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerTransactionCount", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerTransactionCount", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "getGasPrice", + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getGasPrice", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getGasPrice", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "estimateTransactionGas", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", + "array": { + "item": { + "kind": 4, + "name": "topics", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 18, + "name": "topics", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 4, + "name": "topics", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "topics", + "required": true, + "type": "[String]" }, { - "type": "Method", - "name": "estimateContractCallGas", + "kind": 34, + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateContractCallGas", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "estimateContractCallGas", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "checkAddress", + "kind": 34, + "name": "logIndex", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "Boolean", - "name": "checkAddress", + "scalar": { + "kind": 4, + "name": "logIndex", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "checkAddress", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_Log", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "EventNotification", + "properties": [ + { + "kind": 34, + "name": "data", + "required": true, + "scalar": { + "kind": 4, + "name": "data", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "toWei", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "eth", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "eth", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "BigInt", - "name": "toWei", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "toWei", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "toEth", + "kind": 34, + "name": "log", + "object": { + "kind": 8192, + "name": "log", + "required": true, + "type": "Ethereum_Log" + }, + "required": true, + "type": "Ethereum_Log" + } + ], + "type": "Ethereum_EventNotification", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Network", + "properties": [ + { + "kind": 34, + "name": "name", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "String", - "name": "toEth", + "scalar": { + "kind": 4, + "name": "name", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "toEth", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "awaitTransaction", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "txHash", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "txHash", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", + "scalar": { + "kind": 4, + "name": "chainId", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "waitForEvent", + "kind": 34, + "name": "ensAddress", + "scalar": { + "kind": 4, + "name": "ensAddress", + "type": "String" + }, + "type": "String" + } + ], + "type": "Ethereum_Network", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxResponse", + "properties": [ + { + "kind": 34, + "name": "hash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "event", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "event", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "UInt32", - "name": "timeout", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", + "scalar": { + "kind": 4, + "name": "hash", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "getNetwork", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_Network", - "name": "getNetwork", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_Network", - "name": "getNetwork", - "required": true, - "kind": 8192 - } - } + "kind": 34, + "name": "to", + "scalar": { + "kind": 4, + "name": "to", + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "requestAccounts", + "kind": 34, + "name": "from", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "[String]", - "name": "requestAccounts", + "scalar": { + "kind": 4, + "name": "from", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "requestAccounts", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - } - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractMethod", + "kind": 34, + "name": "nonce", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", + "scalar": { + "kind": 4, + "name": "nonce", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "gasLimit", + "required": true, + "scalar": { + "kind": 4, + "name": "gasLimit", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "callContractMethodAndWait", + "kind": 34, + "name": "gasPrice", + "scalar": { + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendTransaction", + "kind": 34, + "name": "value", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", + "scalar": { + "kind": 4, + "name": "value", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "sendTransactionAndWait", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", + "scalar": { + "kind": 4, + "name": "chainId", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "deployContract", + "kind": 34, + "name": "blockNumber", + "scalar": { + "kind": 4, + "name": "blockNumber", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "scalar": { + "kind": 4, + "name": "blockHash", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "timestamp", + "scalar": { + "kind": 4, + "name": "timestamp", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "confirmations", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "abi", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "abi", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "bytecode", + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "raw", + "scalar": { + "kind": 4, + "name": "raw", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "r", + "scalar": { + "kind": 4, + "name": "r", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "s", + "scalar": { + "kind": 4, + "name": "s", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "v", + "scalar": { + "kind": 4, + "name": "v", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "type", + "scalar": { + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "bytecode", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } + "type": "Ethereum_Access" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "deployContract", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "deployContract", + "kind": 18, + "name": "accessList", + "object": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 4 - } - } - }, + "type": "Ethereum_Access" + }, + "type": "[Ethereum_Access]" + }, + "kind": 34, + "name": "accessList", + "type": "[Ethereum_Access]" + } + ], + "type": "Ethereum_TxResponse", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Access", + "properties": [ { - "type": "Method", - "name": "signMessage", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "signMessage", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "signMessage", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendRPC", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", + "array": { + "item": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } + "type": "String" }, - { - "type": "[String]", - "name": "params", + "kind": 18, + "name": "storageKeys", + "required": true, + "scalar": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "params", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - } - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "sendRPC", - "kind": 34, - "scalar": { - "type": "String", - "name": "sendRPC", - "kind": 4 - } - } + "type": "[String]" + }, + "kind": 34, + "name": "storageKeys", + "required": true, + "type": "[String]" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Module", - "isInterface": false + "type": "Ethereum_Access", + "uri": "ens/ethereum.polywrap.eth" } ], "moduleType": { - "type": "Module", + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], "kind": 128, "methods": [ { - "type": "Method", - "name": "methodOne", - "required": true, - "kind": 64, "arguments": [ { - "type": "String", + "kind": 34, "name": "str", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "str", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "optStr", "kind": 34, + "name": "optStr", "scalar": { - "type": "String", + "kind": 4, "name": "optStr", - "kind": 4 - } + "type": "String" + }, + "type": "String" } ], + "kind": 64, + "name": "methodOne", + "required": true, "return": { - "type": "Object", - "name": "methodOne", - "required": true, "kind": 34, + "name": "methodOne", "object": { - "type": "Object", + "kind": 8192, "name": "methodOne", "required": true, - "kind": 8192 - } - } + "type": "Object" + }, + "required": true, + "type": "Object" + }, + "type": "Method" }, { - "type": "Method", - "name": "methodTwo", - "required": true, - "kind": 64, "arguments": [ { - "type": "UInt32", + "kind": 34, "name": "arg", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", + "kind": 4, "name": "arg", "required": true, - "kind": 4 - } + "type": "UInt32" + }, + "type": "UInt32" } ], + "kind": 64, + "name": "methodTwo", + "required": true, "return": { - "type": "String", + "kind": 34, "name": "methodTwo", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "methodTwo", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" + }, + "type": "Method" } ], - "imports": [ - { - "type": "Ethereum_Module" - }, - { - "type": "Ethereum_Connection" - }, - { - "type": "Ethereum_TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult" - }, - { - "type": "Ethereum_TxRequest" - }, - { - "type": "Ethereum_TxReceipt" - }, - { - "type": "Ethereum_Log" - }, - { - "type": "Ethereum_EventNotification" - }, - { - "type": "Ethereum_Network" - }, - { - "type": "Ethereum_TxResponse" - }, - { - "type": "Ethereum_Access" - } - ] + "type": "Module" }, - "envType": { - "type": "Env", - "kind": 65536, - "properties": [ - { - "type": "String", - "name": "arg1", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "arg1", + "objectTypes": [ + { + "kind": 1, + "properties": [ + { + "kind": 34, + "name": "u", + "required": true, + "scalar": { + "kind": 4, + "name": "u", + "required": true, + "type": "UInt" + }, + "type": "UInt" + }, + { + "array": { + "item": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "kind": 18, + "name": "array", + "required": true, + "scalar": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "type": "[Boolean]" + }, + "kind": 34, + "name": "array", "required": true, - "kind": 4 + "type": "[Boolean]" + }, + { + "kind": 34, + "name": "bytes", + "scalar": { + "kind": 4, + "name": "bytes", + "type": "Bytes" + }, + "type": "Bytes" } - } - ] - } + ], + "type": "Object" + } + ], + "version": "0.1" } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/002-single-module/expected/build-artifacts/wrap.info index 37e888ed3e159eeaf2f726cfda353b2729e55246..26683c026cf6c94c7e581bc3ab7fb2063e776bd9 100644 GIT binary patch literal 22201 zcmeHPOLH8z5vHp62a;TKaOnpqu~W%8B8yH`)~hT!KB!Wz;VihEaCc@sgC)hBlCrFv zX(tCKCwZ5a+1GEBKi24A^AQ8+Ma)6s;xCDC{U(`yGqU^iY3Ih_ zAkPLY=Lsu5{}h_XAKXbfXn#K3&)LVrBxjv}0s7{oh@)PVKUK{Y-U2S7s)NT%S=M7w z`dbj#i}F0$v7k5c>obA?wUuloV04difSsytDkKbd5&rqZal%<2hulKuDQMhV+TpCg zF|EOWN^9x)e?l9i^%Y!V77zPbXV_!X;!meZe~{(8_}d>r>*)&LU^yH1Ke`7P{Q7nI zbva8@;Vj`{Z26{aS$*uh^&}RZ>EWG~fcuPZXZa?|Rr7&C4YIUg*iy~^b{w;! z0HaLM7T~LY|6$r^d?V`=yGV!${_iAbe3+-ms)^#STmY)wa{SE+vL2o8Vqn3LRq*ny z1vM1t9ES4CO6Nh8cZYppg5onZf=4`0(k`%IRPellf~ckmb}s>_9i=SrA`)&wR8F!1 z7yoPMLdxkDn1GT1(tV9YV;!88Bwz8@XV7isj*4ERVV=BTY4H;=Um)bILDt*Z&ZEIC z@#R2TwirY)+h0-bhpF)U7L$4pD>X2}my0xreCAGPoMs*7nGAk+rs692CPjMP7sGmx zFKsj z!#s(7R+fset%ah!t*AHjX;BT13bbWiFq*}jCuUspSk$u^MVyd9&{|^VdQ_OulEhW6 zcNGlwBKl_Gg}w(6(5pqQfh?lAJkfa;OC6Lk-eaUM+~xEo&pd>aU!A4m3Xj+GtnU%W z?{x}fO7XLI(2!}CdWpJ+4WL5d19X24)(wf+<4(jQpH<*{omEIExbVVrgTOSd4UA}%JV4Zw>upXsR~QN)Nh07>a+xPSHz8HqMx)7U5RY%PTFBlED^IW z2TdJqNqQ2Nah_$qO$@&~^jGd9^q-1N>VtxHtgg&KY7mYMr7Zz%2(mN}dRezv>SbBq z!kWq}SPMH7^{2$nzmAHHU?(=XxvP`MIs^Miime}9LYFB>`y+Zj{Ednq`X|iEx0+(l~y7@g^=bXLky^(?N$^i{{d70zyu6 z*3Y(@_96uW-CEolmL?rEsO&2!s@?(ya=K5fJ`KH<=bPiuJ_O_Eu~4Vp_%qx3D}32K!<^ zZcedE6e{;e8VnMF!rLq%9Zc>;(k0voBYJj4X;*OFOOsU~?)uLd>y!-%V}j7P#N zj&fQSv;eh95BkKZbTj5nHcc|e40?i%I-g%{6= zWZ@;~t+oeJ61uSF64dIJWh}Vf<_NjU;-v-EOu+r9M75xorTl*=c6uy&X>pB=4huQK zdAqe#3+}O~UWpdcG^hq$%$~;iN~Wq>DXv$e85XRXEiKNGjhCFJTxF!uS^I95eZUiO z55c4Uz!OJEBdDUew(>P0x_JN#TG51}E&aQ-yTV6#wCx!ye6E`?vE6guosam~M$~s0 zd9H5QR2S4^#5T{jJVO>A9kaR~0*pr*zt<=@uWA~24TzcMVFY)AcN1}=4a~tD^HbQ| zXrol?>M$xA1WtS{1)VEM*_FKilmDh!=fzcEqF{G0%f>ZP*Q78;Wu|{9%8Ke0h>EOuYEkJkX_ce)s)2a%)&i34 zD@r!JR5j>UcX>jdSjQ}l#fzbbQ6BXR z(_Lg|G*CfX8OV^q+PO@nUgdTHoZXW~3uZ=$fG$eWYS_k}L!fOpon{e?YGv0j>Ippe z2@YF9T8*1x+YY>i3~pm5$clG|Dcot-^1{MZCRU+@?gke2(zu}}k2dZ@h7}ygl}~BV zMaMh)s($L2p0=GQOLY7I_7K@(Hp>_(mUa{pG`h9%;?AtOu_wy8Bs4L)e0 z8kyORrOwTsA3wl3=}YcDQKpqevt1syeVSC&XU<{xJM9-;(_a?#{g7ko1cIKa6Pn#M z*VR;cHvn}ntT0)AaDPbp`V{$*>i!z2tj-zbQru_heS*;}E#TLr)|EQv#~Uo(^d)2Z zB_yoqV+yk@syBPQw=$662d&5wTSO-{U0UtBC45~lwG^7;(4Y_%&;)xt`;aBIfft*D zeIW#UnkBFD%ylFxPQkt(+mtVcrL_Q~CE% zMDj1*X~}|sc@i_3XhUrS>0eYxE3}m~ZVl}YLQBP|=3ht{NZAxX=IsjOO~Qg5)wPC9JR%XV~i+t^g-TPF+Wc!i$l zENn1amHwGDC7hlri2Q4a!9hqssAsp1xG(=2pnRSf)LWuL%CEwCwThO)`TAA5jFy-E zO8ux1H~ja+-^39=GO6Vk1qJO-fgu-QTNAU?%BD;gKk0y>21lVmp%Kh&AI5s;RL0)- zA1*5sWADbq6u@{bsfrT136`U(1Vd4xof$oEoiFL+fy=baouC#m8NmBt+d=x6Ejg?p zF#1xs5-?IQifx;OwUC*c`=>13S`}dw{{-x4CB+~8{b%9E!UFjlu%6olnM%H0S;ZiR M`oj_u5hD420g2#ziU0rr literal 33946 zcmeHQ&2k(`5tbwT0>G66!2=j}2{>aZwBT4aLmYtgfu8tkQrrFgJTNne$cVmswfaRn?!2 z_E?gJan%3*owo*2&}D-SmS%(OpvQ*2PQD#R{a`cv^d#Q=khQW6{&D*JSK`m>S;*4g|EB!<;Qf11R(|aMkYy zy{lo`3OYgZiB0JCP(ZpGuqf|dz09M8rEzDEwFR#AWVQHQ{P^+XQw# z;SOW$FT!pwPO_?c9*4*%r1$R%lyd-Q1PnQ;_k;T|izHm;o{-1p`5 zOHVeQuJe?XgzX6-&HkGtm*H}_Jxwo1+d+Ci?1mZLSOjUJfhK-zD14ZN+zxVz)W=kF zFqpJAoWs4Kllx&oMTtOWMVu2r55b(TD&{=OIKNsOPv2u{-VsxcnLJ4F5BVg*g)3j# zCMX#GxGd2?f;e)L=V1^hWGHr7B9vMA>P&WsaM$ORy9!5rlo!QDkt)od`jeU;Kg;6E zG`3j^dP$Wdnni^$*h=EA7YIz!4MtH-{orjeWk+%3l3r}0Za^BTZjpIm-3f^|Xa`x~ z#}-7=+ev5^r%gtvs5g*N%eAHfRMQB%fdPR~){u1PSR{!sW|e4z`+Hc=tSxzYs$Cg~01ycI`T611|r?KUqG>Lrp3B8w6?aDapt99fid zaD3HsFKV-=6_u^%9JIK>gG;I;j_aDrWwst5l5Q|y(%>tD_fuA{qO8WT3%h{&^h4HPlI%aP9XrxqQnW@+2g8KydQ6i&ds2(8jegfZm2?7^JdyJ z5e=79`0JuGfc*H^-&ry@pg;?UtkJuX1DB2`o1M6|yOwu18GR8!RN&-CSOguHpuFj& z6?X#!a^7EgTHgwjE?+vvk%n1FV{%AU;RX!ko6A<-%{yhsCy-s_<9$Sd^{B zS-2Ip%1V&Xlb$|$0(Qp&h2}9#l4zG3n0D0ZxX+nG$jP=97^23y0GkzWE)|jp7F|>< zS`$xfJ-Jgn1tFM7O>yP#H6-1*1Ii$!u_|R}WCDdNMvbr=7!Xfm{&>0BZnM^^BzYpF zS#f7Hp@v{gy;q@pSlQzXPevfk>!ok0u|C-GZPj3sM6;+cV87SJL#muN1gzUjOuo`{ zJVAIj7+{V(l%K{~!^bA-1_VU1x(~vNg&=(`IC7W3%992hOxg_&NDbJ8OJs}mG|q=D zU|fwyYAzl^McwQHfM`;;!6bHJZ!qXu+=VU%1#X}KW02mX6%s|<4G>5d$63g?SY<)C zS55v_KooIrKsT$G3T)p`f_=J;%z|##0lHq)U3jaTOk(~3>Ls@mfToxm0Km8xdvqt5 z#JmB>?N_T200vCb3C3mpFzarMZ*xsWFJv5)|G6Kgn&+dUAL1;HHAm#d)p@mS5qQc1 z6oVt?BE0RUQxNkSVJE`LEwqy~i<4lR zy~_^jaF(hKtnp@$!U(1=O$`c&g8{UHEjW|nH%O+Th^1i#h7$i<&?FJAgxGa%a!Y*=@47l0q@Q~&QEIhEU)8ayw6k{gh)&vBq z(IXOsS?Uf&y-{CG5d3lZmT0$Oxz4^2Rx>85wUbBs$e(21hs3>vJnj#NZ>0RZ?rWuwe108IG3($;%%U;hq8l4{I(N>iv>KWnztXWJN zh{IPS;!H%uJ9$)|0BFz~tOk)r1-^))4F;Db4nt%}nS=5wMoQOMbYfqp@lTc%X@H1Z z6Pu{US#rW|*(!GleyWDY7Scm_7BrlnIw54n#~7@QRU}b&3d_0T~tNt>V17rZ+g-F6?Bb zx!KVtMT@+ysc)mS5f-znTm|@QwiW_vbe$H#^-i3WcL3-k>!#QAhpf2hqJbYXw0e{S z6?LNTqM}Fl>B8Knq!?+XBkir9c*vAugs_v3<}=0EE^;wNFUEd3&0I&jN2)1yOshsrRz>saF8sz6{kZKea@FYJmhu3NQolC}(b;uvgeo<)+j zC&{9OnAtR&lWfX8cB`m$gS7o$oZ!<3^-ZrH@a>*hbgJb8E=%;FSR}~QTyz8{@3xwo zIbhy9g0-RRBje?vNPCcDF(MZk*HG>;nZ1I?4@FwK8?`^+Yn(-PD&At}v>|+voeXc@ zt9gCHPZH02cG5LN$f0h}QP=(nk4$x*vZzh!YECxP$RO(%Of4SCgZFb<9U*n_>KJZJ zd=}@}8Re_lieIh7Up9zjo$nTWYQ9QyR@=4Y5Uo4HG#A-fbv^wa+&XKsUMD`7ZvD{L zP{@;);`O=>0c?coiV6{QT28?Sj7P;=UyDPvUPyG(PH+~hJG47oXUH2~KS?tN^W}Dj`Nik?`Kb6+Ib{OE2)&7Htr?ED=Ap@ErEAYY`@3utqH|KqC=B~lbpS|19+Ox0wx(?h}QyyJT)F1R}hQ~s)2@pAXSUrt}(zFNKG{i6P8ue>Pl z*|=NXn)mDS-pz?7^s2mn{$hGl-g7ma@#r$A_I{ex7qyB$5G|AuL1H8bqQW_I822*n z#3~KBcpR4{LXl_j_013Y8@@`rpNdBg#$!_J?x)BK~m7ce1gB<=rRz9V6l+!^30o1?ADD__!WVz2+8w zsmCuan}ipkj#yL%kqCwUYP5$2&A*mzEiH|EN!(*e7P1uCt5`f+Q;fJ;yM7YLDCjn+lDy^zg4#!1 z=2x3nwq;46G~uOP*eDX{_vbf)qZS1GVPj^c+_8XB)@S;=Km7E2h*jH!Wk=i@`8ott vGXM7%Qc;Hv$UnfCxdKeOUlc1$Y{<)*I8Gf?6ay&%Lu%99<&L^7F(!Wls!YkQ literal 770 zcma))u};G<5Qc-qlkfnDz5z?essnuiH#veKK8Ld%sT)HDf~kFm1cw$0fsmLju_B&{ z)TW^-8M67#_n-go&hxqeQe0wray+Pz38*HZbfsrG*gP{S$C6F?{j;22LaZlES}j(9 zMug)FM-6n&VhHg&7r7)2$#|!}O^#$@vfs+LZRN0S_WGA9Lc1E!pKiUOa)^cZ=$;6! z4JSxkb;U9Hjt-(|os-OgGzYbO2moiAIHm!MQ95X4pI&zK$cWg?m4fBYs+eVr=Dn1M zHq66Sn^CwAg9J)u#g=wRdoCBXQx}+(@`D%SF?+qz5D=~VqRJR diff --git a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts index cb80f230a2..6518f6e3cc 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/003-env/expected/wrap/wrap.info.ts @@ -2,67 +2,67 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest: WrapManifest = { +export const manifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", abi: { - "version": "0.1", "envType": { - "type": "Env", "kind": 65536, "properties": [ { - "type": "String", + "kind": 34, "name": "arg1", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "arg1", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" } - ] + ], + "type": "Env" }, "moduleType": { - "type": "Module", "kind": 128, "methods": [ { - "type": "Method", - "name": "method", - "required": true, - "kind": 64, "arguments": [ { - "type": "String", + "kind": 34, "name": "str", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "str", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" } ], + "kind": 64, + "name": "method", + "required": true, "return": { - "type": "String", + "kind": 34, "name": "method", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "method", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" + }, + "type": "Method" } - ] - } + ], + "type": "Module" + }, + "version": "0.1" } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/004-env-sanitization/expected/build-artifacts/wrap.info index 5573844c680fef9537635bbf55425a1a231d3510..dc0e0cc356b825b65979996a8a33b054b667a1f6 100644 GIT binary patch literal 456 zcmaKoK@NgI3`H^VBp$%%4Rqnsm0Vzy1}8!pIx{5fOhEUX0RqT1+#1iM4n~L?mTh1E zYnoOOkmLd8v+2A*=0jnFRE3HKl)}?4$DD0>(#IMZ6G>WdZ5qXaqjNh}KB#@* z$n0$L%C;;ClqNj23mZio-Tu5L2sI~gt|n$u${q6!D> zhK1t`W7<+bJ@x2`AdZN5bnb}A(c*JU$->_eI*jL2ocz!FFn|X yt35+!D}t$Ez;#y)rP8=Z=$AkTv8Q>9pbhf>E9utXPfjI7 z(a&$ZJx-%O8?Ui~kNNI^O$NPTH%Uj)dh(dUjk!tnTmTPX+b&xZRs`*@h-tn(j0U!N3l)Qj>*YPiB%z(r(r@L(y+dMrwR z4+MKro=3YD^g4chOc21fqOAyw>5&ewQ#DP6gyk;6KYu(Nry87>*rhUdYvrh384dMX*_ioB2Ipf1TMZ=mX6P7+uK`ixOpP=od>b)@V9O4cy z-da#=f>pqpeqFIWi1O~RFJw_XRqMFV^CazpIgARPS5P3;_JS*r0OXET7I+aYZ$em3 zvH=(WYw$wb(<86}MFG}lh;3~rGsQ-DD|rZrwGMO96)d#$c0zligeC*bFWy0+35f>h z9|-_*M=A@v_!W8>>!22;*A;(%3>1|eR(>@a=E-xG7C#gE1y8&&$a=dwc{I2oz8pw< zDh5%^_E*&SVJZxMn@PTh6&ujVi$xkepStQBr&))2l!xCP)wvA5PSLMc#j@_^%bQV> z-s*T5`f<(#C>C!}nME!~Bsh5l^O@S$Qqt9lWxpF0x08OtJ$tFfVEu{;Y}?Q1UY^80 zDN9B;)`HRAcGMgCxTpb#1rLIQi9a6_Zynt&%``wA*K>#>aDcH9$F;kTn?Hl+M@In zXyZJ~d`S$yJLa#{N6ddJlGFzU>sV8ni_{=o8&X>YS`frF4|-X*Sn6e2-@=;AD_9FT z6ZWS>&cBU{&EO<9xOu9R2f70LNE}G;{5Y07vge`4M*skCi@YK-&IC3?sW9UpgkC5P z1u`JhgJf$;SLH|Ry)52Z9ro8*IIU9P1yv7IG-~Cbgf;79LR{>h!kageybnh~Mfj3X5 zt0O3^4%T=77^OTJHuz@=1OA$YwKgq2q9uS^Fmnrlz*YNoqH--^Iw?fAVOW65G&6M~ zRU;7e6oopGI&L*fiX4e>fNp6VzdnBx9nHy3L3KLlkZMs}+M2*1r#b6q+fBJhfq=Ir zx0a=ikz|W$)FSa~5Uv}kn^{8%YQeN=V&esiRFaJ?v|8`}1Dq0*&4g!zBzB@3O*aYx z%Pom3-bNs#SXFLSNQ{8+Pnu*}&?u`XlD1Q=HH#@38{9(jBpB?AeB4}Ol_+HHk2F|K z2Re?kgp6~if9VMzs{3t}!txLklwV8BqD-}s2l;AHvp&pnMfR^oLMsk)+6lD)PIN}$ zytRNjahkldXkw}w#VzG8x8rPuUO_)dJlgTB6+YK(n8@y#?~Y4+Y(wfhj673Ui)sq0 zF(R91+nyzhkB(Sf4FSeOjo)h+oL4;!y#K^X^Du(T(A$Z)$_LBA8uL>~Zgfzxb$J*a z4FV^+mW0mTtDH*Scgla$s`KJ3FnQS%%#ye!>V6p3Xq@vrcOSY~A{z!V8uhmZQIoO= zyvKl}f@gWuW$&@w;8}p;V2-8(fkV*tRM3{Nycxy&^)+Dw#go6xq!r|JloaA3kL4TU zp7h_a*Gl!|F8{@~1$~+Sa^a_VFMTGSkMzVfD)fSXm$04M>uCpRDNDy{%%~1Jq-Gqu zBkp@MyiE1p@c-4#o7#qgOVOav3S8C`eCH74tS}+Q7^q6q!}3_%psN^31Irjb%g9i| z4Tq`5+Ztvg1+K0ta>;$Vtn?2>TTwlKQIQo-EvkGbqjJ?=HY%o}v3*I64KGyr0UB;KhlRa_sY}h_M5fe<%ga{6;2cY<(X}*tubh5)l?%GK1Z$=>tIWciT^RTd2w(*+U#+fMI?M|jyx~TZ>@S#xttACZrUN)SUpKl>h)wl zVDTRb@#~jpwF0N0pol4OcA?JO-MHO1VPQz5zVfet8S{i8-TtSc9<+Z zxWAx%b(;KW>i!<6?9LhOQp~gTKEW8467X|Uex=U&@g|G6e8rf42?-v3OktKpb+X5M zD+397(2OjyMO0GLrIr4LC21GxhN;EST!#jQOaVo($FmPvQX6=2I5-zVaHd)6D$ia= z;!ZC(w*<7>;|kw2_edlvHXw$B^B^QN6OOgjCn>Q;J1hy#Ede3vq8`tpohacXof_LU zGYtM9N&1vS<*bBet`OSIW8`N~ZGVOBxuc!%hmF5`P?(T<)KwUHEMmTnarRBSt0oku z@js+-r>x8D~F&aQSK*U z^S+Cdmz}Hl>wCkRo#)VC!vyW^|mAh{J_bBFlAUlXk2$&}^ z(-Li{Eg=1i3MqxQl*X;0JweD-oNoSwh`}hE0?52oVZ1!S#Tgb`U0;*e;4+ze2yNXM zZwteCDI4!p7qa8|M&GOFEwB0Wmgn?|7ux>KwDX}TMGP0HD`)G;gO1ROO!|Xw-Ya*2 zzXFD@o2za@8TpOSUX8bXR?$c?x4IZ7@^=-!r~brg!O~9Mna&%WM@B8G66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME diff --git a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts index c886edc957..80f300e7ad 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/005-custom-config/expected/wrap/wrap.info.ts @@ -2,2688 +2,2688 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest: WrapManifest = { +export const manifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", abi: { - "version": "0.1", - "objectTypes": [ - { - "type": "Object", - "kind": 1, - "properties": [ - { - "type": "UInt", - "name": "u", + "envType": { + "kind": 65536, + "properties": [ + { + "kind": 34, + "name": "arg1", + "required": true, + "scalar": { + "kind": 4, + "name": "arg1", "required": true, - "kind": 34, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - } + "type": "String" }, + "type": "String" + } + ], + "type": "Env" + }, + "importedModuleTypes": [ + { + "isInterface": false, + "kind": 256, + "methods": [ { - "type": "[Boolean]", - "name": "array", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "callContractView", "required": true, - "kind": 34, - "array": { - "type": "[Boolean]", - "name": "array", + "return": { + "kind": 34, + "name": "callContractView", "required": true, - "kind": 18, "scalar": { - "type": "Boolean", - "name": "array", + "kind": 4, + "name": "callContractView", "required": true, - "kind": 4 + "type": "String" }, - "item": { - "type": "Boolean", - "name": "array", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "Method" }, { - "type": "Bytes", - "name": "bytes", - "kind": 34, - "scalar": { - "type": "Bytes", - "name": "bytes", - "kind": 4 - } - } - ] - } - ], - "importedObjectTypes": [ - { - "type": "Ethereum_Connection", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "node", - "kind": 34, - "scalar": { - "type": "String", - "name": "node", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractStatic", + "required": true, + "return": { + "kind": 34, + "name": "callContractStatic", + "object": { + "kind": 8192, + "name": "callContractStatic", + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "type": "Method" }, { - "type": "String", - "name": "networkNameOrChainId", - "kind": 34, - "scalar": { - "type": "String", - "name": "networkNameOrChainId", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Connection" - }, - { - "type": "Ethereum_TxOverrides", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getBalance", + "required": true, + "return": { + "kind": 34, + "name": "getBalance", + "required": true, + "scalar": { + "kind": 4, + "name": "getBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeParams", + "required": true, + "return": { + "kind": 34, + "name": "encodeParams", + "required": true, + "scalar": { + "kind": 4, + "name": "encodeParams", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "result", + "arguments": [ + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeFunction", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "result", + "return": { + "kind": 34, + "name": "encodeFunction", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "encodeFunction", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "error", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityPack", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "error", + "return": { + "kind": 34, + "name": "solidityPack", "required": true, - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "StaticTxResult" - }, - { - "type": "Ethereum_TxRequest", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", - "kind": 34, - "scalar": { - "type": "String", - "name": "to", - "kind": 4 - } - }, - { - "type": "String", - "name": "from", - "kind": 34, - "scalar": { - "type": "String", - "name": "from", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "nonce", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "nonce", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } - }, - { - "type": "String", - "name": "data", - "kind": 34, - "scalar": { - "type": "String", - "name": "data", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "chainId", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityPack", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxRequest" - }, - { - "type": "Ethereum_TxReceipt", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityKeccak256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "to", + "return": { + "kind": 34, + "name": "solidityKeccak256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityKeccak256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "from", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "soliditySha256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "from", + "return": { + "kind": 34, + "name": "soliditySha256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "soliditySha256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "contractAddress", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "contractAddress", + "return": { + "kind": 34, + "name": "getSignerAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerAddress", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerBalance", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "getSignerBalance", "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "root", - "kind": 34, - "scalar": { - "type": "String", - "name": "root", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasUsed", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerTransactionCount", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasUsed", + "return": { + "kind": 34, + "name": "getSignerTransactionCount", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerTransactionCount", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "logsBloom", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "logsBloom", + "return": { + "kind": 34, + "name": "getGasPrice", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getGasPrice", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "transactionHash", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "estimateTransactionGas", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "transactionHash", + "return": { + "kind": 34, + "name": "estimateTransactionGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateTransactionGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 34, - "array": { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 18, - "object": { - "type": "Ethereum_Log", - "name": "logs", + "arguments": [ + { + "kind": 34, + "name": "address", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" }, - "item": { - "type": "Ethereum_Log", - "name": "logs", + { + "kind": 34, + "name": "method", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" } - } - }, - { - "type": "BigInt", - "name": "blockNumber", + ], + "kind": 64, + "name": "estimateContractCallGas", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "kind": 34, + "name": "estimateContractCallGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateContractCallGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "checkAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "checkAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "checkAddress", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "confirmations", + "arguments": [ + { + "kind": 34, + "name": "eth", + "required": true, + "scalar": { + "kind": 4, + "name": "eth", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "toWei", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", + "return": { + "kind": 34, + "name": "toWei", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toWei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "cumulativeGasUsed", + "arguments": [ + { + "kind": 34, + "name": "wei", + "required": true, + "scalar": { + "kind": 4, + "name": "wei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + } + ], + "kind": 64, + "name": "toEth", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "cumulativeGasUsed", + "return": { + "kind": 34, + "name": "toEth", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toEth", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "effectiveGasPrice", + "arguments": [ + { + "kind": 34, + "name": "txHash", + "required": true, + "scalar": { + "kind": 4, + "name": "txHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "confirmations", + "required": true, + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "timeout", + "required": true, + "scalar": { + "kind": 4, + "name": "timeout", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "awaitTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "effectiveGasPrice", + "return": { + "kind": 34, + "name": "awaitTransaction", + "object": { + "kind": 8192, + "name": "awaitTransaction", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "byzantium", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "event", + "required": true, + "scalar": { + "kind": 4, + "name": "event", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "timeout", + "scalar": { + "kind": 4, + "name": "timeout", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "waitForEvent", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "byzantium", + "return": { + "kind": 34, + "name": "waitForEvent", + "object": { + "kind": 8192, + "name": "waitForEvent", + "required": true, + "type": "Ethereum_EventNotification" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_EventNotification" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getNetwork", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", + "return": { + "kind": 34, + "name": "getNetwork", + "object": { + "kind": 8192, + "name": "getNetwork", + "required": true, + "type": "Ethereum_Network" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_Network" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "status", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "status", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxReceipt" - }, - { - "type": "Ethereum_Log", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "blockNumber", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "requestAccounts", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "array": { + "item": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "requestAccounts", + "required": true, + "scalar": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "requestAccounts", "required": true, - "kind": 4 - } + "type": "[String]" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethod", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "callContractMethod", + "object": { + "kind": 8192, + "name": "callContractMethod", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethodAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "callContractMethodAndWait", + "object": { + "kind": 8192, + "name": "callContractMethodAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "removed", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "removed", + "return": { + "kind": 34, + "name": "sendTransaction", + "object": { + "kind": 8192, + "name": "sendTransaction", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "String", - "name": "address", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransactionAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", + "return": { + "kind": 34, + "name": "sendTransactionAndWait", + "object": { + "kind": 8192, + "name": "sendTransactionAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "String", - "name": "data", + "arguments": [ + { + "kind": 34, + "name": "abi", + "required": true, + "scalar": { + "kind": 4, + "name": "abi", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "bytecode", + "required": true, + "scalar": { + "kind": 4, + "name": "bytecode", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "deployContract", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "data", + "return": { + "kind": 34, + "name": "deployContract", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "deployContract", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "[String]", - "name": "topics", + "arguments": [ + { + "kind": 34, + "name": "message", + "required": true, + "scalar": { + "kind": 4, + "name": "message", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "signMessage", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "topics", + "return": { + "kind": 34, + "name": "signMessage", "required": true, - "kind": 18, "scalar": { - "type": "String", - "name": "topics", + "kind": 4, + "name": "signMessage", "required": true, - "kind": 4 + "type": "String" }, - "item": { - "type": "String", - "name": "topics", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "transactionHash", + "arguments": [ + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "params", + "required": true, + "scalar": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "params", + "required": true, + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendRPC", "required": true, + "return": { + "kind": 34, + "name": "sendRPC", + "scalar": { + "kind": 4, + "name": "sendRPC", + "type": "String" + }, + "type": "String" + }, + "type": "Method" + } + ], + "namespace": "Ethereum", + "nativeType": "Module", + "type": "Ethereum_Module", + "uri": "ens/ethereum.polywrap.eth" + } + ], + "importedObjectTypes": [ + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Connection", + "properties": [ + { "kind": 34, + "name": "node", "scalar": { - "type": "String", - "name": "transactionHash", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "node", + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "logIndex", - "required": true, "kind": 34, + "name": "networkNameOrChainId", "scalar": { - "type": "UInt32", - "name": "logIndex", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "networkNameOrChainId", + "type": "String" + }, + "type": "String" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Log" + "type": "Ethereum_Connection", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_EventNotification", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxOverrides", "properties": [ { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "String", - "name": "data", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasLimit", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "address", - "required": true, "kind": 34, + "name": "gasPrice", "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Ethereum_Log", - "name": "log", - "required": true, "kind": 34, - "object": { - "type": "Ethereum_Log", - "name": "log", - "required": true, - "kind": 8192 - } + "name": "value", + "scalar": { + "kind": 4, + "name": "value", + "type": "BigInt" + }, + "type": "BigInt" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "EventNotification" + "type": "Ethereum_TxOverrides", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_Network", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "StaticTxResult", "properties": [ { - "type": "String", - "name": "name", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "name", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", + "name": "result", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "chainId", + "kind": 4, + "name": "result", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "ensAddress", "kind": 34, + "name": "error", + "required": true, "scalar": { - "type": "String", - "name": "ensAddress", - "kind": 4 - } + "kind": 4, + "name": "error", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Network" + "type": "Ethereum_StaticTxResult", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_TxResponse", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxRequest", "properties": [ { - "type": "String", - "name": "hash", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "hash", - "required": true, - "kind": 4 - } - }, - { - "type": "String", "name": "to", - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "to", - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "from", - "required": true, "kind": 34, + "name": "from", "scalar": { - "type": "String", + "kind": 4, "name": "from", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "nonce", - "required": true, "kind": 34, + "name": "nonce", "scalar": { - "type": "UInt32", + "kind": 4, "name": "nonce", - "required": true, - "kind": 4 - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "BigInt", - "name": "gasLimit", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasLimit", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "gasPrice", "kind": 34, + "name": "gasPrice", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasPrice", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "data", "scalar": { - "type": "String", + "kind": 4, "name": "data", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "BigInt", - "name": "value", - "required": true, "kind": 34, + "name": "value", "scalar": { - "type": "BigInt", + "kind": 4, "name": "value", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "chainId", - "required": true, "kind": 34, + "name": "chainId", "scalar": { - "type": "BigInt", + "kind": 4, "name": "chainId", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockNumber", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "blockHash", "kind": 34, + "name": "type", "scalar": { - "type": "String", - "name": "blockHash", - "kind": 4 - } - }, + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxRequest", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxReceipt", + "properties": [ { - "type": "UInt32", - "name": "timestamp", "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timestamp", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", + "name": "to", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", - "name": "confirmations", + "kind": 4, + "name": "to", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "raw", "kind": 34, + "name": "from", + "required": true, "scalar": { - "type": "String", - "name": "raw", - "kind": 4 - } + "kind": 4, + "name": "from", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "r", "kind": 34, + "name": "contractAddress", + "required": true, "scalar": { - "type": "String", - "name": "r", - "kind": 4 - } + "kind": 4, + "name": "contractAddress", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "s", "kind": 34, + "name": "transactionIndex", + "required": true, "scalar": { - "type": "String", - "name": "s", - "kind": 4 - } + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "UInt32", - "name": "v", "kind": 34, + "name": "root", "scalar": { - "type": "UInt32", - "name": "v", - "kind": 4 - } + "kind": 4, + "name": "root", + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "type", "kind": 34, + "name": "gasUsed", + "required": true, "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } + "kind": 4, + "name": "gasUsed", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "[Ethereum_Access]", - "name": "accessList", "kind": 34, - "array": { - "type": "[Ethereum_Access]", - "name": "accessList", - "kind": 18, - "object": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - }, - "item": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxResponse" - }, - { - "type": "Ethereum_Access", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "address", + "name": "logsBloom", "required": true, - "kind": 34, "scalar": { - "type": "String", - "name": "address", + "kind": 4, + "name": "logsBloom", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "[String]", - "name": "storageKeys", - "required": true, "kind": 34, - "array": { - "type": "[String]", - "name": "storageKeys", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Access" - } - ], - "importedModuleTypes": [ - { - "type": "Ethereum_Module", - "kind": 256, - "methods": [ - { - "type": "Method", - "name": "callContractView", + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "callContractView", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "callContractView", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractStatic", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", + "array": { + "item": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "type": "Ethereum_Log" }, - { - "type": "String", - "name": "method", + "kind": 18, + "name": "logs", + "object": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } + "type": "Ethereum_Log" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", - "required": true, - "kind": 8192 - } - } + "type": "[Ethereum_Log]" + }, + "kind": 34, + "name": "logs", + "required": true, + "type": "[Ethereum_Log]" }, { - "type": "Method", - "name": "getBalance", + "kind": 34, + "name": "blockNumber", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getBalance", + "scalar": { + "kind": 4, + "name": "blockNumber", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getBalance", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "encodeParams", + "kind": 34, + "name": "blockHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeParams", + "scalar": { + "kind": 4, + "name": "blockHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeParams", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "encodeFunction", + "kind": 34, + "name": "confirmations", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeFunction", + "scalar": { + "kind": 4, + "name": "confirmations", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeFunction", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "solidityPack", + "kind": 34, + "name": "cumulativeGasUsed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityPack", + "scalar": { + "kind": 4, + "name": "cumulativeGasUsed", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityPack", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "solidityKeccak256", + "kind": 34, + "name": "effectiveGasPrice", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityKeccak256", + "scalar": { + "kind": 4, + "name": "effectiveGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityKeccak256", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "soliditySha256", + "kind": 34, + "name": "byzantium", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "soliditySha256", + "scalar": { + "kind": 4, + "name": "byzantium", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "soliditySha256", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerAddress", + "kind": 34, + "name": "type", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "getSignerAddress", + "scalar": { + "kind": 4, + "name": "type", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "getSignerAddress", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "status", + "scalar": { + "kind": 4, + "name": "status", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxReceipt", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Log", + "properties": [ + { + "kind": 34, + "name": "blockNumber", + "required": true, + "scalar": { + "kind": 4, + "name": "blockNumber", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "required": true, + "scalar": { + "kind": 4, + "name": "blockHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "transactionIndex", + "required": true, + "scalar": { + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "getSignerBalance", + "kind": 34, + "name": "removed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerBalance", + "scalar": { + "kind": 4, + "name": "removed", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerBalance", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerTransactionCount", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerTransactionCount", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerTransactionCount", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "getGasPrice", + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getGasPrice", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getGasPrice", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "estimateTransactionGas", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", + "array": { + "item": { + "kind": 4, + "name": "topics", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 18, + "name": "topics", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 4, + "name": "topics", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "topics", + "required": true, + "type": "[String]" }, { - "type": "Method", - "name": "estimateContractCallGas", + "kind": 34, + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateContractCallGas", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "estimateContractCallGas", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "checkAddress", + "kind": 34, + "name": "logIndex", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "Boolean", - "name": "checkAddress", + "scalar": { + "kind": 4, + "name": "logIndex", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "checkAddress", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_Log", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "EventNotification", + "properties": [ + { + "kind": 34, + "name": "data", + "required": true, + "scalar": { + "kind": 4, + "name": "data", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "toWei", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "eth", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "eth", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "BigInt", - "name": "toWei", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "toWei", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "toEth", + "kind": 34, + "name": "log", + "object": { + "kind": 8192, + "name": "log", + "required": true, + "type": "Ethereum_Log" + }, + "required": true, + "type": "Ethereum_Log" + } + ], + "type": "Ethereum_EventNotification", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Network", + "properties": [ + { + "kind": 34, + "name": "name", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "String", - "name": "toEth", + "scalar": { + "kind": 4, + "name": "name", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "toEth", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "awaitTransaction", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "txHash", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "txHash", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", + "scalar": { + "kind": 4, + "name": "chainId", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "waitForEvent", + "kind": 34, + "name": "ensAddress", + "scalar": { + "kind": 4, + "name": "ensAddress", + "type": "String" + }, + "type": "String" + } + ], + "type": "Ethereum_Network", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxResponse", + "properties": [ + { + "kind": 34, + "name": "hash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "event", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "event", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "UInt32", - "name": "timeout", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", + "scalar": { + "kind": 4, + "name": "hash", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "getNetwork", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_Network", - "name": "getNetwork", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_Network", - "name": "getNetwork", - "required": true, - "kind": 8192 - } - } + "kind": 34, + "name": "to", + "scalar": { + "kind": 4, + "name": "to", + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "requestAccounts", + "kind": 34, + "name": "from", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "[String]", - "name": "requestAccounts", + "scalar": { + "kind": 4, + "name": "from", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "requestAccounts", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - } - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractMethod", + "kind": 34, + "name": "nonce", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", + "scalar": { + "kind": 4, + "name": "nonce", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "gasLimit", + "required": true, + "scalar": { + "kind": 4, + "name": "gasLimit", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "callContractMethodAndWait", + "kind": 34, + "name": "gasPrice", + "scalar": { + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendTransaction", + "kind": 34, + "name": "value", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", + "scalar": { + "kind": 4, + "name": "value", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "sendTransactionAndWait", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", + "scalar": { + "kind": 4, + "name": "chainId", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "deployContract", + "kind": 34, + "name": "blockNumber", + "scalar": { + "kind": 4, + "name": "blockNumber", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "scalar": { + "kind": 4, + "name": "blockHash", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "timestamp", + "scalar": { + "kind": 4, + "name": "timestamp", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "confirmations", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "abi", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "abi", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "bytecode", + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "raw", + "scalar": { + "kind": 4, + "name": "raw", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "r", + "scalar": { + "kind": 4, + "name": "r", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "s", + "scalar": { + "kind": 4, + "name": "s", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "v", + "scalar": { + "kind": 4, + "name": "v", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "type", + "scalar": { + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "bytecode", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } + "type": "Ethereum_Access" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "deployContract", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "deployContract", + "kind": 18, + "name": "accessList", + "object": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 4 - } - } - }, + "type": "Ethereum_Access" + }, + "type": "[Ethereum_Access]" + }, + "kind": 34, + "name": "accessList", + "type": "[Ethereum_Access]" + } + ], + "type": "Ethereum_TxResponse", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Access", + "properties": [ { - "type": "Method", - "name": "signMessage", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "signMessage", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "signMessage", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendRPC", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", + "array": { + "item": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } + "type": "String" }, - { - "type": "[String]", - "name": "params", + "kind": 18, + "name": "storageKeys", + "required": true, + "scalar": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "params", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - } - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "sendRPC", - "kind": 34, - "scalar": { - "type": "String", - "name": "sendRPC", - "kind": 4 - } - } + "type": "[String]" + }, + "kind": 34, + "name": "storageKeys", + "required": true, + "type": "[String]" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Module", - "isInterface": false + "type": "Ethereum_Access", + "uri": "ens/ethereum.polywrap.eth" } ], "moduleType": { - "type": "Module", + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], "kind": 128, "methods": [ { - "type": "Method", - "name": "methodOne", - "required": true, - "kind": 64, "arguments": [ { - "type": "String", + "kind": 34, "name": "str", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "str", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "optStr", "kind": 34, + "name": "optStr", "scalar": { - "type": "String", + "kind": 4, "name": "optStr", - "kind": 4 - } + "type": "String" + }, + "type": "String" } ], + "kind": 64, + "name": "methodOne", + "required": true, "return": { - "type": "Object", - "name": "methodOne", - "required": true, "kind": 34, + "name": "methodOne", "object": { - "type": "Object", + "kind": 8192, "name": "methodOne", "required": true, - "kind": 8192 - } - } + "type": "Object" + }, + "required": true, + "type": "Object" + }, + "type": "Method" }, { - "type": "Method", - "name": "methodTwo", - "required": true, - "kind": 64, "arguments": [ { - "type": "UInt32", + "kind": 34, "name": "arg", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", + "kind": 4, "name": "arg", "required": true, - "kind": 4 - } + "type": "UInt32" + }, + "type": "UInt32" } ], + "kind": 64, + "name": "methodTwo", + "required": true, "return": { - "type": "String", + "kind": 34, "name": "methodTwo", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "methodTwo", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" + }, + "type": "Method" } ], - "imports": [ - { - "type": "Ethereum_Module" - }, - { - "type": "Ethereum_Connection" - }, - { - "type": "Ethereum_TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult" - }, - { - "type": "Ethereum_TxRequest" - }, - { - "type": "Ethereum_TxReceipt" - }, - { - "type": "Ethereum_Log" - }, - { - "type": "Ethereum_EventNotification" - }, - { - "type": "Ethereum_Network" - }, - { - "type": "Ethereum_TxResponse" - }, - { - "type": "Ethereum_Access" - } - ] + "type": "Module" }, - "envType": { - "type": "Env", - "kind": 65536, - "properties": [ - { - "type": "String", - "name": "arg1", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "arg1", + "objectTypes": [ + { + "kind": 1, + "properties": [ + { + "kind": 34, + "name": "u", + "required": true, + "scalar": { + "kind": 4, + "name": "u", + "required": true, + "type": "UInt" + }, + "type": "UInt" + }, + { + "array": { + "item": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "kind": 18, + "name": "array", + "required": true, + "scalar": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "type": "[Boolean]" + }, + "kind": 34, + "name": "array", "required": true, - "kind": 4 + "type": "[Boolean]" + }, + { + "kind": 34, + "name": "bytes", + "scalar": { + "kind": 4, + "name": "bytes", + "type": "Bytes" + }, + "type": "Bytes" } - } - ] - } + ], + "type": "Object" + } + ], + "version": "0.1" } } diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/wrap.info b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/build-artifacts/wrap.info index cddc4cc209ed9722486e1cd29131565fbbe1786a..d79a2831a29d5aac720faea92b7c534af49b7e69 100644 GIT binary patch literal 22450 zcmeHPOLH8z5vHp62a;TKaOnpqu~W%8B8yH`mME1)#|Kr)HJk;P6YkEeXRxH0Q&N_d zv*hI9I7 z(a&$ZJx-%O8?Ui~kNNI^O$NPTH%Uj)dh(dUjk!tnTmTPX+b&xZRs`*@h-tn(j0U!N3l)Qj>*YPiB%z(r(r@L(y+dMrwR z4+MKro=3YD^g4chOc21fqOAyw>5&ewQ#DP6gyk;6KYu(Nry87>*rhUdYvrh384dMX*_ioB2Ipf1TMZ=mX6P7+uK`ixOpP=od>b)@V9O4cy z-da#=f>pqpeqFIWi1O~RFJw_XRqMFV^CazpIgARPS5P3;_JS*r0OXET7I+aYZ$em3 zvH=(WYw$wb(<86}MFG}lh;3~rGsQ-DD|rZrwGMO96)d#$c0zligeC*bFWy0+35f>h z9|-_*M=A@v_!W8>>!22;*A;(%3>1|eR(>@a=E-xG7C#gE1y8&&$a=dwc{I2oz8pw< zDh5%^_E*&SVJZxMn@PTh6&ujVi$xkepStQBr&))2l!xCP)wvA5PSLMc#j@_^%bQV> z-s*T5`f<(#C>C!}nME!~Bsh5l^O@S$Qqt9lWxpF0x08OtJ$tFfVEu{;Y}?Q1UY^80 zDN9B;)`HRAcGMgCxTpb#1rLIQi9a6_Zynt&%``wA*K>#>aDcH9$F;kTn?Hl+M@In zXyZJ~d`S$yJLa#{N6ddJlGFzU>sV8ni_{=o8&X>YS`frF4|-X*Sn6e2-@=;AD_9FT z6ZWS>&cBU{&EO<9xOu9R2f70LNE}G;{5Y07vge`4M*skCi@YK-&IC3?sW9UpgkC5P z1u`JhgJf$;SLH|Ry)52Z9ro8*IIU9P1yv7IG-~Cbgf;79LR{>h!kageybnh~Mfj3X5 zt0O3^4%T=77^OTJHuz@=1OA$YwKgq2q9uS^Fmnrlz*YNoqH--^Iw?fAVOW65G&6M~ zRU;7e6oopGI&L*fiX4e>fNp6VzdnBx9nHy3L3KLlkZMs}+M2*1r#b6q+fBJhfq=Ir zx0a=ikz|W$)FSa~5Uv}kn^{8%YQeN=V&esiRFaJ?v|8`}1Dq0*&4g!zBzB@3O*aYx z%Pom3-bNs#SXFLSNQ{8+Pnu*}&?u`XlD1Q=HH#@38{9(jBpB?AeB4}Ol_+HHk2F|K z2Re?kgp6~if9VMzs{3t}!txLklwV8BqD-}s2l;AHvp&pnMfR^oLMsk)+6lD)PIN}$ zytRNjahkldXkw}w#VzG8x8rPuUO_)dJlgTB6+YK(n8@y#?~Y4+Y(wfhj673Ui)sq0 zF(R91+nyzhkB(Sf4FSeOjo)h+oL4;!y#K^X^Du(T(A$Z)$_LBA8uL>~Zgfzxb$J*a z4FV^+mW0mTtDH*Scgla$s`KJ3FnQS%%#ye!>V6p3Xq@vrcOSY~A{z!V8uhmZQIoO= zyvKl}f@gWuW$&@w;8}p;V2-8(fkV*tRM3{Nycxy&^)+Dw#go6xq!r|JloaA3kL4TU zp7h_a*Gl!|F8{@~1$~+Sa^a_VFMTGSkMzVfD)fSXm$04M>uCpRDNDy{%%~1Jq-Gqu zBkp@MyiE1p@c-4#o7#qgOVOav3S8C`eCH74tS}+Q7^q6q!}3_%psN^31Irjb%g9i| z4Tq`5+Ztvg1+K0ta>;$Vtn?2>TTwlKQIQo-EvkGbqjJ?=HY%o}v3*I64KGyr0UB;KhlRa_sY}h_M5fe<%ga{6;2cY<(X}*tubh5)l?%GK1Z$=>tIWciT^RTd2w(*+U#+fMI?M|jyx~TZ>@S#xttACZrUN)SUpKl>h)wl zVDTRb@#~jpwF0N0pol4OcA?JO-MHO1VPQz5zVfet8S{i8-TtSc9<+Z zxWAx%b(;KW>i!<6?9LhOQp~gTKEW8467X|Uex=U&@g|G6e8rf42?-v3OktKpb+X5M zD+397(2OjyMO0GLrIr4LC21GxhN;EST!#jQOaVo($FmPvQX6=2I5-zVaHd)6D$ia= z;!ZC(w*<7>;|kw2_edlvHXw$B^B^QN6OOgjCn>Q;J1hy#Ede3vq8`tpohacXof_LU zGYtM9N&1vS<*bBet`OSIW8`N~ZGVOBxuc!%hmF5`P?(T<)KwUHEMmTnarRBSt0oku z@js+-r>x8D~F&aQSK*U z^S+Cdmz}Hl>wCkRo#)VC!vyW^|mAh{J_bBFlAUlXk2$&}^ z(-Li{Eg=1i3MqxQl*X;0JweD-oNoSwh`}hE0?52oVZ1!S#Tgb`U0;*e;4+ze2yNXM zZwteCDI4!p7qa8|M&GOFEwB0Wmgn?|7ux>KwDX}TMGP0HD`)G;gO1ROO!|Xw-Ya*2 zzXFD@o2za@8TpOSUX8bXR?$c?x4IZ7@^=-!r~brg!O~9Mna&%WM@B8G66!2=j}2{>arwBT6Va;&xN!9h4$GbO24Gu^ZOBUzjvVgq8~ zVlQw2PTm>KNFyQ1yBppxCk0$tp1==7byrV!R##S4R%yT*n43MC%=s$w%dD*Is_Ks? zyDUk=I2wNc##^H(=(Eu}OS4h7KVaiQFW(BIVXzT?avX1b$U50N|2Td2Yw_o`@}pAd z;xJ(!Ry`;l6b(9EM)2Le_MWi^!}YFE5H0aufP3|^4s4%2$Ce&zZmv| z!NoZ31ic{n*d}y+EFfKsSd{lKUglB4(zv(Fx&qf)vRZsDe*EastvK$nAo_WUK>Qw# z;&q`w3A+^`&Hk&B%lKBfHA^ptTS0m^?1vfMSOjUJfhs??6h25oZU;F<>SL-s z7);t5&cSZb%l)vRqC_C`BF-_OhhWZEHFF+joL`;wC-1Q|?}@3#Odcfo$9xju!nLn# z6BG=8T$X4cK^!^B^Du}LG8DTk5z4%Lbt*eVxa;%UU4^4Q%8O#7NEK#J{YlM_pJj1v z8rv)dy`;(!&7wjWZ63tERsYR^GdWwbt=VjY=?ydN{)TK z@(ne`!EEU=7pihZo2U@vTn#xvm4qDvc!6j7^$4yP;GFy)jNjDfUY4DZ7`zdQyQC8#Fh26jan;iAx zt@Kte1{H)A4n^D>&>7&+PlI%uP9XrxqQnW@>7%+8jegfZm2?7^JdmF z5e=6U`0JuGfc*H^-&rv?pg;?UtkJuX1DB4+8@;%*b3gBIF!~~bsKCjOun0OTL3z_l zEA9pe87ZCTa$17w?rUY+C&XE&f-DXX|j(5MO1MV0jz=(l^ZNL@E;?h z2elhPr+?K3Y;7r^4UHPQ65{A9K7-tU$O~Zq<)u!V2xne%$B-{3#H{hRy24-GWl?rN z&ce;GQ&xh6p7iX|6R^)!L*}J$3xB>LQb}=zz{Xo1=zfJ^FkqsV9|Na zqWj{BttWSiryv9qsVT1fy_TdKcR(4WG*+eTj7*?##i$W>0|Vk|${#Pc+ilibl_XDu zG%xNTJ1NM7eJfzBbL%_Pd#N;bI z#}kBig8}Bq1Nmv3HGFKMZa_dJtNS3VSP0UWf+KectUPJK!KB^bfYg9ZxJ0%{Pvd;p z0>;&Pq~_uwRMgEL0Ei}a8%$ys_6CEl#a-xPP~Zj%Fb3&8S|L%y-2j1fag>F8i&Yl% z2leD{1w;||26VN0slfKbB-o?d$Smk)9iZ!Z(}lOX$t30vpjmP|0ceZ40RW79zDsw4 zNz5C7+i6V6h#fi>O?QW(M1rKv#yaWH^ZumxvQ{07N17O_!~Z+$%pQzkkk;Nc8v?>T*BI&qCHrZo;KMJ_?epyw7`D=^xa! znucBfJ!(Qnj>S0Zi9zBd)@}e{g3A(#CF~+c$%vb+2@h$0z`_IjIxQ|_Nik+3ZcRX- z8a*OGn5F4ZG#mBB1i>GdSEnm#mq~V#Tqe&r9!jmV4&QT~NH+!i71n#fvRnKZCOlW5q$T75*qcvFpeuD)?loHvng>sM(p04@ zL7JHI7kVBAX3#SMlwgp4FmEo*fRd;skS@MTAf_ z60F2SzfY_2P*LKbHANn-(!0u&O*1Y}20GXV7oZsjm%W^IG&()Zqpd1U)HB2bShJWk z5Qncu#Homgck-w_0nnm1SPdeL3Vabo8w@T>9EQk{G6&^VjFhgi=)}HG+ zCN@!x^W>h{$ux(Vbr21p^6!LSybyN7Z2v*f*|D-ub~&2UmKnL&4T2{$gKcmDT14Qo zL`rC4LZfq@QDLGUEhbDFh{IPS;>9c?-esLmu=Dm0f3ysX>mGi`CJCHX%dmiLRV)8! zv0+u?9U!N(0C~6_ETe;8nY4_K>i!)(ynW20E#uAPqlJc9hj(0@^Ulk|a4TX-d*h?B zz;e* zc>CZb-$xnpGvExwFZYRc&8EA}>a&b;1Bd)*jjqcY91C3-0Ity7LZb~$mp6mHnlWg$ zE$24hqGP1c@~OV@%2v5cD0f%?FB`)P7SsZ+*W-6ApygcYrPi7@wdE%go|Tjo#qXd&%_DnS9f5^adxZ@HX>77JtA(eT7gJY|y?#zJs$RpdW!n zkceBdD?F-+!Z)A+vob15#G`h~xi-ENy=4})@P*iidy3&{$PqyzZrP5YcY(q;ps|S( z@u+q@5B7pE1NE!kq{yD&arVUfQYKuMI1n*Sz$-?s)+r)z24qs4w~F)jn%>}SyReg$ z7G_7E6fN?)rn!yMMp(?QauwjK*;)vw(RES;*E?}i-T|PGtgBwrAF$%0ixz&&(CSeR zRMd&S%ZeV|rwenRl47Klj$W^0Kc#N!l{#$}!m1Jc}f4 zPm)CmF|%nlC)t#H>{e0h25I}hIKih6>Z@Ko;M+a1=v2!GT$boTu}F}qx$Fp5@3vZ) zIbhK{f{me@Bje?vNPCcDF(MZkmr(98nZ1I?4@FwK8FfG4Yn)|vD&At}v>|+%oeXc@ zYj}OdPZBSBcG5LN$f0h}QJ4M+k4$xzvZzbyYE~O+WRT4Zrk0Q7!TUL_j*vQdO$@gt zK8thgjPliN#jjT4FIz;i&UZ^bwO^$3*Ruf?HSFC;o?CpgR19oijkGUOGnpQITBa?2bX zG_IR<5P7D~3CAhlX@8Gj#>Q{PYB3-5T4y_T!J}J#I};{E8;nMnI0{jxE7n3d-tj#a7u+3(DSuV1c)9!EU(89k+pn)jRX-pxuAdR5*(e>uA;?^89LkHqD2Ymr-aAEsGzSF30R(V`gbUr zwMzU|UZa(58tf0{;!ynIgl`jM3CsJB`3qdcM}{Z!;tR@iVexS@o~EH8{?d$J+~f&w ynVqnx%upiF3|FIFG$Z|M<=V>1bdbaYmSiDIXZ!;`FP>e!MJJ#|lIUqTlz#(QNW5ME diff --git a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts index 2c0db74d91..80f300e7ad 100644 --- a/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts +++ b/packages/test-cases/cases/cli/plugin/codegen/006-custom-manifest-file/expected/wrap/wrap.info.ts @@ -2,2688 +2,2688 @@ /// All modifications will be overwritten. import { WrapManifest } from "@polywrap/wrap-manifest-types-js" -export const wrapManifest: WrapManifest = { +export const manifest: WrapManifest = { name: "Test", type: "plugin", version: "0.1", abi: { - "version": "0.1", - "objectTypes": [ - { - "type": "Object", - "kind": 1, - "properties": [ - { - "type": "UInt", - "name": "u", + "envType": { + "kind": 65536, + "properties": [ + { + "kind": 34, + "name": "arg1", + "required": true, + "scalar": { + "kind": 4, + "name": "arg1", "required": true, - "kind": 34, - "scalar": { - "type": "UInt", - "name": "u", - "required": true, - "kind": 4 - } + "type": "String" }, + "type": "String" + } + ], + "type": "Env" + }, + "importedModuleTypes": [ + { + "isInterface": false, + "kind": 256, + "methods": [ { - "type": "[Boolean]", - "name": "array", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "callContractView", "required": true, - "kind": 34, - "array": { - "type": "[Boolean]", - "name": "array", + "return": { + "kind": 34, + "name": "callContractView", "required": true, - "kind": 18, "scalar": { - "type": "Boolean", - "name": "array", + "kind": 4, + "name": "callContractView", "required": true, - "kind": 4 + "type": "String" }, - "item": { - "type": "Boolean", - "name": "array", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "Method" }, { - "type": "Bytes", - "name": "bytes", - "kind": 34, - "scalar": { - "type": "Bytes", - "name": "bytes", - "kind": 4 - } - } - ] - } - ], - "importedObjectTypes": [ - { - "type": "Ethereum_Connection", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "node", - "kind": 34, - "scalar": { - "type": "String", - "name": "node", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractStatic", + "required": true, + "return": { + "kind": 34, + "name": "callContractStatic", + "object": { + "kind": 8192, + "name": "callContractStatic", + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "required": true, + "type": "Ethereum_StaticTxResult" + }, + "type": "Method" }, { - "type": "String", - "name": "networkNameOrChainId", - "kind": 34, - "scalar": { - "type": "String", - "name": "networkNameOrChainId", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Connection" - }, - { - "type": "Ethereum_TxOverrides", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getBalance", + "required": true, + "return": { + "kind": 34, + "name": "getBalance", + "required": true, + "scalar": { + "kind": 4, + "name": "getBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeParams", + "required": true, + "return": { + "kind": 34, + "name": "encodeParams", + "required": true, + "scalar": { + "kind": 4, + "name": "encodeParams", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "result", + "arguments": [ + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + } + ], + "kind": 64, + "name": "encodeFunction", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "result", + "return": { + "kind": 34, + "name": "encodeFunction", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "encodeFunction", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "error", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityPack", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "error", + "return": { + "kind": 34, + "name": "solidityPack", "required": true, - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "StaticTxResult" - }, - { - "type": "Ethereum_TxRequest", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", - "kind": 34, - "scalar": { - "type": "String", - "name": "to", - "kind": 4 - } - }, - { - "type": "String", - "name": "from", - "kind": 34, - "scalar": { - "type": "String", - "name": "from", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "nonce", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "nonce", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasLimit", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasLimit", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "gasPrice", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasPrice", - "kind": 4 - } - }, - { - "type": "String", - "name": "data", - "kind": 34, - "scalar": { - "type": "String", - "name": "data", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "value", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "value", - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "chainId", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityPack", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxRequest" - }, - { - "type": "Ethereum_TxReceipt", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "to", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "solidityKeccak256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "to", + "return": { + "kind": 34, + "name": "solidityKeccak256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "solidityKeccak256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "from", + "arguments": [ + { + "array": { + "item": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "types", + "required": true, + "scalar": { + "kind": 4, + "name": "types", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "types", + "required": true, + "type": "[String]" + }, + { + "array": { + "item": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "values", + "required": true, + "scalar": { + "kind": 4, + "name": "values", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "values", + "required": true, + "type": "[String]" + } + ], + "kind": 64, + "name": "soliditySha256", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "from", + "return": { + "kind": 34, + "name": "soliditySha256", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "soliditySha256", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "String", - "name": "contractAddress", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "contractAddress", + "return": { + "kind": 34, + "name": "getSignerAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerAddress", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerBalance", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "getSignerBalance", "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "root", - "kind": 34, - "scalar": { - "type": "String", - "name": "root", - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerBalance", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "gasUsed", + "arguments": [ + { + "kind": 34, + "name": "blockTag", + "scalar": { + "kind": 4, + "name": "blockTag", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getSignerTransactionCount", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "gasUsed", + "return": { + "kind": 34, + "name": "getSignerTransactionCount", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getSignerTransactionCount", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "logsBloom", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "logsBloom", + "return": { + "kind": 34, + "name": "getGasPrice", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "getGasPrice", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "transactionHash", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "estimateTransactionGas", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "transactionHash", + "return": { + "kind": 34, + "name": "estimateTransactionGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateTransactionGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 34, - "array": { - "type": "[Ethereum_Log]", - "name": "logs", - "required": true, - "kind": 18, - "object": { - "type": "Ethereum_Log", - "name": "logs", + "arguments": [ + { + "kind": 34, + "name": "address", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" }, - "item": { - "type": "Ethereum_Log", - "name": "logs", + { + "kind": 34, + "name": "method", "required": true, - "kind": 8192 + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" } - } - }, - { - "type": "BigInt", - "name": "blockNumber", + ], + "kind": 64, + "name": "estimateContractCallGas", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "kind": 34, + "name": "estimateContractCallGas", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "estimateContractCallGas", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "checkAddress", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "checkAddress", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "checkAddress", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "confirmations", + "arguments": [ + { + "kind": 34, + "name": "eth", + "required": true, + "scalar": { + "kind": 4, + "name": "eth", + "required": true, + "type": "String" + }, + "type": "String" + } + ], + "kind": 64, + "name": "toWei", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", + "return": { + "kind": 34, + "name": "toWei", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toWei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "cumulativeGasUsed", + "arguments": [ + { + "kind": 34, + "name": "wei", + "required": true, + "scalar": { + "kind": 4, + "name": "wei", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + } + ], + "kind": 64, + "name": "toEth", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "cumulativeGasUsed", + "return": { + "kind": 34, + "name": "toEth", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "toEth", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "BigInt", - "name": "effectiveGasPrice", + "arguments": [ + { + "kind": 34, + "name": "txHash", + "required": true, + "scalar": { + "kind": 4, + "name": "txHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "confirmations", + "required": true, + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "timeout", + "required": true, + "scalar": { + "kind": 4, + "name": "timeout", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "awaitTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "effectiveGasPrice", + "return": { + "kind": 34, + "name": "awaitTransaction", + "object": { + "kind": 8192, + "name": "awaitTransaction", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "byzantium", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "event", + "required": true, + "scalar": { + "kind": 4, + "name": "event", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "timeout", + "scalar": { + "kind": 4, + "name": "timeout", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "waitForEvent", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "byzantium", + "return": { + "kind": 34, + "name": "waitForEvent", + "object": { + "kind": 8192, + "name": "waitForEvent", + "required": true, + "type": "Ethereum_EventNotification" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_EventNotification" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "type", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "getNetwork", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "type", + "return": { + "kind": 34, + "name": "getNetwork", + "object": { + "kind": 8192, + "name": "getNetwork", + "required": true, + "type": "Ethereum_Network" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_Network" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "status", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "status", - "kind": 4 - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxReceipt" - }, - { - "type": "Ethereum_Log", - "kind": 1025, - "properties": [ - { - "type": "BigInt", - "name": "blockNumber", + "arguments": [ + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "requestAccounts", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", + "return": { + "array": { + "item": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "requestAccounts", + "required": true, + "scalar": { + "kind": 4, + "name": "requestAccounts", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "requestAccounts", "required": true, - "kind": 4 - } + "type": "[String]" + }, + "type": "Method" }, { - "type": "String", - "name": "blockHash", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethod", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "blockHash", + "return": { + "kind": 34, + "name": "callContractMethod", + "object": { + "kind": 8192, + "name": "callContractMethod", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "UInt32", - "name": "transactionIndex", + "arguments": [ + { + "kind": 34, + "name": "address", + "required": true, + "scalar": { + "kind": 4, + "name": "address", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "method", + "required": true, + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + }, + { + "kind": 34, + "name": "txOverrides", + "object": { + "kind": 8192, + "name": "txOverrides", + "type": "Ethereum_TxOverrides" + }, + "type": "Ethereum_TxOverrides" + } + ], + "kind": 64, + "name": "callContractMethodAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "transactionIndex", + "return": { + "kind": 34, + "name": "callContractMethodAndWait", + "object": { + "kind": 8192, + "name": "callContractMethodAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "Boolean", - "name": "removed", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransaction", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "removed", + "return": { + "kind": 34, + "name": "sendTransaction", + "object": { + "kind": 8192, + "name": "sendTransaction", + "required": true, + "type": "Ethereum_TxResponse" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxResponse" + }, + "type": "Method" }, { - "type": "String", - "name": "address", + "arguments": [ + { + "kind": 34, + "name": "tx", + "object": { + "kind": 8192, + "name": "tx", + "required": true, + "type": "Ethereum_TxRequest" + }, + "required": true, + "type": "Ethereum_TxRequest" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "sendTransactionAndWait", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", + "return": { + "kind": 34, + "name": "sendTransactionAndWait", + "object": { + "kind": 8192, + "name": "sendTransactionAndWait", + "required": true, + "type": "Ethereum_TxReceipt" + }, "required": true, - "kind": 4 - } + "type": "Ethereum_TxReceipt" + }, + "type": "Method" }, { - "type": "String", - "name": "data", + "arguments": [ + { + "kind": 34, + "name": "abi", + "required": true, + "scalar": { + "kind": 4, + "name": "abi", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "bytecode", + "required": true, + "scalar": { + "kind": 4, + "name": "bytecode", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "array": { + "item": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "args", + "scalar": { + "kind": 4, + "name": "args", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "args", + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "deployContract", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "data", + "return": { + "kind": 34, + "name": "deployContract", "required": true, - "kind": 4 - } + "scalar": { + "kind": 4, + "name": "deployContract", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" }, { - "type": "[String]", - "name": "topics", + "arguments": [ + { + "kind": 34, + "name": "message", + "required": true, + "scalar": { + "kind": 4, + "name": "message", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" + } + ], + "kind": 64, + "name": "signMessage", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "topics", + "return": { + "kind": 34, + "name": "signMessage", "required": true, - "kind": 18, "scalar": { - "type": "String", - "name": "topics", + "kind": 4, + "name": "signMessage", + "required": true, + "type": "String" + }, + "type": "String" + }, + "type": "Method" + }, + { + "arguments": [ + { + "kind": 34, + "name": "method", "required": true, - "kind": 4 + "scalar": { + "kind": 4, + "name": "method", + "required": true, + "type": "String" + }, + "type": "String" }, - "item": { - "type": "String", - "name": "topics", + { + "array": { + "item": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "kind": 18, + "name": "params", + "required": true, + "scalar": { + "kind": 4, + "name": "params", + "required": true, + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "params", "required": true, - "kind": 4 + "type": "[String]" + }, + { + "kind": 34, + "name": "connection", + "object": { + "kind": 8192, + "name": "connection", + "type": "Ethereum_Connection" + }, + "type": "Ethereum_Connection" } - } - }, - { - "type": "String", - "name": "transactionHash", + ], + "kind": 64, + "name": "sendRPC", "required": true, + "return": { + "kind": 34, + "name": "sendRPC", + "scalar": { + "kind": 4, + "name": "sendRPC", + "type": "String" + }, + "type": "String" + }, + "type": "Method" + } + ], + "namespace": "Ethereum", + "nativeType": "Module", + "type": "Ethereum_Module", + "uri": "ens/ethereum.polywrap.eth" + } + ], + "importedObjectTypes": [ + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Connection", + "properties": [ + { "kind": 34, + "name": "node", "scalar": { - "type": "String", - "name": "transactionHash", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "node", + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "logIndex", - "required": true, "kind": 34, + "name": "networkNameOrChainId", "scalar": { - "type": "UInt32", - "name": "logIndex", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "networkNameOrChainId", + "type": "String" + }, + "type": "String" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Log" + "type": "Ethereum_Connection", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_EventNotification", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxOverrides", "properties": [ { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "String", - "name": "data", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasLimit", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "address", - "required": true, "kind": 34, + "name": "gasPrice", "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Ethereum_Log", - "name": "log", - "required": true, "kind": 34, - "object": { - "type": "Ethereum_Log", - "name": "log", - "required": true, - "kind": 8192 - } + "name": "value", + "scalar": { + "kind": 4, + "name": "value", + "type": "BigInt" + }, + "type": "BigInt" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "EventNotification" + "type": "Ethereum_TxOverrides", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_Network", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "StaticTxResult", "properties": [ { - "type": "String", - "name": "name", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "name", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "chainId", + "name": "result", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "chainId", + "kind": 4, + "name": "result", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "ensAddress", "kind": 34, + "name": "error", + "required": true, "scalar": { - "type": "String", - "name": "ensAddress", - "kind": 4 - } + "kind": 4, + "name": "error", + "required": true, + "type": "Boolean" + }, + "type": "Boolean" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Network" + "type": "Ethereum_StaticTxResult", + "uri": "ens/ethereum.polywrap.eth" }, { - "type": "Ethereum_TxResponse", "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxRequest", "properties": [ { - "type": "String", - "name": "hash", - "required": true, "kind": 34, - "scalar": { - "type": "String", - "name": "hash", - "required": true, - "kind": 4 - } - }, - { - "type": "String", "name": "to", - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "to", - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "from", - "required": true, "kind": 34, + "name": "from", "scalar": { - "type": "String", + "kind": 4, "name": "from", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "nonce", - "required": true, "kind": 34, + "name": "nonce", "scalar": { - "type": "UInt32", + "kind": 4, "name": "nonce", - "required": true, - "kind": 4 - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "BigInt", - "name": "gasLimit", - "required": true, "kind": 34, + "name": "gasLimit", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasLimit", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "gasPrice", "kind": 34, + "name": "gasPrice", "scalar": { - "type": "BigInt", + "kind": 4, "name": "gasPrice", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "data", - "required": true, "kind": 34, + "name": "data", "scalar": { - "type": "String", + "kind": 4, "name": "data", - "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "BigInt", - "name": "value", - "required": true, "kind": 34, + "name": "value", "scalar": { - "type": "BigInt", + "kind": 4, "name": "value", - "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "BigInt", - "name": "chainId", - "required": true, "kind": 34, + "name": "chainId", "scalar": { - "type": "BigInt", + "kind": 4, "name": "chainId", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockNumber", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockNumber", - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "String", - "name": "blockHash", "kind": 34, + "name": "type", "scalar": { - "type": "String", - "name": "blockHash", - "kind": 4 - } - }, + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxRequest", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxReceipt", + "properties": [ { - "type": "UInt32", - "name": "timestamp", "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timestamp", - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", + "name": "to", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", - "name": "confirmations", + "kind": 4, + "name": "to", "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "raw", - "kind": 34, - "scalar": { - "type": "String", - "name": "raw", - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "r", "kind": 34, + "name": "from", + "required": true, "scalar": { - "type": "String", - "name": "r", - "kind": 4 - } + "kind": 4, + "name": "from", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "s", "kind": 34, + "name": "contractAddress", + "required": true, "scalar": { - "type": "String", - "name": "s", - "kind": 4 - } + "kind": 4, + "name": "contractAddress", + "required": true, + "type": "String" + }, + "type": "String" }, { - "type": "UInt32", - "name": "v", "kind": 34, + "name": "transactionIndex", + "required": true, "scalar": { - "type": "UInt32", - "name": "v", - "kind": 4 - } + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "UInt32", - "name": "type", "kind": 34, + "name": "root", "scalar": { - "type": "UInt32", - "name": "type", - "kind": 4 - } + "kind": 4, + "name": "root", + "type": "String" + }, + "type": "String" }, { - "type": "[Ethereum_Access]", - "name": "accessList", "kind": 34, - "array": { - "type": "[Ethereum_Access]", - "name": "accessList", - "kind": 18, - "object": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - }, - "item": { - "type": "Ethereum_Access", - "name": "accessList", - "required": true, - "kind": 8192 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "TxResponse" - }, - { - "type": "Ethereum_Access", - "kind": 1025, - "properties": [ - { - "type": "String", - "name": "address", + "name": "gasUsed", "required": true, - "kind": 34, "scalar": { - "type": "String", - "name": "address", + "kind": 4, + "name": "gasUsed", "required": true, - "kind": 4 - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "[String]", - "name": "storageKeys", - "required": true, "kind": 34, - "array": { - "type": "[String]", - "name": "storageKeys", + "name": "logsBloom", + "required": true, + "scalar": { + "kind": 4, + "name": "logsBloom", "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "storageKeys", - "required": true, - "kind": 4 - } - } - } - ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Access" - } - ], - "importedModuleTypes": [ - { - "type": "Ethereum_Module", - "kind": 256, - "methods": [ + "type": "String" + }, + "type": "String" + }, { - "type": "Method", - "name": "callContractView", + "kind": 34, + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "callContractView", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "callContractView", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractStatic", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", + "array": { + "item": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } + "type": "Ethereum_Log" }, - { - "type": "String", - "name": "method", + "kind": 18, + "name": "logs", + "object": { + "kind": 8192, + "name": "logs", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } + "type": "Ethereum_Log" }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_StaticTxResult", - "name": "callContractStatic", - "required": true, - "kind": 8192 - } - } + "type": "[Ethereum_Log]" + }, + "kind": 34, + "name": "logs", + "required": true, + "type": "[Ethereum_Log]" }, { - "type": "Method", - "name": "getBalance", + "kind": 34, + "name": "blockNumber", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getBalance", + "scalar": { + "kind": 4, + "name": "blockNumber", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getBalance", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "encodeParams", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeParams", + "kind": 34, + "name": "blockHash", + "required": true, + "scalar": { + "kind": 4, + "name": "blockHash", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeParams", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "encodeFunction", + "kind": 34, + "name": "confirmations", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "encodeFunction", + "scalar": { + "kind": 4, + "name": "confirmations", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "encodeFunction", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "solidityPack", + "kind": 34, + "name": "cumulativeGasUsed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityPack", + "scalar": { + "kind": 4, + "name": "cumulativeGasUsed", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityPack", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "solidityKeccak256", + "kind": 34, + "name": "effectiveGasPrice", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "solidityKeccak256", + "scalar": { + "kind": 4, + "name": "effectiveGasPrice", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "solidityKeccak256", - "required": true, - "kind": 4 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "soliditySha256", + "kind": 34, + "name": "byzantium", "required": true, - "kind": 64, - "arguments": [ - { - "type": "[String]", - "name": "types", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "types", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "types", - "required": true, - "kind": 4 - } - } - }, - { - "type": "[String]", - "name": "values", - "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "values", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "values", - "required": true, - "kind": 4 - } - } - } - ], - "return": { - "type": "String", - "name": "soliditySha256", + "scalar": { + "kind": 4, + "name": "byzantium", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "soliditySha256", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerAddress", + "kind": 34, + "name": "type", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "getSignerAddress", + "scalar": { + "kind": 4, + "name": "type", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "getSignerAddress", - "required": true, - "kind": 4 - } - } + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "status", + "scalar": { + "kind": 4, + "name": "status", + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_TxReceipt", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Log", + "properties": [ + { + "kind": 34, + "name": "blockNumber", + "required": true, + "scalar": { + "kind": 4, + "name": "blockNumber", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "required": true, + "scalar": { + "kind": 4, + "name": "blockHash", + "required": true, + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "transactionIndex", + "required": true, + "scalar": { + "kind": 4, + "name": "transactionIndex", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "getSignerBalance", + "kind": 34, + "name": "removed", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerBalance", + "scalar": { + "kind": 4, + "name": "removed", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerBalance", - "required": true, - "kind": 4 - } - } + "type": "Boolean" + }, + "type": "Boolean" }, { - "type": "Method", - "name": "getSignerTransactionCount", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "blockTag", - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "blockTag", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getSignerTransactionCount", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getSignerTransactionCount", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "getGasPrice", + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "getGasPrice", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "getGasPrice", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "estimateTransactionGas", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", + "array": { + "item": { + "kind": 4, + "name": "topics", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 18, + "name": "topics", "required": true, - "kind": 34, "scalar": { - "type": "BigInt", - "name": "estimateTransactionGas", + "kind": 4, + "name": "topics", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "[String]" + }, + "kind": 34, + "name": "topics", + "required": true, + "type": "[String]" }, { - "type": "Method", - "name": "estimateContractCallGas", + "kind": 34, + "name": "transactionHash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "BigInt", - "name": "estimateContractCallGas", + "scalar": { + "kind": 4, + "name": "transactionHash", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "estimateContractCallGas", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "checkAddress", + "kind": 34, + "name": "logIndex", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "Boolean", - "name": "checkAddress", + "scalar": { + "kind": 4, + "name": "logIndex", "required": true, - "kind": 34, - "scalar": { - "type": "Boolean", - "name": "checkAddress", - "required": true, - "kind": 4 - } - } - }, + "type": "UInt32" + }, + "type": "UInt32" + } + ], + "type": "Ethereum_Log", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "EventNotification", + "properties": [ { - "type": "Method", - "name": "toWei", + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "eth", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "eth", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "BigInt", - "name": "toWei", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "toWei", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "toEth", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 34, - "scalar": { - "type": "BigInt", - "name": "wei", - "required": true, - "kind": 4 - } - } - ], - "return": { - "type": "String", - "name": "toEth", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "toEth", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "awaitTransaction", + "kind": 34, + "name": "log", + "object": { + "kind": 8192, + "name": "log", + "required": true, + "type": "Ethereum_Log" + }, "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "txHash", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "txHash", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "confirmations", - "required": true, - "kind": 4 - } - }, - { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", + "type": "Ethereum_Log" + } + ], + "type": "Ethereum_EventNotification", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Network", + "properties": [ + { + "kind": 34, + "name": "name", + "required": true, + "scalar": { + "kind": 4, + "name": "name", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "awaitTransaction", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "waitForEvent", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "event", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "event", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "UInt32", - "name": "timeout", - "kind": 34, - "scalar": { - "type": "UInt32", - "name": "timeout", - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", + "scalar": { + "kind": 4, + "name": "chainId", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_EventNotification", - "name": "waitForEvent", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "getNetwork", + "kind": 34, + "name": "ensAddress", + "scalar": { + "kind": 4, + "name": "ensAddress", + "type": "String" + }, + "type": "String" + } + ], + "type": "Ethereum_Network", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "TxResponse", + "properties": [ + { + "kind": 34, + "name": "hash", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_Network", - "name": "getNetwork", + "scalar": { + "kind": 4, + "name": "hash", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_Network", - "name": "getNetwork", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "requestAccounts", + "kind": 34, + "name": "to", + "scalar": { + "kind": 4, + "name": "to", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "from", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "[String]", - "name": "requestAccounts", + "scalar": { + "kind": 4, + "name": "from", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "requestAccounts", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "requestAccounts", - "required": true, - "kind": 4 - } - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "callContractMethod", + "kind": 34, + "name": "nonce", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", + "scalar": { + "kind": 4, + "name": "nonce", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "callContractMethod", - "required": true, - "kind": 8192 - } - } + "type": "UInt32" + }, + "type": "UInt32" }, { - "type": "Method", - "name": "callContractMethodAndWait", + "kind": 34, + "name": "gasLimit", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "address", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "address", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "method", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - }, - { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 34, - "object": { - "type": "Ethereum_TxOverrides", - "name": "txOverrides", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", + "scalar": { + "kind": 4, + "name": "gasLimit", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "callContractMethodAndWait", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "sendTransaction", + "kind": 34, + "name": "gasPrice", + "scalar": { + "kind": 4, + "name": "gasPrice", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "data", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", + "scalar": { + "kind": 4, + "name": "data", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxResponse", - "name": "sendTransaction", - "required": true, - "kind": 8192 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendTransactionAndWait", + "kind": 34, + "name": "value", "required": true, - "kind": 64, - "arguments": [ - { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxRequest", - "name": "tx", - "required": true, - "kind": 8192 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", + "scalar": { + "kind": 4, + "name": "value", "required": true, - "kind": 34, - "object": { - "type": "Ethereum_TxReceipt", - "name": "sendTransactionAndWait", - "required": true, - "kind": 8192 - } - } + "type": "BigInt" + }, + "type": "BigInt" }, { - "type": "Method", - "name": "deployContract", + "kind": 34, + "name": "chainId", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "abi", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "abi", - "required": true, - "kind": 4 - } - }, - { - "type": "String", - "name": "bytecode", + "scalar": { + "kind": 4, + "name": "chainId", + "required": true, + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockNumber", + "scalar": { + "kind": 4, + "name": "blockNumber", + "type": "BigInt" + }, + "type": "BigInt" + }, + { + "kind": 34, + "name": "blockHash", + "scalar": { + "kind": 4, + "name": "blockHash", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "timestamp", + "scalar": { + "kind": 4, + "name": "timestamp", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "confirmations", + "required": true, + "scalar": { + "kind": 4, + "name": "confirmations", + "required": true, + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "raw", + "scalar": { + "kind": 4, + "name": "raw", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "r", + "scalar": { + "kind": 4, + "name": "r", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "s", + "scalar": { + "kind": 4, + "name": "s", + "type": "String" + }, + "type": "String" + }, + { + "kind": 34, + "name": "v", + "scalar": { + "kind": 4, + "name": "v", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "kind": 34, + "name": "type", + "scalar": { + "kind": 4, + "name": "type", + "type": "UInt32" + }, + "type": "UInt32" + }, + { + "array": { + "item": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "bytecode", - "required": true, - "kind": 4 - } - }, - { - "type": "[String]", - "name": "args", - "kind": 34, - "array": { - "type": "[String]", - "name": "args", - "kind": 18, - "scalar": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "args", - "required": true, - "kind": 4 - } - } + "type": "Ethereum_Access" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "deployContract", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "deployContract", + "kind": 18, + "name": "accessList", + "object": { + "kind": 8192, + "name": "accessList", "required": true, - "kind": 4 - } - } - }, + "type": "Ethereum_Access" + }, + "type": "[Ethereum_Access]" + }, + "kind": 34, + "name": "accessList", + "type": "[Ethereum_Access]" + } + ], + "type": "Ethereum_TxResponse", + "uri": "ens/ethereum.polywrap.eth" + }, + { + "kind": 1025, + "namespace": "Ethereum", + "nativeType": "Access", + "properties": [ { - "type": "Method", - "name": "signMessage", + "kind": 34, + "name": "address", "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "message", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "message", - "required": true, - "kind": 4 - } - }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "signMessage", + "scalar": { + "kind": 4, + "name": "address", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "signMessage", - "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" }, { - "type": "Method", - "name": "sendRPC", - "required": true, - "kind": 64, - "arguments": [ - { - "type": "String", - "name": "method", + "array": { + "item": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "method", - "required": true, - "kind": 4 - } + "type": "String" }, - { - "type": "[String]", - "name": "params", + "kind": 18, + "name": "storageKeys", + "required": true, + "scalar": { + "kind": 4, + "name": "storageKeys", "required": true, - "kind": 34, - "array": { - "type": "[String]", - "name": "params", - "required": true, - "kind": 18, - "scalar": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - }, - "item": { - "type": "String", - "name": "params", - "required": true, - "kind": 4 - } - } + "type": "String" }, - { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 34, - "object": { - "type": "Ethereum_Connection", - "name": "connection", - "kind": 8192 - } - } - ], - "return": { - "type": "String", - "name": "sendRPC", - "kind": 34, - "scalar": { - "type": "String", - "name": "sendRPC", - "kind": 4 - } - } + "type": "[String]" + }, + "kind": 34, + "name": "storageKeys", + "required": true, + "type": "[String]" } ], - "uri": "ens/ethereum.polywrap.eth", - "namespace": "Ethereum", - "nativeType": "Module", - "isInterface": false + "type": "Ethereum_Access", + "uri": "ens/ethereum.polywrap.eth" } ], "moduleType": { - "type": "Module", + "imports": [ + { + "type": "Ethereum_Module" + }, + { + "type": "Ethereum_Connection" + }, + { + "type": "Ethereum_TxOverrides" + }, + { + "type": "Ethereum_StaticTxResult" + }, + { + "type": "Ethereum_TxRequest" + }, + { + "type": "Ethereum_TxReceipt" + }, + { + "type": "Ethereum_Log" + }, + { + "type": "Ethereum_EventNotification" + }, + { + "type": "Ethereum_Network" + }, + { + "type": "Ethereum_TxResponse" + }, + { + "type": "Ethereum_Access" + } + ], "kind": 128, "methods": [ { - "type": "Method", - "name": "methodOne", - "required": true, - "kind": 64, "arguments": [ { - "type": "String", + "kind": 34, "name": "str", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "str", "required": true, - "kind": 4 - } + "type": "String" + }, + "type": "String" }, { - "type": "String", - "name": "optStr", "kind": 34, + "name": "optStr", "scalar": { - "type": "String", + "kind": 4, "name": "optStr", - "kind": 4 - } + "type": "String" + }, + "type": "String" } ], + "kind": 64, + "name": "methodOne", + "required": true, "return": { - "type": "Object", - "name": "methodOne", - "required": true, "kind": 34, + "name": "methodOne", "object": { - "type": "Object", + "kind": 8192, "name": "methodOne", "required": true, - "kind": 8192 - } - } + "type": "Object" + }, + "required": true, + "type": "Object" + }, + "type": "Method" }, { - "type": "Method", - "name": "methodTwo", - "required": true, - "kind": 64, "arguments": [ { - "type": "UInt32", + "kind": 34, "name": "arg", "required": true, - "kind": 34, "scalar": { - "type": "UInt32", + "kind": 4, "name": "arg", "required": true, - "kind": 4 + "type": "UInt32" }, + "type": "UInt32" } ], + "kind": 64, + "name": "methodTwo", + "required": true, "return": { - "type": "String", + "kind": 34, "name": "methodTwo", "required": true, - "kind": 34, "scalar": { - "type": "String", + "kind": 4, "name": "methodTwo", "required": true, - "kind": 4 - } - } + "type": "String" + }, + "type": "String" + }, + "type": "Method" } ], - "imports": [ - { - "type": "Ethereum_Module" - }, - { - "type": "Ethereum_Connection" - }, - { - "type": "Ethereum_TxOverrides" - }, - { - "type": "Ethereum_StaticTxResult" - }, - { - "type": "Ethereum_TxRequest" - }, - { - "type": "Ethereum_TxReceipt" - }, - { - "type": "Ethereum_Log" - }, - { - "type": "Ethereum_EventNotification" - }, - { - "type": "Ethereum_Network" - }, - { - "type": "Ethereum_TxResponse" - }, - { - "type": "Ethereum_Access" - } - ] + "type": "Module" }, - "envType": { - "type": "Env", - "kind": 65536, - "properties": [ - { - "type": "String", - "name": "arg1", - "required": true, - "kind": 34, - "scalar": { - "type": "String", - "name": "arg1", + "objectTypes": [ + { + "kind": 1, + "properties": [ + { + "kind": 34, + "name": "u", + "required": true, + "scalar": { + "kind": 4, + "name": "u", + "required": true, + "type": "UInt" + }, + "type": "UInt" + }, + { + "array": { + "item": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "kind": 18, + "name": "array", + "required": true, + "scalar": { + "kind": 4, + "name": "array", + "required": true, + "type": "Boolean" + }, + "type": "[Boolean]" + }, + "kind": 34, + "name": "array", "required": true, - "kind": 4 + "type": "[Boolean]" + }, + { + "kind": 34, + "name": "bytes", + "scalar": { + "kind": 4, + "name": "bytes", + "type": "Bytes" + }, + "type": "Bytes" } - } - ] - } + ], + "type": "Object" + } + ], + "version": "0.1" } } From cd9c71fdacd0a5704189326cfc61da6ff7fdbd10 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 06:23:03 -0700 Subject: [PATCH 55/56] fix deploy test --- packages/cli/src/__tests__/e2e/deploy.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/__tests__/e2e/deploy.spec.ts b/packages/cli/src/__tests__/e2e/deploy.spec.ts index 672fd98e5e..2df0e8e374 100644 --- a/packages/cli/src/__tests__/e2e/deploy.spec.ts +++ b/packages/cli/src/__tests__/e2e/deploy.spec.ts @@ -207,13 +207,13 @@ describe("e2e tests for deploy command", () => { input: { uri: "wrap://fs/./build" }, - result: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR" + result: "wrap://ipfs/QmT5nBb8xwrfZnmFNRZexmrebzaaxW7CPfh1ZznQ6zsVaG" }, { id: "ipfs_deploy.from_deploy", name: "from_deploy", input: { - uri: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR", + uri: "wrap://ipfs/QmT5nBb8xwrfZnmFNRZexmrebzaaxW7CPfh1ZznQ6zsVaG", config: { domainName: "test1.eth", provider: "http://localhost:8545", @@ -226,7 +226,7 @@ describe("e2e tests for deploy command", () => { id: "ipfs_deploy.from_deploy2", name: "from_deploy2", input: { - uri: "wrap://ipfs/QmWgCskLDXKs33tyEhjfijWB6GTaV4cVQvHj87jYde7XcR", + uri: "wrap://ipfs/QmT5nBb8xwrfZnmFNRZexmrebzaaxW7CPfh1ZznQ6zsVaG", config: { domainName: "test2.eth", provider: "http://localhost:8545", From aaefd3b2ada085610d93c9a9bcf1081334d71bae Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 18 Aug 2022 06:25:37 -0700 Subject: [PATCH 56/56] lint fix --- .../schema/bind/src/bindings/typescript/plugin/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/schema/bind/src/bindings/typescript/plugin/index.ts b/packages/schema/bind/src/bindings/typescript/plugin/index.ts index 7e1f3c58ee..c6111472dc 100644 --- a/packages/schema/bind/src/bindings/typescript/plugin/index.ts +++ b/packages/schema/bind/src/bindings/typescript/plugin/index.ts @@ -61,11 +61,7 @@ export const generateBinding: GenerateBindingFn = ( ), }; - output.entries = renderTemplates( - templatePath(""), - { ...abi, manifest }, - {} - ); + output.entries = renderTemplates(templatePath(""), { ...abi, manifest }, {}); return result; };