diff --git a/examples/jq.ts b/examples/jq.ts index 797d943..fb95391 100755 --- a/examples/jq.ts +++ b/examples/jq.ts @@ -8,7 +8,6 @@ async function main() { const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY, baseUrl: "https://api.substrate.run", - backend: "v1", }); const a = new GenerateJSON({ diff --git a/examples/kitchen-sink.ts b/examples/kitchen-sink.ts index a33ba7f..8fd2e97 100755 --- a/examples/kitchen-sink.ts +++ b/examples/kitchen-sink.ts @@ -570,7 +570,6 @@ async function main() { const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY, baseUrl: env.url.value, - backend: env.backend.value, }); const tag = `[${env.url.name}:${env.backend.value}]`; diff --git a/examples/large-run.ts b/examples/large-run.ts index 793818d..2fc0c0b 100755 --- a/examples/large-run.ts +++ b/examples/large-run.ts @@ -8,7 +8,6 @@ async function main() { const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY, baseUrl: "https://api-staging.substrate.run", - backend: "v1", }); let nodes = []; diff --git a/src/Substrate.ts b/src/Substrate.ts index c38c770..2e82718 100644 --- a/src/Substrate.ts +++ b/src/Substrate.ts @@ -26,11 +26,6 @@ type Configuration = { */ timeout?: number; - /** - * Switches between existing backend and newer backend - */ - backend?: "v0" | "v1"; - /** * Add additional headers to each request. These may override headers set by the Substrate client. */ @@ -45,7 +40,6 @@ export class Substrate { baseUrl: NonNullable; apiVersion: NonNullable; timeout: NonNullable; - backend: NonNullable; additionalHeaders: NonNullable; /** @@ -56,7 +50,6 @@ export class Substrate { baseUrl, apiVersion, timeout, - backend, additionalHeaders, }: Configuration) { if (!apiKey) { @@ -68,7 +61,6 @@ export class Substrate { this.baseUrl = baseUrl ?? "https://api.substrate.run"; this.apiVersion = apiVersion ?? OpenAPIjson["info"]["version"]; this.timeout = timeout ?? 300_000; - this.backend = backend ?? "v1"; this.additionalHeaders = additionalHeaders ?? {}; } @@ -235,7 +227,6 @@ export class Substrate { headers.append("Content-Type", "application/json"); headers.append("User-Agent", `APIClient/JS ${VERSION}`); headers.append("X-Substrate-Version", this.apiVersion); - headers.append("X-Substrate-Backend", this.backend); // Switch between old and new backends headers.append("X-Substrate-Request-Id", randomString(32)); // Auth