admin: updated dist files
This commit is contained in:
parent
ee79d7d005
commit
cf00331309
40
dist/ethers.js
vendored
40
dist/ethers.js
vendored
@ -109,7 +109,7 @@ function stringify$1(value) {
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -135,13 +135,13 @@ function isCallException(error) {
|
||||
}
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
function makeError(message, code, info) {
|
||||
let shortMessage = message;
|
||||
@ -1031,7 +1031,7 @@ function createGetUrl(options) {
|
||||
|
||||
/**
|
||||
* Fetching content from the web is environment-specific, so Ethers
|
||||
* provides an abstraction the each environment can implement to provide
|
||||
* provides an abstraction that each environment can implement to provide
|
||||
* this service.
|
||||
*
|
||||
* On [Node.js](link-node), the ``http`` and ``https`` libs are used to
|
||||
@ -1039,10 +1039,10 @@ function createGetUrl(options) {
|
||||
* and populate the [[FetchResponse]].
|
||||
*
|
||||
* In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting
|
||||
* ``Promise`` is waited on to retreive the payload.
|
||||
* ``Promise`` is waited on to retrieve the payload.
|
||||
*
|
||||
* The [[FetchRequest]] is responsible for handling many common situations,
|
||||
* such as redirects, server throttling, authentcation, etc.
|
||||
* such as redirects, server throttling, authentication, etc.
|
||||
*
|
||||
* It also handles common gateways, such as IPFS and data URIs.
|
||||
*
|
||||
@ -1166,7 +1166,7 @@ class FetchRequest {
|
||||
#throttle;
|
||||
#getUrlFunc;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url() { return this.#url; }
|
||||
set url(url) {
|
||||
@ -1180,15 +1180,15 @@ class FetchRequest {
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body() {
|
||||
@ -1248,7 +1248,7 @@ class FetchRequest {
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -1340,7 +1340,7 @@ class FetchRequest {
|
||||
this.#allowInsecure = !!value;
|
||||
}
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout() { return this.#timeout; }
|
||||
@ -1547,7 +1547,7 @@ class FetchRequest {
|
||||
* to %%location%%.
|
||||
*/
|
||||
redirect(location) {
|
||||
// Redirection; for now we only support absolute locataions
|
||||
// Redirection; for now we only support absolute locations
|
||||
const current = this.url.split(":")[0].toLowerCase();
|
||||
const target = location.split(":")[0].toLowerCase();
|
||||
// Don't allow redirecting:
|
||||
@ -1685,7 +1685,7 @@ class FetchRequest {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
class FetchResponse {
|
||||
#statusCode;
|
||||
@ -1815,7 +1815,7 @@ class FetchResponse {
|
||||
return this.headers[key.toLowerCase()];
|
||||
}
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody() {
|
||||
return (this.#body != null);
|
||||
@ -22088,7 +22088,7 @@ const Testnets = "goerli kovan sepolia classicKotti optimism-goerli arbitrum-goe
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
@ -24369,7 +24369,7 @@ class Wallet extends BaseWallet {
|
||||
return Wallet.#fromAccount(account);
|
||||
}
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
2
dist/ethers.js.map
vendored
2
dist/ethers.js.map
vendored
File diff suppressed because one or more lines are too long
40
dist/ethers.umd.js
vendored
40
dist/ethers.umd.js
vendored
@ -115,7 +115,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -141,13 +141,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
}
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
function makeError(message, code, info) {
|
||||
let shortMessage = message;
|
||||
@ -1037,7 +1037,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
|
||||
/**
|
||||
* Fetching content from the web is environment-specific, so Ethers
|
||||
* provides an abstraction the each environment can implement to provide
|
||||
* provides an abstraction that each environment can implement to provide
|
||||
* this service.
|
||||
*
|
||||
* On [Node.js](link-node), the ``http`` and ``https`` libs are used to
|
||||
@ -1045,10 +1045,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* and populate the [[FetchResponse]].
|
||||
*
|
||||
* In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting
|
||||
* ``Promise`` is waited on to retreive the payload.
|
||||
* ``Promise`` is waited on to retrieve the payload.
|
||||
*
|
||||
* The [[FetchRequest]] is responsible for handling many common situations,
|
||||
* such as redirects, server throttling, authentcation, etc.
|
||||
* such as redirects, server throttling, authentication, etc.
|
||||
*
|
||||
* It also handles common gateways, such as IPFS and data URIs.
|
||||
*
|
||||
@ -1172,7 +1172,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
#throttle;
|
||||
#getUrlFunc;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url() { return this.#url; }
|
||||
set url(url) {
|
||||
@ -1186,15 +1186,15 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body() {
|
||||
@ -1254,7 +1254,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -1346,7 +1346,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
this.#allowInsecure = !!value;
|
||||
}
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout() { return this.#timeout; }
|
||||
@ -1553,7 +1553,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* to %%location%%.
|
||||
*/
|
||||
redirect(location) {
|
||||
// Redirection; for now we only support absolute locataions
|
||||
// Redirection; for now we only support absolute locations
|
||||
const current = this.url.split(":")[0].toLowerCase();
|
||||
const target = location.split(":")[0].toLowerCase();
|
||||
// Don't allow redirecting:
|
||||
@ -1691,7 +1691,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
class FetchResponse {
|
||||
#statusCode;
|
||||
@ -1821,7 +1821,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
return this.headers[key.toLowerCase()];
|
||||
}
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody() {
|
||||
return (this.#body != null);
|
||||
@ -22094,7 +22094,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
@ -24375,7 +24375,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
||||
return Wallet.#fromAccount(account);
|
||||
}
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
2
dist/ethers.umd.js.map
vendored
2
dist/ethers.umd.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/wordlists-extra.js
vendored
8
dist/wordlists-extra.js
vendored
@ -192,13 +192,13 @@ function stringify(value) {
|
||||
}
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
function makeError(message, code, info) {
|
||||
let shortMessage = message;
|
||||
|
2
dist/wordlists-extra.js.map
vendored
2
dist/wordlists-extra.js.map
vendored
File diff suppressed because one or more lines are too long
2
lib.commonjs/providers/default-provider.d.ts
vendored
2
lib.commonjs/providers/default-provider.d.ts
vendored
@ -37,7 +37,7 @@ import { WebSocketLike } from "./provider-websocket.js";
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
|
@ -54,7 +54,7 @@ const Testnets = "goerli kovan sepolia classicKotti optimism-goerli arbitrum-goe
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
|
2
lib.commonjs/providers/signer.d.ts
vendored
2
lib.commonjs/providers/signer.d.ts
vendored
@ -100,7 +100,7 @@ export interface Signer extends Addressable, ContractRunner, NameResolver {
|
||||
*/
|
||||
sendTransaction(tx: TransactionRequest): Promise<TransactionResponse>;
|
||||
/**
|
||||
* Signers an [[link-eip-191]] prefixed personal message.
|
||||
* Signs an [[link-eip-191]] prefixed personal message.
|
||||
*
|
||||
* If the %%message%% is a string, it is signed as UTF-8 encoded bytes. It is **not**
|
||||
* interpretted as a [[BytesLike]]; so the string ``"0x1234"`` is signed as six
|
||||
|
20
lib.commonjs/utils/errors.d.ts
vendored
20
lib.commonjs/utils/errors.d.ts
vendored
@ -11,14 +11,14 @@ import type { TransactionRequest, TransactionReceipt, TransactionResponse } from
|
||||
import type { FetchRequest, FetchResponse } from "./fetch.js";
|
||||
/**
|
||||
* An error may contain additional properties, but those must not
|
||||
* conflict with any impliciat properties.
|
||||
* conflict with any implicit properties.
|
||||
*/
|
||||
export type ErrorInfo<T> = Omit<T, "code" | "name" | "message" | "shortMessage"> & {
|
||||
shortMessage?: string;
|
||||
};
|
||||
/**
|
||||
* All errors emitted by ethers have an **ErrorCode** to help
|
||||
* identify and coalesce errors to simplfy programatic analysis.
|
||||
* identify and coalesce errors to simplify programmatic analysis.
|
||||
*
|
||||
* Each **ErrorCode** is the %%code%% proerty of a coresponding
|
||||
* [[EthersError]].
|
||||
@ -123,7 +123,7 @@ export interface NotImplementedError extends EthersError<"NOT_IMPLEMENTED"> {
|
||||
/**
|
||||
* This Error indicates that the attempted operation is not supported.
|
||||
*
|
||||
* This could range from a specifc JSON-RPC end-point not supporting
|
||||
* This could range from a specific JSON-RPC end-point not supporting
|
||||
* a feature to a specific configuration of an object prohibiting the
|
||||
* operation.
|
||||
*
|
||||
@ -137,7 +137,7 @@ export interface UnsupportedOperationError extends EthersError<"UNSUPPORTED_OPER
|
||||
operation: string;
|
||||
}
|
||||
/**
|
||||
* This Error indicates a proplem connecting to a network.
|
||||
* This Error indicates a problem connecting to a network.
|
||||
*/
|
||||
export interface NetworkError extends EthersError<"NETWORK_ERROR"> {
|
||||
/**
|
||||
@ -183,7 +183,7 @@ export interface TimeoutError extends EthersError<"TIMEOUT"> {
|
||||
}
|
||||
/**
|
||||
* This Error indicates that a provided set of data cannot
|
||||
* be correctly interpretted.
|
||||
* be correctly interpreted.
|
||||
*/
|
||||
export interface BadDataError extends EthersError<"BAD_DATA"> {
|
||||
/**
|
||||
@ -451,7 +451,7 @@ export type CodedEthersError<T> = T extends "UNKNOWN_ERROR" ? UnknownError : T e
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -473,13 +473,13 @@ export declare function isError<K extends ErrorCode, T extends CodedEthersError<
|
||||
export declare function isCallException(error: any): error is CallExceptionError;
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
export declare function makeError<K extends ErrorCode, T extends CodedEthersError<K>>(message: string, code: K, info?: ErrorInfo<T>): T;
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ function stringify(value) {
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -81,13 +81,13 @@ function isCallException(error) {
|
||||
exports.isCallException = isCallException;
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
function makeError(message, code, info) {
|
||||
let shortMessage = message;
|
||||
|
20
lib.commonjs/utils/fetch.d.ts
vendored
20
lib.commonjs/utils/fetch.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* An environments implementation of ``getUrl`` must return this type.
|
||||
* An environment's implementation of ``getUrl`` must return this type.
|
||||
*/
|
||||
export type GetUrlResponse = {
|
||||
statusCode: number;
|
||||
@ -65,7 +65,7 @@ export declare class FetchCancelSignal {
|
||||
export declare class FetchRequest implements Iterable<[key: string, value: string]> {
|
||||
#private;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url(): string;
|
||||
set url(url: string);
|
||||
@ -77,15 +77,15 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body(): null | Uint8Array;
|
||||
@ -107,7 +107,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -150,7 +150,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
get allowInsecureAuthentication(): boolean;
|
||||
set allowInsecureAuthentication(value: boolean);
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout(): number;
|
||||
@ -288,7 +288,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
static createIpfsGatewayFunc(baseUrl: string): FetchGatewayFunc;
|
||||
}
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
export declare class FetchResponse implements Iterable<[key: string, value: string]> {
|
||||
#private;
|
||||
@ -342,7 +342,7 @@ export declare class FetchResponse implements Iterable<[key: string, value: stri
|
||||
*/
|
||||
getHeader(key: string): string;
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody(): this is (FetchResponse & {
|
||||
body: Uint8Array;
|
||||
|
@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FetchResponse = exports.FetchRequest = exports.FetchCancelSignal = void 0;
|
||||
/**
|
||||
* Fetching content from the web is environment-specific, so Ethers
|
||||
* provides an abstraction the each environment can implement to provide
|
||||
* provides an abstraction that each environment can implement to provide
|
||||
* this service.
|
||||
*
|
||||
* On [Node.js](link-node), the ``http`` and ``https`` libs are used to
|
||||
@ -11,10 +11,10 @@ exports.FetchResponse = exports.FetchRequest = exports.FetchCancelSignal = void
|
||||
* and populate the [[FetchResponse]].
|
||||
*
|
||||
* In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting
|
||||
* ``Promise`` is waited on to retreive the payload.
|
||||
* ``Promise`` is waited on to retrieve the payload.
|
||||
*
|
||||
* The [[FetchRequest]] is responsible for handling many common situations,
|
||||
* such as redirects, server throttling, authentcation, etc.
|
||||
* such as redirects, server throttling, authentication, etc.
|
||||
*
|
||||
* It also handles common gateways, such as IPFS and data URIs.
|
||||
*
|
||||
@ -145,7 +145,7 @@ class FetchRequest {
|
||||
#throttle;
|
||||
#getUrlFunc;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url() { return this.#url; }
|
||||
set url(url) {
|
||||
@ -159,15 +159,15 @@ class FetchRequest {
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body() {
|
||||
@ -227,7 +227,7 @@ class FetchRequest {
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -320,7 +320,7 @@ class FetchRequest {
|
||||
this.#allowInsecure = !!value;
|
||||
}
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout() { return this.#timeout; }
|
||||
@ -528,7 +528,7 @@ class FetchRequest {
|
||||
* to %%location%%.
|
||||
*/
|
||||
redirect(location) {
|
||||
// Redirection; for now we only support absolute locataions
|
||||
// Redirection; for now we only support absolute locations
|
||||
const current = this.url.split(":")[0].toLowerCase();
|
||||
const target = location.split(":")[0].toLowerCase();
|
||||
// Don't allow redirecting:
|
||||
@ -668,7 +668,7 @@ class FetchRequest {
|
||||
exports.FetchRequest = FetchRequest;
|
||||
;
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
class FetchResponse {
|
||||
#statusCode;
|
||||
@ -798,7 +798,7 @@ class FetchResponse {
|
||||
return this.headers[key.toLowerCase()];
|
||||
}
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody() {
|
||||
return (this.#body != null);
|
||||
|
File diff suppressed because one or more lines are too long
2
lib.commonjs/wallet/wallet.d.ts
vendored
2
lib.commonjs/wallet/wallet.d.ts
vendored
@ -57,7 +57,7 @@ export declare class Wallet extends BaseWallet {
|
||||
*/
|
||||
static fromEncryptedJsonSync(json: string, password: Uint8Array | string): HDNodeWallet | Wallet;
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
@ -121,7 +121,7 @@ class Wallet extends base_wallet_js_1.BaseWallet {
|
||||
return Wallet.#fromAccount(account);
|
||||
}
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
@ -1,13 +1,25 @@
|
||||
import fs from "fs";
|
||||
import { getVersions } from "./utils/npm.js";
|
||||
import { resolve } from "./utils/path.js";
|
||||
import { getDiff } from "./utils/git.js";
|
||||
function escver(v) {
|
||||
return v.replace(/\./, "-");
|
||||
}
|
||||
(async function () {
|
||||
let versions = await getVersions("ethers");
|
||||
versions = versions.filter((h) => (h.version.match(/^6\.[0-9]+\.[0-9]+$/)));
|
||||
for (let i = 1; i < versions.length; i++) {
|
||||
const tag0 = versions[i - 1].gitHead, tag1 = versions[i].gitHead;
|
||||
const diff = await getDiff(resolve("dist/ethers.js"), tag0, tag1);
|
||||
console.log(diff);
|
||||
fs.writeFileSync(resolve("misc/diffs/versions.txt"), versions.map((h) => h.version).join(","));
|
||||
for (let i = 0; i < versions.length; i++) {
|
||||
for (let j = i + 1; j < versions.length; j++) {
|
||||
const filename = resolve(`misc/diffs/diff-${escver(versions[i].version)}_${escver(versions[j].version)}.txt`);
|
||||
if (fs.existsSync(filename)) {
|
||||
continue;
|
||||
}
|
||||
const tag0 = versions[i].gitHead, tag1 = versions[j].gitHead;
|
||||
const diff = await getDiff(resolve("src.ts"), tag0, tag1);
|
||||
console.log({ diff });
|
||||
fs.writeFileSync(filename, diff);
|
||||
}
|
||||
}
|
||||
})();
|
||||
//# sourceMappingURL=generate-diffs.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"generate-diffs.js","sourceRoot":"","sources":["../../src.ts/_admin/generate-diffs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,CAAC,KAAK;IACF,IAAI,QAAQ,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC3C,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACjE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACrB;AACL,CAAC,CAAC,EAAE,CAAC"}
|
||||
{"version":3,"file":"generate-diffs.js","sourceRoot":"","sources":["../../src.ts/_admin/generate-diffs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,SAAS,MAAM,CAAC,CAAS;IACrB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AC,CAAC;YACtB,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACpC;KACJ;AACL,CAAC,CAAC,EAAE,CAAC"}
|
1
lib.esm/_admin/utils/git.d.ts
vendored
1
lib.esm/_admin/utils/git.d.ts
vendored
@ -11,4 +11,5 @@ export declare function getLogs(files?: null | Array<string>, range?: null | {
|
||||
tag1: string;
|
||||
}, limit?: null | number): Promise<Array<GitLog>>;
|
||||
export declare function getDiff(filename: string, tag0: string, tag1: string): Promise<string>;
|
||||
export declare function getTags(): Promise<Array<string>>;
|
||||
//# sourceMappingURL=git.d.ts.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/git.ts"],"names":[],"mappings":"AASA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAUxE;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAiB9E;AACD,MAAM,WAAW,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAsCxJ;AAED,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI3F"}
|
||||
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/git.ts"],"names":[],"mappings":"AASA,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAUxE;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAiB9E;AAED,MAAM,WAAW,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAsCxJ;AAED,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI3F;AAED,wBAAsB,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAItD"}
|
@ -87,4 +87,11 @@ export async function getDiff(filename, tag0, tag1) {
|
||||
}
|
||||
return result.stdout.trim();
|
||||
}
|
||||
export async function getTags() {
|
||||
const result = await run("git", ["tag"]);
|
||||
if (!result.ok) {
|
||||
throw new Error(`git log error`);
|
||||
}
|
||||
return result.stdout.trim().split("\n");
|
||||
}
|
||||
//# sourceMappingURL=git.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/git.ts"],"names":[],"mappings":"AAA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AAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
2
lib.esm/providers/default-provider.d.ts
vendored
2
lib.esm/providers/default-provider.d.ts
vendored
@ -37,7 +37,7 @@ import { WebSocketLike } from "./provider-websocket.js";
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
|
@ -51,7 +51,7 @@ const Testnets = "goerli kovan sepolia classicKotti optimism-goerli arbitrum-goe
|
||||
* // third-party services available
|
||||
* provider = getDefaultProvider("mainnet");
|
||||
*
|
||||
* // Connect to Polygoin, but only allow Etherscan and
|
||||
* // Connect to Polygon, but only allow Etherscan and
|
||||
* // INFURA and use "MY_API_KEY" in calls to Etherscan.
|
||||
* provider = getDefaultProvider("matic", {
|
||||
* etherscan: "MY_API_KEY",
|
||||
|
2
lib.esm/providers/signer.d.ts
vendored
2
lib.esm/providers/signer.d.ts
vendored
@ -100,7 +100,7 @@ export interface Signer extends Addressable, ContractRunner, NameResolver {
|
||||
*/
|
||||
sendTransaction(tx: TransactionRequest): Promise<TransactionResponse>;
|
||||
/**
|
||||
* Signers an [[link-eip-191]] prefixed personal message.
|
||||
* Signs an [[link-eip-191]] prefixed personal message.
|
||||
*
|
||||
* If the %%message%% is a string, it is signed as UTF-8 encoded bytes. It is **not**
|
||||
* interpretted as a [[BytesLike]]; so the string ``"0x1234"`` is signed as six
|
||||
|
20
lib.esm/utils/errors.d.ts
vendored
20
lib.esm/utils/errors.d.ts
vendored
@ -11,14 +11,14 @@ import type { TransactionRequest, TransactionReceipt, TransactionResponse } from
|
||||
import type { FetchRequest, FetchResponse } from "./fetch.js";
|
||||
/**
|
||||
* An error may contain additional properties, but those must not
|
||||
* conflict with any impliciat properties.
|
||||
* conflict with any implicit properties.
|
||||
*/
|
||||
export type ErrorInfo<T> = Omit<T, "code" | "name" | "message" | "shortMessage"> & {
|
||||
shortMessage?: string;
|
||||
};
|
||||
/**
|
||||
* All errors emitted by ethers have an **ErrorCode** to help
|
||||
* identify and coalesce errors to simplfy programatic analysis.
|
||||
* identify and coalesce errors to simplify programmatic analysis.
|
||||
*
|
||||
* Each **ErrorCode** is the %%code%% proerty of a coresponding
|
||||
* [[EthersError]].
|
||||
@ -123,7 +123,7 @@ export interface NotImplementedError extends EthersError<"NOT_IMPLEMENTED"> {
|
||||
/**
|
||||
* This Error indicates that the attempted operation is not supported.
|
||||
*
|
||||
* This could range from a specifc JSON-RPC end-point not supporting
|
||||
* This could range from a specific JSON-RPC end-point not supporting
|
||||
* a feature to a specific configuration of an object prohibiting the
|
||||
* operation.
|
||||
*
|
||||
@ -137,7 +137,7 @@ export interface UnsupportedOperationError extends EthersError<"UNSUPPORTED_OPER
|
||||
operation: string;
|
||||
}
|
||||
/**
|
||||
* This Error indicates a proplem connecting to a network.
|
||||
* This Error indicates a problem connecting to a network.
|
||||
*/
|
||||
export interface NetworkError extends EthersError<"NETWORK_ERROR"> {
|
||||
/**
|
||||
@ -183,7 +183,7 @@ export interface TimeoutError extends EthersError<"TIMEOUT"> {
|
||||
}
|
||||
/**
|
||||
* This Error indicates that a provided set of data cannot
|
||||
* be correctly interpretted.
|
||||
* be correctly interpreted.
|
||||
*/
|
||||
export interface BadDataError extends EthersError<"BAD_DATA"> {
|
||||
/**
|
||||
@ -451,7 +451,7 @@ export type CodedEthersError<T> = T extends "UNKNOWN_ERROR" ? UnknownError : T e
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -473,13 +473,13 @@ export declare function isError<K extends ErrorCode, T extends CodedEthersError<
|
||||
export declare function isCallException(error: any): error is CallExceptionError;
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
export declare function makeError<K extends ErrorCode, T extends CodedEthersError<K>>(message: string, code: K, info?: ErrorInfo<T>): T;
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ function stringify(value) {
|
||||
* Returns true if the %%error%% matches an error thrown by ethers
|
||||
* that matches the error %%code%%.
|
||||
*
|
||||
* In TypeScript envornoments, this can be used to check that %%error%%
|
||||
* In TypeScript environments, this can be used to check that %%error%%
|
||||
* matches an EthersError type, which means the expected properties will
|
||||
* be set.
|
||||
*
|
||||
@ -76,13 +76,13 @@ export function isCallException(error) {
|
||||
}
|
||||
/**
|
||||
* Returns a new Error configured to the format ethers emits errors, with
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties
|
||||
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
||||
* for the corresponding EthersError.
|
||||
*
|
||||
* Each error in ethers includes the version of ethers, a
|
||||
* machine-readable [[ErrorCode]], and depneding on %%code%%, additional
|
||||
* required properties. The error message will also include the %%meeage%%,
|
||||
* ethers version, %%code%% and all aditional properties, serialized.
|
||||
* machine-readable [[ErrorCode]], and depending on %%code%%, additional
|
||||
* required properties. The error message will also include the %%message%%,
|
||||
* ethers version, %%code%% and all additional properties, serialized.
|
||||
*/
|
||||
export function makeError(message, code, info) {
|
||||
let shortMessage = message;
|
||||
|
20
lib.esm/utils/fetch.d.ts
vendored
20
lib.esm/utils/fetch.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* An environments implementation of ``getUrl`` must return this type.
|
||||
* An environment's implementation of ``getUrl`` must return this type.
|
||||
*/
|
||||
export type GetUrlResponse = {
|
||||
statusCode: number;
|
||||
@ -65,7 +65,7 @@ export declare class FetchCancelSignal {
|
||||
export declare class FetchRequest implements Iterable<[key: string, value: string]> {
|
||||
#private;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url(): string;
|
||||
set url(url: string);
|
||||
@ -77,15 +77,15 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body(): null | Uint8Array;
|
||||
@ -107,7 +107,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -150,7 +150,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
get allowInsecureAuthentication(): boolean;
|
||||
set allowInsecureAuthentication(value: boolean);
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout(): number;
|
||||
@ -288,7 +288,7 @@ export declare class FetchRequest implements Iterable<[key: string, value: strin
|
||||
static createIpfsGatewayFunc(baseUrl: string): FetchGatewayFunc;
|
||||
}
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
export declare class FetchResponse implements Iterable<[key: string, value: string]> {
|
||||
#private;
|
||||
@ -342,7 +342,7 @@ export declare class FetchResponse implements Iterable<[key: string, value: stri
|
||||
*/
|
||||
getHeader(key: string): string;
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody(): this is (FetchResponse & {
|
||||
body: Uint8Array;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Fetching content from the web is environment-specific, so Ethers
|
||||
* provides an abstraction the each environment can implement to provide
|
||||
* provides an abstraction that each environment can implement to provide
|
||||
* this service.
|
||||
*
|
||||
* On [Node.js](link-node), the ``http`` and ``https`` libs are used to
|
||||
@ -8,10 +8,10 @@
|
||||
* and populate the [[FetchResponse]].
|
||||
*
|
||||
* In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting
|
||||
* ``Promise`` is waited on to retreive the payload.
|
||||
* ``Promise`` is waited on to retrieve the payload.
|
||||
*
|
||||
* The [[FetchRequest]] is responsible for handling many common situations,
|
||||
* such as redirects, server throttling, authentcation, etc.
|
||||
* such as redirects, server throttling, authentication, etc.
|
||||
*
|
||||
* It also handles common gateways, such as IPFS and data URIs.
|
||||
*
|
||||
@ -141,7 +141,7 @@ export class FetchRequest {
|
||||
#throttle;
|
||||
#getUrlFunc;
|
||||
/**
|
||||
* The fetch URI to requrest.
|
||||
* The fetch URL to request.
|
||||
*/
|
||||
get url() { return this.#url; }
|
||||
set url(url) {
|
||||
@ -155,15 +155,15 @@ export class FetchRequest {
|
||||
* header.
|
||||
*
|
||||
* If %%body%% is null, the body is cleared (along with the
|
||||
* intrinsic ``Content-Type``) and the .
|
||||
* intrinsic ``Content-Type``).
|
||||
*
|
||||
* If %%body%% is a string, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a string, the intrinsic ``Content-Type`` is set to
|
||||
* ``text/plain``.
|
||||
*
|
||||
* If %%body%% is a Uint8Array, the intrincis ``Content-Type`` is set to
|
||||
* If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to
|
||||
* ``application/octet-stream``.
|
||||
*
|
||||
* If %%body%% is any other object, the intrincis ``Content-Type`` is
|
||||
* If %%body%% is any other object, the intrinsic ``Content-Type`` is
|
||||
* set to ``application/json``.
|
||||
*/
|
||||
get body() {
|
||||
@ -223,7 +223,7 @@ export class FetchRequest {
|
||||
* The headers that will be used when requesting the URI. All
|
||||
* keys are lower-case.
|
||||
*
|
||||
* This object is a copy, so any chnages will **NOT** be reflected
|
||||
* This object is a copy, so any changes will **NOT** be reflected
|
||||
* in the ``FetchRequest``.
|
||||
*
|
||||
* To set a header entry, use the ``setHeader`` method.
|
||||
@ -316,7 +316,7 @@ export class FetchRequest {
|
||||
this.#allowInsecure = !!value;
|
||||
}
|
||||
/**
|
||||
* The timeout (in milliseconds) to wait for a complere response.
|
||||
* The timeout (in milliseconds) to wait for a complete response.
|
||||
* //(default: 5 minutes)//
|
||||
*/
|
||||
get timeout() { return this.#timeout; }
|
||||
@ -524,7 +524,7 @@ export class FetchRequest {
|
||||
* to %%location%%.
|
||||
*/
|
||||
redirect(location) {
|
||||
// Redirection; for now we only support absolute locataions
|
||||
// Redirection; for now we only support absolute locations
|
||||
const current = this.url.split(":")[0].toLowerCase();
|
||||
const target = location.split(":")[0].toLowerCase();
|
||||
// Don't allow redirecting:
|
||||
@ -663,7 +663,7 @@ export class FetchRequest {
|
||||
}
|
||||
;
|
||||
/**
|
||||
* The response for a FetchREquest.
|
||||
* The response for a FetchRequest.
|
||||
*/
|
||||
export class FetchResponse {
|
||||
#statusCode;
|
||||
@ -793,7 +793,7 @@ export class FetchResponse {
|
||||
return this.headers[key.toLowerCase()];
|
||||
}
|
||||
/**
|
||||
* Returns true of the response has a body.
|
||||
* Returns true if the response has a body.
|
||||
*/
|
||||
hasBody() {
|
||||
return (this.#body != null);
|
||||
|
File diff suppressed because one or more lines are too long
2
lib.esm/wallet/wallet.d.ts
vendored
2
lib.esm/wallet/wallet.d.ts
vendored
@ -57,7 +57,7 @@ export declare class Wallet extends BaseWallet {
|
||||
*/
|
||||
static fromEncryptedJsonSync(json: string, password: Uint8Array | string): HDNodeWallet | Wallet;
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
@ -118,7 +118,7 @@ export class Wallet extends BaseWallet {
|
||||
return Wallet.#fromAccount(account);
|
||||
}
|
||||
/**
|
||||
* Creates a new random [[HDNodeWallet]] using the avavilable
|
||||
* Creates a new random [[HDNodeWallet]] using the available
|
||||
* [cryptographic random source](randomBytes).
|
||||
*
|
||||
* If there is no crytographic random source, this will throw.
|
||||
|
Loading…
Reference in New Issue
Block a user