Socket
Socket
Sign inDemoInstall

@radixdlt/networking

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radixdlt/networking - npm Package Compare versions

Comparing version 2.1.17 to 2.1.18

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.1.18](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/networking@2.1.17...@radixdlt/networking@2.1.18) (2022-11-10)
**Note:** Version bump only for package @radixdlt/networking
## [2.1.17](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/networking@2.1.16...@radixdlt/networking@2.1.17) (2022-08-22)

@@ -8,0 +16,0 @@

2

dist/open-api-client.js

@@ -50,3 +50,3 @@ "use strict";

_1.TokenApiFactory,
_1.StatusApiFactory
_1.StatusApiFactory,
].reduce((acc, factory) => (Object.assign(Object.assign({}, acc), factory(configuration))), {});

@@ -53,0 +53,0 @@ return {

@@ -12,3 +12,3 @@ /**

*/
import { Configuration } from "./configuration";
import { Configuration } from './configuration';
import { AxiosInstance, AxiosRequestConfig } from 'axios';

@@ -54,5 +54,5 @@ export declare const BASE_PATH: string;

field: string;
name: "RequiredError";
name: 'RequiredError';
constructor(field: string, msg?: string);
}
//# sourceMappingURL=base.d.ts.map

@@ -21,3 +21,3 @@ "use strict";

const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
exports.BASE_PATH = "http://localhost:5208".replace(/\/+$/, "");
exports.BASE_PATH = 'http://localhost:5208'.replace(/\/+$/, '');
/**

@@ -28,6 +28,6 @@ *

exports.COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};

@@ -50,3 +50,2 @@ /**

exports.BaseAPI = BaseAPI;
;
/**

@@ -62,3 +61,3 @@ *

this.field = field;
this.name = "RequiredError";
this.name = 'RequiredError';
}

@@ -65,0 +64,0 @@ }

@@ -12,4 +12,4 @@ /**

*/
import { Configuration } from "./configuration";
import { RequestArgs } from "./base";
import { Configuration } from './configuration';
import { RequestArgs } from './base';
import { AxiosInstance, AxiosResponse } from 'axios';

@@ -16,0 +16,0 @@ /**

@@ -56,3 +56,6 @@ "use strict";

if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
object['auth'] = {
username: configuration.username,
password: configuration.password,
};
}

@@ -71,3 +74,3 @@ };

: yield configuration.accessToken;
object["Authorization"] = "Bearer " + accessToken;
object['Authorization'] = 'Bearer ' + accessToken;
}

@@ -87,3 +90,3 @@ });

: yield configuration.accessToken;
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
object['Authorization'] = 'Bearer ' + localVarAccessTokenValue;
}

@@ -126,3 +129,3 @@ });

? JSON.stringify(value !== undefined ? value : {})
: (value || "");
: value || '';
};

@@ -129,0 +132,0 @@ exports.serializeDataIfNeeded = serializeDataIfNeeded;

@@ -38,4 +38,6 @@ "use strict";

isJsonMime(mime) {
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
const jsonMime = new RegExp('^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return (mime !== null &&
(jsonMime.test(mime) ||
mime.toLowerCase() === 'application/json-patch+json'));
}

@@ -42,0 +44,0 @@ }

@@ -12,4 +12,4 @@ /**

*/
export * from "./api";
export * from "./configuration";
export * from './api';
export * from './configuration';
//# sourceMappingURL=index.d.ts.map

@@ -1,7 +0,13 @@

const fs = require('fs');
const path = require('path');
const fs = require('fs')
const path = require('path')
const text = fs.readFileSync(path.join(__dirname, 'src', 'open-api', 'api.ts'), {encoding: 'utf-8'});
const version = text.match(/The version of the OpenAPI document: (\d.\d.\d)/)[1];
const text = fs.readFileSync(
path.join(__dirname, 'src', 'open-api', 'api.ts'),
{ encoding: 'utf-8' },
)
const version = text.match(/The version of the OpenAPI document: (\d.\d.\d)/)[1]
fs.writeFileSync(path.join(__dirname, 'src', 'open-api', 'api-version.ts'), `export const apiVersion = '${version}'`)
fs.writeFileSync(
path.join(__dirname, 'src', 'open-api', 'api-version.ts'),
`export const apiVersion = '${version}'`,
)
{
"name": "@radixdlt/networking",
"version": "2.1.17",
"version": "2.1.18",
"description": "Requesting and sending data from/to Radix Core RPC API over HTTP(s).",

@@ -44,3 +44,3 @@ "keywords": [

},
"gitHead": "14ef871b175ad600f391f03665ce0fc51039ff86"
"gitHead": "d0eb25bca558eb21d4eab1d27840626d7d64376d"
}

@@ -10,3 +10,3 @@ import { ResultAsync } from 'neverthrow'

param: Params,
headers?: Record<string, string>
headers?: Record<string, string>,
) => ResultAsync<Return, Error>

@@ -13,0 +13,0 @@

@@ -14,3 +14,3 @@ import 'isomorphic-fetch'

TokenApiFactory,
StatusApiFactory
StatusApiFactory,
} from '.'

@@ -41,3 +41,3 @@ import { AxiosResponse, AxiosError } from 'axios'

ReturnType<typeof TransactionApiFactory> &
ReturnType<typeof TokenApiFactory> &
ReturnType<typeof TokenApiFactory> &
ReturnType<typeof StatusApiFactory>

@@ -111,3 +111,3 @@

TokenApiFactory,
StatusApiFactory
StatusApiFactory,
].reduce<ClientInterface>(

@@ -114,0 +114,0 @@ (acc, factory) => ({

@@ -1,1 +0,1 @@

export const apiVersion = '1.1.6'
export const apiVersion = '1.1.6'

@@ -5,7 +5,7 @@ /* tslint:disable */

* Radix Gateway API
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
*
* The version of the OpenAPI document: 1.1.6
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

@@ -16,9 +16,12 @@ * https://openapi-generator.tech

import { Configuration } from "./configuration";
import { Configuration } from './configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import globalAxios, {
AxiosPromise,
AxiosInstance,
AxiosRequestConfig,
} from 'axios'
export const BASE_PATH = "http://localhost:5208".replace(/\/+$/, "");
export const BASE_PATH = 'http://localhost:5208'.replace(/\/+$/, '')

@@ -30,7 +33,7 @@ /**

export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
}

@@ -43,4 +46,4 @@ /**

export interface RequestArgs {
url: string;
options: AxiosRequestConfig;
url: string
options: AxiosRequestConfig
}

@@ -54,11 +57,15 @@

export class BaseAPI {
protected configuration: Configuration | undefined;
protected configuration: Configuration | undefined
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
};
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected axios: AxiosInstance = globalAxios,
) {
if (configuration) {
this.configuration = configuration
this.basePath = configuration.basePath || this.basePath
}
}
}

@@ -72,6 +79,6 @@ /**

export class RequiredError extends Error {
name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {
super(msg);
}
name: 'RequiredError' = 'RequiredError'
constructor(public field: string, msg?: string) {
super(msg)
}
}

@@ -5,7 +5,7 @@ /* tslint:disable */

* Radix Gateway API
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
*
* The version of the OpenAPI document: 1.1.6
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

@@ -16,7 +16,6 @@ * https://openapi-generator.tech

import { Configuration } from './configuration'
import { RequiredError, RequestArgs } from './base'
import { AxiosInstance, AxiosResponse } from 'axios'
import { Configuration } from "./configuration";
import { RequiredError, RequestArgs } from "./base";
import { AxiosInstance, AxiosResponse } from 'axios';
/**

@@ -33,6 +32,13 @@ *

*/
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
if (paramValue === null || paramValue === undefined) {
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
}
export const assertParamExists = function (
functionName: string,
paramName: string,
paramValue: unknown,
) {
if (paramValue === null || paramValue === undefined) {
throw new RequiredError(
paramName,
`Required parameter ${paramName} was null or undefined when calling ${functionName}.`,
)
}
}

@@ -44,9 +50,14 @@

*/
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? await configuration.apiKey(keyParamName)
: await configuration.apiKey;
object[keyParamName] = localVarApiKeyValue;
}
export const setApiKeyToObject = async function (
object: any,
keyParamName: string,
configuration?: Configuration,
) {
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? await configuration.apiKey(keyParamName)
: await configuration.apiKey
object[keyParamName] = localVarApiKeyValue
}
}

@@ -58,6 +69,12 @@

*/
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
}
export const setBasicAuthToObject = function (
object: any,
configuration?: Configuration,
) {
if (configuration && (configuration.username || configuration.password)) {
object['auth'] = {
username: configuration.username,
password: configuration.password,
}
}
}

@@ -69,9 +86,13 @@

*/
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
object["Authorization"] = "Bearer " + accessToken;
}
export const setBearerAuthToObject = async function (
object: any,
configuration?: Configuration,
) {
if (configuration && configuration.accessToken) {
const accessToken =
typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken
object['Authorization'] = 'Bearer ' + accessToken
}
}

@@ -83,9 +104,15 @@

*/
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
}
export const setOAuthToObject = async function (
object: any,
name: string,
scopes: string[],
configuration?: Configuration,
) {
if (configuration && configuration.accessToken) {
const localVarAccessTokenValue =
typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken
object['Authorization'] = 'Bearer ' + localVarAccessTokenValue
}
}

@@ -98,16 +125,16 @@

export const setSearchParams = function (url: URL, ...objects: any[]) {
const searchParams = new URLSearchParams(url.search);
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (const item of object[key]) {
searchParams.append(key, item);
}
} else {
searchParams.set(key, object[key]);
}
}
}
url.search = searchParams.toString();
const searchParams = new URLSearchParams(url.search)
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key)
for (const item of object[key]) {
searchParams.append(key, item)
}
} else {
searchParams.set(key, object[key])
}
}
}
url.search = searchParams.toString()
}

@@ -119,10 +146,15 @@

*/
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
const nonString = typeof value !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
export const serializeDataIfNeeded = function (
value: any,
requestOptions: any,
configuration?: Configuration,
) {
const nonString = typeof value !== 'string'
const needsSerialization =
nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: value || ''
}

@@ -135,3 +167,3 @@

export const toPathString = function (url: URL) {
return url.pathname + url.search + url.hash
return url.pathname + url.search + url.hash
}

@@ -143,7 +175,18 @@

*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
export const createRequestFunction = function (
axiosArgs: RequestArgs,
globalAxios: AxiosInstance,
BASE_PATH: string,
configuration?: Configuration,
) {
return <T = unknown, R = AxiosResponse<T>>(
axios: AxiosInstance = globalAxios,
basePath: string = BASE_PATH,
) => {
const axiosRequestArgs = {
...axiosArgs.options,
url: (configuration?.basePath || basePath) + axiosArgs.url,
}
return axios.request<T, R>(axiosRequestArgs)
}
}

@@ -5,7 +5,7 @@ /* tslint:disable */

* Radix Gateway API
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
*
* The version of the OpenAPI document: 1.1.6
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

@@ -16,88 +16,110 @@ * https://openapi-generator.tech

export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
apiKey?:
| string
| Promise<string>
| ((name: string) => string)
| ((name: string) => Promise<string>)
username?: string
password?: string
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string)
| ((name?: string, scopes?: string[]) => Promise<string>)
basePath?: string
baseOptions?: any
formDataCtor?: new () => any
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?:
| string
| Promise<string>
| ((name: string) => string)
| ((name: string) => Promise<string>)
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string)
| ((name?: string, scopes?: string[]) => Promise<string>)
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
}
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey
this.username = param.username
this.password = param.password
this.accessToken = param.accessToken
this.basePath = param.basePath
this.baseOptions = param.baseOptions
this.formDataCtor = param.formDataCtor
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp(
'^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$',
'i',
)
return (
mime !== null &&
(jsonMime.test(mime) ||
mime.toLowerCase() === 'application/json-patch+json')
)
}
}

@@ -5,7 +5,7 @@ /* tslint:disable */

* Radix Gateway API
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
* This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to simply build and submit transactions to the network. The API is designed for use by the Radix Foundation\'s [Desktop Wallet](https://wallet.radixdlt.com/) and [Explorer](https://explorer.radixdlt.com/), and replaces the original Olympia \"Archive Node API\". # Gateway API Overview The Gateway API is separated into distinct groupings: * `/gateway` - Information about the Gateway API status * `/account/_*` - To query account-related information * `/token/_*` - To query token-related information * `/validator/_*` and `/validators` - To query validator-related information * `/transaction/_*` - To build, finalize and submit transactions, and to read the status and content of submitted and on-ledger transactions. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/radixdlt-network-gateway), which is configured to read from full node/s to extract and index data from the network. # Gateway API Format The API is designed in a JSON-RPC style, using HTTP as a transport layer, which means that: * All requests are POST requests. * Any error is returned with an HTTP status code of 500, with a returned error object. * The error object contains an HTTP-like `code` * The error object also contains a structured/typed `details` sub-object, with a `type` discriminator, allowing for structured error interpretation in clients. # Comparison to other Radix APIs * [Core API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/core/api.yaml) - The Core API is a low level API exposed by full nodes, and designed for use on internal networks. It is primarily designed for network integrations such as exchanges, ledger analytics providers, or hosted ledger data dashboards. The Core API provides endpoints for reading the mempool, constructing transactions and also exposes a stream of committed transactions. * [System API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/radixdlt/main/radixdlt-core/radixdlt/src/main/java/com/radixdlt/api/system/api.yaml) - The System API is a private API exposed by full nodes to read system status. The Gateway API offers a much wider range of query options and is more performant than the Core API. It is built on top of the Core API, ingesting data via the Core API transaction stream into a relational database. The Gateway API transaction/construction endpoints operate with the concept of \"actions\" - these are higher-levels of intent compared with the Core API, which makes it easier for clients to use. The Core API should be used if you require more power/flexiblity for managing UTXOs, or submitting transactions which can\'t be mapped to a Gateway API action.
*
* The version of the OpenAPI document: 1.1.6
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

@@ -16,5 +16,3 @@ * https://openapi-generator.tech

export * from "./api";
export * from "./configuration";
export * from './api'
export * from './configuration'

@@ -64,3 +64,3 @@ import {

params: unknown[] | Record<string, unknown>,
headers?: Record<string, string>
headers?: Record<string, string>,
) => Promise<unknown>

@@ -72,3 +72,3 @@

params: unknown[] | Record<string, unknown>,
headers?: Record<string, string>
headers?: Record<string, string>,
): Promise<unknown> => {

@@ -82,3 +82,3 @@ // @ts-ignore

[defaultHeaders[1]]: correlationID,
...headers
...headers,
},

@@ -85,0 +85,0 @@ })

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc