diff --git a/lib.esm/README.md b/lib.esm/README.md
deleted file mode 100644
index ce8d3ba5..00000000
--- a/lib.esm/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-ESM Files
-=========
-
-The contents of this folder are for using `import` in ESM
-projects.
-
-
-Notes
------
-
-The contents are generated via the `npm run build` target
-using `tsc` and the `/tsconfig.esm.json` configuration.
-
-Do not modify the files in this folder. They are deleted on `build-clean`.
-
-To modify this `README.md`, see the `/output/post-build/lib.esm`.
diff --git a/lib.esm/_admin/create-release.d.ts b/lib.esm/_admin/create-release.d.ts
deleted file mode 100644
index 9c0e2741..00000000
--- a/lib.esm/_admin/create-release.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=create-release.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/create-release.d.ts.map b/lib.esm/_admin/create-release.d.ts.map
deleted file mode 100644
index 5af33e35..00000000
--- a/lib.esm/_admin/create-release.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"create-release.d.ts","sourceRoot":"","sources":["../../src.ts/_admin/create-release.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_admin/create-release.js b/lib.esm/_admin/create-release.js
deleted file mode 100644
index 0a067940..00000000
--- a/lib.esm/_admin/create-release.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { getChanges } from "./utils/changelog.js";
-import { getDateTime } from "./utils/date.js";
-import { resolve } from "./utils/path.js";
-import { run } from "./utils/run.js";
-import { getVersions } from "./utils/npm.js";
-const version = process.argv[2] || null;
-(async function () {
- // Get the change from the CHANGELOG
- const changes = getChanges();
- const change = version ? changes.filter((c) => (c.version === version))[0] : changes.shift();
- if (change == null) {
- throw new Error(`version not found: ${version}`);
- }
- console.log(change);
- // Find the gitHead and release date
- const versions = await getVersions("quais");
- const ver = versions.filter((c) => (c.version === change.version))[0];
- if (ver == null) {
- throw new Error(`no npm version found: ${change.version}`);
- }
- console.log(ver);
- const title = `${change.title.split("(")[0].trim()} (${getDateTime(new Date(ver.date))})`;
- const args = [
- "release", "create", `v${change.version}`,
- // "--draft", // DEBUGGING
- "--title", title,
- "--target", ver.gitHead,
- "--notes", change.body.join("\n"),
- ];
- console.log(args);
- const result = await run("gh", args, resolve("."));
- console.log("Published");
- console.log(`See: ${(result.stdout || "").trim()}`);
-})().catch((e) => {
- console.log("ERROR");
- console.log(e);
-});
-//# sourceMappingURL=create-release.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/create-release.js.map b/lib.esm/_admin/create-release.js.map
deleted file mode 100644
index 3feb5411..00000000
--- a/lib.esm/_admin/create-release.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"create-release.js","sourceRoot":"","sources":["../../src.ts/_admin/create-release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAExC,CAAC,KAAK;IAEF,oCAAoC;IACpC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC5F,IAAI,MAAM,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAuB,OAAQ,EAAE,CAAC,CAAC;KAAE;IAC3E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,CAAC,CAAC,CAAC,EAAE,EAAE;IACb,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/generate-diffs.d.ts b/lib.esm/_admin/generate-diffs.d.ts
deleted file mode 100644
index 35ddf437..00000000
--- a/lib.esm/_admin/generate-diffs.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=generate-diffs.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/generate-diffs.d.ts.map b/lib.esm/_admin/generate-diffs.d.ts.map
deleted file mode 100644
index e1e2c9f7..00000000
--- a/lib.esm/_admin/generate-diffs.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"generate-diffs.d.ts","sourceRoot":"","sources":["../../src.ts/_admin/generate-diffs.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_admin/generate-diffs.js b/lib.esm/_admin/generate-diffs.js
deleted file mode 100644
index d5ccf51f..00000000
--- a/lib.esm/_admin/generate-diffs.js
+++ /dev/null
@@ -1,25 +0,0 @@
-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("quais");
- versions = versions.filter((h) => (h.version.match(/^6\.[0-9]+\.[0-9]+$/)));
- 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
\ No newline at end of file
diff --git a/lib.esm/_admin/generate-diffs.js.map b/lib.esm/_admin/generate-diffs.js.map
deleted file mode 100644
index 7f64350c..00000000
--- a/lib.esm/_admin/generate-diffs.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,CAAC,KAAK;IACF,IAAI,QAAQ,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1C,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAC5E,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,yBAAyB,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAoB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAE,IAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAE,MAAM,CAAC,CAAC;YAClH,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAAE,SAAS;aAAE;YAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YAC7D,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;YACtB,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACpC;KACJ;AACL,CAAC,CAAC,EAAE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/test-browser.d.ts b/lib.esm/_admin/test-browser.d.ts
deleted file mode 100644
index bb35a67d..00000000
--- a/lib.esm/_admin/test-browser.d.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- *
- * Paths
- * /index.js => dist/quais.js
- * /tests/utils.js => in-memory hijack
- * /static/* => output/*
- * - index.html
- * - assert.js
- * /tests/* => lib.esm/_tests/*
- */
-///
-import { WebSocket } from "ws";
-import { Server } from "http";
-export declare function getMime(filename: string): string;
-export declare class CDPSession {
- #private;
- readonly websocket: WebSocket;
- constructor(url: string);
- get target(): string;
- get ready(): Promise;
- get done(): Promise;
- send(method: string, params: any): Promise;
- _send(method: string, params: any): Promise;
- navigate(url: string): Promise;
-}
-export type Options = {
- port?: number;
- redirects?: Record;
-};
-export declare function start(_root: string, options: Options): Promise;
-//# sourceMappingURL=test-browser.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/test-browser.d.ts.map b/lib.esm/_admin/test-browser.d.ts.map
deleted file mode 100644
index f90f6eab..00000000
--- a/lib.esm/_admin/test-browser.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-browser.d.ts","sourceRoot":"","sources":["../../src.ts/_admin/test-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAQH,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,OAAO,EAAgB,MAAM,EAAE,MAAM,MAAM,CAAC;AAuB5C,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAShD;AAOD,qBAAa,UAAU;;IACnB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;gBAclB,GAAG,EAAE,MAAM;IA4EvB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAKzB;IAED,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAE1B;IAEK,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAO/C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAahD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C;AAED,MAAM,MAAM,OAAO,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAAC;AAgCF,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAyGtE"}
\ No newline at end of file
diff --git a/lib.esm/_admin/test-browser.js b/lib.esm/_admin/test-browser.js
deleted file mode 100644
index 5279548e..00000000
--- a/lib.esm/_admin/test-browser.js
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- *
- *
- * Paths
- * /index.js => dist/quais.js
- * /tests/utils.js => in-memory hijack
- * /static/* => output/*
- * - index.html
- * - assert.js
- * /tests/* => lib.esm/_tests/*
- */
-// See: https://vanilla.aslushnikov.com/?Console
-import fs from "fs";
-import child_process from "child_process";
-import zlib from "zlib";
-import { WebSocket } from "ws";
-import { createServer } from "http";
-import { join, resolve } from "path";
-const mimes = {
- css: "text/css",
- doctree: "application/x-doctree",
- eot: "application/vnd.ms-fontobject",
- gif: "image/gif",
- html: "text/html",
- ico: "image/x-icon",
- js: "application/javascript",
- jpg: "image/jpeg",
- jpeg: "image/jpeg",
- json: "application/json",
- map: "application/json",
- md: "text/markdown",
- png: "image/png",
- svg: "image/svg+xml",
- ttf: "application/x-font-ttf",
- txt: "text/plain",
- woff: "application/font-woff"
-};
-export function getMime(filename) {
- const mime = mimes[(filename.split('.').pop() || "").toLowerCase()];
- if (mime == null) {
- console.log(`WARN: NO MIME for ${filename}`);
- return "application/octet-stream";
- }
- return mime;
-}
-export class CDPSession {
- websocket;
- #id;
- #resp;
- #readyOpen;
- #readyPage;
- #target;
- #session;
- #done;
- #exit;
- constructor(url) {
- this.websocket = new WebSocket(url);
- this.#id = 1;
- this.#resp = new Map();
- this.#exit = (status) => { };
- this.#done = new Promise((resolve) => {
- this.#exit = resolve;
- });
- this.#target = "";
- this.#session = "";
- const readyOpen = new Promise((resolve, reject) => {
- this.websocket.onopen = async () => { resolve(); };
- });
- const readyPage = (async () => {
- await readyOpen;
- const target = await this._send("Target.getTargets", {});
- if (target.targetInfos.length) {
- this.#target = target.targetInfos[0].targetId;
- }
- else {
- const target = await this._send("Target.createTarget", { url: "" });
- this.#target = target.targetId;
- }
- const attached = await this._send("Target.attachToTarget", {
- targetId: this.#target,
- flatten: true
- });
- this.#session = attached.sessionId;
- })();
- this.#readyOpen = readyOpen;
- this.#readyPage = readyPage;
- this.websocket.onmessage = (_msg) => {
- const msg = JSON.parse(_msg.data);
- if (msg.id != null) {
- const responder = this.#resp.get(msg.id);
- this.#resp.delete(msg.id);
- if (responder == null) {
- console.log("WARN: unknown request ${ msg.id }");
- return;
- }
- if (msg.error) {
- responder.reject(new Error(msg.error));
- }
- else {
- responder.resolve(msg.result);
- }
- }
- else {
- if (msg.method === "Console.messageAdded") {
- const text = msg.params.message.text;
- if (text.startsWith("#status")) {
- this.#exit(parseInt(text.split("=").pop()));
- }
- console.log(text);
- //console.log(msg.params.message.text, `${ msg.params.message.url }:${ msg.params.message.line }`);
- }
- else if (msg.method === "Target.attachedToTarget") {
- }
- else {
- console.log(`WARN: Unhandled event - ${JSON.stringify(msg)}`);
- }
- }
- };
- this.websocket.onerror = (error) => {
- console.log(`WARN: WebSocket error - ${JSON.stringify(error)}`);
- };
- }
- get target() {
- return this.#target;
- }
- get ready() {
- return (async () => {
- await this.#readyOpen;
- await this.#readyPage;
- })();
- }
- get done() {
- return this.#done;
- }
- async send(method, params) {
- await this.#readyOpen;
- await this.#readyPage;
- return this._send(method, params);
- }
- async _send(method, params) {
- const id = this.#id++;
- const payload = { id, method, params };
- if (this.#session) {
- payload.sessionId = this.#session;
- }
- this.websocket.send(JSON.stringify(payload));
- return new Promise((resolve, reject) => {
- this.#resp.set(id, { resolve, reject });
- });
- }
- async navigate(url) {
- await this.send("Page.navigate", { url });
- }
-}
-const TestData = (function () {
- function load(tag) {
- const filename = resolve("testcases", tag + ".json.gz");
- const data = zlib.gunzipSync(fs.readFileSync(filename));
- return [String(data.length), zlib.deflateRawSync(data).toString("base64")].join(",");
- }
- let data = [];
- data.push(`import { quais } from "/index.js";`);
- data.push(`import { inflate } from "/static/tiny-inflate.js";`);
- data.push(`const fs = new Map();`);
- for (const filename of fs.readdirSync("testcases")) {
- if (!filename.endsWith(".json.gz")) {
- continue;
- }
- const tag = filename.split(".")[0];
- data.push(`fs.set(${JSON.stringify(tag)}, ${JSON.stringify(load(tag))});`);
- }
- data.push(`export function loadTests(tag) {`);
- data.push(` const data = fs.get(tag);`);
- data.push(` if (data == null) { throw new Error("missing tag: " + tag); }`);
- data.push(` const comps = data.split(",");`);
- data.push(` const result = new Uint8Array(parseInt(comps[0]));`);
- data.push(` inflate(quais.decodeBase64(comps[1]), result);`);
- data.push(` return JSON.parse(quais.toUtf8String(result))`);
- data.push(`}`);
- return data.join("\n");
-})();
-export function start(_root, options) {
- if (options == null) {
- options = {};
- }
- if (options.port == null) {
- options.port = 8000;
- }
- const server = createServer((req, resp) => {
- const url = (req.url || "").split("?")[0];
- let transform = false;
- let filename;
- if (url === "/") {
- filename = "./misc/test-browser/index.html";
- }
- else if (url === "/quais.js" || url === "/index.js") {
- filename = "./dist/quais.js";
- }
- else if (url === "/quais.js.map") {
- filename = "./dist/quais.js.map";
- }
- else if (url.startsWith("/static/")) {
- filename = "./misc/test-browser/" + url.substring(8);
- }
- else if (url === "/tests/utils.js") {
- //console.log({ status: 200, content: `<>` });
- resp.writeHead(200, {
- "Content-Length": TestData.length,
- "Content-Type": getMime("testdata.js")
- });
- resp.end(TestData);
- return;
- }
- else if (url.startsWith("/tests/")) {
- transform = true;
- filename = join("./lib.esm/_tests", url.substring(7));
- }
- else {
- //console.log("FALLBACK");
- filename = url.substring(1);
- }
- // Make sure we aren't crawling out of our sandbox
- if (url[0] !== "/" || filename.substring(0, filename.length) !== filename) {
- //console.log({ status: 403, reason: "escaping" });
- resp.writeHead(403);
- resp.end();
- return;
- }
- try {
- const stat = fs.statSync(filename);
- if (stat.isDirectory()) {
- // Redirect bare directory to its path (i.e. "/foo" => "/foo/")
- if (url[url.length - 1] !== "/") {
- //console.log({ status: 301, location: (url + "/") });
- resp.writeHead(301, { Location: url + "/" });
- resp.end();
- return;
- }
- filename += "/index.html";
- }
- let content = fs.readFileSync(filename);
- if (transform) {
- content = Buffer.from(content.toString().replace(/import ([^;]*) from "([^"]*)";/g, (all, names, filename) => {
- switch (filename) {
- case "assert":
- //case "path":
- //case "fs":
- //case "zlib":
- return `import ${names} from "/static/${filename}.js"`;
- }
- return all;
- }));
- }
- //console.log({ status: 200, filename });
- resp.writeHead(200, {
- "Content-Length": content.length,
- "Content-Type": getMime(filename)
- });
- resp.end(content);
- return;
- }
- catch (error) {
- if (error.code === "ENOENT") {
- //console.log({ status: 404, filename });
- console.log(`WARN: Not found - ${filename}`);
- resp.writeHead(404, {});
- resp.end();
- return;
- }
- //console.log({ status: 500, error: error.toString() });
- console.log(`WARN: Server error - ${error.toString()}`);
- resp.writeHead(500, {});
- resp.end();
- return;
- }
- });
- return new Promise((resolve, reject) => {
- server.listen(options.port, () => {
- console.log(`Server running on: http://localhost:${options.port}`);
- resolve(server);
- });
- });
-}
-(async function () {
- await start(resolve("."), { port: 8000 });
- const cmds = [
- "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
- "/usr/bin/chromium"
- ].filter((f) => { try {
- fs.accessSync(f);
- return true;
- }
- catch (error) {
- return false;
- } });
- if (cmds.length === 0) {
- throw new Error("no installed browser found");
- }
- const cmd = cmds[0];
- const args = ["--headless", "--disable-gpu", "--remote-debugging-port=8022"];
- const browser = child_process.spawn(cmd, args);
- let url = await new Promise((resolve, reject) => {
- browser.stdout.on("data", (data) => {
- console.log("OUT", data.toString());
- });
- browser.stderr.on("data", (data) => {
- const text = data.toString();
- for (const line of text.split("\n")) {
- const match = line.match(/^DevTools listening on (.*)$/);
- if (match) {
- resolve(match[1]);
- return;
- }
- }
- });
- });
- console.log("URL:", url);
- const session = new CDPSession(url);
- await session.ready;
- await session.send("Console.enable", {});
- await session.navigate("http:/\/localhost:8000");
- const status = await session.done;
- console.log("STATUS:", status);
- process.exit(status);
-})();
-//# sourceMappingURL=test-browser.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/test-browser.js.map b/lib.esm/_admin/test-browser.js.map
deleted file mode 100644
index ccb61c5f..00000000
--- a/lib.esm/_admin/test-browser.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-browser.js","sourceRoot":"","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MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC,EAAE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/update-changelog.d.ts b/lib.esm/_admin/update-changelog.d.ts
deleted file mode 100644
index 9559d610..00000000
--- a/lib.esm/_admin/update-changelog.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=update-changelog.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/update-changelog.d.ts.map b/lib.esm/_admin/update-changelog.d.ts.map
deleted file mode 100644
index 075e7b70..00000000
--- a/lib.esm/_admin/update-changelog.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"update-changelog.d.ts","sourceRoot":"","sources":["../../src.ts/_admin/update-changelog.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_admin/update-changelog.js b/lib.esm/_admin/update-changelog.js
deleted file mode 100644
index c814c0f8..00000000
--- a/lib.esm/_admin/update-changelog.js
+++ /dev/null
@@ -1,160 +0,0 @@
-import fs from "fs";
-import { getLogs } from "./utils/git.js";
-import { loadJson } from "./utils/json.js";
-import { resolve } from "./utils/path.js";
-import { getVersions } from "./utils/npm.js";
-import { getDateTime } from "./utils/date.js";
-function repeat(c, length) {
- if (c.length === 0) {
- throw new Error("too short");
- }
- while (c.length < length) {
- c += c;
- }
- return c.substring(0, length);
-}
-async function getChanges(tag0, tag1) {
- const result = [];
- const logs = await getLogs(null, { tag0, tag1 });
- for (const log of logs) {
- if (log.body.startsWith("admin:") || log.body.startsWith("docs:")) {
- continue;
- }
- let message = log.body;
- const issues = [];
- message = message.replace(/\((([0-9#,]|\s)*)\)/g, (all, text) => {
- text = text.replace(/#([0-9]+)/g, (all, issue) => {
- issues.push(issue);
- return "";
- });
- if (text.replace(/,/g, "").trim()) {
- console.log(`WARNING: commit leftovers ${JSON.stringify(text)}`);
- }
- return "";
- }).replace(/\.+\s*$/, "").trim();
- result.push({ message, issues, commit: log.commit });
- }
- return result;
-}
-(async function () {
- // Get the already included versions in the CHANGELOG
- const present = [{ version: "null", body: [] }];
- {
- const content = fs.readFileSync(resolve("CHANGELOG.md")).toString();
- for (const line of content.split("\n")) {
- let match = line.match(/^ethers\/v(\S+)\s/);
- if (match) {
- present.push({ version: match[1], body: [line] });
- }
- else {
- present[present.length - 1].body.push(line);
- }
- }
- for (const { body } of present) {
- while (body[body.length - 1].trim() === "") {
- body.pop();
- }
- }
- }
- // Get the remote versions (along with their date and gitHead)
- let versions = await getVersions("ethers");
- versions = versions.filter((v) => (v.version.match(/^6\.[0-9]+\.[0-9]+$/)));
- const entries = [];
- const getPresent = (version) => {
- const pres = present.filter((p) => (p.version === version));
- return pres.length ? pres[0] : null;
- };
- // Add the first entry, which has no previous version to compare against
- {
- const pres = getPresent(versions[0].version);
- if (pres) {
- entries.push(pres);
- }
- else {
- entries.push({
- date: getDateTime(new Date(versions[0].date)),
- version: versions[0].version,
- changes: [{
- message: "Initial release",
- issues: [],
- commit: versions[0].gitHead
- }]
- });
- }
- }
- // Add each version, with preference given to present entries, as
- // they may have been updated manually
- let lastVer = versions[0];
- for (let i = 1; i < versions.length; i++) {
- const ver = versions[i];
- // Prefer present entries
- const pres = getPresent(ver.version);
- if (pres) {
- entries.push(pres);
- lastVer = ver;
- continue;
- }
- // Get the entry info from git
- const version = ver.version;
- const date = getDateTime(new Date(ver.date));
- const changes = await getChanges(lastVer.gitHead, ver.gitHead);
- entries.push({ date, version, changes });
- lastVer = ver;
- }
- // If this is a new version (not present in npm) add the changes
- // from the lastest version until HEAD.
- const curVer = loadJson(resolve("package.json")).version;
- if (curVer !== lastVer) {
- // Include any present entry, as it was placed here by a
- // previous run of update-changelog and may have been
- // modified manually
- const pres = getPresent(curVer);
- if (pres) {
- console.log(`WARNING: existing entry for ${curVer}; duplicating`);
- entries.push(pres);
- }
- // Also include theentry from git
- const latest = await getChanges(lastVer.gitHead, "HEAD");
- if (latest.length) {
- entries.push({
- date: getDateTime(new Date()),
- version: curVer,
- changes: latest
- });
- }
- }
- // Gerenate the CHANGELOG.md output
- const output = [];
- output.push("Change Log");
- output.push("==========");
- output.push("");
- output.push("This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.");
- output.push("");
- for (const ver of entries.reverse()) {
- // Present entry; include verbatim
- if ("body" in ver) {
- ver.body.forEach((line) => output.push(line));
- output.push("");
- continue;
- }
- // Entry from git; format it nicely
- const title = `ethers/v${ver.version} (${ver.date})`;
- output.push(title);
- output.push(repeat("-", title.length));
- output.push("");
- for (const change of ver.changes) {
- let line = ` - ${change.message} (`;
- line += change.issues.map((i) => {
- return `[#${i}](https:/\/github.com/ethers-io/ethers.js/issues/${i})`;
- }).join(", ");
- if (change.issues.length) {
- line += "; ";
- }
- line += `[${change.commit.substring(0, 7)}](https:/\/github.com/ethers-io/ethers.js/commit/${change.commit})).`;
- output.push(line);
- }
- output.push("");
- }
- fs.writeFileSync(resolve("CHANGELOG.md"), output.join("\n"));
-})();
-//# sourceMappingURL=update-changelog.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/update-changelog.js.map b/lib.esm/_admin/update-changelog.js.map
deleted file mode 100644
index 03c820a0..00000000
--- a/lib.esm/_admin/update-changelog.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"update-changelog.js","sourceRoot":"","sources":["../../src.ts/_admin/update-changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,SAAS,MAAM,CAAC,CAAS,EAAE,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IAAI,IAAI,CAAC;aAAE;YAC3C,IAAI,IAAI,IAAK,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAE,oDAAqD,MAAM,CAAC,MAAO,KAAK,CAAC;YACpH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACpB;QACD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACnB;IAED,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC,EAAE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/update-version.d.ts b/lib.esm/_admin/update-version.d.ts
deleted file mode 100644
index 933287ba..00000000
--- a/lib.esm/_admin/update-version.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=update-version.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/update-version.d.ts.map b/lib.esm/_admin/update-version.d.ts.map
deleted file mode 100644
index 78fc2230..00000000
--- a/lib.esm/_admin/update-version.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"update-version.d.ts","sourceRoot":"","sources":["../../src.ts/_admin/update-version.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_admin/update-version.js b/lib.esm/_admin/update-version.js
deleted file mode 100644
index 3664058e..00000000
--- a/lib.esm/_admin/update-version.js
+++ /dev/null
@@ -1,100 +0,0 @@
-import semver from "semver";
-import { FetchRequest } from "../utils/index.js";
-import { atomicWrite } from "./utils/fs.js";
-import { getLogs } from "./utils/git.js";
-import { loadJson, saveJson } from "./utils/json.js";
-import { resolve } from "./utils/path.js";
-const cache = {};
-async function getNpmPackage(name) {
- if (!cache[name]) {
- const resp = await (new FetchRequest("https:/\/registry.npmjs.org/" + name)).send();
- resp.assertOk();
- cache[name] = resp.bodyJson;
- }
- return cache[name] || null;
-}
-function writeVersion(version) {
- const content = `/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */\n\n/**\n * The current version of quais.\n */\nexport const version: string = "${version}";\n`;
- atomicWrite(resolve("src.ts/_version.ts"), content);
-}
-(async function () {
- // Local pkg
- const pkgPath = resolve("package.json");
- const pkgInfo = loadJson(pkgPath);
- const tag = pkgInfo.publishConfig.tag;
- // Get the remote version that matches our dist-tag
- const remoteInfo = await getNpmPackage(pkgInfo.name);
- const remoteVersion = remoteInfo["dist-tags"][tag];
- // Remote pkg
- const remotePkgInfo = remoteInfo.versions[remoteVersion];
- const remoteGitHead = remotePkgInfo.gitHead;
- let gitHead = "";
- for (const log of await getLogs(["."])) {
- if (log.body.startsWith("admin:")) {
- continue;
- }
- if (log.body.startsWith("docs:")) {
- continue;
- }
- if (log.body.startsWith("tests:")) {
- continue;
- }
- gitHead = log.commit;
- break;
- }
- if (gitHead === "") {
- throw new Error("no meaningful commit found");
- }
- // There are new commits, not reflected in the package
- // published on npm; update the gitHead and version
- if (gitHead !== remoteGitHead) {
- // Bump the version from the remote version
- if (tag.indexOf("beta") >= 0) {
- // Still a beta branch; advance the beta version
- const prerelease = semver.prerelease(remoteVersion);
- if (prerelease == null || prerelease.length !== 2) {
- throw new Error("no prerelease found");
- }
- pkgInfo.version = semver.inc(remoteVersion, "prerelease", String(prerelease[0]));
- }
- else if (semver.minor(remoteVersion) == semver.minor(pkgInfo.version)) {
- // If we want to bump the minor version, it was done explicitly in the pkg
- pkgInfo.version = semver.inc(remoteVersion, "patch");
- }
- pkgInfo.gitHead = gitHead;
- // Save the package.json
- const check = { "default": 1, "require": 1, "import": 1, "types": 1 };
- saveJson(pkgPath, pkgInfo, (path, a, b) => {
- if ((path.startsWith("./") || path === ".") && check[a] && check[b]) {
- const cmp = a.localeCompare(b);
- if (cmp === 0) {
- return cmp;
- }
- // Make sure require comes first; it has the types built-in
- // so its ok
- if (a === "require") {
- return -1;
- }
- if (b === "require") {
- return 1;
- }
- // Favour types the next-first and default for last
- if (a === "types" || b === "default") {
- return -1;
- }
- if (b === "types" || a === "default") {
- return 1;
- }
- return cmp;
- }
- return a.localeCompare(b);
- });
- // Save the src.ts/_version.ts
- writeVersion(pkgInfo.version);
- }
-})().catch((error) => {
- console.log("ERROR");
- console.log(error);
- process.exit(1);
-});
-//# sourceMappingURL=update-version.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/update-version.js.map b/lib.esm/_admin/update-version.js.map
deleted file mode 100644
index 02ea1c37..00000000
--- a/lib.esm/_admin/update-version.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"update-version.js","sourceRoot":"","sources":["../../src.ts/_admin/update-version.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,KAAK,GAAwB,EAAG,CAAC;AAEvC,KAAK,UAAU,aAAa,CAAC,IAAY;IACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACd,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,YAAY,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACpF,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;KAC/B;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAC/B,CAAC;AAED,SAAS,YAAY,CAAC,OAAe;IACjC,MAAM,OAAO,GAAG,uJAAwJ,OAAQ,MAAM,CAAC;IACvL,WAAW,CA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AE;gBACnC,IAAI,CAAC,KAAK,SAAS,EAAE;oBAAE,OAAO,CAAC,CAAC;iBAAE;gBAElC,mDAAmD;gBACnD,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,SAAS,EAAE;oBAAE,OAAO,CAAC,CAAC,CAAC;iBAAE;gBACpD,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,SAAS,EAAE;oBAAE,OAAO,CAAC,CAAC;iBAAE;gBACnD,OAAO,GAAG,CAAC;aACd;YACD,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QAEH,8BAA8B;QAC9B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACjC;AAEL,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/changelog.d.ts b/lib.esm/_admin/utils/changelog.d.ts
deleted file mode 100644
index 27d912fc..00000000
--- a/lib.esm/_admin/utils/changelog.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type ChangeVersion = {
- version: string;
- title: string;
- body: Array;
-};
-export declare function getChanges(): Array;
-//# sourceMappingURL=changelog.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/changelog.d.ts.map b/lib.esm/_admin/utils/changelog.d.ts.map
deleted file mode 100644
index 068233fd..00000000
--- a/lib.esm/_admin/utils/changelog.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/changelog.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC;AAEF,wBAAgB,UAAU,IAAI,KAAK,CAAC,aAAa,CAAC,CAqBjD"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/changelog.js b/lib.esm/_admin/utils/changelog.js
deleted file mode 100644
index 1cce85de..00000000
--- a/lib.esm/_admin/utils/changelog.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import fs from "fs";
-import { resolve } from "./path.js";
-export function getChanges() {
- const changes = [
- { title: "", version: "null", body: [] }
- ];
- const content = fs.readFileSync(resolve("CHANGELOG.md")).toString();
- for (const line of content.split("\n")) {
- let match = line.match(/^quais\/v(\S+)\s/);
- if (match) {
- changes.push({ version: match[1], title: line.trim(), body: [] });
- }
- else {
- const l = line.trim();
- if (l && !l.match(/^-+$/)) {
- changes[changes.length - 1].body.push(l);
- }
- }
- }
- changes.shift();
- return changes;
-}
-//# sourceMappingURL=changelog.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/changelog.js.map b/lib.esm/_admin/utils/changelog.js.map
deleted file mode 100644
index 8191c1b6..00000000
--- a/lib.esm/_admin/utils/changelog.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,MAAM,UAAU,UAAU;IACtB,MAAM,OAAO,GAAyB;QAClC,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAG,EAAE;KAC5C,CAAC;IAEF,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACpE,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACpC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC3C,IAAI,KAAK,EAAE;YACP,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAG,EAAE,CAAC,CAAC;SACtE;aAAM;YACH,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBACvB,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAC5C;SACJ;KACJ;IAED,OAAO,CAAC,KAAK,EAAE,CAAC;IAEhB,OAAO,OAAO,CAAC;AACnB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/date.d.ts b/lib.esm/_admin/utils/date.d.ts
deleted file mode 100644
index 73e011d4..00000000
--- a/lib.esm/_admin/utils/date.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export declare function getDateTime(date: Date): string;
-//# sourceMappingURL=date.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/date.d.ts.map b/lib.esm/_admin/utils/date.d.ts.map
deleted file mode 100644
index 79066fb3..00000000
--- a/lib.esm/_admin/utils/date.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/date.ts"],"names":[],"mappings":"AAqBA,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK9C"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/date.js b/lib.esm/_admin/utils/date.js
deleted file mode 100644
index e1e5f412..00000000
--- a/lib.esm/_admin/utils/date.js
+++ /dev/null
@@ -1,30 +0,0 @@
-function repeat(c, length) {
- if (c.length === 0) {
- throw new Error("too short");
- }
- while (c.length < length) {
- c += c;
- }
- return c.substring(0, length);
-}
-function zpad(value, length) {
- if (length == null) {
- length = 2;
- }
- const str = String(value);
- return repeat("0", length - str.length) + str;
-}
-function getDate(date) {
- return [
- date.getFullYear(),
- zpad(date.getMonth() + 1),
- zpad(date.getDate())
- ].join("-");
-}
-export function getDateTime(date) {
- return getDate(date) + " " + [
- zpad(date.getHours()),
- zpad(date.getMinutes() + 1)
- ].join(":");
-}
-//# sourceMappingURL=date.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/date.js.map b/lib.esm/_admin/utils/date.js.map
deleted file mode 100644
index 4989b574..00000000
--- a/lib.esm/_admin/utils/date.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/date.ts"],"names":[],"mappings":"AACA,SAAS,MAAM,CAAC,CAAS,EAAE,MAAc;IACrC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;KAAE;IACrD,OAAM,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,CAAC,IAAI,CAAC,CAAC;KAAE;IACpC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,IAAI,CAAC,KAAa,EAAE,MAAe;IACxC,IAAI,MAAM,IAAI,IAAI,EAAE;QAAE,MAAM,GAAG,CAAC,CAAC;KAAE;IACnC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,OAAO,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAC,IAAU;IACvB,OAAO;QACH,IAAI,CAAC,WAAW,EAAE;QAClB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;KACvB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAU;IAClC,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;KAC9B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/fs.d.ts b/lib.esm/_admin/utils/fs.d.ts
deleted file mode 100644
index fc652971..00000000
--- a/lib.esm/_admin/utils/fs.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export declare function atomicWrite(path: string, value: string | Uint8Array): void;
-//# sourceMappingURL=fs.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/fs.d.ts.map b/lib.esm/_admin/utils/fs.d.ts.map
deleted file mode 100644
index 787ab509..00000000
--- a/lib.esm/_admin/utils/fs.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/fs.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAI1E"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/fs.js b/lib.esm/_admin/utils/fs.js
deleted file mode 100644
index 61ed7f29..00000000
--- a/lib.esm/_admin/utils/fs.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import fs from "fs";
-import { resolve } from "./path.js";
-export function atomicWrite(path, value) {
- const tmp = resolve(".atomic-tmp");
- fs.writeFileSync(tmp, value);
- fs.renameSync(tmp, path);
-}
-//# sourceMappingURL=fs.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/fs.js.map b/lib.esm/_admin/utils/fs.js.map
deleted file mode 100644
index 8c6507df..00000000
--- a/lib.esm/_admin/utils/fs.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,KAA0B;IAChE,MAAM,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACnC,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC7B,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/git.d.ts b/lib.esm/_admin/utils/git.d.ts
deleted file mode 100644
index 4fe7e806..00000000
--- a/lib.esm/_admin/utils/git.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export declare function getGitTag(filename: string): Promise;
-export declare function getModifiedTime(filename: string): Promise;
-export interface GitLog {
- commit: string;
- author: string;
- date: string;
- body: string;
-}
-export declare function getLogs(files?: null | Array, range?: null | {
- tag0: string;
- tag1: string;
-}, limit?: null | number): Promise>;
-export declare function getDiff(filename: string, tag0: string, tag1: string): Promise;
-export declare function getTags(): Promise>;
-//# sourceMappingURL=git.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/git.d.ts.map b/lib.esm/_admin/utils/git.d.ts.map
deleted file mode 100644
index a65a0912..00000000
--- a/lib.esm/_admin/utils/git.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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,CAoCxJ;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"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/git.js b/lib.esm/_admin/utils/git.js
deleted file mode 100644
index de2b6c60..00000000
--- a/lib.esm/_admin/utils/git.js
+++ /dev/null
@@ -1,94 +0,0 @@
-import { dirname } from "path";
-import { fileURLToPath } from "url";
-import { run } from "./run.js";
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = dirname(__filename);
-// Returns the most recent git commit hash for a given filename
-export async function getGitTag(filename) {
- const result = await run("git", ["log", "-n", "1", "--", filename], __dirname);
- if (!result.ok) {
- throw new Error(`git log error`);
- }
- let log = result.stdout.trim();
- if (!log) {
- return null;
- }
- const hashMatch = log.match(/^commit\s+([0-9a-f]{40})\n/i);
- if (!hashMatch) {
- return null;
- }
- return hashMatch[1];
-}
-export async function getModifiedTime(filename) {
- const result = await run("git", ["log", "-n", "1", "--", filename], __dirname);
- if (!result.ok) {
- throw new Error(`git log error`);
- }
- let log = result.stdout.trim();
- if (!log) {
- return null;
- }
- for (let line of log.split("\n")) {
- line = line.trim();
- if (!line) {
- break;
- }
- const match = line.match(/^date:\s+(.*)$/i);
- if (match) {
- return (new Date(match[1].trim())).getTime();
- ;
- }
- }
- return null;
-}
-export async function getLogs(files, range, limit) {
- const args = ["log", "-n", String((limit != null) ? limit : 1)];
- if (range) {
- args.push(`${range.tag0}..${range.tag1}`);
- }
- if (files) {
- args.push("--");
- files.forEach((f) => args.push(f));
- }
- const exec = await run("git", args);
- const log = exec.stdout.trim();
- if (!log) {
- return [];
- }
- const results = [{ commit: "", author: "", date: "", body: "" }];
- for (const line of log.split("\n")) {
- const hashMatch = line.match(/^commit\s+([0-9a-f]{40})/i);
- if (hashMatch) {
- results.push({ commit: hashMatch[1], author: "", date: "", body: "" });
- }
- else {
- if (line.startsWith("Author:")) {
- results[results.length - 1].author = line.substring(7).trim();
- }
- else if (line.startsWith("Date:")) {
- results[results.length - 1].date = line.substring(5).trim();
- }
- else {
- results[results.length - 1].body = (results[results.length - 1].body + " " + line).trim();
- }
- }
- }
- // Nix the bootstrap entry
- results.shift();
- return results;
-}
-export async function getDiff(filename, tag0, tag1) {
- const result = await run("git", ["diff", `${tag0}..${tag1}`, "--", filename]);
- if (!result.ok) {
- throw new Error(`git log error`);
- }
- 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
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/git.js.map b/lib.esm/_admin/utils/git.js.map
deleted file mode 100644
index 23dca130..00000000
--- a/lib.esm/_adm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7F;SACJ;KACL;IAED,0BAA0B;IAC1B,OAAO,CAAC,KAAK,EAAE,CAAC;IAEhB,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAY;IACtE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAE,MAAM,EAAE,GAAI,IAAK,KAAM,IAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAE,CAAC,CAAC;IACpF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAAE;IACrD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO;IACzB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAE,KAAK,CAAE,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAAE;IACrD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/json.d.ts b/lib.esm/_admin/utils/json.d.ts
deleted file mode 100644
index 23d3a441..00000000
--- a/lib.esm/_admin/utils/json.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export declare function loadJson(path: string): any;
-export type SortFunc = (parent: string, a: string, b: string) => number;
-export declare function saveJson(filename: string, data: any, sort?: boolean | SortFunc): any;
-//# sourceMappingURL=json.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/json.d.ts.map b/lib.esm/_admin/utils/json.d.ts.map
deleted file mode 100644
index 0dd7f84b..00000000
--- a/lib.esm/_admin/utils/json.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/json.ts"],"names":[],"mappings":"AAKA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAE1C;AAID,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAExE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,GAAG,CA0BpF"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/json.js b/lib.esm/_admin/utils/json.js
deleted file mode 100644
index 511ee937..00000000
--- a/lib.esm/_admin/utils/json.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import fs from "fs";
-import { atomicWrite } from "./fs.js";
-export function loadJson(path) {
- return JSON.parse(fs.readFileSync(path).toString());
-}
-export function saveJson(filename, data, sort) {
- let replacer = undefined;
- if (sort) {
- replacer = (key, value) => {
- if (Array.isArray(value)) {
- // pass
- }
- else if (value && typeof (value) === "object") {
- const keys = Object.keys(value);
- let sortFunc;
- if (typeof (sort) === "function") {
- sortFunc = function (a, b) {
- return sort(key, a, b);
- };
- }
- keys.sort(sortFunc);
- return keys.reduce((accum, key) => {
- accum[key] = value[key];
- return accum;
- }, {});
- }
- return value;
- };
- }
- atomicWrite(filename, JSON.stringify(data, replacer, 2) + "\n");
-}
-//# sourceMappingURL=json.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/json.js.map b/lib.esm/_admin/utils/json.js.map
deleted file mode 100644
index 0b9c1093..00000000
--- a/lib.esm/_admin/utils/json.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAE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CAAC;AACpE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/npm.d.ts b/lib.esm/_admin/utils/npm.d.ts
deleted file mode 100644
index 28b8b6b4..00000000
--- a/lib.esm/_admin/utils/npm.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export declare function _getNpmPackage(name: string): Promise;
-export type Version = {
- version: string;
- gitHead: string;
- date: string;
-};
-export declare function getVersions(name: string): Promise>;
-//# sourceMappingURL=npm.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/npm.d.ts.map b/lib.esm/_admin/utils/npm.d.ts.map
deleted file mode 100644
index fb3abe2d..00000000
--- a/lib.esm/_admin/utils/npm.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/npm.ts"],"names":[],"mappings":"AAIA,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAQ/D;AAED,MAAM,MAAM,OAAO,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAYvE"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/npm.js b/lib.esm/_admin/utils/npm.js
deleted file mode 100644
index 0b7bb499..00000000
--- a/lib.esm/_admin/utils/npm.js
+++ /dev/null
@@ -1,106 +0,0 @@
-import { FetchRequest } from "../../utils/index.js";
-const cache = {};
-export async function _getNpmPackage(name) {
- if (!cache[name]) {
- const resp = await (new FetchRequest("https:/\/registry.npmjs.org/" + name)).send();
- resp.assertOk();
- cache[name] = resp.bodyJson;
- }
- return cache[name] || null;
-}
-export async function getVersions(name) {
- const result = [];
- const pkg = await _getNpmPackage(name);
- for (const version in pkg.versions) {
- const gitHead = pkg.versions[version].gitHead;
- const date = pkg.time[version];
- if (gitHead == null || date == null) {
- continue;
- }
- result.push({ date, gitHead, version });
- }
- return result;
-}
-/*
-(async function() {
- //console.log(await _getNpmPackage("quais"));
- console.log(await getGitHeads("quais"));
-})();
-*/
-/*
-import semver from "semver";
-
-import { FetchRequest } from "../../utils/index.js";
-
-export type PackageInfo = {
- dependencies: { [ name: string ]: string };
- devDependencies: { [ name: string ]: string };
- gitHead: string;
- name: string;
- version: string;
- tarballHash: string;
- location: "remote" | "local";
- _quais_nobuild: boolean;
-};
-
-export class Package {
- readonly #info: PackageInfo;
-
- constructor(info: PackageInfo) {
- this.#info = info;
- }
-
- get name(): string { return this.#info.name; }
- get version(): string { return this.#info.version; }
-
- get dependencies(): Record { return this.#info.dependencies; }
- get devDependencies(): Record { return this.#info.devDependencies; }
-
- get gitHead(): string { return this.#info.gitHead; }
- get tarballHash(): string { return this.#info.tarballHash; }
-
-}
-
-
-const cache: Record = { };
-
-async function getPackageInfo(name: string): Promise {
- if (!cache[name]) {
- const resp = await (new FetchRequest("https:/\/registry.npmjs.org/" + name)).send();
- resp.assertOk();
- cache[name] = resp.bodyJson();
- }
-
- return cache[name] || null;
-}
-
-export async function getPackage(name: string, version?: string): Promise {
- const infos = await getPackageInfo(name);
- if (infos == null) { return null; }
-
- if (version == null) {
- const versions = Object.keys(infos.versions);
- versions.sort(semver.compare);
-
- // HACK: So v5 continues working while v6 is managed by reticulate
- version = "6.0.0";
- while (version.indexOf("beta") >= 0 || semver.gte(version, "6.0.0")) {
- version = versions.pop();
- }
- }
-
- const info = infos.versions[version];
-
- return new Package({
- dependencies: (info.dependencies || {}),
- devDependencies: (info.devDependencies || {}),
- gitHead: info.gitHead,
- location: "remote",
- name: info.name,
- tarballHash: info.tarballHash,
- version : info.version,
- _quais_nobuild: !!info._quais_nobuild,
- });
-}
-*/
-//# sourceMappingURL=npm.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/npm.js.map b/lib.esm/_admin/utils/npm.js.map
deleted file mode 100644
index 26c0f558..00000000
--- a/lib.esm/_admin/utils/npm.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"npm.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/npm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,KAAK,GAAwB,EAAG,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAY;IAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACd,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,YAAY,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACpF,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;KAC/B;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAC/B,CAAC;AAQD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY;IAC1C,MAAM,MAAM,GAAmB,EAAG,CAAC;IAEnC,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;IACvC,KAAK,MAAM,OAAO,IAAI,GAAG,CAAC,QAAQ,EAAE;QAChC,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;QAC9C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;YAAE,SAAS;SAAE;QAClD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;KAC3C;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AACD;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EE"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/path.d.ts b/lib.esm/_admin/utils/path.d.ts
deleted file mode 100644
index e146d5df..00000000
--- a/lib.esm/_admin/utils/path.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export declare const ROOT: string;
-export declare function resolve(...args: Array): string;
-//# sourceMappingURL=path.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/path.d.ts.map b/lib.esm/_admin/utils/path.d.ts.map
deleted file mode 100644
index d7794f73..00000000
--- a/lib.esm/_admin/utils/path.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/path.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAAmC,CAAC;AAErD,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAItD"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/path.js b/lib.esm/_admin/utils/path.js
deleted file mode 100644
index 83310e29..00000000
--- a/lib.esm/_admin/utils/path.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { dirname, resolve as _resolve } from "path";
-import { fileURLToPath } from 'url';
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = dirname(__filename);
-export const ROOT = _resolve(__dirname, "../../../");
-export function resolve(...args) {
- args = args.slice();
- args.unshift(ROOT);
- return _resolve.apply(null, args);
-}
-//# sourceMappingURL=path.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/path.js.map b/lib.esm/_admin/utils/path.js.map
deleted file mode 100644
index 264db516..00000000
--- a/lib.esm/_admin/utils/path.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAErD,MAAM,UAAU,OAAO,CAAC,GAAG,IAAmB;IAC1C,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/run.d.ts b/lib.esm/_admin/utils/run.d.ts
deleted file mode 100644
index 393e7d44..00000000
--- a/lib.esm/_admin/utils/run.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-///
-export declare class RunResult {
- #private;
- constructor(progname: string, args: Array, status: null | number, stdout: string | Buffer, stderr: string | Buffer);
- get cmd(): string;
- get stderr(): string | null;
- get _stderr(): string | Buffer;
- get stdout(): string;
- get _stdout(): string | Buffer;
- get status(): null | number;
- get ok(): boolean;
- assertOk(message?: string): void;
-}
-export declare function run(progname: string, args?: Array, currentWorkingDirectory?: string): RunResult;
-//# sourceMappingURL=run.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/run.d.ts.map b/lib.esm/_admin/utils/run.d.ts.map
deleted file mode 100644
index 839f4a9a..00000000
--- a/lib.esm/_admin/utils/run.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src.ts/_admin/utils/run.ts"],"names":[],"mappings":";AAEA,qBAAa,SAAS;;gBAMN,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAO1H,IAAI,GAAG,IAAI,MAAM,CAAsB;IAEvC,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,MAAM,CAE7B;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,MAAM,CAE7B;IAED,IAAI,MAAM,IAAI,IAAI,GAAG,MAAM,CAAyB;IAEpD,IAAI,EAAE,IAAI,OAAO,CAEhB;IAED,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;CAKnC;AAED,wBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAgBvG"}
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/run.js b/lib.esm/_admin/utils/run.js
deleted file mode 100644
index 98761524..00000000
--- a/lib.esm/_admin/utils/run.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import { spawnSync } from "child_process";
-export class RunResult {
- #cmd;
- #status;
- #stdout;
- #stderr;
- constructor(progname, args, status, stdout, stderr) {
- this.#cmd = `${progname} ${args.map((a) => JSON.stringify(a))}`;
- this.#status = status;
- this.#stdout = stdout;
- this.#stderr = stderr;
- }
- get cmd() { return this.#cmd; }
- get stderr() {
- return this._stderr.toString() || null;
- }
- get _stderr() {
- return this.#stderr;
- }
- get stdout() {
- return this._stdout.toString();
- }
- get _stdout() {
- return this.#stdout;
- }
- get status() { return this.#status; }
- get ok() {
- return (this.#stderr.length === 0 && this.#status === 0);
- }
- assertOk(message) {
- if (!this.ok) {
- throw new Error(message || `failed to run: ${this.#cmd}`);
- }
- }
-}
-;
-export function run(progname, args, currentWorkingDirectory) {
- if (args == null) {
- args = [];
- }
- const options = {};
- if (currentWorkingDirectory) {
- options.cwd = currentWorkingDirectory;
- }
- const child = spawnSync(progname, args, options);
- const result = new RunResult(progname, args, child.status, child.stdout, child.stderr);
- if (child.error) {
- const error = child.error;
- error.result = result;
- throw error;
- }
- return result;
-}
-//# sourceMappingURL=run.js.map
\ No newline at end of file
diff --git a/lib.esm/_admin/utils/run.js.map b/lib.esm/_admin/utils/run.js.map
deleted file mode 100644
index 75c8cc8f..00000000
--- a/lib.esm/_admin/utils/run.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src.ts/_admin/utils/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,OAAO,SAAS;IACT,IAAI,CAAS;IACb,OAAO,CAAgB;IACvB,OAAO,CAAkB;IACzB,OAAO,CAAkB;IAElC,YAAY,QAAgB,EAAE,IAAmB,EAAE,MAAqB,EAAE,MAAuB,EAAE,MAAuB;QACtH,IAAI,CAAC,IAAI,GAAG,GAAI,QAAS,IAAK,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,IAAI,GAAG,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvC,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC;IAC3C,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,OAA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}
\ No newline at end of file
diff --git a/lib.esm/_tests/blockchain-data.d.ts b/lib.esm/_tests/blockchain-data.d.ts
deleted file mode 100644
index 1af3cb50..00000000
--- a/lib.esm/_tests/blockchain-data.d.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-export type TestBlockchainNetwork = "mainnet" | "goerli";
-export interface TestBlockchainAddress {
- test: string;
- address: string;
- code?: string;
- nonce?: number;
- name?: string;
- balance?: bigint;
- storage?: Record;
-}
-export interface TestBlockchainBlock {
- test: string;
- hash: string;
- parentHash: string;
- number: number;
- timestamp: number;
- nonce: string;
- difficulty: bigint;
- gasLimit: bigint;
- gasUsed: bigint;
- miner: string;
- extraData: string;
- transactions: Array;
- baseFeePerGas?: bigint;
-}
-export interface TestBlockchainTransaction {
- test: string;
- hash: string;
- blockHash: string;
- blockNumber: number;
- type: number;
- from: string;
- gasPrice: bigint;
- gasLimit: bigint;
- to: string;
- value: bigint;
- nonce: number;
- data: string;
- signature: {
- r: string;
- s: string;
- yParity: 0 | 1;
- v: number;
- networkV: null | bigint;
- };
- creates: null | string;
- chainId: bigint;
- accessList?: Array>>;
- maxPriorityFeePerGas?: bigint;
- maxFeePerGas?: bigint;
-}
-export interface TestBlockchainReceipt {
- test: string;
- blockHash: string;
- blockNumber: number;
- type: number;
- contractAddress: null | string;
- cumulativeGasUsed: bigint;
- from: string;
- gasUsed: bigint;
- gasPrice: bigint;
- logs: Array<{
- address: string;
- blockHash: string;
- blockNumber: number;
- data: string;
- index: number;
- topics: Array;
- transactionHash: string;
- transactionIndex: number;
- }>;
- logsBloom: string;
- root: null | string;
- status: null | number;
- to: string;
- hash: string;
- index: number;
-}
-export declare const testAddress: Record>;
-export declare const testBlock: Record>;
-export declare const testTransaction: Record>;
-export declare const testReceipt: Record>;
-export declare const networkNames: Array;
-export declare function networkFeatureAtBlock(feature: string, block: number): boolean;
-//# sourceMappingURL=blockchain-data.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/blockchain-data.d.ts.map b/lib.esm/_tests/blockchain-data.d.ts.map
deleted file mode 100644
index 1a30177f..00000000
--- a/lib.esm/_tests/blockchain-data.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"blockchain-data.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/blockchain-data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GAAG,QAAQ,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;I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EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAuBnF,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,mBAAmB,CAAC,CA8D/E,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAwD3F,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAsFnF,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,qBAAqB,CAErD,CAAC;AACF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7E"}
\ No newline at end of file
diff --git a/lib.esm/_tests/blockchain-data.js b/lib.esm/_tests/blockchain-data.js
deleted file mode 100644
index 9c6f8321..00000000
--- a/lib.esm/_tests/blockchain-data.js
+++ /dev/null
@@ -1,241 +0,0 @@
-;
-export const testAddress = {
- mainnet: [
- {
- test: "old-account",
- address: "0xAC1639CF97a3A46D431e6d1216f576622894cBB5",
- balance: BigInt("4813414100000000"),
- nonce: 3,
- code: "0x"
- }, {
- test: "TheDAO-splitter-contract",
- address: "0x3474627D4F63A678266BC17171D87f8570936622",
- code: "0x606060405260e060020a60003504630b3ed5368114602e57806337b0574a14605257806356fa47f0146062575b005b602c6004356000546101009004600160a060020a03908116339091161460bb575b50565b60005460ff166060908152602090f35b602c60043560005460ff1615609657600160a060020a038116600034606082818181858883f193505050501515604f576002565b33600160a060020a0316600034606082818181858883f193505050501515604f576002565b600080546101009004600160a060020a03169082606082818181858883f193505050501515604f57600256",
- storage: {
- "0": "0x0000000000000000000000b2682160c482eb985ec9f3e364eec0a904c44c2300"
- }
- }, {
- test: "ricmoo.firefly.eth",
- address: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
- name: "ricmoo.firefly.eth"
- },
- ],
- goerli: []
-};
-export const testBlock = {
- mainnet: [
- {
- test: "old-homestead-block",
- hash: "0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741",
- parentHash: "0xb495a1d7e6663152ae92708da4843337b958146015a2802f4193a410044698c9",
- number: 3,
- timestamp: 1438270048,
- nonce: "0x2e9344e0cbde83ce",
- difficulty: BigInt(17154715646),
- gasLimit: BigInt("0x1388"),
- gasUsed: BigInt("0"),
- miner: "0x5088D623ba0fcf0131E0897a91734A4D83596AA0",
- extraData: "0x476574682f76312e302e302d66633739643332642f6c696e75782f676f312e34",
- transactions: []
- },
- {
- test: "london-block",
- number: 14413999,
- hash: "0x6c79356d40ebb6ed63dc19f5d407f8f1c876047b59dc1a4598cce0e64dcabec5",
- parentHash: "0xbf09b0e215f247a5066d19ece5b4c66960771d45fae62985e8d751fb1adcfe2f",
- timestamp: 1647654576,
- nonce: "0xb4bc9979af5369fe",
- difficulty: BigInt("12841513359509721"),
- gasLimit: BigInt("30087914"),
- gasUsed: BigInt("2008910"),
- miner: "0x2A20380DcA5bC24D052acfbf79ba23e988ad0050",
- extraData: "0x706f6f6c696e2e636f6d21f7092f019bb92a76",
- baseFeePerGas: BigInt("40911884304"),
- transactions: [
- "0x1c3a398933db10634631f54b435c40c8805c13f12bbac7c3dab858ca44213fa2",
- "0xd98947cbdd892cc7f679c903903e6d18a5c5afb19e94437beba79372ad71c347",
- "0x4d66190deb55b5820cb0ce9adb972f646fa0f3e64eaeee674bbf3d054bf3d883",
- "0x9db7bd5f4c91d6103c714bcbc35df3dc708daa668aaef7449b589dbd3be24dac",
- "0x126a43ae4ade4b7fc5c8ac9ebd3dbcf7314f63c60f2804fb49aa25b5c7d80bb1",
- "0x82a90aa4b3b1b7873b117c3ff1ca7165ae34b2fc0788cc0cbfd41805d588590d",
- "0x7f694a6a9972457753ed3dec164f17272b1c8b1da4eab149df95e31a3e72f606",
- "0xdce1cba1ff33f0c23881087d49de3b34fe84c8a6883f3edd75b04fc23e458aac",
- "0xbe1c69f825279cebef42d1f0e07397dcddef7fb278b0195e295ede3e156836c4",
- "0x1d2f007b3c0f894403973a30e5ffaa78589f873d963e9554c6bb1bd7a3127245",
- "0x9c8c78191cf4ae9ae8eee1165153eabe24dbd8b9509b83d5f0caeea85251bb2f",
- "0x42e956f4b3dd6535359b272a0d2dab995c364cb48baaf8d0a1981995f3f8c808",
- "0xdc2c2e99393e24d5dc66e38665fa1d1ff007d92088ef3fd2549545fdbe862ef6",
- "0xaad7be28fffd2e77e8e40bf57f2ac140aa8283ec93c7f3f61a82c79405602f53",
- "0x4735f1421b7b30283e87e0799e82e54307d3e5ba14cd54ad8420b57577489a71",
- "0x0b9d6aa23aa439b41e86595f2ad91f498adffa3e6e7cb26ac7d73252e59fd3de",
- "0xcd93e19bd5d5c5a834fec613116fa01f46eddfd2faa20ef302271b874b9d812a",
- "0x5bf1976574a637f5ac0b8bda1a792fa16cc7ce9624d32e9bd6bd9aa6a8f19d2f",
- "0x2e778da4f66f10f7b681b605635c6599cdbeea167fc1c4396a097aef5d06de61",
- "0xd5fd68eebc4c870ccda081786a74c75c250e9e2d8269b8935edb3adb11b80bb2",
- "0x2aec42a11c1d8c1e5198d54aacbc6bebb09bcd5e78f6af81ea09d65c9064734a",
- "0xbea2e364ea4959ec438d9ccc2d2f7120c7eaba3b177cc0d7df8ff65d866ef89f",
- "0xf48bbb0f838353060da4126a555ce532abf497a9d1108001afffaac513a59ddf",
- "0xf5664e4372cce62733a6610efb7701a4a0e552d81f8caa764d8474b3070c6617",
- "0x9d3732ddbd20610008ff737da2f61120734a1cbfa864374bcbcf10051e6048cb",
- "0xc4d0df5bc6fa51b34ac3c898866d779d4e51a6be4d13be1ec3084b7229b03b47",
- "0x90c86ec98b8ad98049b4ee54cb3aa72c5ae743077b830e8a294aa5dc47a1fb18"
- ]
- }
- ],
- goerli: [],
-};
-export const testTransaction = {
- mainnet: [
- {
- test: "legacy",
- hash: "0xccc90ab97a74c952fb3376c4a3efb566a58a10df62eb4d44a61e106fcf10ec61",
- blockHash: "0x9653f180a5720f3634816eb945a6d722adee52cc47526f6357ac10adaf368135",
- blockNumber: 4097745,
- // index: 18,
- type: 0,
- from: "0x32DEF047DeFd076DB21A2D759aff2A591c972248",
- gasPrice: BigInt("0x4a817c800"),
- gasLimit: BigInt("0x3d090"),
- to: "0x6fC21092DA55B392b045eD78F4732bff3C580e2c",
- value: BigInt("0x186cc6acd4b0000"),
- nonce: 0,
- data: "0xf2c298be000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000067269636d6f6f0000000000000000000000000000000000000000000000000000",
- signature: {
- r: "0x1e5605197a03e3f0a168f14749168dfeefc44c9228312dacbffdcbbb13263265",
- s: "0x269c3e5b3558267ad91b0a887d51f9f10098771c67b82ea6cb74f29638754f54",
- yParity: 1,
- v: 28,
- networkV: BigInt(38),
- },
- creates: null,
- chainId: BigInt(1)
- },
- {
- test: "EIP-1559",
- hash: "0x8ff41d0ba5d239acc8c123ff12451a2c15721c838f657e583d355999af4a4349",
- blockHash: '0x9d4c3bef68e119841281105da96beb1c7252f357340d7a3355236b3332b197b0',
- blockNumber: 12966000,
- // index: 185,
- type: 2,
- from: '0x5afFBa12E9332bbc0E221c8E7BEf7CB7cfB3F281',
- to: '0x2258CcD34ae29E6B199b6CD64eb2aEF157df7CdE',
- gasLimit: BigInt("21000"),
- nonce: 2,
- data: '0x',
- value: BigInt("1100000000000000"),
- gasPrice: BigInt("70578812137"),
- maxPriorityFeePerGas: BigInt("1000000000"),
- maxFeePerGas: BigInt("131115411100"),
- chainId: BigInt(1),
- signature: {
- r: "0xdd26e5478d0aa84e334a0393d335ab24b83de8ecae9290305f15ab884ded246c",
- s: "0x6494b4f61b0d9a5a82ecb86d72b301f859f404f0bec9682bbfff619903ecfbe2",
- yParity: 1,
- v: 28,
- networkV: null
- },
- creates: null,
- accessList: []
- }
- ],
- goerli: []
-};
-export const testReceipt = {
- mainnet: [
- {
- test: "legacy",
- //byzantium: false,
- blockHash: "0x36b4af7f0538559e581c8588f16477df0f676439ea67fe8d7a2ae4abb20e2566",
- blockNumber: 0x3c92b5,
- type: 0,
- contractAddress: null,
- cumulativeGasUsed: BigInt(0x1cca2e),
- from: "0x18C6045651826824FEBBD39d8560584078d1b247",
- gasUsed: BigInt(0x14bb7),
- gasPrice: BigInt(4100000000),
- logs: [
- {
- address: "0x314159265dD8dbb310642f98f50C066173C1259b",
- blockHash: "0x36b4af7f0538559e581c8588f16477df0f676439ea67fe8d7a2ae4abb20e2566",
- blockNumber: 0x3c92b5,
- data: "0x00000000000000000000000018c6045651826824febbd39d8560584078d1b247",
- index: 0x1a,
- topics: [
- "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82",
- "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae",
- "0xf0106919d12469348e14ad6a051d0656227e1aba2fefed41737fdf78421b20e1"
- ],
- transactionHash: "0xc6fcb7d00d536e659a4559d2de29afa9e364094438fef3e72ba80728ce1cb616",
- transactionIndex: 0x39,
- },
- {
- address: "0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef",
- blockHash: "0x36b4af7f0538559e581c8588f16477df0f676439ea67fe8d7a2ae4abb20e2566",
- blockNumber: 0x3c92b5,
- data: "0x000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000595a32ce",
- index: 0x1b,
- topics: [
- "0x0f0c27adfd84b60b6f456b0e87cdccb1e5fb9603991588d87fa99f5b6b61e670",
- "0xf0106919d12469348e14ad6a051d0656227e1aba2fefed41737fdf78421b20e1",
- "0x00000000000000000000000018c6045651826824febbd39d8560584078d1b247"
- ],
- transactionHash: "0xc6fcb7d00d536e659a4559d2de29afa9e364094438fef3e72ba80728ce1cb616",
- transactionIndex: 0x39,
- }
- ],
- logsBloom: "0x00000000000000040000000000100000010000000000000040000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000200000010000000004000000000000000000000000000000000002000000000000000000000000400000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000801000000000000000000000020000000000040000000040000000000000000002000000004000000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000",
- root: "0x9b550a9a640ce50331b64504ef87aaa7e2aaf97344acb6ff111f879b319d2590",
- // Should be null for pre-byzantium, but some nodes have backfilled it
- status: 1,
- to: "0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef",
- hash: "0xc6fcb7d00d536e659a4559d2de29afa9e364094438fef3e72ba80728ce1cb616",
- index: 0x39
- }, {
- test: "byzantium",
- //byzantium: true,
- blockHash: "0x34e5a6cfbdbb84f7625df1de69d218ade4da72f4a2558064a156674e72e976c9",
- blockNumber: 0x444f76,
- type: 0,
- contractAddress: null,
- cumulativeGasUsed: BigInt(0x15bfe7),
- from: "0x18C6045651826824FEBBD39d8560584078d1b247",
- gasUsed: BigInt(0x1b968),
- gasPrice: BigInt(1000000000),
- logs: [
- {
- address: "0xb90E64082D00437e65A76d4c8187596BC213480a",
- blockHash: "0x34e5a6cfbdbb84f7625df1de69d218ade4da72f4a2558064a156674e72e976c9",
- blockNumber: 0x444f76,
- data: "0x",
- index: 0x10,
- topics: [
- "0x748d071d1992ee1bfe7a39058114d0a50d5798fe8eb3a9bfb4687f024629a2ce",
- "0x5574aa58f7191ccab6de6cf75fe2ea0484f010b852fdd8c6b7ae151d6c2f4b83"
- ],
- transactionHash: "0x7f1c6a58dc880438236d0b0a4ae166e9e9a038dbea8ec074149bd8b176332cac",
- transactionIndex: 0x1e,
- }
- ],
- logsBloom: "0x00000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000200000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000800000000000000000800000000000000000000000000000000000000",
- root: null,
- status: 1,
- to: "0xb90E64082D00437e65A76d4c8187596BC213480a",
- hash: "0x7f1c6a58dc880438236d0b0a4ae166e9e9a038dbea8ec074149bd8b176332cac",
- index: 0x1e
- }
- ],
- goerli: []
-};
-export const networkNames = [
- "mainnet", "goerli"
-];
-export function networkFeatureAtBlock(feature, block) {
- switch (feature) {
- case "byzantium":
- return block >= 4370000;
- default:
- break;
- }
- throw new Error(`unknown feature: ${feature}`);
-}
-//# sourceMappingURL=blockchain-data.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/blockchain-data.js.map b/lib.esm/_tests/blockchain-data.js.map
deleted file mode 100644
index e594fe23..00000000
--- a/lib.esm/_tests/blockchain-data.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"blockchain-data.js","sourceRoot":"","sources":["../../src.ts/_tests/blockchain-data.ts"],"names":[],"mappings":"AAuFC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAgE;IACpF,OAAO,EAAE;QACL;YACI,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACnC,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,IAAI;SACb,EAAE;YACC,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,kdAAkd;YACxd,OAAO,EAAE;gBACL,GAAG,EAAE,oEAAoE;aAC5E;SACJ,EAAE;YACC,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oBAAoB;SAC7B;KACJ;IACD,MAAM,EAAE,EACP;CACJ,CAAC;AAEF,MAAM,CA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lib.esm/_tests/contracts/QRC20.d.ts b/lib.esm/_tests/contracts/QRC20.d.ts
deleted file mode 100644
index 503cb874..00000000
--- a/lib.esm/_tests/contracts/QRC20.d.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-declare const QRC20: {
- _format: string;
- contractName: string;
- sourceName: string;
- abi: ({
- inputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- stateMutability: string;
- type: string;
- anonymous?: undefined;
- name?: undefined;
- outputs?: undefined;
- } | {
- anonymous: boolean;
- inputs: {
- indexed: boolean;
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- type: string;
- stateMutability?: undefined;
- outputs?: undefined;
- } | {
- inputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- outputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- stateMutability: string;
- type: string;
- anonymous?: undefined;
- })[];
- bytecode: string;
- deployedBytecode: string;
- linkReferences: {};
- deployedLinkReferences: {};
-};
-export default QRC20;
-//# sourceMappingURL=QRC20.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/QRC20.d.ts.map b/lib.esm/_tests/contracts/QRC20.d.ts.map
deleted file mode 100644
index d2320201..00000000
--- a/lib.esm/_tests/contracts/QRC20.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"QRC20.d.ts","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/QRC20.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4dV,CAAA;AAGD,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/QRC20.js b/lib.esm/_tests/contracts/QRC20.js
deleted file mode 100644
index 878d85c2..00000000
--- a/lib.esm/_tests/contracts/QRC20.js
+++ /dev/null
@@ -1,479 +0,0 @@
-const QRC20 = {
- "_format": "hh-sol-artifact-1",
- "contractName": "QRC20",
- "sourceName": "contracts/QRC20.sol",
- "abi": [
- {
- "inputs": [
- {
- "internalType": "string",
- "name": "name_",
- "type": "string"
- },
- {
- "internalType": "string",
- "name": "symbol_",
- "type": "string"
- },
- {
- "internalType": "uint256",
- "name": "initialSupply_",
- "type": "uint256"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "ExternalTransfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "uint8[]",
- "name": "chain",
- "type": "uint8[]"
- },
- {
- "internalType": "address[]",
- "name": "addr",
- "type": "address[]"
- }
- ],
- "name": "AddApprovedAddresses",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "ApprovedAddresses",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "Ranges",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "low",
- "type": "uint8"
- },
- {
- "internalType": "uint8",
- "name": "high",
- "type": "uint8"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "gasLimit",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "minerTip",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "baseFee",
- "type": "uint256"
- }
- ],
- "name": "crossChainTransfer",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "subtractedValue",
- "type": "uint256"
- }
- ],
- "name": "decreaseAllowance",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "addr",
- "type": "address"
- }
- ],
- "name": "getAddressLocation",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "incomingTransfer",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "addedValue",
- "type": "uint256"
- }
- ],
- "name": "increaseAllowance",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "a",
- "type": "address"
- }
- ],
- "name": "toBytes",
- "outputs": [
- {
- "internalType": "bytes",
- "name": "",
- "type": "bytes"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "bytecode": "0x60806040523480156200001157600080fd5b5060405162001f7238038062001f72833981016040819052620000349162000325565b600f62000042848262000426565b50601062000051838262000426565b50601180546001600160a01b03191633908117909155819062000075908262000195565b505060408051808201825260008152601d60209182015260128054611d0061ffff199182161790915582518084018452601e8152603a90830152601380548216613a1e17905582518084018452603b815260579083015260148054821661573b17905582518084018452605881526073908301526015805482166173581790558251808401845260748152608f90830152601680548216618f74179055825180840184526090815260ab9083015260178054821661ab901790558251808401845260ac815260c79083015260188054821661c7ac1790558251808401845260c8815260e39083015260198054821661e3c8179055825180840190935260e4835260ff9290910191909152601a805490911661ffe4179055506200051a9050565b6001600160a01b038216620001f05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600e6000828254620002049190620004f2565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200028857600080fd5b81516001600160401b0380821115620002a557620002a562000260565b604051601f8301601f19908116603f01168101908282118183101715620002d057620002d062000260565b81604052838152602092508683858801011115620002ed57600080fd5b600091505b83821015620003115785820183015181830184015290820190620002f2565b600093810190920192909252949350505050565b6000806000606084860312156200033b57600080fd5b83516001600160401b03808211156200035357600080fd5b620003618783880162000276565b945060208601519150808211156200037857600080fd5b50620003878682870162000276565b925050604084015190509250925092565b600181811c90821680620003ad57607f821691505b602082108103620003ce57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200025b57600081815260208120601f850160051c81016020861015620003fd5750805b601f850160051c820191505b818110156200041e5782815560010162000409565b505050505050565b81516001600160401b0381111562000442576200044262000260565b6200045a8162000453845462000398565b84620003d4565b602080601f831160018114620004925760008415620004795750858301515b600019600386901b1c1916600185901b1785556200041e565b600085815260208120601f198616915b82811015620004c357888601518255948401946001909101908401620004a2565b5085821015620004e25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200051457634e487b7160e01b600052601160045260246000fd5b92915050565b611a48806200052a6000396000f3fe6080604052600436106101295760003560e01c8063593b79fe116100a5578063a457c2d711610074578063a9059cbb11610059578063a9059cbb14610375578063bc472aa314610395578063dd62ed3e146103cd57600080fd5b8063a457c2d714610335578063a534d9de1461035557600080fd5b8063593b79fe1461028657806370a08231146102d757806373cddab21461030d57806395d89b411461032057600080fd5b806323b872dd116100fc57806339509351116100e1578063395093511461020c578063399444bc1461022c578063429437bf1461024c57600080fd5b806323b872dd146101ca578063313ce567146101ea57600080fd5b806306fdde031461012e578063095ea7b31461015957806318160ddd1461018957806320e8dd93146101a8575b600080fd5b34801561013a57600080fd5b50610143610413565b60405161015091906115a8565b60405180910390f35b34801561016557600080fd5b506101796101743660046115de565b6104a5565b6040519015158152602001610150565b34801561019557600080fd5b50600e545b604051908152602001610150565b3480156101b457600080fd5b506101c86101c33660046115de565b6104bc565b005b3480156101d657600080fd5b506101796101e5366004611608565b61056d565b3480156101f657600080fd5b5060125b60405160ff9091168152602001610150565b34801561021857600080fd5b506101796102273660046115de565b61058f565b34801561023857600080fd5b506101fa610247366004611644565b6105ce565b34801561025857600080fd5b5061026c61026736600461165f565b6106e5565b6040805160ff938416815292909116602083015201610150565b34801561029257600080fd5b506101436102a1366004611644565b604051606082811b6bffffffffffffffffffffffff19166020830152906034016040516020818303038152906040529050919050565b3480156102e357600080fd5b5061019a6102f2366004611644565b6001600160a01b031660009081526020819052604090205490565b6101c861031b366004611678565b610708565b34801561032c57600080fd5b5061014361094c565b34801561034157600080fd5b506101796103503660046115de565b61095b565b34801561036157600080fd5b506101c8610370366004611706565b610a10565b34801561038157600080fd5b506101796103903660046115de565b610ce1565b3480156103a157600080fd5b506103b56103b036600461165f565b610cee565b6040516001600160a01b039091168152602001610150565b3480156103d957600080fd5b5061019a6103e8366004611772565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600f8054610422906117a5565b80601f016020809104026020016040519081016040528092919081815260200182805461044e906117a5565b801561049b5780601f106104705761010080835404028352916020019161049b565b820191906000526020600020905b81548152906001019060200180831161047e57829003601f168201915b5050505050905090565b60006104b2338484610d0e565b5060015b92915050565b3360026104c8826105ce565b60ff16600c81106104db576104db6117df565b01546040516bffffffffffffffffffffffff193360601b1660208201526001600160a01b03909116919091149060340160408051601f1981840301815290829052610528916020016117f5565b6040516020818303038152906040529061055e5760405162461bcd60e51b815260040161055591906115a8565b60405180910390fd5b506105698282610edc565b5050565b600061057a843384610f9b565b61058584848461102d565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061058590829086906105c9908790611877565b610d0e565b604080516bffffffffffffffffffffffff19606084901b1660208201528151601481830301815260349091019091526000908190600081518110610614576106146117df565b016020015160f81c905060005b60098160ff16101561069c5760128160ff16600d8110610643576106436117df565b015460ff9081169083161080159061067e575060128160ff16600d811061066c5761066c6117df565b015460ff610100909104811690831611155b1561068a579392505050565b806106948161188a565b915050610621565b5060405162461bcd60e51b815260206004820152601060248201527f496e76616c6964204c6f636174696f6e000000000000000000000000000000006044820152606401610555565b601281600d81106106f557600080fd5b015460ff80821692506101009091041682565b84f780156107585760405162461bcd60e51b815260206004820152601760248201527f41646472657373206973206e6f742065787465726e616c0000000000000000006044820152606401610555565b610762338661128f565b6000600261076f886105ce565b60ff16600c8110610782576107826117df565b01546001600160a01b03169050806108025760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e206973206e6f7420617661696c61626c65206f6e2074686520646560448201527f7374696e6174696f6e20636861696e00000000000000000000000000000000006064820152608401610555565b60008561080f8686611877565b61081991906118a9565b905080341015610828826113f8565b60405160200161083891906118c0565b604051602081830303815290604052906108655760405162461bcd60e51b815260040161055591906115a8565b506040516001600160a01b03891660248201526044810188905260009060640160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f20e8dd930000000000000000000000000000000000000000000000000000000017815281519192506000918291829190898b8d858b81f69050896001600160a01b0316336001600160a01b03167fcf0ee562475620bbcd2f1b0675c8163317513271e4fdbbe9722436f247bd6d998b60405161093891815260200190565b60405180910390a350505050505050505050565b606060108054610422906117a5565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156109f85760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610555565b610a058286868403610d0e565b506001949350505050565b6011546001600160a01b03163314610a6a5760405162461bcd60e51b815260206004820152601660248201527f53656e646572206973206e6f74206465706c6f796572000000000000000000006044820152606401610555565b828114610adf5760405162461bcd60e51b815260206004820152603060248201527f636861696e20616e64206164647265737320617272617973206d75737420626560448201527f207468652073616d65206c656e677468000000000000000000000000000000006064820152608401610555565b60005b60ff8116841115610cda57600985858360ff16818110610b0457610b046117df565b9050602002016020810190610b199190611952565b60ff1610610b695760405162461bcd60e51b815260206004820152600b60248201527f4d61782039207a6f6e65730000000000000000000000000000000000000000006044820152606401610555565b60006002868660ff8516818110610b8257610b826117df565b9050602002016020810190610b979190611952565b60ff16600c8110610baa57610baa6117df565b01546001600160a01b031614610c285760405162461bcd60e51b815260206004820152603160248201527f54686520617070726f766564206164647265737320666f722074686973207a6f60448201527f6e6520616c7265616479206578697374730000000000000000000000000000006064820152608401610555565b82828260ff16818110610c3d57610c3d6117df565b9050602002016020810190610c529190611644565b600286868460ff16818110610c6957610c696117df565b9050602002016020810190610c7e9190611952565b60ff16600c8110610c9157610c916117df565b0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905580610cd28161188a565b915050610ae2565b5050505050565b60006104b233848461102d565b600281600c8110610cfe57600080fd5b01546001600160a01b0316905081565b81f780610d835760405162461bcd60e51b815260206004820152603f60248201527f5370656e64657220616464726573732069732065787465726e616c2e2055736560448201527f2063726f73732d636861696e207472616e736665722066756e6374696f6e2e006064820152608401610555565b6001600160a01b038416610dfe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b038316610e7a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0384811660008181526001602090815260408083209488168084529482529182902086905590518581527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050565b6001600160a01b038216610f325760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610555565b80600e6000828254610f449190611877565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611027578181101561101a5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610555565b6110278484848403610d0e565b50505050565b81f7806110a25760405162461bcd60e51b815260206004820152603760248201527f416464726573732069732065787465726e616c2e205573652063726f73732d6360448201527f6861696e207472616e736665722066756e6374696f6e2e0000000000000000006064820152608401610555565b6001600160a01b03841661111e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b03831661119a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b038416600090815260208190526040902054828110156112295760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b03858116600081815260208181526040808320888703905593881680835291849020805488019055925186815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cda565b6001600160a01b03821661130b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0382166000908152602081905260409020548181101561139a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0383166000818152602081815260408083208686039055600e80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b60608160000361143b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611465578061144f81611975565b915061145e9050600a8361198e565b915061143f565b60008167ffffffffffffffff811115611480576114806119b0565b6040519080825280601f01601f1916602001820160405280156114aa576020820181803683370190505b509050815b851561154f576114c06001826119c6565b905060006114cf600a8861198e565b6114da90600a6118a9565b6114e490886119c6565b6114ef9060306119d9565b905060008160f81b90508084848151811061150c5761150c6117df565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611546600a8961198e565b975050506114af565b50949350505050565b60005b8381101561157357818101518382015260200161155b565b50506000910152565b60008151808452611594816020860160208601611558565b601f01601f19169290920160200192915050565b6020815260006115bb602083018461157c565b9392505050565b80356001600160a01b03811681146115d957600080fd5b919050565b600080604083850312156115f157600080fd5b6115fa836115c2565b946020939093013593505050565b60008060006060848603121561161d57600080fd5b611626846115c2565b9250611634602085016115c2565b9150604084013590509250925092565b60006020828403121561165657600080fd5b6115bb826115c2565b60006020828403121561167157600080fd5b5035919050565b600080600080600060a0868803121561169057600080fd5b611699866115c2565b97602087013597506040870135966060810135965060800135945092505050565b60008083601f8401126116cc57600080fd5b50813567ffffffffffffffff8111156116e457600080fd5b6020830191508360208260051b85010111156116ff57600080fd5b9250929050565b6000806000806040858703121561171c57600080fd5b843567ffffffffffffffff8082111561173457600080fd5b611740888389016116ba565b9096509450602087013591508082111561175957600080fd5b50611766878288016116ba565b95989497509550505050565b6000806040838503121561178557600080fd5b61178e836115c2565b915061179c602084016115c2565b90509250929050565b600181811c908216806117b957607f821691505b6020821081036117d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b7f53656e646572200000000000000000000000000000000000000000000000000081526000825161182d816007850160208701611558565b7f206e6f7420617070726f766564000000000000000000000000000000000000006007939091019283015250601401919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b6576104b6611861565b600060ff821660ff81036118a0576118a0611861565b60010192915050565b80820281158282048414176104b6576104b6611861565b7f4e6f7420656e6f756768206761732073656e742c206e656564206174206c656181527f737420000000000000000000000000000000000000000000000000000000000060208201526000825161191e816023850160208701611558565b7f20776569000000000000000000000000000000000000000000000000000000006023939091019283015250602701919050565b60006020828403121561196457600080fd5b813560ff811681146115bb57600080fd5b60006001820161198757611987611861565b5060010190565b6000826119ab57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b818103818111156104b6576104b6611861565b60ff81811683821601908111156104b6576104b661186156fea26469706673582212204c6dd8a18c56cd6389a7fc7f0bf473d092abcc9aec3ae408859c35bbcc52713e64736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "deployedBytecode": "0x6080604052600436106101295760003560e01c8063593b79fe116100a5578063a457c2d711610074578063a9059cbb11610059578063a9059cbb14610375578063bc472aa314610395578063dd62ed3e146103cd57600080fd5b8063a457c2d714610335578063a534d9de1461035557600080fd5b8063593b79fe1461028657806370a08231146102d757806373cddab21461030d57806395d89b411461032057600080fd5b806323b872dd116100fc57806339509351116100e1578063395093511461020c578063399444bc1461022c578063429437bf1461024c57600080fd5b806323b872dd146101ca578063313ce567146101ea57600080fd5b806306fdde031461012e578063095ea7b31461015957806318160ddd1461018957806320e8dd93146101a8575b600080fd5b34801561013a57600080fd5b50610143610413565b60405161015091906115a8565b60405180910390f35b34801561016557600080fd5b506101796101743660046115de565b6104a5565b6040519015158152602001610150565b34801561019557600080fd5b50600e545b604051908152602001610150565b3480156101b457600080fd5b506101c86101c33660046115de565b6104bc565b005b3480156101d657600080fd5b506101796101e5366004611608565b61056d565b3480156101f657600080fd5b5060125b60405160ff9091168152602001610150565b34801561021857600080fd5b506101796102273660046115de565b61058f565b34801561023857600080fd5b506101fa610247366004611644565b6105ce565b34801561025857600080fd5b5061026c61026736600461165f565b6106e5565b6040805160ff938416815292909116602083015201610150565b34801561029257600080fd5b506101436102a1366004611644565b604051606082811b6bffffffffffffffffffffffff19166020830152906034016040516020818303038152906040529050919050565b3480156102e357600080fd5b5061019a6102f2366004611644565b6001600160a01b031660009081526020819052604090205490565b6101c861031b366004611678565b610708565b34801561032c57600080fd5b5061014361094c565b34801561034157600080fd5b506101796103503660046115de565b61095b565b34801561036157600080fd5b506101c8610370366004611706565b610a10565b34801561038157600080fd5b506101796103903660046115de565b610ce1565b3480156103a157600080fd5b506103b56103b036600461165f565b610cee565b6040516001600160a01b039091168152602001610150565b3480156103d957600080fd5b5061019a6103e8366004611772565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600f8054610422906117a5565b80601f016020809104026020016040519081016040528092919081815260200182805461044e906117a5565b801561049b5780601f106104705761010080835404028352916020019161049b565b820191906000526020600020905b81548152906001019060200180831161047e57829003601f168201915b5050505050905090565b60006104b2338484610d0e565b5060015b92915050565b3360026104c8826105ce565b60ff16600c81106104db576104db6117df565b01546040516bffffffffffffffffffffffff193360601b1660208201526001600160a01b03909116919091149060340160408051601f1981840301815290829052610528916020016117f5565b6040516020818303038152906040529061055e5760405162461bcd60e51b815260040161055591906115a8565b60405180910390fd5b506105698282610edc565b5050565b600061057a843384610f9b565b61058584848461102d565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061058590829086906105c9908790611877565b610d0e565b604080516bffffffffffffffffffffffff19606084901b1660208201528151601481830301815260349091019091526000908190600081518110610614576106146117df565b016020015160f81c905060005b60098160ff16101561069c5760128160ff16600d8110610643576106436117df565b015460ff9081169083161080159061067e575060128160ff16600d811061066c5761066c6117df565b015460ff610100909104811690831611155b1561068a579392505050565b806106948161188a565b915050610621565b5060405162461bcd60e51b815260206004820152601060248201527f496e76616c6964204c6f636174696f6e000000000000000000000000000000006044820152606401610555565b601281600d81106106f557600080fd5b015460ff80821692506101009091041682565b84f780156107585760405162461bcd60e51b815260206004820152601760248201527f41646472657373206973206e6f742065787465726e616c0000000000000000006044820152606401610555565b610762338661128f565b6000600261076f886105ce565b60ff16600c8110610782576107826117df565b01546001600160a01b03169050806108025760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e206973206e6f7420617661696c61626c65206f6e2074686520646560448201527f7374696e6174696f6e20636861696e00000000000000000000000000000000006064820152608401610555565b60008561080f8686611877565b61081991906118a9565b905080341015610828826113f8565b60405160200161083891906118c0565b604051602081830303815290604052906108655760405162461bcd60e51b815260040161055591906115a8565b506040516001600160a01b03891660248201526044810188905260009060640160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f20e8dd930000000000000000000000000000000000000000000000000000000017815281519192506000918291829190898b8d858b81f69050896001600160a01b0316336001600160a01b03167fcf0ee562475620bbcd2f1b0675c8163317513271e4fdbbe9722436f247bd6d998b60405161093891815260200190565b60405180910390a350505050505050505050565b606060108054610422906117a5565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156109f85760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610555565b610a058286868403610d0e565b506001949350505050565b6011546001600160a01b03163314610a6a5760405162461bcd60e51b815260206004820152601660248201527f53656e646572206973206e6f74206465706c6f796572000000000000000000006044820152606401610555565b828114610adf5760405162461bcd60e51b815260206004820152603060248201527f636861696e20616e64206164647265737320617272617973206d75737420626560448201527f207468652073616d65206c656e677468000000000000000000000000000000006064820152608401610555565b60005b60ff8116841115610cda57600985858360ff16818110610b0457610b046117df565b9050602002016020810190610b199190611952565b60ff1610610b695760405162461bcd60e51b815260206004820152600b60248201527f4d61782039207a6f6e65730000000000000000000000000000000000000000006044820152606401610555565b60006002868660ff8516818110610b8257610b826117df565b9050602002016020810190610b979190611952565b60ff16600c8110610baa57610baa6117df565b01546001600160a01b031614610c285760405162461bcd60e51b815260206004820152603160248201527f54686520617070726f766564206164647265737320666f722074686973207a6f60448201527f6e6520616c7265616479206578697374730000000000000000000000000000006064820152608401610555565b82828260ff16818110610c3d57610c3d6117df565b9050602002016020810190610c529190611644565b600286868460ff16818110610c6957610c696117df565b9050602002016020810190610c7e9190611952565b60ff16600c8110610c9157610c916117df565b0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905580610cd28161188a565b915050610ae2565b5050505050565b60006104b233848461102d565b600281600c8110610cfe57600080fd5b01546001600160a01b0316905081565b81f780610d835760405162461bcd60e51b815260206004820152603f60248201527f5370656e64657220616464726573732069732065787465726e616c2e2055736560448201527f2063726f73732d636861696e207472616e736665722066756e6374696f6e2e006064820152608401610555565b6001600160a01b038416610dfe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b038316610e7a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0384811660008181526001602090815260408083209488168084529482529182902086905590518581527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050565b6001600160a01b038216610f325760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610555565b80600e6000828254610f449190611877565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611027578181101561101a5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610555565b6110278484848403610d0e565b50505050565b81f7806110a25760405162461bcd60e51b815260206004820152603760248201527f416464726573732069732065787465726e616c2e205573652063726f73732d6360448201527f6861696e207472616e736665722066756e6374696f6e2e0000000000000000006064820152608401610555565b6001600160a01b03841661111e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b03831661119a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b038416600090815260208190526040902054828110156112295760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b03858116600081815260208181526040808320888703905593881680835291849020805488019055925186815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cda565b6001600160a01b03821661130b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0382166000908152602081905260409020548181101561139a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610555565b6001600160a01b0383166000818152602081815260408083208686039055600e80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b60608160000361143b57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611465578061144f81611975565b915061145e9050600a8361198e565b915061143f565b60008167ffffffffffffffff811115611480576114806119b0565b6040519080825280601f01601f1916602001820160405280156114aa576020820181803683370190505b509050815b851561154f576114c06001826119c6565b905060006114cf600a8861198e565b6114da90600a6118a9565b6114e490886119c6565b6114ef9060306119d9565b905060008160f81b90508084848151811061150c5761150c6117df565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611546600a8961198e565b975050506114af565b50949350505050565b60005b8381101561157357818101518382015260200161155b565b50506000910152565b60008151808452611594816020860160208601611558565b601f01601f19169290920160200192915050565b6020815260006115bb602083018461157c565b9392505050565b80356001600160a01b03811681146115d957600080fd5b919050565b600080604083850312156115f157600080fd5b6115fa836115c2565b946020939093013593505050565b60008060006060848603121561161d57600080fd5b611626846115c2565b9250611634602085016115c2565b9150604084013590509250925092565b60006020828403121561165657600080fd5b6115bb826115c2565b60006020828403121561167157600080fd5b5035919050565b600080600080600060a0868803121561169057600080fd5b611699866115c2565b97602087013597506040870135966060810135965060800135945092505050565b60008083601f8401126116cc57600080fd5b50813567ffffffffffffffff8111156116e457600080fd5b6020830191508360208260051b85010111156116ff57600080fd5b9250929050565b6000806000806040858703121561171c57600080fd5b843567ffffffffffffffff8082111561173457600080fd5b611740888389016116ba565b9096509450602087013591508082111561175957600080fd5b50611766878288016116ba565b95989497509550505050565b6000806040838503121561178557600080fd5b61178e836115c2565b915061179c602084016115c2565b90509250929050565b600181811c908216806117b957607f821691505b6020821081036117d957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b7f53656e646572200000000000000000000000000000000000000000000000000081526000825161182d816007850160208701611558565b7f206e6f7420617070726f766564000000000000000000000000000000000000006007939091019283015250601401919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b6576104b6611861565b600060ff821660ff81036118a0576118a0611861565b60010192915050565b80820281158282048414176104b6576104b6611861565b7f4e6f7420656e6f756768206761732073656e742c206e656564206174206c656181527f737420000000000000000000000000000000000000000000000000000000000060208201526000825161191e816023850160208701611558565b7f20776569000000000000000000000000000000000000000000000000000000006023939091019283015250602701919050565b60006020828403121561196457600080fd5b813560ff811681146115bb57600080fd5b60006001820161198757611987611861565b5060010190565b6000826119ab57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b818103818111156104b6576104b6611861565b60ff81811683821601908111156104b6576104b661186156fea26469706673582212204c6dd8a18c56cd6389a7fc7f0bf473d092abcc9aec3ae408859c35bbcc52713e64736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "linkReferences": {},
- "deployedLinkReferences": {}
-};
-export default QRC20;
-//# sourceMappingURL=QRC20.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/QRC20.js.map b/lib.esm/_tests/contracts/QRC20.js.map
deleted file mode 100644
index 8ad2e590..00000000
--- a/lib.esm/_tests/contracts/QRC20.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"QRC20.js","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/QRC20.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG;IACZ,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,OAAO;IACvB,YAAY,EAAE,qBAAqB;IACnC,KAAK,EAAE;QACL;YACE,QAAQ,EAAE;gBACR;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,OAAO;oBACf,MAAM,EAAE,QAAQ;iBACjB;gBACD;oBACE,cAAc,EAAE,QAAQ;oB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E,SAAS;oBACzB,MAAM,EAAE,QAAQ;oBAChB,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,MAAM,EAAE,cAAc;YACtB,SAAS,EAAE;gBACT;oBACE,cAAc,EAAE,MAAM;oBACtB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,MAAM;iBACf;aACF;YACD,iBAAiB,EAAE,YAAY;YAC/B,MAAM,EAAE,UAAU;SACnB;KACF;IACD,UAAU,EAAE,wufAAwuf;IACpvf,kBAAkB,EAAE,opaAAopa;IACxqa,gBAAgB,EAAE,EAAE;IACpB,wBAAwB,EAAE,EAAE;CAC7B,CAAA;AAGD,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TestContract.d.ts b/lib.esm/_tests/contracts/TestContract.d.ts
deleted file mode 100644
index c42d178a..00000000
--- a/lib.esm/_tests/contracts/TestContract.d.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-declare const TestContract: {
- _format: string;
- contractName: string;
- sourceName: string;
- abi: ({
- inputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- type: string;
- anonymous?: undefined;
- outputs?: undefined;
- stateMutability?: undefined;
- } | {
- anonymous: boolean;
- inputs: {
- indexed: boolean;
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- type: string;
- outputs?: undefined;
- stateMutability?: undefined;
- } | {
- inputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- outputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- stateMutability: string;
- type: string;
- anonymous?: undefined;
- })[];
- bytecode: string;
- deployedBytecode: string;
- linkReferences: {};
- deployedLinkReferences: {};
-};
-export default TestContract;
-//# sourceMappingURL=TestContract.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TestContract.d.ts.map b/lib.esm/_tests/contracts/TestContract.d.ts.map
deleted file mode 100644
index 3f1bd915..00000000
--- a/lib.esm/_tests/contracts/TestContract.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"TestContract.d.ts","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/TestContract.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0MjB,CAAA;AAED,eAAe,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TestContract.js b/lib.esm/_tests/contracts/TestContract.js
deleted file mode 100644
index 8d293317..00000000
--- a/lib.esm/_tests/contracts/TestContract.js
+++ /dev/null
@@ -1,205 +0,0 @@
-const TestContract = {
- "_format": "hh-sol-artifact-1",
- "contractName": "TestContract",
- "sourceName": "contracts/Test.sol",
- "abi": [
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "code",
- "type": "uint256"
- },
- {
- "internalType": "string",
- "name": "message",
- "type": "string"
- }
- ],
- "name": "CustomError1",
- "type": "error"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "value",
- "type": "address"
- }
- ],
- "name": "EventAddress",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "value",
- "type": "bytes"
- }
- ],
- "name": "EventBytes",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "string",
- "name": "value",
- "type": "string"
- }
- ],
- "name": "EventString",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "EventUint256",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "a",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "b",
- "type": "uint256"
- }
- ],
- "name": "testCallAdd",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "result",
- "type": "uint256"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bool",
- "name": "pass",
- "type": "bool"
- },
- {
- "internalType": "uint256",
- "name": "code",
- "type": "uint256"
- },
- {
- "internalType": "string",
- "name": "message",
- "type": "string"
- }
- ],
- "name": "testCustomError1",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bool",
- "name": "pass",
- "type": "bool"
- },
- {
- "internalType": "string",
- "name": "message",
- "type": "string"
- }
- ],
- "name": "testErrorString",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "valueUint256",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "valueAddress",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "valueString",
- "type": "string"
- },
- {
- "internalType": "bytes",
- "name": "valueBytes",
- "type": "bytes"
- }
- ],
- "name": "testEvent",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "code",
- "type": "uint256"
- }
- ],
- "name": "testPanic",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- }
- ],
- "bytecode": "0x608060405234801561001057600080fd5b5061058d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063c8d6fda711610050578063c8d6fda7146100a4578063db734248146100b9578063f24684e5146100cc57600080fd5b80633da613681461006c578063b206699b14610091575b600080fd5b61007f61007a3660046102aa565b6100df565b60405190815260200160405180910390f35b61007f61009f366004610321565b61013a565b6100b76100b2366004610374565b610167565b005b61007f6100c7366004610419565b61024d565b61007f6100da366004610473565b610295565b6000816000036101365760405162461bcd60e51b815260206004820152601360248201527f50616e69633a20636f6465206973207a65726f0000000000000000000000000060448201526064015b60405180910390fd5b5090565b600082828561015d5760405162461bcd60e51b815260040161012d9291906104be565b5091949350505050565b60405186907f85c55bbb820e6d71c71f4894e57751de334b38c421f9c170b0e66d32eafea33790600090a260405173ffffffffffffffffffffffffffffffffffffffff8616907f52cb491081609a3d8c50cb8d5c1395de748f65789fc66e140e795decadd86c3090600090a27f7240e2f75cccc64acf37f699b7cc2726ccd9c0ed8afeafdbf7911af78d077bad84846040516102049291906104be565b60405180910390a17f06e852ba9138ee18ce13f482908b8634bc29d809282ea568cf505aca412b195e828260405161023d9291906104be565b60405180910390a1505050505050565b60008461028c578383836040517f180c751a00000000000000000000000000000000000000000000000000000000815260040161012d939291906104da565b50919392505050565b60006102a182846104fd565b90505b92915050565b6000602082840312156102bc57600080fd5b5035919050565b803580151581146102d357600080fd5b919050565b60008083601f8401126102ea57600080fd5b50813567ffffffffffffffff81111561030257600080fd5b60208301915083602082850101111561031a57600080fd5b9250929050565b60008060006040848603121561033657600080fd5b61033f846102c3565b9250602084013567ffffffffffffffff81111561035b57600080fd5b610367868287016102d8565b9497909650939450505050565b6000806000806000806080878903121561038d57600080fd5b86359550602087013573ffffffffffffffffffffffffffffffffffffffff811681146103b857600080fd5b9450604087013567ffffffffffffffff808211156103d557600080fd5b6103e18a838b016102d8565b909650945060608901359150808211156103fa57600080fd5b5061040789828a016102d8565b979a9699509497509295939492505050565b6000806000806060858703121561042f57600080fd5b610438856102c3565b935060208501359250604085013567ffffffffffffffff81111561045b57600080fd5b610467878288016102d8565b95989497509550505050565b6000806040838503121561048657600080fd5b50508035926020909101359150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006104d2602083018486610495565b949350505050565b8381526040602082015260006104f4604083018486610495565b95945050505050565b808201808211156102a4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220aa52c22ce2f4a856b56d32ae58c6b41a9dba4c7aed43a0872ffa898f157e67b564736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c8063c8d6fda711610050578063c8d6fda7146100a4578063db734248146100b9578063f24684e5146100cc57600080fd5b80633da613681461006c578063b206699b14610091575b600080fd5b61007f61007a3660046102aa565b6100df565b60405190815260200160405180910390f35b61007f61009f366004610321565b61013a565b6100b76100b2366004610374565b610167565b005b61007f6100c7366004610419565b61024d565b61007f6100da366004610473565b610295565b6000816000036101365760405162461bcd60e51b815260206004820152601360248201527f50616e69633a20636f6465206973207a65726f0000000000000000000000000060448201526064015b60405180910390fd5b5090565b600082828561015d5760405162461bcd60e51b815260040161012d9291906104be565b5091949350505050565b60405186907f85c55bbb820e6d71c71f4894e57751de334b38c421f9c170b0e66d32eafea33790600090a260405173ffffffffffffffffffffffffffffffffffffffff8616907f52cb491081609a3d8c50cb8d5c1395de748f65789fc66e140e795decadd86c3090600090a27f7240e2f75cccc64acf37f699b7cc2726ccd9c0ed8afeafdbf7911af78d077bad84846040516102049291906104be565b60405180910390a17f06e852ba9138ee18ce13f482908b8634bc29d809282ea568cf505aca412b195e828260405161023d9291906104be565b60405180910390a1505050505050565b60008461028c578383836040517f180c751a00000000000000000000000000000000000000000000000000000000815260040161012d939291906104da565b50919392505050565b60006102a182846104fd565b90505b92915050565b6000602082840312156102bc57600080fd5b5035919050565b803580151581146102d357600080fd5b919050565b60008083601f8401126102ea57600080fd5b50813567ffffffffffffffff81111561030257600080fd5b60208301915083602082850101111561031a57600080fd5b9250929050565b60008060006040848603121561033657600080fd5b61033f846102c3565b9250602084013567ffffffffffffffff81111561035b57600080fd5b610367868287016102d8565b9497909650939450505050565b6000806000806000806080878903121561038d57600080fd5b86359550602087013573ffffffffffffffffffffffffffffffffffffffff811681146103b857600080fd5b9450604087013567ffffffffffffffff808211156103d557600080fd5b6103e18a838b016102d8565b909650945060608901359150808211156103fa57600080fd5b5061040789828a016102d8565b979a9699509497509295939492505050565b6000806000806060858703121561042f57600080fd5b610438856102c3565b935060208501359250604085013567ffffffffffffffff81111561045b57600080fd5b610467878288016102d8565b95989497509550505050565b6000806040838503121561048657600080fd5b50508035926020909101359150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006104d2602083018486610495565b949350505050565b8381526040602082015260006104f4604083018486610495565b95945050505050565b808201808211156102a4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220aa52c22ce2f4a856b56d32ae58c6b41a9dba4c7aed43a0872ffa898f157e67b564736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "linkReferences": {},
- "deployedLinkReferences": {}
-};
-export default TestContract;
-//# sourceMappingURL=TestContract.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TestContract.js.map b/lib.esm/_tests/contracts/TestContract.js.map
deleted file mode 100644
index 4a60df9d..00000000
--- a/lib.esm/_tests/contracts/TestContract.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"TestContract.js","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/TestContract.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,oBAAoB;IAClC,KAAK,EAAE;QACL;YACE,QAAQ,EAAE;gBACR;oBACE,cAAc,EAAE,SAAS;oBACzB,MAAM,EAAE,MAAM;oBACd,MAAM,EAAE,SAAS;iBAClB;gBACD;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,SAAS;oBACjB,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,MAAM,EAAE,cAAc;YACtB,MAAM,EAAE,OAAO;SAChB;QACD;YACE,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE;gBACR;oBACE,SAAS,EAAE,IAAI;oBACf,cAAc,EAAE,SAAS;oBACzB,MAAM,EAAE,OAAO;oBACf,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,MAAM,EAAE,cAAc;YACtB,MAAM,EA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SAAS;oBACzB,MAAM,EAAE,MAAM;oBACd,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE;gBACT;oBACE,cAAc,EAAE,SAAS;oBACzB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,iBAAiB,EAAE,MAAM;YACzB,MAAM,EAAE,UAAU;SACnB;KACF;IACD,UAAU,EAAE,81FAA81F;IAC12F,kBAAkB,EAAE,8xFAA8xF;IAClzF,gBAAgB,EAAE,EAAE;IACpB,wBAAwB,EAAE,EAAE;CAC7B,CAAA;AAED,eAAe,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TypedContract.d.ts b/lib.esm/_tests/contracts/TypedContract.d.ts
deleted file mode 100644
index 01194bde..00000000
--- a/lib.esm/_tests/contracts/TypedContract.d.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-declare const TypedContract: {
- _format: string;
- contractName: string;
- sourceName: string;
- abi: {
- inputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- name: string;
- outputs: {
- internalType: string;
- name: string;
- type: string;
- }[];
- stateMutability: string;
- type: string;
- }[];
- bytecode: string;
- deployedBytecode: string;
- linkReferences: {};
- deployedLinkReferences: {};
-};
-export default TypedContract;
-//# sourceMappingURL=TypedContract.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TypedContract.d.ts.map b/lib.esm/_tests/contracts/TypedContract.d.ts.map
deleted file mode 100644
index 101393e4..00000000
--- a/lib.esm/_tests/contracts/TypedContract.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"TypedContract.d.ts","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/TypedContract.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CAs3DlB,CAAA;AAKD,eAAe,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TypedContract.js b/lib.esm/_tests/contracts/TypedContract.js
deleted file mode 100644
index d78dc70f..00000000
--- a/lib.esm/_tests/contracts/TypedContract.js
+++ /dev/null
@@ -1,1913 +0,0 @@
-const TypedContract = {
- "_format": "hh-sol-artifact-1",
- "contractName": "TypedContract",
- "sourceName": "contracts/TestTyped.sol",
- "abi": [
- {
- "inputs": [
- {
- "internalType": "uint32",
- "name": "",
- "type": "uint32"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes24",
- "name": "",
- "type": "bytes24"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int208",
- "name": "",
- "type": "int208"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint176",
- "name": "",
- "type": "uint176"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes4",
- "name": "",
- "type": "bytes4"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes9",
- "name": "",
- "type": "bytes9"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int72",
- "name": "",
- "type": "int72"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint200",
- "name": "",
- "type": "uint200"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes20",
- "name": "",
- "type": "bytes20"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int32",
- "name": "",
- "type": "int32"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint216",
- "name": "",
- "type": "uint216"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint184",
- "name": "",
- "type": "uint184"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint152",
- "name": "",
- "type": "uint152"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int248",
- "name": "",
- "type": "int248"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint80",
- "name": "",
- "type": "uint80"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes28",
- "name": "",
- "type": "bytes28"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes30",
- "name": "",
- "type": "bytes30"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int120",
- "name": "",
- "type": "int120"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes21",
- "name": "",
- "type": "bytes21"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint104",
- "name": "",
- "type": "uint104"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int96",
- "name": "",
- "type": "int96"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint224",
- "name": "",
- "type": "uint224"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int168",
- "name": "",
- "type": "int168"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int200",
- "name": "",
- "type": "int200"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int184",
- "name": "",
- "type": "int184"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes14",
- "name": "",
- "type": "bytes14"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint192",
- "name": "",
- "type": "uint192"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes2",
- "name": "",
- "type": "bytes2"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint24",
- "name": "",
- "type": "uint24"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int112",
- "name": "",
- "type": "int112"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes6",
- "name": "",
- "type": "bytes6"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint16",
- "name": "",
- "type": "uint16"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes3",
- "name": "",
- "type": "bytes3"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes17",
- "name": "",
- "type": "bytes17"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int224",
- "name": "",
- "type": "int224"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int128",
- "name": "",
- "type": "int128"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes18",
- "name": "",
- "type": "bytes18"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int104",
- "name": "",
- "type": "int104"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes7",
- "name": "",
- "type": "bytes7"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes25",
- "name": "",
- "type": "bytes25"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint40",
- "name": "",
- "type": "uint40"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint120",
- "name": "",
- "type": "uint120"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint168",
- "name": "",
- "type": "uint168"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int136",
- "name": "",
- "type": "int136"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint248",
- "name": "",
- "type": "uint248"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes8",
- "name": "",
- "type": "bytes8"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int192",
- "name": "",
- "type": "int192"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int216",
- "name": "",
- "type": "int216"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes",
- "name": "",
- "type": "bytes"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint240",
- "name": "",
- "type": "uint240"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint112",
- "name": "",
- "type": "uint112"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes29",
- "name": "",
- "type": "bytes29"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int80",
- "name": "",
- "type": "int80"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int176",
- "name": "",
- "type": "int176"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes31",
- "name": "",
- "type": "bytes31"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint208",
- "name": "",
- "type": "uint208"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint88",
- "name": "",
- "type": "uint88"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes10",
- "name": "",
- "type": "bytes10"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes16",
- "name": "",
- "type": "bytes16"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int88",
- "name": "",
- "type": "int88"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint64",
- "name": "",
- "type": "uint64"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes12",
- "name": "",
- "type": "bytes12"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes27",
- "name": "",
- "type": "bytes27"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int64",
- "name": "",
- "type": "int64"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint136",
- "name": "",
- "type": "uint136"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint232",
- "name": "",
- "type": "uint232"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes26",
- "name": "",
- "type": "bytes26"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes5",
- "name": "",
- "type": "bytes5"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint48",
- "name": "",
- "type": "uint48"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int40",
- "name": "",
- "type": "int40"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint96",
- "name": "",
- "type": "uint96"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint160",
- "name": "",
- "type": "uint160"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int8",
- "name": "",
- "type": "int8"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint72",
- "name": "",
- "type": "uint72"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int232",
- "name": "",
- "type": "int232"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes32",
- "name": "",
- "type": "bytes32"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int16",
- "name": "",
- "type": "int16"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes15",
- "name": "",
- "type": "bytes15"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint56",
- "name": "",
- "type": "uint56"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes23",
- "name": "",
- "type": "bytes23"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int240",
- "name": "",
- "type": "int240"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int160",
- "name": "",
- "type": "int160"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint128",
- "name": "",
- "type": "uint128"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int48",
- "name": "",
- "type": "int48"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes13",
- "name": "",
- "type": "bytes13"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes22",
- "name": "",
- "type": "bytes22"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int256",
- "name": "",
- "type": "int256"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes19",
- "name": "",
- "type": "bytes19"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int152",
- "name": "",
- "type": "int152"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint144",
- "name": "",
- "type": "uint144"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int24",
- "name": "",
- "type": "int24"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes11",
- "name": "",
- "type": "bytes11"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int56",
- "name": "",
- "type": "int56"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "int144",
- "name": "",
- "type": "int144"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "bytes1",
- "name": "",
- "type": "bytes1"
- }
- ],
- "name": "testTyped",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "pure",
- "type": "function"
- }
- ],
- "bytecode": "0x608060405234801561001057600080fd5b506134a7806100206000396000f3fe608060405234801561001057600080fd5b506004361061065c5760003560e01c8063a202e8c011610345578063cec31ded116101bd578063e96add8c11610104578063f3164597116100ad578063f85a090311610087578063f85a0903146120b7578063fa4d99c9146120fd578063fbf3e13a14612143578063fd1652cb1461218957600080fd5b8063f316459714611fe5578063f44076171461202b578063f7b0e3d51461207157600080fd5b8063eecd1129116100de578063eecd112914611f13578063ef4483be14611f59578063f0fb21ff14611f9f57600080fd5b8063e96add8c14611e41578063e9da42ca14611e87578063eb01940114611ecd57600080fd5b8063d92e6c0611610166578063e0fa6ea111610140578063e0fa6ea114611d6f578063e137fb7014611db5578063e8fb922314611dfb57600080fd5b8063d92e6c0614611c9d578063dad2ef4f14611ce3578063dafbc72414611d2957600080fd5b8063d4b789d811610197578063d4b789d814611bcb578063d4c0c48614611c11578063d7d7398414611c5757600080fd5b8063cec31ded14611af9578063d0e03b0714611b3f578063d20f679a14611b8557600080fd5b8063bbeb25e01161028c578063c233fd3311610235578063c84ad5801161020f578063c84ad580146119e1578063c8ddda4a14611a27578063cc69cf9714611a6d578063ccd94f9814611ab357600080fd5b8063c233fd331461190f578063c639604b14611955578063c847fe3b1461199b57600080fd5b8063c081607b11610266578063c081607b1461183d578063c1397e9914611883578063c1847bee146118c957600080fd5b8063bbeb25e01461176b578063bccdc9c4146117b1578063bf01c7f9146117f757600080fd5b8063ad87e2e1116102ee578063b860f47f116102c8578063b860f47f14611699578063ba607fac146116df578063bb73447f1461172557600080fd5b8063ad87e2e1146115c7578063b429b23c1461160d578063b7bab2861461165357600080fd5b8063a925e7621161031f578063a925e762146114f5578063a95d606e1461153b578063aa8de9461461158157600080fd5b8063a202e8c014611423578063a3ab9e7a14611469578063a6496f62146114af57600080fd5b806351e0489a116104d85780637c9affcb1161041f578063891a099d116103c85780639df2391c116103a25780639df2391c1461130b5780639faf388f146113515780639fcbede614611397578063a178b800146113dd57600080fd5b8063891a099d146112395780638e4884d11461127f5780639ded4e2b146112c557600080fd5b806381c4b4cc116103f957806381c4b4cc146111675780638275b290146111ad57806387ad7515146111f357600080fd5b80637c9affcb146110955780637fcc3d5d146110db578063803bf56d1461112157600080fd5b80636913a82b11610481578063769008e41161045b578063769008e414610fc35780637a3058c1146110095780637bc705c11461104f57600080fd5b80636913a82b14610ef15780636a678a7514610f3757806375b5533714610f7d57600080fd5b80636357d3b7116104b25780636357d3b714610e1f578063659665f914610e65578063679b530214610eab57600080fd5b806351e0489a14610d4d57806357301b0214610d935780635793d40814610dd957600080fd5b80632a0caa6a116105a7578063429545a4116105505780634961a7ce1161052a5780634961a7ce14610c355780634a3ccd5f14610c7b5780634fb7d4bd14610cc157806350fbcfb614610d0757600080fd5b8063429545a414610b6357806343c84f3314610ba957806346d79d1314610bef57600080fd5b806333c064151161058157806333c0641514610a9157806334bdbab714610ad75780634029cdee14610b1d57600080fd5b80632a0caa6a146109bf5780632a97dfbf14610a055780632f0d528b14610a4b57600080fd5b80631b46fa941161060957806325cb6b9a116105e357806325cb6b9a146108ed57806326888cda1461093357806328b01d811461097957600080fd5b80631b46fa941461081b5780631eb765fd1461086157806325bc2c82146108a757600080fd5b8063107810d51161063a578063107810d5146107495780631400a02f1461078f5780631a762a3a146107d557600080fd5b806303290450146106615780630e9ba011146106bd5780630f84821114610703575b600080fd5b6106a761066f3660046121cf565b5060408051808201909152600681527f75696e7433320000000000000000000000000000000000000000000000000000602082015290565b6040516106b491906121fc565b60405180910390f35b6106a76106cb36600461224a565b5060408051808201909152600781527f6279746573323400000000000000000000000000000000000000000000000000602082015290565b6106a7610711366004612275565b5060408051808201909152600681527f696e743230380000000000000000000000000000000000000000000000000000602082015290565b6106a7610757366004612298565b5060408051808201909152600781527f75696e7431373600000000000000000000000000000000000000000000000000602082015290565b6106a761079d3660046122d0565b5060408051808201909152600681527f6279746573340000000000000000000000000000000000000000000000000000602082015290565b6106a76107e3366004612312565b5060408051808201909152600681527f6279746573390000000000000000000000000000000000000000000000000000602082015290565b6106a7610829366004612354565b5060408051808201909152600581527f696e743732000000000000000000000000000000000000000000000000000000602082015290565b6106a761086f366004612377565b5060408051808201909152600781527f75696e7432303000000000000000000000000000000000000000000000000000602082015290565b6106a76108b53660046123b2565b5060408051808201909152600781527f6279746573323000000000000000000000000000000000000000000000000000602082015290565b6106a76108fb3660046123e1565b5060408051808201909152600581527f696e743332000000000000000000000000000000000000000000000000000000602082015290565b6106a7610941366004612404565b5060408051808201909152600781527f75696e7432313600000000000000000000000000000000000000000000000000602082015290565b6106a7610987366004612441565b5060408051808201909152600781527f75696e7431383400000000000000000000000000000000000000000000000000602082015290565b6106a76109cd36600461247a565b5060408051808201909152600781527f75696e7431353200000000000000000000000000000000000000000000000000602082015290565b6106a7610a133660046124af565b5060408051808201909152600681527f696e743234380000000000000000000000000000000000000000000000000000602082015290565b6106a7610a593660046124d2565b5060408051808201909152600681527f75696e7438300000000000000000000000000000000000000000000000000000602082015290565b6106a7610a9f3660046124fe565b5060408051808201909152600781527f6279746573323800000000000000000000000000000000000000000000000000602082015290565b6106a7610ae5366004612525565b5060408051808201909152600781527f6279746573333000000000000000000000000000000000000000000000000000602082015290565b6106a7610b2b36600461254a565b5060408051808201909152600681527f696e743132300000000000000000000000000000000000000000000000000000602082015290565b6106a7610b7136600461256d565b5060408051808201909152600781527f6279746573323100000000000000000000000000000000000000000000000000602082015290565b6106a7610bb736600461259b565b5060408051808201909152600781527f75696e7431303400000000000000000000000000000000000000000000000000602082015290565b6106a7610bfd3660046125ca565b5060408051808201909152600581527f696e743936000000000000000000000000000000000000000000000000000000602082015290565b6106a7610c433660046125ed565b5060408051808201909152600781527f75696e7432323400000000000000000000000000000000000000000000000000602082015290565b6106a7610c8936600461262b565b5060408051808201909152600681527f696e743136380000000000000000000000000000000000000000000000000000602082015290565b6106a7610ccf36600461264e565b5060408051808201909152600681527f696e743230300000000000000000000000000000000000000000000000000000602082015290565b6106a7610d15366004612671565b5060408051808201909152600681527f696e743138340000000000000000000000000000000000000000000000000000602082015290565b6106a7610d5b366004612694565b5060408051808201909152600781527f6279746573313400000000000000000000000000000000000000000000000000602082015290565b6106a7610da13660046126d6565b5060408051808201909152600781527f75696e7431393200000000000000000000000000000000000000000000000000602082015290565b6106a7610de7366004612710565b5060408051808201909152600681527f6279746573320000000000000000000000000000000000000000000000000000602082015290565b6106a7610e2d366004612752565b5060408051808201909152600681527f75696e7432340000000000000000000000000000000000000000000000000000602082015290565b6106a7610e73366004612777565b5060408051808201909152600681527f696e743131320000000000000000000000000000000000000000000000000000602082015290565b6106a7610eb936600461279a565b5060408051808201909152600681527f6279746573360000000000000000000000000000000000000000000000000000602082015290565b6106a7610eff3660046127dc565b5060408051808201909152600681527f75696e7431360000000000000000000000000000000000000000000000000000602082015290565b6106a7610f45366004612800565b5060408051808201909152600681527f6279746573330000000000000000000000000000000000000000000000000000602082015290565b6106a7610f8b366004612842565b5060408051808201909152600781527f6279746573313700000000000000000000000000000000000000000000000000602082015290565b6106a7610fd1366004612874565b5060408051808201909152600681527f696e743232340000000000000000000000000000000000000000000000000000602082015290565b6106a7611017366004612897565b5060408051808201909152600681527f696e743132380000000000000000000000000000000000000000000000000000602082015290565b6106a761105d3660046128ba565b5060408051808201909152600781527f6279746573313800000000000000000000000000000000000000000000000000602082015290565b6106a76110a33660046128eb565b5060408051808201909152600681527f696e743130340000000000000000000000000000000000000000000000000000602082015290565b6106a76110e936600461290e565b5060408051808201909152600681527f6279746573370000000000000000000000000000000000000000000000000000602082015290565b6106a761112f366004612950565b5060408051808201909152600781527f6279746573323500000000000000000000000000000000000000000000000000602082015290565b6106a761117536600461297a565b5060408051808201909152600681527f75696e7434300000000000000000000000000000000000000000000000000000602082015290565b6106a76111bb3660046129a1565b5060408051808201909152600781527f75696e7431323000000000000000000000000000000000000000000000000000602082015290565b6106a76112013660046129d2565b5060408051808201909152600781527f75696e7431363800000000000000000000000000000000000000000000000000602082015290565b6106a7611247366004612a09565b5060408051808201909152600681527f696e743133360000000000000000000000000000000000000000000000000000602082015290565b6106a761128d366004612a2c565b5060408051808201909152600781527f75696e7432343800000000000000000000000000000000000000000000000000602082015290565b6106a76112d3366004612a6d565b5060408051808201909152600681527f6279746573380000000000000000000000000000000000000000000000000000602082015290565b6106a7611319366004612aaf565b5060408051808201909152600681527f696e743139320000000000000000000000000000000000000000000000000000602082015290565b6106a761135f366004612ad2565b5060408051808201909152600681527f696e743231360000000000000000000000000000000000000000000000000000602082015290565b6106a76113a5366004612b9a565b5060408051808201909152600581527f6279746573000000000000000000000000000000000000000000000000000000602082015290565b6106a76113eb366004612beb565b5060408051808201909152600781527f75696e7432343000000000000000000000000000000000000000000000000000602082015290565b6106a7611431366004612c2b565b5060408051808201909152600781527f75696e7431313200000000000000000000000000000000000000000000000000602082015290565b6106a7611477366004612c5b565b5060408051808201909152600781527f6279746573323900000000000000000000000000000000000000000000000000602082015290565b6106a76114bd366004612c81565b5060408051808201909152600581527f696e743830000000000000000000000000000000000000000000000000000000602082015290565b6106a7611503366004612ca4565b5060408051808201909152600681527f696e743137360000000000000000000000000000000000000000000000000000602082015290565b6106a7611549366004612cc7565b5060408051808201909152600781527f6279746573333100000000000000000000000000000000000000000000000000602082015290565b6106a761158f366004612ceb565b5060408051808201909152600581527f75696e7438000000000000000000000000000000000000000000000000000000602082015290565b6106a76115d5366004612d0e565b5060408051808201909152600781527f75696e7432303800000000000000000000000000000000000000000000000000602082015290565b6106a761161b366004612d4a565b5060408051808201909152600681527f75696e7438380000000000000000000000000000000000000000000000000000602082015290565b6106a7611661366004612d77565b5060408051808201909152600781527f6279746573313000000000000000000000000000000000000000000000000000602082015290565b6106a76116a7366004612db9565b5060408051808201909152600781527f6279746573313600000000000000000000000000000000000000000000000000602082015290565b6106a76116ed366004612dfb565b5060408051808201909152600581527f696e743838000000000000000000000000000000000000000000000000000000602082015290565b6106a7611733366004612e1e565b5060408051808201909152600681527f75696e7436340000000000000000000000000000000000000000000000000000602082015290565b6106a7611779366004612e6d565b5060408051808201909152600781527f6164647265737300000000000000000000000000000000000000000000000000602082015290565b6106a76117bf366004612e8a565b5060408051808201909152600781527f6279746573313200000000000000000000000000000000000000000000000000602082015290565b6106a7611805366004612ecc565b5060408051808201909152600781527f6279746573323700000000000000000000000000000000000000000000000000602082015290565b6106a761184b366004612ef4565b5060408051808201909152600581527f696e743634000000000000000000000000000000000000000000000000000000602082015290565b6106a7611891366004612f17565b5060408051808201909152600781527f75696e7431333600000000000000000000000000000000000000000000000000602082015290565b6106a76118d7366004612f4a565b5060408051808201909152600781527f75696e7432333200000000000000000000000000000000000000000000000000602082015290565b6106a761191d366004612f89565b5060408051808201909152600781527f6279746573323600000000000000000000000000000000000000000000000000602082015290565b6106a7611963366004612fb2565b5060408051808201909152600681527f6279746573350000000000000000000000000000000000000000000000000000602082015290565b6106a76119a9366004612ff4565b5060408051808201909152600681527f75696e7434380000000000000000000000000000000000000000000000000000602082015290565b6106a76119ef36600461301c565b5060408051808201909152600581527f696e743430000000000000000000000000000000000000000000000000000000602082015290565b6106a7611a3536600461303f565b5060408051808201909152600681527f75696e7439360000000000000000000000000000000000000000000000000000602082015290565b6106a7611a7b366004612e6d565b5060408051808201909152600781527f75696e7431363000000000000000000000000000000000000000000000000000602082015290565b6106a7611ac136600461306d565b5060408051808201909152600481527f696e743800000000000000000000000000000000000000000000000000000000602082015290565b6106a7611b07366004613090565b5060408051808201909152600681527f75696e7437320000000000000000000000000000000000000000000000000000602082015290565b6106a7611b4d3660046130bb565b5060408051808201909152600681527f696e743233320000000000000000000000000000000000000000000000000000602082015290565b6106a7611b933660046130de565b5060408051808201909152600781527f6279746573333200000000000000000000000000000000000000000000000000602082015290565b6106a7611bd93660046130de565b5060408051808201909152600781527f75696e7432353600000000000000000000000000000000000000000000000000602082015290565b6106a7611c1f3660046130f7565b5060408051808201909152600581527f696e743136000000000000000000000000000000000000000000000000000000602082015290565b6106a7611c6536600461311a565b5060408051808201909152600781527f6279746573313500000000000000000000000000000000000000000000000000602082015290565b6106a7611cab36600461315c565b5060408051808201909152600681527f75696e7435360000000000000000000000000000000000000000000000000000602082015290565b6106a7611cf1366004613185565b5060408051808201909152600781527f6279746573323300000000000000000000000000000000000000000000000000602082015290565b6106a7611d373660046131b1565b5060408051808201909152600681527f696e743234300000000000000000000000000000000000000000000000000000602082015290565b6106a7611d7d3660046131d4565b5060408051808201909152600681527f696e743136300000000000000000000000000000000000000000000000000000602082015290565b6106a7611dc33660046131f7565b5060408051808201909152600781527f75696e7431323800000000000000000000000000000000000000000000000000602082015290565b6106a7611e09366004613229565b5060408051808201909152600581527f696e743438000000000000000000000000000000000000000000000000000000602082015290565b6106a7611e4f36600461324c565b5060408051808201909152600481527f626f6f6c00000000000000000000000000000000000000000000000000000000602082015290565b6106a7611e9536600461326e565b5060408051808201909152600781527f6279746573313300000000000000000000000000000000000000000000000000602082015290565b6106a7611edb3660046132b0565b5060408051808201909152600781527f6279746573323200000000000000000000000000000000000000000000000000602082015290565b6106a7611f213660046130de565b5060408051808201909152600681527f696e743235360000000000000000000000000000000000000000000000000000602082015290565b6106a7611f673660046132dd565b5060408051808201909152600781527f6279746573313900000000000000000000000000000000000000000000000000602082015290565b6106a7611fad36600461330d565b5060408051808201909152600681527f696e743135320000000000000000000000000000000000000000000000000000602082015290565b6106a7611ff3366004613330565b5060408051808201909152600781527f75696e7431343400000000000000000000000000000000000000000000000000602082015290565b6106a7612039366004612b9a565b5060408051808201909152600681527f737472696e670000000000000000000000000000000000000000000000000000602082015290565b6106a761207f366004613364565b5060408051808201909152600581527f696e743234000000000000000000000000000000000000000000000000000000602082015290565b6106a76120c5366004613387565b5060408051808201909152600781527f6279746573313100000000000000000000000000000000000000000000000000602082015290565b6106a761210b3660046133c9565b5060408051808201909152600581527f696e743536000000000000000000000000000000000000000000000000000000602082015290565b6106a76121513660046133ec565b5060408051808201909152600681527f696e743134340000000000000000000000000000000000000000000000000000602082015290565b6106a761219736600461340f565b5060408051808201909152600681527f6279746573310000000000000000000000000000000000000000000000000000602082015290565b6000602082840312156121e157600080fd5b813563ffffffff811681146121f557600080fd5b9392505050565b600060208083528351808285015260005b818110156122295785810183015185820160400152820161220d565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561225c57600080fd5b813567ffffffffffffffff19811681146121f557600080fd5b60006020828403121561228757600080fd5b81358060190b81146121f557600080fd5b6000602082840312156122aa57600080fd5b813575ffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156122e257600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561232457600080fd5b81357fffffffffffffffffff0000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561236657600080fd5b81358060080b81146121f557600080fd5b60006020828403121561238957600080fd5b813578ffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156123c457600080fd5b81356bffffffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156123f357600080fd5b81358060030b81146121f557600080fd5b60006020828403121561241657600080fd5b81357affffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561245357600080fd5b813576ffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561248c57600080fd5b813572ffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156124c157600080fd5b813580601e0b81146121f557600080fd5b6000602082840312156124e457600080fd5b813569ffffffffffffffffffff811681146121f557600080fd5b60006020828403121561251057600080fd5b813563ffffffff19811681146121f557600080fd5b60006020828403121561253757600080fd5b813561ffff19811681146121f557600080fd5b60006020828403121561255c57600080fd5b813580600e0b81146121f557600080fd5b60006020828403121561257f57600080fd5b81356affffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156125ad57600080fd5b81356cffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156125dc57600080fd5b813580600b0b81146121f557600080fd5b6000602082840312156125ff57600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561263d57600080fd5b81358060140b81146121f557600080fd5b60006020828403121561266057600080fd5b81358060180b81146121f557600080fd5b60006020828403121561268357600080fd5b81358060160b81146121f557600080fd5b6000602082840312156126a657600080fd5b81357fffffffffffffffffffffffffffff000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156126e857600080fd5b813577ffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561272257600080fd5b81357fffff000000000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561276457600080fd5b813562ffffff811681146121f557600080fd5b60006020828403121561278957600080fd5b813580600d0b81146121f557600080fd5b6000602082840312156127ac57600080fd5b81357fffffffffffff0000000000000000000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156127ee57600080fd5b813561ffff811681146121f557600080fd5b60006020828403121561281257600080fd5b81357fffffff0000000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561285457600080fd5b81356effffffffffffffffffffffffffffff19811681146121f557600080fd5b60006020828403121561288657600080fd5b813580601b0b81146121f557600080fd5b6000602082840312156128a957600080fd5b813580600f0b81146121f557600080fd5b6000602082840312156128cc57600080fd5b81356dffffffffffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156128fd57600080fd5b813580600c0b81146121f557600080fd5b60006020828403121561292057600080fd5b81357fffffffffffffff00000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561296257600080fd5b813566ffffffffffffff19811681146121f557600080fd5b60006020828403121561298c57600080fd5b813564ffffffffff811681146121f557600080fd5b6000602082840312156129b357600080fd5b81356effffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156129e457600080fd5b813574ffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612a1b57600080fd5b81358060100b81146121f557600080fd5b600060208284031215612a3e57600080fd5b81357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612a7f57600080fd5b81357fffffffffffffffff000000000000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612ac157600080fd5b81358060170b81146121f557600080fd5b600060208284031215612ae457600080fd5b813580601a0b81146121f557600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115612b3f57612b3f612af5565b604051601f8501601f19908116603f01168101908282118183101715612b6757612b67612af5565b81604052809350858152868686011115612b8057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612bac57600080fd5b813567ffffffffffffffff811115612bc357600080fd5b8201601f81018413612bd457600080fd5b612be384823560208401612b24565b949350505050565b600060208284031215612bfd57600080fd5b81357dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612c3d57600080fd5b81356dffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612c6d57600080fd5b813562ffffff19811681146121f557600080fd5b600060208284031215612c9357600080fd5b81358060090b81146121f557600080fd5b600060208284031215612cb657600080fd5b81358060150b81146121f557600080fd5b600060208284031215612cd957600080fd5b813560ff19811681146121f557600080fd5b600060208284031215612cfd57600080fd5b813560ff811681146121f557600080fd5b600060208284031215612d2057600080fd5b813579ffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612d5c57600080fd5b81356affffffffffffffffffffff811681146121f557600080fd5b600060208284031215612d8957600080fd5b81357fffffffffffffffffffff00000000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612dcb57600080fd5b81357fffffffffffffffffffffffffffffffff00000000000000000000000000000000811681146121f557600080fd5b600060208284031215612e0d57600080fd5b813580600a0b81146121f557600080fd5b600060208284031215612e3057600080fd5b813567ffffffffffffffff811681146121f557600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114612e6a57600080fd5b50565b600060208284031215612e7f57600080fd5b81356121f581612e48565b600060208284031215612e9c57600080fd5b81357fffffffffffffffffffffffff0000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612ede57600080fd5b813564ffffffffff19811681146121f557600080fd5b600060208284031215612f0657600080fd5b81358060070b81146121f557600080fd5b600060208284031215612f2957600080fd5b813570ffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612f5c57600080fd5b81357cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612f9b57600080fd5b813565ffffffffffff19811681146121f557600080fd5b600060208284031215612fc457600080fd5b81357fffffffffff000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561300657600080fd5b813565ffffffffffff811681146121f557600080fd5b60006020828403121561302e57600080fd5b81358060040b81146121f557600080fd5b60006020828403121561305157600080fd5b81356bffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561307f57600080fd5b81358060000b81146121f557600080fd5b6000602082840312156130a257600080fd5b813568ffffffffffffffffff811681146121f557600080fd5b6000602082840312156130cd57600080fd5b813580601c0b81146121f557600080fd5b6000602082840312156130f057600080fd5b5035919050565b60006020828403121561310957600080fd5b81358060010b81146121f557600080fd5b60006020828403121561312c57600080fd5b81357fffffffffffffffffffffffffffffff0000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561316e57600080fd5b813566ffffffffffffff811681146121f557600080fd5b60006020828403121561319757600080fd5b813568ffffffffffffffffff19811681146121f557600080fd5b6000602082840312156131c357600080fd5b813580601d0b81146121f557600080fd5b6000602082840312156131e657600080fd5b81358060130b81146121f557600080fd5b60006020828403121561320957600080fd5b81356fffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561323b57600080fd5b81358060050b81146121f557600080fd5b60006020828403121561325e57600080fd5b813580151581146121f557600080fd5b60006020828403121561328057600080fd5b81357fffffffffffffffffffffffffff00000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156132c257600080fd5b813569ffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156132ef57600080fd5b81356cffffffffffffffffffffffffff19811681146121f557600080fd5b60006020828403121561331f57600080fd5b81358060120b81146121f557600080fd5b60006020828403121561334257600080fd5b813571ffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561337657600080fd5b81358060020b81146121f557600080fd5b60006020828403121561339957600080fd5b81357fffffffffffffffffffffff000000000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156133db57600080fd5b81358060060b81146121f557600080fd5b6000602082840312156133fe57600080fd5b81358060110b81146121f557600080fd5b60006020828403121561342157600080fd5b81357fff00000000000000000000000000000000000000000000000000000000000000811681146121f557600080fdfea2646970667358221220c03630ca6910d46ede5cae5ed1f6ae9571e1ccb99a0b3b83f560d5c9079c96db64736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061065c5760003560e01c8063a202e8c011610345578063cec31ded116101bd578063e96add8c11610104578063f3164597116100ad578063f85a090311610087578063f85a0903146120b7578063fa4d99c9146120fd578063fbf3e13a14612143578063fd1652cb1461218957600080fd5b8063f316459714611fe5578063f44076171461202b578063f7b0e3d51461207157600080fd5b8063eecd1129116100de578063eecd112914611f13578063ef4483be14611f59578063f0fb21ff14611f9f57600080fd5b8063e96add8c14611e41578063e9da42ca14611e87578063eb01940114611ecd57600080fd5b8063d92e6c0611610166578063e0fa6ea111610140578063e0fa6ea114611d6f578063e137fb7014611db5578063e8fb922314611dfb57600080fd5b8063d92e6c0614611c9d578063dad2ef4f14611ce3578063dafbc72414611d2957600080fd5b8063d4b789d811610197578063d4b789d814611bcb578063d4c0c48614611c11578063d7d7398414611c5757600080fd5b8063cec31ded14611af9578063d0e03b0714611b3f578063d20f679a14611b8557600080fd5b8063bbeb25e01161028c578063c233fd3311610235578063c84ad5801161020f578063c84ad580146119e1578063c8ddda4a14611a27578063cc69cf9714611a6d578063ccd94f9814611ab357600080fd5b8063c233fd331461190f578063c639604b14611955578063c847fe3b1461199b57600080fd5b8063c081607b11610266578063c081607b1461183d578063c1397e9914611883578063c1847bee146118c957600080fd5b8063bbeb25e01461176b578063bccdc9c4146117b1578063bf01c7f9146117f757600080fd5b8063ad87e2e1116102ee578063b860f47f116102c8578063b860f47f14611699578063ba607fac146116df578063bb73447f1461172557600080fd5b8063ad87e2e1146115c7578063b429b23c1461160d578063b7bab2861461165357600080fd5b8063a925e7621161031f578063a925e762146114f5578063a95d606e1461153b578063aa8de9461461158157600080fd5b8063a202e8c014611423578063a3ab9e7a14611469578063a6496f62146114af57600080fd5b806351e0489a116104d85780637c9affcb1161041f578063891a099d116103c85780639df2391c116103a25780639df2391c1461130b5780639faf388f146113515780639fcbede614611397578063a178b800146113dd57600080fd5b8063891a099d146112395780638e4884d11461127f5780639ded4e2b146112c557600080fd5b806381c4b4cc116103f957806381c4b4cc146111675780638275b290146111ad57806387ad7515146111f357600080fd5b80637c9affcb146110955780637fcc3d5d146110db578063803bf56d1461112157600080fd5b80636913a82b11610481578063769008e41161045b578063769008e414610fc35780637a3058c1146110095780637bc705c11461104f57600080fd5b80636913a82b14610ef15780636a678a7514610f3757806375b5533714610f7d57600080fd5b80636357d3b7116104b25780636357d3b714610e1f578063659665f914610e65578063679b530214610eab57600080fd5b806351e0489a14610d4d57806357301b0214610d935780635793d40814610dd957600080fd5b80632a0caa6a116105a7578063429545a4116105505780634961a7ce1161052a5780634961a7ce14610c355780634a3ccd5f14610c7b5780634fb7d4bd14610cc157806350fbcfb614610d0757600080fd5b8063429545a414610b6357806343c84f3314610ba957806346d79d1314610bef57600080fd5b806333c064151161058157806333c0641514610a9157806334bdbab714610ad75780634029cdee14610b1d57600080fd5b80632a0caa6a146109bf5780632a97dfbf14610a055780632f0d528b14610a4b57600080fd5b80631b46fa941161060957806325cb6b9a116105e357806325cb6b9a146108ed57806326888cda1461093357806328b01d811461097957600080fd5b80631b46fa941461081b5780631eb765fd1461086157806325bc2c82146108a757600080fd5b8063107810d51161063a578063107810d5146107495780631400a02f1461078f5780631a762a3a146107d557600080fd5b806303290450146106615780630e9ba011146106bd5780630f84821114610703575b600080fd5b6106a761066f3660046121cf565b5060408051808201909152600681527f75696e7433320000000000000000000000000000000000000000000000000000602082015290565b6040516106b491906121fc565b60405180910390f35b6106a76106cb36600461224a565b5060408051808201909152600781527f6279746573323400000000000000000000000000000000000000000000000000602082015290565b6106a7610711366004612275565b5060408051808201909152600681527f696e743230380000000000000000000000000000000000000000000000000000602082015290565b6106a7610757366004612298565b5060408051808201909152600781527f75696e7431373600000000000000000000000000000000000000000000000000602082015290565b6106a761079d3660046122d0565b5060408051808201909152600681527f6279746573340000000000000000000000000000000000000000000000000000602082015290565b6106a76107e3366004612312565b5060408051808201909152600681527f6279746573390000000000000000000000000000000000000000000000000000602082015290565b6106a7610829366004612354565b5060408051808201909152600581527f696e743732000000000000000000000000000000000000000000000000000000602082015290565b6106a761086f366004612377565b5060408051808201909152600781527f75696e7432303000000000000000000000000000000000000000000000000000602082015290565b6106a76108b53660046123b2565b5060408051808201909152600781527f6279746573323000000000000000000000000000000000000000000000000000602082015290565b6106a76108fb3660046123e1565b5060408051808201909152600581527f696e743332000000000000000000000000000000000000000000000000000000602082015290565b6106a7610941366004612404565b5060408051808201909152600781527f75696e7432313600000000000000000000000000000000000000000000000000602082015290565b6106a7610987366004612441565b5060408051808201909152600781527f75696e7431383400000000000000000000000000000000000000000000000000602082015290565b6106a76109cd36600461247a565b5060408051808201909152600781527f75696e7431353200000000000000000000000000000000000000000000000000602082015290565b6106a7610a133660046124af565b5060408051808201909152600681527f696e743234380000000000000000000000000000000000000000000000000000602082015290565b6106a7610a593660046124d2565b5060408051808201909152600681527f75696e7438300000000000000000000000000000000000000000000000000000602082015290565b6106a7610a9f3660046124fe565b5060408051808201909152600781527f6279746573323800000000000000000000000000000000000000000000000000602082015290565b6106a7610ae5366004612525565b5060408051808201909152600781527f6279746573333000000000000000000000000000000000000000000000000000602082015290565b6106a7610b2b36600461254a565b5060408051808201909152600681527f696e743132300000000000000000000000000000000000000000000000000000602082015290565b6106a7610b7136600461256d565b5060408051808201909152600781527f6279746573323100000000000000000000000000000000000000000000000000602082015290565b6106a7610bb736600461259b565b5060408051808201909152600781527f75696e7431303400000000000000000000000000000000000000000000000000602082015290565b6106a7610bfd3660046125ca565b5060408051808201909152600581527f696e743936000000000000000000000000000000000000000000000000000000602082015290565b6106a7610c433660046125ed565b5060408051808201909152600781527f75696e7432323400000000000000000000000000000000000000000000000000602082015290565b6106a7610c8936600461262b565b5060408051808201909152600681527f696e743136380000000000000000000000000000000000000000000000000000602082015290565b6106a7610ccf36600461264e565b5060408051808201909152600681527f696e743230300000000000000000000000000000000000000000000000000000602082015290565b6106a7610d15366004612671565b5060408051808201909152600681527f696e743138340000000000000000000000000000000000000000000000000000602082015290565b6106a7610d5b366004612694565b5060408051808201909152600781527f6279746573313400000000000000000000000000000000000000000000000000602082015290565b6106a7610da13660046126d6565b5060408051808201909152600781527f75696e7431393200000000000000000000000000000000000000000000000000602082015290565b6106a7610de7366004612710565b5060408051808201909152600681527f6279746573320000000000000000000000000000000000000000000000000000602082015290565b6106a7610e2d366004612752565b5060408051808201909152600681527f75696e7432340000000000000000000000000000000000000000000000000000602082015290565b6106a7610e73366004612777565b5060408051808201909152600681527f696e743131320000000000000000000000000000000000000000000000000000602082015290565b6106a7610eb936600461279a565b5060408051808201909152600681527f6279746573360000000000000000000000000000000000000000000000000000602082015290565b6106a7610eff3660046127dc565b5060408051808201909152600681527f75696e7431360000000000000000000000000000000000000000000000000000602082015290565b6106a7610f45366004612800565b5060408051808201909152600681527f6279746573330000000000000000000000000000000000000000000000000000602082015290565b6106a7610f8b366004612842565b5060408051808201909152600781527f6279746573313700000000000000000000000000000000000000000000000000602082015290565b6106a7610fd1366004612874565b5060408051808201909152600681527f696e743232340000000000000000000000000000000000000000000000000000602082015290565b6106a7611017366004612897565b5060408051808201909152600681527f696e743132380000000000000000000000000000000000000000000000000000602082015290565b6106a761105d3660046128ba565b5060408051808201909152600781527f6279746573313800000000000000000000000000000000000000000000000000602082015290565b6106a76110a33660046128eb565b5060408051808201909152600681527f696e743130340000000000000000000000000000000000000000000000000000602082015290565b6106a76110e936600461290e565b5060408051808201909152600681527f6279746573370000000000000000000000000000000000000000000000000000602082015290565b6106a761112f366004612950565b5060408051808201909152600781527f6279746573323500000000000000000000000000000000000000000000000000602082015290565b6106a761117536600461297a565b5060408051808201909152600681527f75696e7434300000000000000000000000000000000000000000000000000000602082015290565b6106a76111bb3660046129a1565b5060408051808201909152600781527f75696e7431323000000000000000000000000000000000000000000000000000602082015290565b6106a76112013660046129d2565b5060408051808201909152600781527f75696e7431363800000000000000000000000000000000000000000000000000602082015290565b6106a7611247366004612a09565b5060408051808201909152600681527f696e743133360000000000000000000000000000000000000000000000000000602082015290565b6106a761128d366004612a2c565b5060408051808201909152600781527f75696e7432343800000000000000000000000000000000000000000000000000602082015290565b6106a76112d3366004612a6d565b5060408051808201909152600681527f6279746573380000000000000000000000000000000000000000000000000000602082015290565b6106a7611319366004612aaf565b5060408051808201909152600681527f696e743139320000000000000000000000000000000000000000000000000000602082015290565b6106a761135f366004612ad2565b5060408051808201909152600681527f696e743231360000000000000000000000000000000000000000000000000000602082015290565b6106a76113a5366004612b9a565b5060408051808201909152600581527f6279746573000000000000000000000000000000000000000000000000000000602082015290565b6106a76113eb366004612beb565b5060408051808201909152600781527f75696e7432343000000000000000000000000000000000000000000000000000602082015290565b6106a7611431366004612c2b565b5060408051808201909152600781527f75696e7431313200000000000000000000000000000000000000000000000000602082015290565b6106a7611477366004612c5b565b5060408051808201909152600781527f6279746573323900000000000000000000000000000000000000000000000000602082015290565b6106a76114bd366004612c81565b5060408051808201909152600581527f696e743830000000000000000000000000000000000000000000000000000000602082015290565b6106a7611503366004612ca4565b5060408051808201909152600681527f696e743137360000000000000000000000000000000000000000000000000000602082015290565b6106a7611549366004612cc7565b5060408051808201909152600781527f6279746573333100000000000000000000000000000000000000000000000000602082015290565b6106a761158f366004612ceb565b5060408051808201909152600581527f75696e7438000000000000000000000000000000000000000000000000000000602082015290565b6106a76115d5366004612d0e565b5060408051808201909152600781527f75696e7432303800000000000000000000000000000000000000000000000000602082015290565b6106a761161b366004612d4a565b5060408051808201909152600681527f75696e7438380000000000000000000000000000000000000000000000000000602082015290565b6106a7611661366004612d77565b5060408051808201909152600781527f6279746573313000000000000000000000000000000000000000000000000000602082015290565b6106a76116a7366004612db9565b5060408051808201909152600781527f6279746573313600000000000000000000000000000000000000000000000000602082015290565b6106a76116ed366004612dfb565b5060408051808201909152600581527f696e743838000000000000000000000000000000000000000000000000000000602082015290565b6106a7611733366004612e1e565b5060408051808201909152600681527f75696e7436340000000000000000000000000000000000000000000000000000602082015290565b6106a7611779366004612e6d565b5060408051808201909152600781527f6164647265737300000000000000000000000000000000000000000000000000602082015290565b6106a76117bf366004612e8a565b5060408051808201909152600781527f6279746573313200000000000000000000000000000000000000000000000000602082015290565b6106a7611805366004612ecc565b5060408051808201909152600781527f6279746573323700000000000000000000000000000000000000000000000000602082015290565b6106a761184b366004612ef4565b5060408051808201909152600581527f696e743634000000000000000000000000000000000000000000000000000000602082015290565b6106a7611891366004612f17565b5060408051808201909152600781527f75696e7431333600000000000000000000000000000000000000000000000000602082015290565b6106a76118d7366004612f4a565b5060408051808201909152600781527f75696e7432333200000000000000000000000000000000000000000000000000602082015290565b6106a761191d366004612f89565b5060408051808201909152600781527f6279746573323600000000000000000000000000000000000000000000000000602082015290565b6106a7611963366004612fb2565b5060408051808201909152600681527f6279746573350000000000000000000000000000000000000000000000000000602082015290565b6106a76119a9366004612ff4565b5060408051808201909152600681527f75696e7434380000000000000000000000000000000000000000000000000000602082015290565b6106a76119ef36600461301c565b5060408051808201909152600581527f696e743430000000000000000000000000000000000000000000000000000000602082015290565b6106a7611a3536600461303f565b5060408051808201909152600681527f75696e7439360000000000000000000000000000000000000000000000000000602082015290565b6106a7611a7b366004612e6d565b5060408051808201909152600781527f75696e7431363000000000000000000000000000000000000000000000000000602082015290565b6106a7611ac136600461306d565b5060408051808201909152600481527f696e743800000000000000000000000000000000000000000000000000000000602082015290565b6106a7611b07366004613090565b5060408051808201909152600681527f75696e7437320000000000000000000000000000000000000000000000000000602082015290565b6106a7611b4d3660046130bb565b5060408051808201909152600681527f696e743233320000000000000000000000000000000000000000000000000000602082015290565b6106a7611b933660046130de565b5060408051808201909152600781527f6279746573333200000000000000000000000000000000000000000000000000602082015290565b6106a7611bd93660046130de565b5060408051808201909152600781527f75696e7432353600000000000000000000000000000000000000000000000000602082015290565b6106a7611c1f3660046130f7565b5060408051808201909152600581527f696e743136000000000000000000000000000000000000000000000000000000602082015290565b6106a7611c6536600461311a565b5060408051808201909152600781527f6279746573313500000000000000000000000000000000000000000000000000602082015290565b6106a7611cab36600461315c565b5060408051808201909152600681527f75696e7435360000000000000000000000000000000000000000000000000000602082015290565b6106a7611cf1366004613185565b5060408051808201909152600781527f6279746573323300000000000000000000000000000000000000000000000000602082015290565b6106a7611d373660046131b1565b5060408051808201909152600681527f696e743234300000000000000000000000000000000000000000000000000000602082015290565b6106a7611d7d3660046131d4565b5060408051808201909152600681527f696e743136300000000000000000000000000000000000000000000000000000602082015290565b6106a7611dc33660046131f7565b5060408051808201909152600781527f75696e7431323800000000000000000000000000000000000000000000000000602082015290565b6106a7611e09366004613229565b5060408051808201909152600581527f696e743438000000000000000000000000000000000000000000000000000000602082015290565b6106a7611e4f36600461324c565b5060408051808201909152600481527f626f6f6c00000000000000000000000000000000000000000000000000000000602082015290565b6106a7611e9536600461326e565b5060408051808201909152600781527f6279746573313300000000000000000000000000000000000000000000000000602082015290565b6106a7611edb3660046132b0565b5060408051808201909152600781527f6279746573323200000000000000000000000000000000000000000000000000602082015290565b6106a7611f213660046130de565b5060408051808201909152600681527f696e743235360000000000000000000000000000000000000000000000000000602082015290565b6106a7611f673660046132dd565b5060408051808201909152600781527f6279746573313900000000000000000000000000000000000000000000000000602082015290565b6106a7611fad36600461330d565b5060408051808201909152600681527f696e743135320000000000000000000000000000000000000000000000000000602082015290565b6106a7611ff3366004613330565b5060408051808201909152600781527f75696e7431343400000000000000000000000000000000000000000000000000602082015290565b6106a7612039366004612b9a565b5060408051808201909152600681527f737472696e670000000000000000000000000000000000000000000000000000602082015290565b6106a761207f366004613364565b5060408051808201909152600581527f696e743234000000000000000000000000000000000000000000000000000000602082015290565b6106a76120c5366004613387565b5060408051808201909152600781527f6279746573313100000000000000000000000000000000000000000000000000602082015290565b6106a761210b3660046133c9565b5060408051808201909152600581527f696e743536000000000000000000000000000000000000000000000000000000602082015290565b6106a76121513660046133ec565b5060408051808201909152600681527f696e743134340000000000000000000000000000000000000000000000000000602082015290565b6106a761219736600461340f565b5060408051808201909152600681527f6279746573310000000000000000000000000000000000000000000000000000602082015290565b6000602082840312156121e157600080fd5b813563ffffffff811681146121f557600080fd5b9392505050565b600060208083528351808285015260005b818110156122295785810183015185820160400152820161220d565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561225c57600080fd5b813567ffffffffffffffff19811681146121f557600080fd5b60006020828403121561228757600080fd5b81358060190b81146121f557600080fd5b6000602082840312156122aa57600080fd5b813575ffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156122e257600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561232457600080fd5b81357fffffffffffffffffff0000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561236657600080fd5b81358060080b81146121f557600080fd5b60006020828403121561238957600080fd5b813578ffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156123c457600080fd5b81356bffffffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156123f357600080fd5b81358060030b81146121f557600080fd5b60006020828403121561241657600080fd5b81357affffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561245357600080fd5b813576ffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561248c57600080fd5b813572ffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156124c157600080fd5b813580601e0b81146121f557600080fd5b6000602082840312156124e457600080fd5b813569ffffffffffffffffffff811681146121f557600080fd5b60006020828403121561251057600080fd5b813563ffffffff19811681146121f557600080fd5b60006020828403121561253757600080fd5b813561ffff19811681146121f557600080fd5b60006020828403121561255c57600080fd5b813580600e0b81146121f557600080fd5b60006020828403121561257f57600080fd5b81356affffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156125ad57600080fd5b81356cffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156125dc57600080fd5b813580600b0b81146121f557600080fd5b6000602082840312156125ff57600080fd5b81357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561263d57600080fd5b81358060140b81146121f557600080fd5b60006020828403121561266057600080fd5b81358060180b81146121f557600080fd5b60006020828403121561268357600080fd5b81358060160b81146121f557600080fd5b6000602082840312156126a657600080fd5b81357fffffffffffffffffffffffffffff000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156126e857600080fd5b813577ffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561272257600080fd5b81357fffff000000000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561276457600080fd5b813562ffffff811681146121f557600080fd5b60006020828403121561278957600080fd5b813580600d0b81146121f557600080fd5b6000602082840312156127ac57600080fd5b81357fffffffffffff0000000000000000000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156127ee57600080fd5b813561ffff811681146121f557600080fd5b60006020828403121561281257600080fd5b81357fffffff0000000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561285457600080fd5b81356effffffffffffffffffffffffffffff19811681146121f557600080fd5b60006020828403121561288657600080fd5b813580601b0b81146121f557600080fd5b6000602082840312156128a957600080fd5b813580600f0b81146121f557600080fd5b6000602082840312156128cc57600080fd5b81356dffffffffffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156128fd57600080fd5b813580600c0b81146121f557600080fd5b60006020828403121561292057600080fd5b81357fffffffffffffff00000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561296257600080fd5b813566ffffffffffffff19811681146121f557600080fd5b60006020828403121561298c57600080fd5b813564ffffffffff811681146121f557600080fd5b6000602082840312156129b357600080fd5b81356effffffffffffffffffffffffffffff811681146121f557600080fd5b6000602082840312156129e457600080fd5b813574ffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612a1b57600080fd5b81358060100b81146121f557600080fd5b600060208284031215612a3e57600080fd5b81357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612a7f57600080fd5b81357fffffffffffffffff000000000000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612ac157600080fd5b81358060170b81146121f557600080fd5b600060208284031215612ae457600080fd5b813580601a0b81146121f557600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115612b3f57612b3f612af5565b604051601f8501601f19908116603f01168101908282118183101715612b6757612b67612af5565b81604052809350858152868686011115612b8057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612bac57600080fd5b813567ffffffffffffffff811115612bc357600080fd5b8201601f81018413612bd457600080fd5b612be384823560208401612b24565b949350505050565b600060208284031215612bfd57600080fd5b81357dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612c3d57600080fd5b81356dffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612c6d57600080fd5b813562ffffff19811681146121f557600080fd5b600060208284031215612c9357600080fd5b81358060090b81146121f557600080fd5b600060208284031215612cb657600080fd5b81358060150b81146121f557600080fd5b600060208284031215612cd957600080fd5b813560ff19811681146121f557600080fd5b600060208284031215612cfd57600080fd5b813560ff811681146121f557600080fd5b600060208284031215612d2057600080fd5b813579ffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612d5c57600080fd5b81356affffffffffffffffffffff811681146121f557600080fd5b600060208284031215612d8957600080fd5b81357fffffffffffffffffffff00000000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612dcb57600080fd5b81357fffffffffffffffffffffffffffffffff00000000000000000000000000000000811681146121f557600080fd5b600060208284031215612e0d57600080fd5b813580600a0b81146121f557600080fd5b600060208284031215612e3057600080fd5b813567ffffffffffffffff811681146121f557600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114612e6a57600080fd5b50565b600060208284031215612e7f57600080fd5b81356121f581612e48565b600060208284031215612e9c57600080fd5b81357fffffffffffffffffffffffff0000000000000000000000000000000000000000811681146121f557600080fd5b600060208284031215612ede57600080fd5b813564ffffffffff19811681146121f557600080fd5b600060208284031215612f0657600080fd5b81358060070b81146121f557600080fd5b600060208284031215612f2957600080fd5b813570ffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612f5c57600080fd5b81357cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b600060208284031215612f9b57600080fd5b813565ffffffffffff19811681146121f557600080fd5b600060208284031215612fc457600080fd5b81357fffffffffff000000000000000000000000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561300657600080fd5b813565ffffffffffff811681146121f557600080fd5b60006020828403121561302e57600080fd5b81358060040b81146121f557600080fd5b60006020828403121561305157600080fd5b81356bffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561307f57600080fd5b81358060000b81146121f557600080fd5b6000602082840312156130a257600080fd5b813568ffffffffffffffffff811681146121f557600080fd5b6000602082840312156130cd57600080fd5b813580601c0b81146121f557600080fd5b6000602082840312156130f057600080fd5b5035919050565b60006020828403121561310957600080fd5b81358060010b81146121f557600080fd5b60006020828403121561312c57600080fd5b81357fffffffffffffffffffffffffffffff0000000000000000000000000000000000811681146121f557600080fd5b60006020828403121561316e57600080fd5b813566ffffffffffffff811681146121f557600080fd5b60006020828403121561319757600080fd5b813568ffffffffffffffffff19811681146121f557600080fd5b6000602082840312156131c357600080fd5b813580601d0b81146121f557600080fd5b6000602082840312156131e657600080fd5b81358060130b81146121f557600080fd5b60006020828403121561320957600080fd5b81356fffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561323b57600080fd5b81358060050b81146121f557600080fd5b60006020828403121561325e57600080fd5b813580151581146121f557600080fd5b60006020828403121561328057600080fd5b81357fffffffffffffffffffffffffff00000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156132c257600080fd5b813569ffffffffffffffffffff19811681146121f557600080fd5b6000602082840312156132ef57600080fd5b81356cffffffffffffffffffffffffff19811681146121f557600080fd5b60006020828403121561331f57600080fd5b81358060120b81146121f557600080fd5b60006020828403121561334257600080fd5b813571ffffffffffffffffffffffffffffffffffff811681146121f557600080fd5b60006020828403121561337657600080fd5b81358060020b81146121f557600080fd5b60006020828403121561339957600080fd5b81357fffffffffffffffffffffff000000000000000000000000000000000000000000811681146121f557600080fd5b6000602082840312156133db57600080fd5b81358060060b81146121f557600080fd5b6000602082840312156133fe57600080fd5b81358060110b81146121f557600080fd5b60006020828403121561342157600080fd5b81357fff00000000000000000000000000000000000000000000000000000000000000811681146121f557600080fdfea2646970667358221220c03630ca6910d46ede5cae5ed1f6ae9571e1ccb99a0b3b83f560d5c9079c96db64736f6c637822302e382e31392d646576656c6f702b636f6d6d69742e63383866343066642e6d6f640053",
- "linkReferences": {},
- "deployedLinkReferences": {}
-};
-export default TypedContract;
-//# sourceMappingURL=TypedContract.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/contracts/TypedContract.js.map b/lib.esm/_tests/contracts/TypedContract.js.map
deleted file mode 100644
index 2ee01c4a..00000000
--- a/lib.esm/_tests/contracts/TypedContract.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"TypedContract.js","sourceRoot":"","sources":["../../../src.ts/_tests/contracts/TypedContract.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,eAAe;IAC/B,YAAY,EAAE,yBAAyB;IACvC,KAAK,EAAE;QACL;YACE,QAAQ,EAAE;gBACR;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE;gBACT;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,iBAAiB,EAAE,MAAM;YACzB,MAAM,EAAE,UAAU;SACnB;QACD;YACE,QAAQ,EAAE;gBACR;oBACE,cAAc,EAAE,SAAS;oBACzB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,SAAS;iBAClB;aACF;YACD,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE;gBACT;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,iBAAiB,EAAE,MAAM;YACzB,MAAM,EAAE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B;aACF;YACD,iBAAiB,EAAE,MAAM;YACzB,MAAM,EAAE,UAAU;SACnB;QACD;YACE,QAAQ,EAAE;gBACR;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE;gBACT;oBACE,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,iBAAiB,EAAE,MAAM;YACzB,MAAM,EAAE,UAAU;SACnB;KACF;IACD,UAAU,EAAE,k50BAAk50B;IAC950B,kBAAkB,EAAE,k10BAAk10B;IACt20B,gBAAgB,EAAE,EAAE;IACpB,wBAAwB,EAAE,EAAE;CAC7B,CAAA;AAKD,eAAe,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/create-provider.d.ts b/lib.esm/_tests/create-provider.d.ts
deleted file mode 100644
index ef373e81..00000000
--- a/lib.esm/_tests/create-provider.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { AbstractProvider } from "../index.js";
-export declare function setupProviders(): void;
-export declare const providerNames: readonly string[];
-export declare function getProviderNetworks(provider: string): Array;
-export declare function getProvider(provider: string, network: string): null | AbstractProvider;
-export declare function checkProvider(provider: string, network: string): boolean;
-export declare function connect(network: string): AbstractProvider;
-//# sourceMappingURL=create-provider.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/create-provider.d.ts.map b/lib.esm/_tests/create-provider.d.ts.map
deleted file mode 100644
index 3e7a7376..00000000
--- a/lib.esm/_tests/create-provider.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAyBpD,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,eAAO,MAAM,aAAa,mBAAuD,CAAC;AAQlF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAetF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIzD"}
\ No newline at end of file
diff --git a/lib.esm/_tests/create-provider.js b/lib.esm/_tests/create-provider.js
deleted file mode 100644
index b93fd7b9..00000000
--- a/lib.esm/_tests/create-provider.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import { isError, JsonRpcProvider, } from "../index.js";
-import dotenv from "dotenv";
-dotenv.config();
-;
-const quaiNetworks = ["colosseum"];
-const ProviderCreators = [
- {
- name: "JsonRpcProvider",
- networks: quaiNetworks,
- create: function (network) {
- return new JsonRpcProvider(process.env.RPC_URL, network);
- }
- },
-];
-let setup = false;
-const cleanup = [];
-export function setupProviders() {
- after(function () {
- for (const func of cleanup) {
- func();
- }
- });
- setup = true;
-}
-export const providerNames = Object.freeze(ProviderCreators.map((c) => (c.name)));
-function getCreator(provider) {
- const creators = ProviderCreators.filter((c) => (c.name === provider));
- if (creators.length === 1) {
- return creators[0];
- }
- return null;
-}
-export function getProviderNetworks(provider) {
- const creator = getCreator(provider);
- if (creator) {
- return creator.networks;
- }
- return [];
-}
-export function getProvider(provider, network) {
- if (setup == false) {
- throw new Error("MUST CALL setupProviders in root context");
- }
- const creator = getCreator(provider);
- try {
- if (creator) {
- const provider = creator.create(network);
- if (provider) {
- cleanup.push(() => { provider.destroy(); });
- }
- return provider;
- }
- }
- catch (error) {
- if (!isError(error, "INVALID_ARGUMENT")) {
- throw error;
- }
- }
- return null;
-}
-export function checkProvider(provider, network) {
- const creator = getCreator(provider);
- return (creator != null);
-}
-export function connect(network) {
- const provider = getProvider("JsonRpcProvider", network);
- if (provider == null) {
- throw new Error(`could not connect to ${network}`);
- }
- return provider;
-}
-//# sourceMappingURL=create-provider.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/create-provider.js.map b/lib.esm/_tests/create-provider.js.map
deleted file mode 100644
index 9c56620d..00000000
--- a/lib.esm/_tests/create-provider.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,EACP,eAAe,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAMf,CAAC;AAEF,MAAM,YAAY,GAAG,CAAE,WAAW,CAAE,CAAC;AAErC,MAAM,gBAAgB,GAA2B;IAC7C;QACI,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7D,CAAC;KACJ;CACJ,CAAC;AAGF,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,MAAM,OAAO,GAAsB,EAAG,CAAC;AACvC,MAAM,UAAU,cAAc;IAC1B,KAAK,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;YAAE,IAAI,EAAE,CAAC;SAAE;IAC3C,CAAC,CAAC,CAAC;IACH,KAAK,GAAG,IAAI,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAElF,SAAS,U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AAC,OAAO,IAAI,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACzD,IAAI,QAAQ,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAyB,OAAQ,EAAE,CAAC,CAAC;KAAE;IAC/E,OAAO,QAAQ,CAAC;AACpB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/index.d.ts b/lib.esm/_tests/index.d.ts
deleted file mode 100644
index 2fa3fd57..00000000
--- a/lib.esm/_tests/index.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import "./test-abi.js";
-import "./test-address.js";
-import "./test-contract.js";
-import "./test-crypto.js";
-import "./test-hash.js";
-import "./test-hash-typeddata.js";
-import "./test-providers-avatar.js";
-import "./test-providers-ccip.js";
-import "./test-providers-wildcard.js";
-import "./test-rlp.js";
-import "./test-transaction.js";
-import "./test-utils-maths.js";
-import "./test-utils-misc.js";
-import "./test-utils-units.js";
-import "./test-utils-utf8.js";
-import "./test-wallet.js";
-import "./test-wallet-hd.js";
-import "./test-wallet-json.js";
-import "./test-wallet-mnemonic.js";
-import "./test-wordlists.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/index.d.ts.map b/lib.esm/_tests/index.d.ts.map
deleted file mode 100644
index 96135825..00000000
--- a/lib.esm/_tests/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,8BAA8B,CAAC;AACtC,OAAO,eAAe,CAAA;AACtB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2BAA2B,CAAC;AACnC,OAAO,qBAAqB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/index.js b/lib.esm/_tests/index.js
deleted file mode 100644
index a1c99773..00000000
--- a/lib.esm/_tests/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import "./test-abi.js";
-import "./test-address.js";
-import "./test-contract.js";
-import "./test-crypto.js";
-import "./test-hash.js";
-import "./test-hash-typeddata.js";
-import "./test-providers-avatar.js";
-import "./test-providers-ccip.js";
-import "./test-providers-wildcard.js";
-import "./test-rlp.js";
-import "./test-transaction.js";
-import "./test-utils-maths.js";
-import "./test-utils-misc.js";
-import "./test-utils-units.js";
-import "./test-utils-utf8.js";
-import "./test-wallet.js";
-import "./test-wallet-hd.js";
-import "./test-wallet-json.js";
-import "./test-wallet-mnemonic.js";
-import "./test-wordlists.js";
-////import "./test-contract-integ.js";
-////import "./test-providers-data.js";
-//import "./test-providers-errors.js";
-////import "./test-providers-extra.js";
-////import "./test-providers-send.js";
-/*
-test-crypto-algoswap.ts
-*/
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/index.js.map b/lib.esm/_tests/index.js.map
deleted file mode 100644
index 46ac6512..00000000
--- a/lib.esm/_tests/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/_tests/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAClC,OAAO,8BAA8B,CAAC;AACtC,OAAO,eAAe,CAAA;AACtB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2BAA2B,CAAC;AACnC,OAAO,qBAAqB,CAAC;AAE7B,sCAAsC;AAEtC,sCAAsC;AACtC,sCAAsC;AACtC,uCAAuC;AACvC,sCAAsC;AAEtC;;EAEE"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-abi.d.ts b/lib.esm/_tests/test-abi.d.ts
deleted file mode 100644
index 5a0731b4..00000000
--- a/lib.esm/_tests/test-abi.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-abi.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-abi.d.ts.map b/lib.esm/_tests/test-abi.d.ts.map
deleted file mode 100644
index 23df12e3..00000000
--- a/lib.esm/_tests/test-abi.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-abi.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-abi.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-abi.js b/lib.esm/_tests/test-abi.js
deleted file mode 100644
index 42dc08d2..00000000
--- a/lib.esm/_tests/test-abi.js
+++ /dev/null
@@ -1,281 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { AbiCoder, Interface, decodeBytes32String, encodeBytes32String } from "../index.js";
-function equal(actual, expected) {
- switch (expected.type) {
- case "address":
- case "boolean":
- case "hexstring":
- case "string":
- assert.equal(actual, expected.value);
- return;
- case "number":
- assert.equal(actual, BigInt(expected.value));
- return;
- case "array":
- case "object":
- assert.ok(Array.isArray(actual), "!array");
- assert.equal(actual.length, expected.value.length, ".length mismatch");
- for (let i = 0; i < actual.length; i++) {
- equal(actual[i], expected.value[i]);
- }
- return;
- }
- throw new Error(`unsupported: ${expected}`);
-}
-describe("Tests ABI Coder", function () {
- const tests = loadTests("abi");
- for (const test of tests) {
- it(`tests ABI encoding: (${test.name})`, function () {
- const encoded = AbiCoder.defaultAbiCoder().encode([test.type], [test.value]);
- assert.equal(encoded, test.encoded, "encoded");
- });
- }
- for (const test of tests) {
- it(`tests ABI decoding: (${test.name})`, function () {
- const decoded = AbiCoder.defaultAbiCoder().decode([test.type], test.encoded)[0];
- equal(decoded, test.verbose);
- });
- }
-});
-describe("Test Bytes32 strings", function () {
- const tests = [
- {
- name: "ricmoo.firefly.eth",
- str: "ricmoo.firefly.eth",
- expected: '0x7269636d6f6f2e66697265666c792e6574680000000000000000000000000000'
- },
- {
- name: "empty string",
- str: "",
- expected: '0x0000000000000000000000000000000000000000000000000000000000000000'
- }
- ];
- for (const { name, str, expected } of tests) {
- it(`encodes and decodes Bytes32 strings: ${name}`, function () {
- const bytes32 = encodeBytes32String(str);
- const decoded = decodeBytes32String(bytes32);
- assert.equal(bytes32, expected, 'formatted correctly');
- assert.equal(decoded, str, "parsed correctly");
- });
- }
-});
-describe("Test Interface", function () {
- const iface = new Interface([
- "function balanceOf(address owner) returns (uint)",
- "event Transfer(address indexed from, address indexed to, uint amount)",
- // #4244
- "event RedemptionRequested(bytes20 indexed walletPubKeyHash, bytes redeemerOutputScript, address indexed redeemer, uint64 requestedAmount, uint64 treasuryFee, uint64 txMaxFee)"
- ]);
- it("does interface stuff; @TODO expand this", function () {
- const addr = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
- const addr2 = "0xAC1639CF97a3A46D431e6d1216f576622894cBB5";
- const data = iface.encodeFunctionData("balanceOf", [addr]);
- assert.equal(data, "0x70a082310000000000000000000000008ba1f109551bd432803012645ac136ddd64dba72", "encoded");
- const decoded = iface.decodeFunctionData("balanceOf", data);
- assert.equal(decoded.length, 1, "decoded.length");
- assert.equal(decoded[0], addr, "decoded[0]");
- const tx = iface.parseTransaction({ data, value: 10 });
- assert.ok(tx != null, "tx == null");
- assert.equal(tx.name, "balanceOf", "tx.balanceOf");
- assert.equal(tx.signature, "balanceOf(address)", "tx.balanceOf");
- assert.equal(tx.args.length, 1, "tx.args.length");
- assert.equal(tx.args[0], addr, "tx.args[0]");
- assert.equal(tx.selector, "0x70a08231", "tx.selector");
- assert.equal(tx.value, BigInt(10), "tx.value");
- const result = iface.encodeFunctionResult("balanceOf", [123]);
- assert.equal(result, "0x000000000000000000000000000000000000000000000000000000000000007b", "result");
- const value = iface.decodeFunctionResult("balanceOf", result);
- assert.equal(value.length, 1, "result.length");
- assert.equal(value[0], BigInt(123), "result.value[0]");
- // @TODO: parseResult
- const filter = iface.encodeFilterTopics("Transfer", [addr, addr2]);
- assert.equal(filter.length, 3);
- assert.equal(filter[0], "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef");
- assert.equal(filter[1], "0x0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba72");
- assert.equal(filter[2], "0x000000000000000000000000ac1639cf97a3a46d431e6d1216f576622894cbb5");
- // See: #4244
- // https://goerli.quaiscan.io/tx/0xe61cef4cd706db8e23114717a207d76cc6b0df0b74ec52805551c4d1bf347a27#eventlog
- // See `RedemptionRequested` event.
- {
- const walletPubKeyHash = "0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e";
- const redeemer = "0x086813525A7dC7dafFf015Cdf03896Fd276eab60";
- const filterWithBytes20 = iface.encodeFilterTopics("RedemptionRequested", [walletPubKeyHash, undefined, redeemer]);
- assert.equal(filterWithBytes20.length, 3);
- assert.equal(filterWithBytes20[0], "0x97a0199072f487232635d50ab75860891afe0b91c976ed2fc76502c4d82d0d95");
- assert.equal(filterWithBytes20[1], "0x03b74d6893ad46dfdd01b9e0e3b3385f4fce2d1e000000000000000000000000");
- assert.equal(filterWithBytes20[2], "0x000000000000000000000000086813525a7dc7dafff015cdf03896fd276eab60");
- }
- const eventLog = iface.encodeEventLog("Transfer", [addr, addr2, 234]);
- assert.equal(eventLog.data, "0x00000000000000000000000000000000000000000000000000000000000000ea");
- assert.deepEqual(eventLog.topics, [
- "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
- "0x0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba72",
- "0x000000000000000000000000ac1639cf97a3a46d431e6d1216f576622894cbb5"
- ]);
- const values = iface.decodeEventLog("Transfer", eventLog.data, eventLog.topics);
- assert.equal(values.length, 3);
- assert.equal(values[0], addr);
- assert.equal(values[1], addr2);
- assert.equal(values[2], BigInt(234));
- const log = iface.parseLog(eventLog);
- assert.ok(log != null);
- assert.equal(log.name, "Transfer");
- assert.equal(log.signature, "Transfer(address,address,uint256)");
- assert.equal(log.topic, "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef");
- assert.equal(log.args.length, 3);
- assert.equal(log.args[0], "0x8ba1f109551bD432803012645Ac136ddd64DBA72");
- assert.equal(log.args[1], "0xAC1639CF97a3A46D431e6d1216f576622894cBB5");
- assert.equal(log.args[2], BigInt(234));
- });
- // See #4248
- it("formats JSON ABI parameters with default empty string for `name` key", function () {
- assert.deepEqual(JSON.parse(iface.getFunction("balanceOf").format('json')), {
- constant: false,
- inputs: [
- { name: "owner", type: "address" }
- ],
- name: "balanceOf",
- outputs: [
- { name: "", type: "uint256" }
- ],
- payable: false,
- type: "function",
- });
- });
-});
-describe("Tests Legacy ABI formats", function () {
- // See: #3932
- const iface = new Interface([
- {
- name: "implicitView",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "constant": true,
- "payable": false,
- "type": "function"
- },
- {
- name: "implicitSendNonpay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "constant": false,
- "payable": false,
- "type": "function"
- },
- {
- name: "implicitSendPay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "constant": false,
- "payable": true,
- "type": "function"
- },
- {
- name: "implicitSendImplicitPay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "constant": false,
- "type": "function"
- },
- {
- name: "implicitSendExplicitPay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- payable: true,
- type: "function"
- },
- {
- name: "implicitSendExplicitNonpay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- payable: false,
- type: "function"
- },
- {
- name: "implicitAll",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "type": "function"
- },
- {
- name: "explicitView",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "stateMutability": "view",
- "constant": true,
- "payable": false,
- "type": "function"
- },
- {
- name: "explicitPure",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "stateMutability": "pure",
- "constant": true,
- "payable": false,
- "type": "function"
- },
- {
- name: "explicitPay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "stateMutability": "payable",
- "constant": true,
- "payable": true,
- "type": "function"
- },
- {
- name: "explicitNonpay",
- outputs: [],
- inputs: [
- { type: "int128", name: "arg0" }
- ],
- "stateMutability": "nonpayable",
- "constant": true,
- "payable": false,
- "type": "function"
- },
- ]);
- function test(name, isConst, payable, stateMutability) {
- it(`tests ABI configuration: ${name}`, function () {
- const f = iface.getFunction(name);
- assert.ok(!!f, `missing ${name}`);
- assert.equal(f.constant, isConst, `${name}.constant`);
- assert.equal(f.stateMutability, stateMutability, `${name}.stateMutability`);
- assert.equal(f.payable, payable, `${name}.payable`);
- });
- }
- test("explicitView", true, false, "view");
- test("explicitPure", true, false, "pure");
- test("explicitPay", false, true, "payable");
- test("explicitNonpay", false, false, "nonpayable");
- test("implicitView", true, false, "view");
- test("implicitSendNonpay", false, false, "nonpayable");
- test("implicitSendPay", false, true, "payable");
- test("implicitSendImplicitPay", false, true, "payable");
- test("implicitSendExplicitPay", false, true, "payable");
- test("implicitSendExplicitNonpay", false, false, "nonpayable");
- test("implicitAll", false, true, "payable");
-});
-//# sourceMappingURL=test-abi.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-abi.js.map b/lib.esm/_tests/test-abi.js.map
deleted file mode 100644
index 27dcf26c..00000000
--- a/lib.esm/_tests/test-abi.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-abi.js","sourceRoot":"","sources":["../../src.ts/_tests/test-abi.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EACH,QAAQ,EAAE,SAAS,EACnB,mBAAmB,EAAE,mBAAmB,EAC3C,MAAM,aAAa,CAAC;AAErB,SAAS,KAAK,CAAC,MAAW,EAAE,QAA4B;IACpD,QAAQ,QAAQ,CAAC,IAAI,EAAE;QACnB,KAAK,SAAS,CAAC;QAAC,KAAK,SAAS,CAAC;QAAC,KAAK,WAAW,CAAC;QAAC,KAAK,QAAQ;YAC3D,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;YACrC,OAAO;QACX,KAAK,QAAQ;YACT,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7C,OAAM;QACV,KAAK,OAAO,CAAC;QAAC,KAAK,QAAQ;YACvB,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC3C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,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,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC5C,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IAEnD,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,yBAAyB,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACxD,IAAI,CAAC,yBAAyB,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACxD,IAAI,CAAC,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IAC/D,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-address.d.ts b/lib.esm/_tests/test-address.d.ts
deleted file mode 100644
index afa579d8..00000000
--- a/lib.esm/_tests/test-address.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-address.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-address.d.ts.map b/lib.esm/_tests/test-address.d.ts.map
deleted file mode 100644
index a5475c06..00000000
--- a/lib.esm/_tests/test-address.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-address.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-address.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-address.js b/lib.esm/_tests/test-address.js
deleted file mode 100644
index ed3e4202..00000000
--- a/lib.esm/_tests/test-address.js
+++ /dev/null
@@ -1,109 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { getAddress, getCreateAddress, getCreate2Address } from "../index.js";
-describe("computes checksum address", function () {
- const tests = loadTests("accounts");
- for (const test of tests) {
- it(`computes the checksum address: ${test.name}`, function () {
- assert.equal(getAddress(test.address), test.address);
- assert.equal(getAddress(test.icap), test.address);
- assert.equal(getAddress(test.address.substring(2)), test.address);
- assert.equal(getAddress(test.address.toLowerCase()), test.address);
- assert.equal(getAddress("0x" + test.address.substring(2).toUpperCase()), test.address);
- });
- }
- const invalidAddresses = [
- { name: "null", value: null },
- { name: "number", value: 1234 },
- { name: "emtpy bytes", value: "0x" },
- { name: "too short", value: "0x8ba1f109551bd432803012645ac136ddd64dba" },
- { name: "too long", value: "0x8ba1f109551bd432803012645ac136ddd64dba7200" },
- ];
- invalidAddresses.forEach(({ name, value }) => {
- it(`correctly fails on invalid address: ${name}`, function () {
- assert.throws(function () {
- getAddress(value);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid address/) &&
- error.argument === "address" &&
- error.value === value);
- });
- });
- });
- it("correctly fails on invalid checksum", function () {
- const value = "0x8ba1f109551bD432803012645Ac136ddd64DBa72";
- assert.throws(function () {
- getAddress(value);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^bad address checksum/) &&
- error.argument === "address" &&
- error.value === value);
- });
- });
- it("correctly fails on invalid IBAN checksum", function () {
- const value = "XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK37";
- assert.throws(function () {
- getAddress(value);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^bad icap checksum/) &&
- error.argument === "address" &&
- error.value === value);
- });
- });
-});
-describe("computes ICAP address", function () {
- const tests = loadTests("accounts");
- for (const test of tests) {
- it(`computes the ICAP address: ${test.name}`, function () {
- assert.equal(getAddress(test.address.toLowerCase()), test.address);
- assert.equal(getAddress("0x" + test.address.substring(2).toUpperCase()), test.address);
- });
- }
-});
-describe("computes create address", function () {
- const tests = loadTests("create");
- for (const { sender, creates } of tests) {
- for (const { name, nonce, address } of creates) {
- it(`computes the create address: ${name}`, function () {
- assert.equal(getCreateAddress({ from: sender, nonce }), address);
- });
- }
- }
-});
-describe("computes create2 address", function () {
- const tests = loadTests("create2");
- for (const { sender, creates } of tests) {
- for (const { name, salt, initCodeHash, address } of creates) {
- it(`computes the create2 address: ${name}`, function () {
- assert.equal(getCreate2Address(sender, salt, initCodeHash), address);
- });
- }
- }
- const sender = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
- const salt = "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8";
- const initCodeHash = "0x8452c9b9140222b08593a26daa782707297be9f7b3e8281d7b4974769f19afd0";
- it("correctly fails on invalid salt", function () {
- const badSalt = "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36dea";
- assert.throws(function () {
- getCreate2Address(sender, badSalt, initCodeHash);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "salt" &&
- error.value === badSalt);
- });
- });
- it("correctly fails on invalid initCodeHash", function () {
- const badInitCodeHash = "0x8452c9b9140222b08593a26daa782707297be9f7b3e8281d7b4974769f19af";
- assert.throws(function () {
- getCreate2Address(sender, salt, badInitCodeHash);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "initCodeHash" &&
- error.value === badInitCodeHash);
- });
- });
-});
-//# sourceMappingURL=test-address.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-address.js.map b/lib.esm/_tests/test-address.js.map
deleted file mode 100644
index 97eac0f5..00000000
--- a/lib.esm/_tests/test-address.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-address.js","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,cAAc;gBACjC,KAAK,CAAC,KAAK,KAAK,eAAe,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract-integ.d.ts b/lib.esm/_tests/test-contract-integ.d.ts
deleted file mode 100644
index 404e7e48..00000000
--- a/lib.esm/_tests/test-contract-integ.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-contract-integ.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract-integ.d.ts.map b/lib.esm/_tests/test-contract-integ.d.ts.map
deleted file mode 100644
index 66f4bade..00000000
--- a/lib.esm/_tests/test-contract-integ.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-contract-integ.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-contract-integ.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract-integ.js b/lib.esm/_tests/test-contract-integ.js
deleted file mode 100644
index fe347d0b..00000000
--- a/lib.esm/_tests/test-contract-integ.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import assert from "assert";
-import { quais } from "../index.js";
-import dotenv from "dotenv";
-import QRC20 from "./contracts/QRC20.js";
-import { stall } from "./utils.js";
-dotenv.config();
-describe("Tests contract integration", function () {
- const provider = new quais.JsonRpcProvider(process.env.RPC_URL);
- const wallet = new quais.Wallet(process.env.FAUCET_PRIVATEKEY || '', provider);
- const abi = QRC20.abi;
- const bytecode = QRC20.bytecode;
- const constructorArgs = {
- name: 'Testing',
- symbol: 'Test',
- totalSupply: Math.pow(10, 3),
- };
- let contract;
- let address;
- before(async function () {
- this.timeout(100000);
- const factory = new quais.ContractFactory(abi, bytecode, wallet);
- contract = await factory.deploy(constructorArgs.name, constructorArgs.symbol, constructorArgs.totalSupply, {
- gasLimit: 5000000
- });
- address = await contract.getAddress();
- console.log('Contract deployed to:', address);
- let tries = 0;
- const POLLING_TRIES = 10; // define POLLING_TRIES if not defined elsewhere
- let deployed = false;
- let code = await provider.getCode(address);
- while (tries < POLLING_TRIES && !deployed) {
- code = await provider.getCode(address);
- if (code != "0x") {
- deployed = true;
- }
- tries += 1;
- await stall(10000); // Ensure stall is defined or use a different delay mechanism
- }
- if (!deployed) {
- throw new Error("Contract deployment failed");
- }
- });
- it("confirms the contract deployment", function () {
- assert.ok(address, "Contract address should be available");
- assert.ok(contract, "Contract instance should be available");
- });
- it("runs contract operations", async function () {
- this.timeout(120000);
- assert.ok(address != null);
- const CustomContract = quais.BaseContract.buildClass(abi);
- const contract = new CustomContract(address, wallet); //quais.Contract.from(address, abi, signer);
- await stall(30000);
- // Test implicit staticCall (i.e. view/pure)
- {
- const supply0 = await contract.totalSupply();
- assert.equal(supply0, BigInt(1000), "initial supply 0; default");
- }
- // Test explicit staticCall
- {
- const supply0 = await contract.totalSupply.staticCall();
- assert.equal(supply0, BigInt(1000), "initial supply 0; staticCall");
- }
- // Test staticCallResult (positional and named)
- {
- const supply0 = await contract.totalSupply.staticCallResult();
- assert.equal(supply0[0], BigInt(1000), "initial supply 0; staticCallResult");
- }
- const reciever = '0x0047f9CEa7662C567188D58640ffC48901cde02a';
- // Test transfer (default)
- const tx = await contract.transfer(reciever, BigInt(1));
- await stall(60000);
- const receipt = await provider.getTransactionReceipt(tx.hash);
- console.log('Receipt: ', receipt);
- await stall(10000);
- assert.ok(receipt, "receipt not null");
- const contractAddr = await contract.getAddress();
- // Check the receipt has parsed the events
- assert.equal(receipt.logs.length, 1, "logs.length");
- assert.ok(receipt instanceof quais.TransactionReceipt, "receipt typeof");
- assert.ok(receipt.logs[0] instanceof quais.Log, "receipt.log typeof");
- assert.equal(receipt.logs[0].address, contractAddr, "Proper target address");
- // Check the state has been adjusted
- assert.equal(await contract.balanceOf(reciever), BigInt(1), "balanceOf(signer)");
- });
-});
-//# sourceMappingURL=test-contract-integ.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract-integ.js.map b/lib.esm/_tests/test-contract-integ.js.map
deleted file mode 100644
index dfeb7d00..00000000
--- a/lib.esm/_tests/test-contract-integ.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-contract-integ.js","sourceRoot":"","sources":["../../src.ts/_tests/test-contract-integ.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAY,MAAM,aAAa,CAAC;AAC9C,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,EAAE,CAAC;AAShB,QAAQ,CAAC,4BAA4B,EAAE;IACnC,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC/E,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;IACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,MAAM,eAAe,GAAG;QACpB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;KAC/B,CAAA;IACD,IAAI,QAAkB,CAAC;IACvB,IAAI,OAAe,CAAC;IAEpB,MAAM,CAAC,KAAK;QACR,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAErB,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjE,QAAQ,GAAG,MAAM,OAAO,CAAC,M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AAC,UAAU,EAAE,CAAA;QAChD,0CAA0C;QAE1C,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;QACpD,MAAM,CAAC,EAAE,CAAC,OAAO,YAAY,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;QACzE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QACtE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,uBAAuB,CAAC,CAAC;QAE7E,oCAAoC;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract.d.ts b/lib.esm/_tests/test-contract.d.ts
deleted file mode 100644
index 1427a869..00000000
--- a/lib.esm/_tests/test-contract.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-contract.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract.d.ts.map b/lib.esm/_tests/test-contract.d.ts.map
deleted file mode 100644
index fb6a18b4..00000000
--- a/lib.esm/_tests/test-contract.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-contract.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-contract.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract.js b/lib.esm/_tests/test-contract.js
deleted file mode 100644
index a3687e87..00000000
--- a/lib.esm/_tests/test-contract.js
+++ /dev/null
@@ -1,352 +0,0 @@
-import assert from "assert";
-import { getProvider, setupProviders } from "./create-provider.js";
-import { Contract, ContractFactory, isError, Typed, } from "../index.js";
-import TestContract from "./contracts/TestContract.js";
-import TypedContract from "./contracts/TypedContract.js";
-import { quais } from "../index.js";
-import { stall } from "./utils.js";
-setupProviders();
-describe("Test Contract", function () {
- const provider = new quais.JsonRpcProvider(process.env.RPC_URL);
- const wallet = new quais.Wallet(process.env.FAUCET_PRIVATEKEY || '', provider);
- const abi = TestContract.abi;
- const bytecode = TestContract.bytecode;
- let contract;
- let addr;
- before(async function () {
- this.timeout(60000);
- await stall(10000);
- const factory = new ContractFactory(abi, bytecode, wallet);
- contract = await factory.deploy({ gasLimit: 5000000, maxFeePerGas: quais.parseUnits('10', 'gwei'), maxPriorityFeePerGas: quais.parseUnits('3', 'gwei') });
- addr = await contract.getAddress();
- console.log("Contract deployed to: ", addr);
- await stall(30000);
- });
- it("tests contract calls", async function () {
- this.timeout(10000);
- assert.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
- assert.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
- });
- //Awaiting Quai subscrigbe functionality
- // it("tests events", async function() {
- // this.timeout(60000);
- // assert.ok(provider)
- // const vUint256 = 42;
- // const vAddrName = "quais.eth";
- // const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
- // const vString = "Hello";
- // const vBytes = "0x12345678";
- // let hash: null | string = null;
- // // Test running a listener for a specific event
- // const specificEvent = new Promise((resolve, reject) => {
- // contract.on("EventUint256", async (value, event) => {
- // // Triggered by someone else
- // if (hash == null || hash !== event.log.transactionHash) { return; }
- // try {
- // assert.equal(event.filter, "EventUint256", "event.filter");
- // assert.equal(event.fragment.name, "EventUint256", "event.fragment.name");
- // assert.equal(event.log.address, addr, "event.log.address");
- // assert.equal(event.args.length, 1, "event.args.length");
- // assert.equal(event.args[0], BigInt(42), "event.args[0]");
- // const count = await contract.listenerCount("EventUint256");
- // await event.removeListener();
- // assert.equal(await contract.listenerCount("EventUint256"), count - 1, "decrement event count");
- // resolve(null);
- // } catch (e) {
- // event.removeListener();
- // reject(e);
- // }
- // });
- // });
- // // Test running a listener on all (i.e. "*") events
- // const allEvents = new Promise((resolve, reject) => {
- // const waitingFor: Record = {
- // EventUint256: vUint256,
- // EventAddress: vAddr,
- // EventString: vString,
- // EventBytes: vBytes
- // };
- // contract.on("*", (event: ContractEventPayload) => {
- // // Triggered by someone else
- // if (hash == null || hash !== event.log.transactionHash) { return; }
- // try {
- // const name = event.eventName;
- // assert.equal(event.args[0], waitingFor[name], `${ name }`);
- // delete waitingFor[name];
- // if (Object.keys(waitingFor).length === 0) {
- // event.removeListener();
- // resolve(null);
- // }
- // } catch (error) {
- // reject(error);
- // }
- // });
- // });
- // // Send a transaction to trigger some events
- // const tx = await contractSigner.testEvent(vUint256, vAddr, vString, vBytes);
- // hash = tx.hash;
- // const checkEvent = (filter: ContractEventName, event: EventLog | Log) => {
- // const values: Record = {
- // EventUint256: vUint256,
- // EventString: vString,
- // EventAddress: vAddr,
- // EventBytes: vBytes
- // };
- // assert.ok(event instanceof EventLog, `queryFilter(${ filter }):isEventLog`);
- // const name = event.eventName;
- // assert.equal(event.address, addr, `queryFilter(${ filter }):address`);
- // assert.equal(event.args[0], values[name], `queryFilter(${ filter }):args[0]`);
- // };
- // const checkEventFilter = async (filter: ContractEventName) => {
- // const events = (await contract.queryFilter(filter, -10)).filter((e) => (e.transactionHash === hash));
- // assert.equal(events.length, 1, `queryFilter(${ filter }).length`);
- // checkEvent(filter, events[0]);
- // return events[0];
- // };
- // const receipt = await tx.wait();
- // // Check the logs in the receipt
- // for (const log of receipt.logs) { checkEvent("receipt", log); }
- // // Various options for queryFilter
- // await checkEventFilter("EventUint256");
- // await checkEventFilter([ "EventUint256" ]);
- // await checkEventFilter([ [ "EventUint256" ] ]);
- // await checkEventFilter("EventUint256(uint)");
- // await checkEventFilter([ "EventUint256(uint)" ]);
- // await checkEventFilter([ [ "EventUint256(uint)" ] ]);
- // await checkEventFilter([ [ "EventUint256", "EventUint256(uint)" ] ]);
- // await checkEventFilter("0x85c55bbb820e6d71c71f4894e57751de334b38c421f9c170b0e66d32eafea337");
- // // Query by Event
- // await checkEventFilter(contract.filters.EventUint256);
- // // Query by Deferred Topic Filter; address
- // await checkEventFilter(contract.filters.EventUint256(vUint256));
- // // Query by Deferred Topic Filter; address
- // await checkEventFilter(contract.filters.EventAddress(vAddr));
- // // Query by Deferred Topic Filter; ENS name => address
- // await checkEventFilter(contract.filters.EventAddress(vAddrName));
- // // Multiple Methods
- // {
- // const filter = [ [ "EventUint256", "EventString" ] ];
- // const events = (await contract.queryFilter(filter, -10)).filter((e) => (e.transactionHash === hash));
- // assert.equal(events.length, 2, `queryFilter(${ filter }).length`);
- // for (const event of events) { checkEvent(filter, event); }
- // }
- // await specificEvent;
- // await allEvents;
- // });
- it("tests the _in_ operator for functions", function () {
- const contract = new Contract(addr, abi);
- assert.equal("testCallAdd" in contract, true, "has(testCallAdd)");
- assert.equal("nonExist" in contract, false, "has(nonExist)");
- {
- const sig = "function testCallAdd(uint256 a, uint256 b) pure returns (uint256 result)";
- assert.equal(sig in contract, true, `has(${sig})`);
- assert.equal("function nonExist()" in contract, false, "has(function nonExist())");
- }
- assert.equal("0xf24684e5" in contract, true, "has(0xf24684e5)");
- assert.equal("0xbad01234" in contract, false, "has(0xbad01234)");
- });
- it("tests the _in_ operator for events", function () {
- const contract = new Contract(addr, abi);
- assert.equal("EventUint256" in contract.filters, true, "has(EventUint256)");
- assert.equal("NonExist" in contract.filters, false, "has(NonExist)");
- {
- const sig = "event EventUint256(uint256 indexed value)";
- assert.equal(sig in contract.filters, true, `has(${sig})`);
- assert.equal("event NonExist()" in contract.filters, false, "has(event NonExist())");
- }
- {
- const hash = "0x85c55bbb820e6d71c71f4894e57751de334b38c421f9c170b0e66d32eafea337";
- const badHash = "0xbad01234567890ffbad01234567890ffbad01234567890ffbad01234567890ff";
- assert.equal(hash in contract.filters, true, `has(${hash})`);
- assert.equal(badHash in contract.filters, false, `has(${badHash})`);
- }
- });
-});
-describe("Test Typed Contract Interaction", function () {
- const tests = [
- {
- types: ["uint8", "uint16", "uint24", "uint32", "uint40", "uint48", "uint56", "uint64", "uint72", "uint80", "uint88", "uint96", "uint104", "uint112", "uint120", "uint128", "uint136", "uint144", "uint152", "uint160", "uint168", "uint176", "uint184", "uint192", "uint200", "uint208", "uint216", "uint224", "uint232", "uint240", "uint248", "uint256", "int8", "int16", "int24", "int32", "int40", "int48", "int56", "int64", "int72", "int80", "int88", "int96", "int104", "int112", "int120", "int128", "int136", "int144", "int152", "int160", "int168", "int176", "int184", "int192", "int200", "int208", "int216", "int224", "int232", "int240", "int248", "int256"],
- valueFunc: (type) => { return 42; }
- },
- {
- types: [
- "bytes1", "bytes2", "bytes3", "bytes4", "bytes5", "bytes6", "bytes7", "bytes8", "bytes9", "bytes10", "bytes11", "bytes12", "bytes13", "bytes14", "bytes15", "bytes16", "bytes17", "bytes18", "bytes19", "bytes20", "bytes21", "bytes22", "bytes23", "bytes24", "bytes25", "bytes26", "bytes27", "bytes28", "bytes29", "bytes30", "bytes31", "bytes32",
- "bytes"
- ],
- valueFunc: (type) => {
- const length = type.substring(5);
- if (length) {
- const value = new Uint8Array(parseInt(length));
- value.fill(42);
- return value;
- }
- return "0x123456";
- }
- }, {
- types: ["bool"],
- valueFunc: (type) => { return true; }
- }, {
- types: ["address"],
- valueFunc: (type) => { return "0x643aA0A61eADCC9Cc202D1915D942d35D005400C"; }
- }, {
- types: ["string"],
- valueFunc: (type) => { return "someString"; }
- }
- ];
- const abi = TypedContract.abi;
- const provider = new quais.JsonRpcProvider(process.env.RPC_URL);
- const wallet = new quais.Wallet(process.env.FAUCET_PRIVATEKEY || '', provider);
- const bytecode = TypedContract.bytecode;
- let contract;
- let addr;
- before(async function () {
- this.timeout(120000);
- const factory = new ContractFactory(abi, bytecode, wallet);
- contract = await factory.deploy({ gasLimit: 5000000, maxFeePerGas: quais.parseUnits('10', 'gwei'), maxPriorityFeePerGas: quais.parseUnits('3', 'gwei'), });
- addr = await contract.getAddress();
- console.log("Contract deployed to: ", addr);
- await stall(50000);
- });
- for (const { types, valueFunc } of tests) {
- for (const type of types) {
- const value = valueFunc(type);
- it(`tests typed value: Typed.from(${type})`, async function () {
- this.timeout(10000);
- const v = Typed.from(type, value);
- const result = await contract.testTyped(v);
- assert.equal(result, type);
- });
- it(`tests typed value: Typed.${type}()`, async function () {
- this.timeout(10000);
- const v = Typed[type](value);
- const result = await contract.testTyped(v);
- assert.equal(result, type);
- });
- }
- }
-});
-describe("Test Contract Fallback", function () {
- const tests = [
- {
- name: "none",
- address: "0x0ccdace3d8353fed9b87a2d63c40452923ccdae5",
- abi: [],
- sendNone: { error: "no fallback" },
- sendData: { error: "no fallback" },
- sendValue: { error: "no fallback" },
- sendDataAndValue: { error: "no fallback" },
- },
- {
- name: "non-payable fallback",
- address: "0x3f10193f79a639b11ec9d2ab42a25a4a905a8870",
- abi: [
- "fallback()"
- ],
- sendNone: { data: "0x" },
- sendData: { data: "0x1234" },
- sendValue: { error: "overrides.value" },
- sendDataAndValue: { error: "overrides.value" },
- },
- {
- name: "payable fallback",
- address: "0xe2de6b97c5eb9fee8a47ca6c0fa642331e0b6330",
- abi: [
- "fallback() payable"
- ],
- sendNone: { data: "0x" },
- sendData: { data: "0x1234" },
- sendValue: { data: "0x" },
- sendDataAndValue: { data: "0x1234" },
- },
- {
- name: "receive-only",
- address: "0xf8f2afbbe37f6a4520e4db7f99495655aa31229b",
- abi: [
- "receive()"
- ],
- sendNone: { data: "0x" },
- sendData: { error: "overrides.data" },
- sendValue: { data: "0x" },
- sendDataAndValue: { error: "overrides.data" },
- },
- {
- name: "receive and payable fallback",
- address: "0x7d97ca5d9dea1cd0364f1d493252006a3c4e18a0",
- abi: [
- "fallback() payable",
- "receive()"
- ],
- sendNone: { data: "0x" },
- sendData: { data: "0x1234" },
- sendValue: { data: "0x" },
- sendDataAndValue: { data: "0x1234" },
- },
- {
- name: "receive and non-payable fallback",
- address: "0x5b59d934f0d22b15e73b5d6b9ae83486b70df67e",
- abi: [
- "fallback()",
- "receive()"
- ],
- sendNone: { data: "0x" },
- sendData: { data: "0x" },
- sendValue: { data: "0x" },
- sendDataAndValue: { error: "overrides" },
- },
- ];
- const provider = getProvider("InfuraProvider", "goerli");
- const testGroups = [
- {
- group: "sendNone",
- tx: {}
- },
- {
- group: "sendData",
- tx: { data: "0x1234" }
- },
- {
- group: "sendValue",
- tx: { value: 123 }
- },
- {
- group: "sendDataAndValue",
- tx: { data: "0x1234", value: 123 }
- },
- ];
- for (const { group, tx } of testGroups) {
- for (const test of tests) {
- const { name, address, abi } = test;
- const send = test[group];
- const contract = new Contract(address, abi, provider);
- it(`test contract fallback checks: ${group} - ${name}`, async function () {
- const func = async function () {
- if (abi.length === 0) {
- throw new Error("no fallback");
- }
- assert.ok(contract.fallback);
- return await contract.fallback.populateTransaction(tx);
- };
- if ("data" in send) {
- await func();
- //const result = await func();
- //@TODO: Test for the correct populated tx
- //console.log(result);
- assert.ok(true);
- }
- else {
- await assert.rejects(func, function (error) {
- if (error.message === send.error) {
- return true;
- }
- if (isError(error, "INVALID_ARGUMENT")) {
- return error.argument === send.error;
- }
- console.log("EE", error);
- return true;
- });
- }
- });
- }
- }
-});
-//# sourceMappingURL=test-contract.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-contract.js.map b/lib.esm/_tests/test-contract.js.map
deleted file mode 100644
index a1940dce..00000000
--- a/lib.esm/_tests/test-contract.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-contract.js","sourceRoot":"","sources":["../../src.ts/_tests/test-contract.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EACH,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,GAC5C,MAAM,aAAa,CAAC;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AAO,IAAI,CAAC;oBAChB,CAAC,CAAC,CAAC;iBACN;YACL,CAAC,CAAC,CAAC;SACN;KACJ;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto-algoswap.d.ts b/lib.esm/_tests/test-crypto-algoswap.d.ts
deleted file mode 100644
index 8c2f71dc..00000000
--- a/lib.esm/_tests/test-crypto-algoswap.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-crypto-algoswap.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto-algoswap.d.ts.map b/lib.esm/_tests/test-crypto-algoswap.d.ts.map
deleted file mode 100644
index 6b75dde0..00000000
--- a/lib.esm/_tests/test-crypto-algoswap.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-crypto-algoswap.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-crypto-algoswap.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto-algoswap.js b/lib.esm/_tests/test-crypto-algoswap.js
deleted file mode 100644
index 3fa1bb09..00000000
--- a/lib.esm/_tests/test-crypto-algoswap.js
+++ /dev/null
@@ -1,96 +0,0 @@
-import assert from "assert";
-import { lock, computeHmac, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, randomBytes } from "../index.js";
-describe("test registration", function () {
- let hijack = "";
- function getHijack(algo) {
- return function (...args) {
- hijack = `hijacked ${algo}: ${JSON.stringify(args)}`;
- return "0x42";
- };
- }
- const tests = [
- {
- name: "keccak256",
- params: ["0x"],
- hijackTag: 'hijacked keccak256: [{}]',
- algorithm: keccak256
- },
- {
- name: "sha256",
- params: ["0x"],
- hijackTag: 'hijacked sha256: [{}]',
- algorithm: sha256
- },
- {
- name: "sha512",
- params: ["0x"],
- hijackTag: 'hijacked sha512: [{}]',
- algorithm: sha512
- },
- {
- name: "ripemd160",
- params: ["0x"],
- hijackTag: 'hijacked ripemd160: [{}]',
- algorithm: ripemd160
- },
- {
- name: "pbkdf2",
- params: ["0x", "0x", 1024, 32, "sha256"],
- hijackTag: 'hijacked pbkdf2: [{},{},1024,32,"sha256"]',
- algorithm: pbkdf2
- },
- {
- name: "scryptSync",
- params: ["0x", "0x", 1024, 8, 1, 32],
- hijackTag: 'hijacked scryptSync: [{},{},1024,8,1,32]',
- algorithm: scryptSync
- },
- {
- name: "scrypt",
- params: ["0x", "0x", 1024, 8, 1, 32],
- hijackTag: 'hijacked scrypt: [{},{},1024,8,1,32,null]',
- algorithm: scrypt
- },
- {
- name: "computeHmac",
- params: ["sha256", "0x", "0x"],
- hijackTag: 'hijacked computeHmac: ["sha256",{},{}]',
- algorithm: computeHmac
- },
- {
- name: "randomBytes",
- params: [32],
- hijackTag: "hijacked randomBytes: [32]",
- algorithm: randomBytes,
- postCheck: (value) => {
- return (value instanceof Uint8Array && value.length === 32);
- }
- }
- ];
- tests.forEach(({ name, params, hijackTag, algorithm, postCheck }) => {
- it(`swaps in hijacked callback: ${name}`, async function () {
- const initial = await algorithm(...params);
- algorithm.register(getHijack(name));
- assert.equal(await algorithm(...params), "0x42");
- assert.equal(hijack, hijackTag);
- algorithm.register(algorithm._);
- if (postCheck) {
- assert.ok(postCheck(await algorithm(...params)));
- }
- else {
- assert.equal(await algorithm(...params), initial);
- }
- });
- });
- it("prevents swapping after locked", function () {
- lock();
- tests.forEach(({ name, params, hijackTag, algorithm }) => {
- assert.throws(function () {
- algorithm.register(getHijack("test"));
- }, function (error) {
- return (error.message === `${name} is locked`);
- });
- });
- });
-});
-//# sourceMappingURL=test-crypto-algoswap.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto-algoswap.js.map b/lib.esm/_tests/test-crypto-algoswap.js.map
deleted file mode 100644
index 1e0fea5a..00000000
--- a/lib.esm/_tests/test-crypto-algoswap.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-crypto-algoswap.js","sourceRoot":"","sources":["../../src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C,CAAC,CAAC;YAChC,IAAI,SAAS,EAAE;gBACX,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;aACpD;iBAAM;gBACH,MAAM,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,GAAG,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;aACrD;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE;QACjC,IAAI,EAAE,CAAC;QAEP,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;YACrD,MAAM,CAAC,MAAM,CAAC;gBACV,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1C,CAAC,EAAE,UAAS,KAAU;gBAClB,OAAO,CAAC,KAAK,CAAC,OAAO,KAAK,GAAI,IAAK,YAAY,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto.d.ts b/lib.esm/_tests/test-crypto.d.ts
deleted file mode 100644
index 5e2048d9..00000000
--- a/lib.esm/_tests/test-crypto.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-crypto.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto.d.ts.map b/lib.esm/_tests/test-crypto.d.ts.map
deleted file mode 100644
index bac9d8b0..00000000
--- a/lib.esm/_tests/test-crypto.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-crypto.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-crypto.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto.js b/lib.esm/_tests/test-crypto.js
deleted file mode 100644
index 87712ba0..00000000
--- a/lib.esm/_tests/test-crypto.js
+++ /dev/null
@@ -1,475 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { getBytes } from "../index.js";
-import { computeHmac, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, SigningKey } from "../index.js";
-describe("test hashing", function () {
- const tests = loadTests("hashes");
- tests.forEach((test) => {
- it(`computes sha2-256: ${test.name}`, function () {
- assert.equal(sha256(test.data), test.sha256);
- });
- });
- tests.forEach((test) => {
- it(`computes sha2-512: ${test.name}`, function () {
- assert.equal(sha512(test.data), test.sha512);
- });
- });
- tests.forEach((test) => {
- it(`computes ripemd160: ${test.name}`, function () {
- assert.equal(ripemd160(test.data), test.ripemd160);
- });
- });
- tests.forEach((test) => {
- it(`computes keccak256: ${test.name}`, function () {
- assert.equal(keccak256(test.data), test.keccak256);
- });
- });
-});
-describe("test password-based key derivation", function () {
- const tests = loadTests("pbkdf");
- tests.forEach((test) => {
- it(`computes pbkdf2: ${test.name}`, function () {
- const password = getBytes(test.password);
- const salt = getBytes(test.salt);
- const { iterations, algorithm, key } = test.pbkdf2;
- const result = pbkdf2(password, salt, iterations, test.dkLen, algorithm);
- assert.equal(result, key);
- });
- });
- tests.forEach((test) => {
- it(`computes scrypt (sync): ${test.name}`, function () {
- this.timeout(1000);
- const password = getBytes(test.password);
- const salt = getBytes(test.salt);
- const { N, r, p, key } = test.scrypt;
- const result = scryptSync(password, salt, N, r, p, test.dkLen);
- assert.equal(result, key);
- });
- });
- tests.forEach((test) => {
- it(`computes scrypt (async): ${test.name}`, async function () {
- this.timeout(1000);
- const password = getBytes(test.password);
- const salt = getBytes(test.salt);
- const { N, r, p, key } = test.scrypt;
- let progressCount = 0, progressOk = true, lastProgress = -1;
- const result = await scrypt(password, salt, N, r, p, test.dkLen, (progress) => {
- if (progress < lastProgress) {
- progressOk = false;
- }
- lastProgress = progress;
- progressCount++;
- });
- assert.ok(progressOk, "progress was not monotonically increasing");
- assert.ok(progressCount > 100, "progress callback was called at leat 100 times");
- assert.equal(result, key);
- });
- });
-});
-describe("test hmac", function () {
- const tests = loadTests("hmac");
- tests.forEach((test) => {
- it(`computes hmac: ${test.name}`, async function () {
- const { algorithm, key, data } = test;
- assert.equal(computeHmac(algorithm, key, data), test.hmac);
- });
- });
-});
-describe("tests ECDH shared secret", function () {
- const tests = [
- {
- "name": "test-0",
- "keyA": "0xb484f7e25b06a887c3a01c97db40b5d96a1bd1ce69f342442a8395bfc995c34c",
- "keyB": "0x407f75dc7d9f420c54bcc51189a16841b75aab53827d3ed54d5548448136f577",
- "shared": "0x04131c0361e18fbdfb1575b06763225e8e7d4b6d33a6b6f369f20ff05bb6bb79cf6f510154615774f14a68ec405244fc8cba9fecdf012d22988575bf7f72f55cea"
- },
- {
- "name": "test-1",
- "keyA": "0x953287b3e32f93c3ae8974d380b88f9a6d89ce2969c4b589cf4d068ec719c885",
- "keyB": "0xf92ec8bea281236772a90219e9c661d475c6dd457dbf71f3076e9f136a7dee2b",
- "shared": "0x04b0d910de1a56e19a300e4cf7d8946fab088da26bad0be01b3139af7f61633387c110d00a9f4059a75808c7471665242996b0999677bfef0f8c9b2eb9cb7ff3f0"
- },
- {
- "name": "test-2",
- "keyA": "0xe47de7c043683a3facabbd72097c5c1c9148fc2d66854dfc32df924bfdb45a13",
- "keyB": "0x5bfe0ef6a3c40797a4b013d01bbc02dfb150c46cb04c85a52be5d5d370d1f60a",
- "shared": "0x04abcb75054302b210ac0ab42d412e47cc08bfc0d29298edc3a1c0f11d88c49240a8f922ca57dfbc003e6655337c75d5598b704ea91546206d9495aa61213aa96a"
- },
- {
- "name": "test-3",
- "keyA": "0x3f0b65deb1a95ec280649e81b933ef382441fdc875f6280d782e45628f0dccd7",
- "keyB": "0x3aeb016c64f23b276f816aa5494a2cec07361d2a4a0d4992a5b99764127e8f9e",
- "shared": "0x04de883e02e1842f87796a83790b646615902e2a0612477bc63002f23a94d700c15632660cf6018f10a81785a9f294dd100309e397e88e7d1b7d70f601a4cf3b1b"
- },
- {
- "name": "test-4",
- "keyA": "0xb9f059a915d6421848ae4344c64f1803342a7991c1fd567d61238aaaab583a5a",
- "keyB": "0x0beb07549d6496d635c45152673455268f4beb89c07ff049c6e269dfa867ac2c",
- "shared": "0x0411f59f62bd3033dba981f23fac5cc0718737dabeea9f060d0fd572383007402b539dd60b23b936c7842fcf16f4fb0524cc07ab02a06c3be8b33113a20f3d47d0"
- },
- {
- "name": "test-5",
- "keyA": "0xb48da3af696d7893c818b5e38ff682ab77818dccb80599f36b5108ad25214cf0",
- "keyB": "0xac732d7e814ef45ef8a7acf31c4f04eef30247c992b558c8523f4894e599e772",
- "shared": "0x0499778f55f0e87e28d72991c380a2ea5147f0336f5bc7d7ef6a1b2ef25e8949d05e3a5e60a1d605abe69427daf321a118f648c4b4da2529843b5409df921fb927"
- },
- {
- "name": "test-6",
- "keyA": "0x90b5123740bf282e9622ff8a2511692e0abc897bd61a64f49c2497967cb45dd5",
- "keyB": "0x471e8f4b20e3328d4a25c20dad734e0bdc160c6c3dd3709858ca6ba6ce74d24b",
- "shared": "0x04428de953d7409c419a6f11622c4a4d087082b54bc8207c514534ecf7901723c1f58359631ba94e95c05d934a2eedcecd705bbb61dd8f57cbb08572dc69e6a782"
- },
- {
- "name": "test-7",
- "keyA": "0x9f7f6431c1318481003fd21871b4b8a86ca779caaef10fec2209479b5072ea15",
- "keyB": "0xb6be68f448ac1092a704613f3a75324b5c58157f3595c48a3825a0089d7f9d3c",
- "shared": "0x0468218704c8c364d4d1838c7f66ccab205797eab0b02b93b75cf4e4437dbe13e7d9d0830971758b3a65e75eab577954b42f6721c104e4b876b77b8db63d23d43d"
- },
- {
- "name": "test-8",
- "keyA": "0xb9113e35ac2f7ba2a315e9f4301275cf561b91860f612d14a351273e38c04966",
- "keyB": "0x00c3101f5d3d6272299180fd426dc1554854cb06dc911bc85fa97327d4fa3f21",
- "shared": "0x04532cc9a89b735f0a11a0dbbbd40b05460dcf8e41e9da8359c727336a245d5d9babcca050434b81c01a6c70bd27692123f99377f22c0651bc0b01ae9871624894"
- },
- {
- "name": "test-9",
- "keyA": "0xf569179eccaaf12c837a7362b7fbe41976dbf760270fa759e3dff18ae2bbe5fd",
- "keyB": "0xc8654bad899f2e827d581f45db8b7f295a0dcfe5253577d8604c08d589180527",
- "shared": "0x04d3568b0d1203d09cf9d1707c3ed1a44eb0230d2169c19c89433df8330010160885e6e626ce4505ac6ce7dda68bd57d2ddaa07a5ef5a4685c6a4e3784b8ad9184"
- },
- {
- "name": "test-10",
- "keyA": "0x0ffd74c78276a1bcffe332b0545400e5992c87f2a2f91caa71ad76215ed2b229",
- "keyB": "0x47dcfdf847d5b572784d546e0c5048aa4e613e74936fcc5438b75370d5f5525a",
- "shared": "0x040fc7a5c5a7f9bfb98b596d698dbb0a87e1dcd50457544644acfb09ee3802835bbadc7717d06f4cc19af3bd308755eedfb162055b08134d63a49231ef9a38e503"
- },
- {
- "name": "test-11",
- "keyA": "0x9777dd28dd62dbf7b17244b8e7b49b3cb673b81ef9dabbb196c23ccd3d0b22e6",
- "keyB": "0xbc1f73ca7cdc51e1264429d6f6b581c75b3a5986cb993f09ab779156764ae1b1",
- "shared": "0x04493d9be34f59077b11f56f8f883bb1f9ff247500f482f3ff6c1adcee9860442529b957a92ddc3a40391859e3b853b95c8e2159cf2dcfcf70ad4d6b7b55386f37"
- },
- {
- "name": "test-12",
- "keyA": "0xd0ae54b6b72ddc5b8ed416251671bb488f9bd18e63fc60ed10dbcd12920d2f65",
- "keyB": "0x2bcfd3837358a43cb181613ebdb152d72efc9fe7dada0c6bc44eb84d61070e2a",
- "shared": "0x049f2d2eb2a6ba4937ab44c8ab1769c4b64b74b4d187f965c5ec1272cbe53d79858c8bcadfc17a37d95633da3881fb0e2900a1dfd1ac7160d67fa3dbd81b3de268"
- },
- {
- "name": "test-13",
- "keyA": "0x14dbcd45b32a3ece2adb1691352096d395354928f7ceb5197c85cfe95b4e23eb",
- "keyB": "0x111ed2f1a9fafbe021cb07033f0a1d45084fbb6b2facd008fe1d89e7ad029ae8",
- "shared": "0x0441389bf60228a087c317d6a07b41ce9da09a4749c6b595ba5d8deef7eb7d8c21d266450b3df6a2a2d29ed149e909b3381604c74b5154da7cdcb9bb26336a6aa5"
- },
- {
- "name": "test-14",
- "keyA": "0x3e7d474097eb34d76c38d4bc586f9cefc3bed6d8c172e4e5fea4016e0f820e1c",
- "keyB": "0x3d8c224427a5cc554fd064020017c20f655c347f344afa68d133b1e3b8bfb0d6",
- "shared": "0x04acd1f4ff562dd474f6ecda6f94b9d6eac65c497f0b103f1b6bcf03fd306f82505d5c5aa9de302f9c0577e479392795eaa13d68e2c6fe665ed7dc249d5a9ca7bd"
- },
- {
- "name": "test-15",
- "keyA": "0xa79deef7a811761554cc019967eeb15ad61b6a69b266e3a091c1e00d3bcd2057",
- "keyB": "0x43fcca9678c66d1ef35617ade47cf015f75da19d1b7189144a0be0c1631a4a00",
- "shared": "0x0470131669ac84dc65ada0c23469b39cc42a54df3482577427a7aab58bddaf13dc05469397717be0882fa7c37b8b7bbfbf49b500d1f17a3b6fe8c7f233eb2ac2b1"
- },
- {
- "name": "test-16",
- "keyA": "0x1945930000f6a3bdf339d5b632c3864f9ce8a0370243dd2bdcf805aa8f9e80e8",
- "keyB": "0xa97c423f9cc5827730b33ba804d15c8c97406f154a71561e3ed263299781e591",
- "shared": "0x0414fca0eb5db9d0b52f64b5e7b794659e87f2ee6816e83076d1e16446f5e9646fb1dd042027eee659363958d472f4a38f9bc400556dd85c7802eb1b87d4250581"
- },
- {
- "name": "test-17",
- "keyA": "0x5f6e300343975539ba132a6bf26c2b3fa827ee558bb6698c86bbc84ea8a71577",
- "keyB": "0xc015b1dddc249815a81d9c7f54f4676b10a3ec321d9d0ddd35b800557fed6431",
- "shared": "0x0476371203edee28e291a2b0fabccdf1018c395b090a8ffff2feec116d3cd103e6d3fa1ea02ddecdbd392dc076ea959c318abf2d69c06e35a92e4f09249d4d73b6"
- },
- {
- "name": "test-18",
- "keyA": "0x3f4f0a728833e864f96e202060239743ceb1150cc75094195e6bd4f53e7bf62a",
- "keyB": "0x5a7b89392da6f39464967d315ecfbe8822b75062d68f3a43cc2a928a6abf2993",
- "shared": "0x04959db3cb80d503579bc587399d09b043778c66115d1354ce449e060d3599bf2faa4adcf7da0419aa0af732ab5b82fe3ed68e5e5860dd2f6610f3f4f2ca7351eb"
- },
- {
- "name": "test-19",
- "keyA": "0xc3106be0925e0d69703e4ea6d3dbee7903a8b8bb293ae59b2f90b0efdb0b3a1a",
- "keyB": "0x44cf9575f03af5afc03c36f62433ebd52579d894c759cab76d29a4b9d0bae083",
- "shared": "0x04a980b037da455ec856a7e3a9f63e8b9daf73f8e1e929f3f10e2c4b603b5bca48264c057ce04a25f5f48d87d27a43f7192aaac3340d7d5972e2ad3efc5de20c13"
- },
- {
- "name": "test-20",
- "keyA": "0xb6c7bd2ba0d2b30d3e56d038398c2c937fb5cae348accdc060fb882903312008",
- "keyB": "0x9ed8d5fb02fa0e825e7e095cfd32f9e817e8cd030c4363470f55d17e37cf73ef",
- "shared": "0x042aa9b64ce873f5a3005a8eaee54e823f17633eec0a808ce0e24286f3c169485c2b7145f10deee39073056ce69c7d8bbbd2ff693b33b8749ae2b2f47e2e342397"
- },
- {
- "name": "test-21",
- "keyA": "0x9f44756603bca7e87e2dd718ef2323f12854056aae86dc9e31715f97c0b3dc12",
- "keyB": "0xd1ae23664d6320f9989b031cd7357fe346e207ffe73ed51de7c485754b8f1578",
- "shared": "0x04037ab94245dad8282b4fabfec79ae5ca26367db2f45a183eb4c0f0c9ab7bf0d2b33503981159468f660711fb956eb730675b1e34f1e7d0aca07b936b64c47d56"
- },
- {
- "name": "test-22",
- "keyA": "0x4c6307b149f1052290dc0140d6d597c25ddd23bc0ca826a9f44215009d13dad5",
- "keyB": "0x9845254fdb40c7c74d0f9f3c6f73ce97a27f4306368685448b1f72dfbb3dd5d9",
- "shared": "0x04f0ea5528a2efa16d424dbc07d49d3d2943e842289c6472f1cdeded965438326af76bb47449b417ef3b82130096f3c019d0ae3ffc3c9631f065a3285ba8539bfd"
- },
- {
- "name": "test-23",
- "keyA": "0xab6ac9d67466cae30d31584104970e1093ebda6690dc9bf7bea1f66f07ddfcb7",
- "keyB": "0xc0f58e549e7984e780cbc307b2a6b4c4863302474d271637586fa7cc0e389df8",
- "shared": "0x045d5fd0d76d168b746462231a5bfb07fc175f43b206622781614e3df3491ba4c3738c4d3ae2d7f18ab0570c86aeb139778219fcc57cac3d42726de0f38d31b52a"
- },
- {
- "name": "test-24",
- "keyA": "0x5b0e950974450f38dba31e01379814f0ed1b0f983cfda62dfecff5cd3e8db391",
- "keyB": "0x4739f9e168dee9af2c8a9107b18738c9e3335115af8a431810ecce5269fba577",
- "shared": "0x04da8ab5cf841804f0b5845f36e46e3463dfa3d6d9e7a306962062b729c680b2e8fdbf2b3eb2bdcc90d2884b9217dbdb3ad3620cd844982f19920e5d4f59353504"
- },
- {
- "name": "test-25",
- "keyA": "0x9f3583cffcbe992d4a537defb5d8479c2bfa96a39a3f33fcf40123854bc96ea4",
- "keyB": "0x42fe9367ef668babd70d4f5e836627cc78990b8a1738a56adf23baebf9410b48",
- "shared": "0x0414edfdae5d2db370a51b5cf45ee6049621f52dd15eb5136c795ed364221c0a5c0f32e9ebbc9211b121ccc06516756e9280b210abe5b1a8f6c658dc69c39341f5"
- },
- {
- "name": "test-26",
- "keyA": "0x289406a24a7794b04469a4acf9846e905ed4cae37349101db835f90e25d09605",
- "keyB": "0xb2d58cdc470106c12f538b4516559d8ecaad0bcae063848a44f8639168453b93",
- "shared": "0x04a9a80e466ea54aa0651eccde081e47637d2c142e1aaaf42572ee0753a49f7667c94b99f5bc2bf632b1330e3ffef95d009560e61084cbc07aab020282af5721f9"
- },
- {
- "name": "test-27",
- "keyA": "0xd9bcf36ef585f59e1570904784f0a3df6435c798bec7e1c406e922d51f98b510",
- "keyB": "0x40244928c9d371a427a0ce96530120deee3d31af086db679ee6bd8c1a7773030",
- "shared": "0x04ac55594d87dfdd8af303c5f92745d49fba6ff15afb628212bc5d432d97bbd909938873c298fb93c851d901bf178e14ef1d590ff0dca7f7ead5613e97e3a824db"
- },
- {
- "name": "test-28",
- "keyA": "0x301b79d85431a2c8bc21236cc58e1221eeb0862d3e3cfb29534423e6992e7591",
- "keyB": "0xe6a62f0c49971b7b11477fc964d777de92267ab09f1465520ca31edcd7abaffe",
- "shared": "0x049b7326b33eacc5ee3c102cae791d1835219253b70596f6a36892f2bb35fda1aebd661c781ac38b2461ac67b80ea1c18cd0230d024712a4e1826a6c5463874b0f"
- },
- {
- "name": "test-29",
- "keyA": "0x49542517ff2bd70e851405cf285cf2280f84af838e2b0a68ed779f96d0ce62eb",
- "keyB": "0x48ffc78034851d2f4e610bc11b97c21d42f5d7bbada2415ee8f03f6b643c92b7",
- "shared": "0x04dc12a233b08ff25ee7806cfede3565dedd663e0cd25108ad233b6c5c8f8c25fe82d4b2820fa44e0ef86d51d0eada0033854a1199644204f9233887e457775bb0"
- },
- {
- "name": "test-30",
- "keyA": "0x6597a9b39b58bd47561fd4058894ee327368fdd8b8b267efa0596793c3852ed8",
- "keyB": "0xbcab19f22f0cca9fc791f998a5717bc4c81853ff4f1c974a7dde7ecef41b4802",
- "shared": "0x043d622a7f3255437c9f6459e68d5e3333d377b76ac053a50affbdf88c555508c42000b092dbb07b72ecf5887766ebb2e47afdb3d8324b7938d9255171d971b1a8"
- },
- {
- "name": "test-31",
- "keyA": "0x4127797885e7b8b7c882fec5cf38be273f42de47261e8ea4aab49769d606dd01",
- "keyB": "0xc82a9b18f2f060adaf4f7cf56f29a2f4859d12a452b8b9f079f8850423fba666",
- "shared": "0x045e7b62ced9cebd94d2115b11f2e9ca6f9a66119a17296613a60439d2960747f927c305822fe15582bb62f48c574aa7c89e7b2c8e5d4affc86f097e794bdf029d"
- },
- {
- "name": "test-32",
- "keyA": "0xf5ffbd9bf88dd867ace131df25fc9bd9ab87b7834d91786f110f40eb2e7b73b2",
- "keyB": "0x203fe0bd83081d65fe45f194c373dd84c61fcdcfd4783d18e0e060f56efde038",
- "shared": "0x04cddff70996f116a874442da0a33ac3df0e99f063bd1066644e6ca88442bda15d5b46fe8c6de7467a13c65febf4a6d258ffae99784c21fa61fa8a3b384b666154"
- },
- {
- "name": "test-33",
- "keyA": "0x5073d19c09be03d0c41cef0b950e13b85ee87c4c1642061addbdfd34c3258618",
- "keyB": "0x37cf3617c1728e613c738c9b61fc84b76490128b3a584a861862416b1bb5ca60",
- "shared": "0x046234004e627b076d7bb6b6aedae341ab755f5f3dbca295fb2a70ae3206f26543c8f031605764e7dfb377a12c0be3a61df6983707ba62955487cc36ba8e8c0812"
- },
- {
- "name": "test-34",
- "keyA": "0x0378dd63bb9f1fd4b0b7c266239ca574c7f6f7ca62645b3e9edcf763918eb110",
- "keyB": "0xfd144b5e82bb6dbbcc9e9b714d64e283b748e85ba93b0113727fc1670251c6dc",
- "shared": "0x0481f04971c2282e9850ee373aba6ec92390e3ff12b95d86d339dfce7dfa592f012ef71875aba27adec232a90f209f420c6e7c73fd40f165ba9b6196a10ca5e82b"
- },
- {
- "name": "test-35",
- "keyA": "0xfa99235e06ec83c103ab50653ff5af505b085892781a6e743c7398219562ffe4",
- "keyB": "0x6a8850083fdf6ecb9f9bdb613f1c6706fe233e2e74fad460f7c650751bf999e9",
- "shared": "0x0407117676960073ab08890efd07eb6222584b2c8ad9a1eb64f9e610138c10a4d59f4ca496910ac35a1fad24e56fc08020ffac2dfabb2d79bbcc041e70dffb203c"
- },
- {
- "name": "test-36",
- "keyA": "0x3abcf36699a174e462196891e49e72759f707d7f82ae5e64a49f1273927802ae",
- "keyB": "0x44212cd650066f2371908cc6ba520061745db823c64b8b99dae535e364fe7034",
- "shared": "0x04c354916600479cbbf9d91f5b851ee075f0aac99befa434f3f3b30fa887a0a7af71129ea47b388ac41538a71f9e52f68473ccc2611ace7cdd999ee036bc43b459"
- },
- {
- "name": "test-37",
- "keyA": "0x858512678a61f3d286fd1a90cb8fb8960d8cffaa31686706d0a879d66acabc7f",
- "keyB": "0x490e29655cb5da0dcd2f60e4583cb41b7ad9a801fbc00a2927968f06b0c14852",
- "shared": "0x040dde94c952ec15bcba15d773ba0dfa9cb5ed7731cda1b7f8110fa91f843173f83d577f601b61f2df21b9f7cbf2b1d54792a6f9403c2446a480af7b69e23b8d21"
- },
- {
- "name": "test-38",
- "keyA": "0xaeb4d6c2a817e5882f991f0c3c81d0f6f2d3d8854d472511a211cae67adae695",
- "keyB": "0x72c297384a02544ba9719c0ce1f0ad3cb4e89b57536880f65c0462d1f058a55f",
- "shared": "0x041a61bd828eacb1aaacbbb3b0291d691f5fc1462f16fc55f828b1f28e73342957de6b718501e66c3a1885ce16e124adb600457095ba770f58be012d0b69ca949a"
- },
- {
- "name": "test-39",
- "keyA": "0xb0fc529ff1bb4a7985663d54b279cbf4a597ec922a810ca16b87697ef3ef0dd3",
- "keyB": "0xaf6019921bc7db54c334102a766d32d3ff06fd68ed08efe8ca2a35ce5074dcd0",
- "shared": "0x04b49b24610350fde84bf067affc1d9f7ac549b3c4c05fa963aade41e65d6645cf867466f6c87e11298cb433f45f65eec4c5d88e76acdd5515a92802ded42c6e0a"
- },
- {
- "name": "test-40",
- "keyA": "0x160fdb84df11195fb0d33335e593499c3505cadce25ffdf6cdd8af0cb78d400c",
- "keyB": "0xb37568a52ead1debcb2d402fa3d58f212a37321aae2cea1b90b263a3276bfdce",
- "shared": "0x04091c2e14e517d9990425bb5d0a9e48f3bfe27a1cb673182fe1f7dc27bd6a56043a7745c9d27052e60ce72a1d82357f6675fadf9994add784c45821f52f2b094e"
- },
- {
- "name": "test-41",
- "keyA": "0x253ca7443d94998bab1f508e3424c662831c6be6ec5d387e97c79f078087ff15",
- "keyB": "0x38102245618fddf8a1bd7de152c6fa630523223b89a1649d5f2fa5f9e47ffe4a",
- "shared": "0x04046754be94d9ad925f67b1bc80fe32cd6920f9f80327cdc83f68e95d999b1d8ab7b41844db1c1ea66662b42737169daefc675c9364583565e3982b674d8a30dd"
- },
- {
- "name": "test-42",
- "keyA": "0xef558874b5b1d5915c83e3c1e4554d73de1e9943af445eba3f6516b731cc0126",
- "keyB": "0x956e32c2e87263215b8c31c7f2e7311d6acad863f3c428b0625c9376cbc405cd",
- "shared": "0x047e9265334e20ad8747098147b0eabb6d01c8ab12722cf0bbede05c1beaa67e8e770e04e19cf6035f48289fbe85cd4b9496a9ca5a90d088f8e75a0c1c6c7f1cc8"
- },
- {
- "name": "test-43",
- "keyA": "0x32c00e0d3a2ba3db6685058e1327dcee6425068190890439391fdb95857f27b0",
- "keyB": "0x8b39021f7ad57a101534977d323c0349cecc8405d93286c6e71a441f4cc16c86",
- "shared": "0x04c8095c862e64f6866fd3c177ed898fa3ca5da2d585c60ea4646d8f2cb9f332dbd54ca9d3b2a9e852a15189a0eb97a8edfaa114a01277418aa2ecfdfb3770caa0"
- },
- {
- "name": "test-44",
- "keyA": "0x40627c6987e20c07014833e23a0b9304bbaf66525a59b892e224944b56d3117a",
- "keyB": "0xe23607bff98d5699816836f65e5405f2e60d4fe2449979acd43ee2b3e9bfc218",
- "shared": "0x04be3ec3c188e7c74944d42beddf19003aeb0ccf8cccf8532b220dc666520f277e8b98b87ee694e8c76256e51ebf69433479c69a4ccef3032e9cb550632db539f8"
- },
- {
- "name": "test-45",
- "keyA": "0x46c25bcd7d2f8ce6d27148a11f18e0314046260433f8cc6421be4dcd72a6e088",
- "keyB": "0xf29022ca90a60d455d0b1470034d1c7fbba27a9997b1940a9373a97d092f965e",
- "shared": "0x041f5fd1dd02afa8ce5d2877a05ce92a4db5aef022a8203551590343352c1bd6e71cad811974a74f49d140949aa091dc4262cf7da0b48bdfa26939cf4b9c461f52"
- },
- {
- "name": "test-46",
- "keyA": "0x6d6b69d4f9fafd986e5b1a9c36f3021aae9ce64c027f1bf9bd9e9e12d86a276b",
- "keyB": "0xeed0cabb4ae5a696e762c98e6d697bd88a89d9a0b38458c6e696f0748e404fe6",
- "shared": "0x04f2f9c8fa945577d7188292f5c4a4fad80bdcc3db44d6d5c15bda5a23971ac7046cb8af44bb5864a9e0e82c921805663c539a22f8c5ef22187062564f1359f4d2"
- },
- {
- "name": "test-47",
- "keyA": "0xf6b6d733b8c473a562f7a23c7cbb23f40273d809d13aeb308149ad709c674300",
- "keyB": "0xd873a7d24c1f498a43c181f566f265cda248f9e2df8a825e69a73aeb1437dad9",
- "shared": "0x0495f669c1c7271be4c8e628017ef570a0cb903887c3ea4897f09cc9ecd2a4f6b043e1fa41d1ddbf8f01e60368bc95e81ae2a8bf4922374294b0836ff7e43ad2ab"
- },
- {
- "name": "test-48",
- "keyA": "0x28410a640558a5da5b7746a46a9cdefc704ba2944f23699d3767f6505a97eb78",
- "keyB": "0xfd1a548275be4d922cc294276d7b059cea0fbbcb629be29bb8072de597a96597",
- "shared": "0x04fca25ec051c8532f664fe2c2e213d1bd3e298422232dd34e821245256e0bff4ff80fb1f03524fd57d1d4a6effc076899cc21dde0be10d60016c20c33b7524d00"
- },
- {
- "name": "test-49",
- "keyA": "0x89e51abd416ad4579d523bed183da74b991c589decb982649a0abedfe6061c0f",
- "keyB": "0x22b4cad2ade397b86756c2457516cd23d0858700b0597fdb2433e891efa435e3",
- "shared": "0x049316e68898db5d7c987fbfa371b1fbd6a56d585bde1017a825d1dfaad406b428a505e773e63ddd0244b0e25ddc1b08dda6dd9968673f7b10c40d8fe8a1e1d55f"
- },
- {
- "name": "test-50",
- "keyA": "0x2c645e1abac8e5848617067e6c3d739a6f126484d27f73bc8fdfdc9f0ac3ff04",
- "keyB": "0x71252585fb806d9273c0103dcf642b419e7632ef3aeba3efc6c71863b50ae177",
- "shared": "0x04886ec11347e30fc5e68a353201d702c4425358791ea6a6213c444c7489e38103c953fe13f4238dbe769f0d6208f693e356f81e7037977cf8a5b04661e37d2569"
- },
- {
- "name": "test-51",
- "keyA": "0x572a1ce3adfc10ca3afc39262d36c329ba44d7cfa6ca5c62d2e882ac25480d47",
- "keyB": "0x2b9081d499417315277663c86e25dd7898ea67e969b632dd11e80d29e92b557f",
- "shared": "0x0424c5ae82f447c156d97ed31c83f36cf3416cb4a72666bb4e8a61687a4ba4ae22b42f7d18579ff204f7974af9f8dcc51d8f9eabc45c720f607478ba78c2b2921c"
- },
- {
- "name": "test-52",
- "keyA": "0x60ba350fb7e0729ad992f53a314eacce65da6897856e362d2ef0959e890b9e99",
- "keyB": "0x6a9629c655cf4f8b8816e95df1c14f769cb946431c6da17a04423ceef8979ee1",
- "shared": "0x04831e236ece1bde7db14b819c06e0a17964b88b5fc4e8253a8dc316d613fad8ffdb5117eb920f34ce838d6861caa0e885e3c20d37cfd20e19d1092d52976e0f91"
- },
- {
- "name": "test-53",
- "keyA": "0x32eb6769ade64560a016e080f5e16ea97b2d0cb96b730e9c5c809bfd19a002c4",
- "keyB": "0x7dff2eb8455b0e9c0fd38838db3d3de96067a6efc05d21d1bb303ca0bd52d87d",
- "shared": "0x04b0cf54b0590546e434a5e3d2071c3c022d4b3b571660b359cee7d199e525965e9f38d12436affda7741d5b752e0b430149a1ec6d7835a6999e64b3ea324e91c6"
- },
- {
- "name": "test-54",
- "keyA": "0x70446e5ede6e26b96d3cecfe8afc35055a0a90f83c7db4d1b8a819d5cddb6642",
- "keyB": "0x2df217bf6e92875e35af50bfa301059b2ddf593c0694b70116a8c87ee27ef4c9",
- "shared": "0x0458e1554b06a40b9508d86d5cedeb3dccb82053881393306b1894d198412500dc0efa4dad2265d7532e59d06f71cf33f3d48728b4707434a5c722eea8d9a9acbc"
- },
- {
- "name": "test-55",
- "keyA": "0x64e16f672ec5aba6be5a4965d44bd7224aae65d444ceee6dd58690e527b36186",
- "keyB": "0xefb054ff4222e8e493cb667f56129dc1b6a3437581280a3f984ff0ea09ec3029",
- "shared": "0x04c806576fb79b4d7d38d00a3ee2c2896dfb1b29ef3a42ac72a82c7bf7626f2073a79aec8ee2c3c101845ce5171b27a9f23075ed74ccdae088956e3dcdbae74e7d"
- },
- {
- "name": "test-56",
- "keyA": "0x284a5592ab3fa9b8df2bf927761a667118697cd7413c255ef3cce9e9de76c321",
- "keyB": "0x52d0033d83fbdeb0b7c8d21b475ec637fabfcc7c2593494d7e846ecd974083af",
- "shared": "0x04e092613c7552c3180bdb041c32b9763804e6703c2c116009f1012526002472b5b627a85cb50c90942fe177bd36e2d4fbd8e9d835c72a607ee07ffead29cf12eb"
- },
- {
- "name": "test-57",
- "keyA": "0x488e6c2d97fe0ff3f5357254658ae487ade54bdf7bf871ffdfe27079cbeff103",
- "keyB": "0x00f8632a6982d58c25236ce1952c19052f6b08edad61edd166570a8679a98f5c",
- "shared": "0x048f02436bb55798561a6a78aacbeec67f0acd8ba88e99af6ec1b7b5152d9a5d7691a905c11fe26c2ba3d72be918f6ee7c3e66115a31a7f199f33073f6f5087181"
- },
- {
- "name": "test-58",
- "keyA": "0x0067fd2eec16c7ddf9a364f591d47394bfc12fd2b3ccff1bf1013e92e969f6f0",
- "keyB": "0x76f1e3f4abfb237ec3ac6e72a56f25bfa06e7561bc5fdc4823282f9db40c49d4",
- "shared": "0x04975e88ffcd670b06e7752d3d375613d0cd614f2b3a812e684342dcc16be6de336af2bb30ab25da0362ecf43752b477b412081d723f5c6840ea78deacd5f76b4a"
- },
- {
- "name": "test-59",
- "keyA": "0x4ff02743564c317a3578c08f7961a204d48e511e31688ba069037f6090235b37",
- "keyB": "0xcf22489e1b9058b4a645e38504eaa32e031dea44e1465eb1122e14e4847c9744",
- "shared": "0x04e584b571a9f99087bc6cb7818741cfc3b630ec412f64da1ada72de17279afa60258c5844cc2c7c1416548497b083f2aeb035c8945c0aa03a25b97bad7870c136"
- },
- {
- "name": "test-60",
- "keyA": "0xd140deee768594cea37e2eb5c89c60228083f93866ebd62c7c07a1a9f8a9bf58",
- "keyB": "0xc9f2edf7ccd6db9f21ef5a3966ee11694dec652d60ef21a540802db8b990c370",
- "shared": "0x0451b4a54b1fcdcbe4f5b97b3003bce3cc91f362cf2baa696ad0abca3cd21b12d4e4f3d1b0dc1c18599917f5fc9be7825d23999769d3811edf61a7ecc34525b403"
- },
- {
- "name": "test-61",
- "keyA": "0x63dcf1d3db0d89a37df3734e88f601412a184030f15474a0d9687e3105361161",
- "keyB": "0x5370bec049bcd28507f4078783d9378cd84b8e05230089e8987d3a485c945b08",
- "shared": "0x04e27e5ec5eb72fa6bda376f832b4730d6f7b9104594fa191ac87198f0d4aeed47c79568cf8f59fae0e43e8bf0931c491eda0cce1f19efc4153aacde94e673ba7f"
- },
- {
- "name": "test-62",
- "keyA": "0x465d0d758d8c7664d9e1bfa46fb5fb8e27265cb4bc28c0f7752d596910545028",
- "keyB": "0xeff55416a21e627ec4c55a08c9a3f7378ae2953fd5bf0926bde15965cf6b4d5d",
- "shared": "0x0487b20dbad3b5443594fc66470559206c37440a01ef91c24c38a51bc7bcf7676409789c6bc214087947ab8d0359927080422b2ecbd23e765bf6a79e4bbb456796"
- },
- {
- "name": "test-63",
- "keyA": "0x28469aab3ebc9efdec35b19e7c42a26311c649267ac92ae2ef2f5c8880eb517c",
- "keyB": "0x786e828e92abb73818380b37395c67dcb6a72f3e0a440bdf1f5f132a0621fc78",
- "shared": "0x046bfff91c9b31abb6df020018b66734c7f9fc4f7294c809c706b76c308982e5d75c10200fbdf67d75ba4b154223f591bfe3504006ba69634d4025c57b9af4ab73"
- }
- ];
- for (const { name, keyA, keyB, shared } of tests) {
- it(`tests shared secrets match: ${name}`, function () {
- const signA = new SigningKey(keyA);
- const signB = new SigningKey(keyB);
- assert.equal(signA.computeSharedSecret(signB.publicKey), shared, "privA + pubB");
- assert.equal(signB.computeSharedSecret(signA.publicKey), shared, "pubA + privB");
- assert.equal(signA.computeSharedSecret(signB.privateKey), shared, "privA + privB");
- });
- }
-});
-//# sourceMappingURL=test-crypto.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-crypto.js.map b/lib.esm/_tests/test-crypto.js.map
deleted file mode 100644
index fd92acaf..00000000
--- a/lib.esm/_tests/test-crypto.js.map
+++ /dev/null
@@ -1 +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CAAC,CAAC;YACjF,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;YACjF,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash-typeddata.d.ts b/lib.esm/_tests/test-hash-typeddata.d.ts
deleted file mode 100644
index ff782691..00000000
--- a/lib.esm/_tests/test-hash-typeddata.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-hash-typeddata.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash-typeddata.d.ts.map b/lib.esm/_tests/test-hash-typeddata.d.ts.map
deleted file mode 100644
index b415412a..00000000
--- a/lib.esm/_tests/test-hash-typeddata.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-hash-typeddata.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-hash-typeddata.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash-typeddata.js b/lib.esm/_tests/test-hash-typeddata.js
deleted file mode 100644
index a590b0dd..00000000
--- a/lib.esm/_tests/test-hash-typeddata.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { TypedDataEncoder } from "../index.js";
-describe("Tests Typed Data (EIP-712)", function () {
- const tests = loadTests("typed-data");
- for (const test of tests) {
- it(`tests encoding typed-data: ${test.name}`, function () {
- const encoder = TypedDataEncoder.from(test.types);
- assert.equal(encoder.primaryType, test.primaryType, "primaryType");
- assert.equal(encoder.encode(test.data), test.encoded, "encoded");
- assert.equal(TypedDataEncoder.getPrimaryType(test.types), test.primaryType, "primaryType");
- assert.equal(TypedDataEncoder.hash(test.domain, test.types, test.data), test.digest, "digest");
- });
- }
-});
-//# sourceMappingURL=test-hash-typeddata.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash-typeddata.js.map b/lib.esm/_tests/test-hash-typeddata.js.map
deleted file mode 100644
index 0e7cd1f5..00000000
--- a/lib.esm/_tests/test-hash-typeddata.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-hash-typeddata.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash-typeddata.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,QAAQ,CAAC,4BAA4B,EAAE;IACnC,MAAM,KAAK,GAAG,SAAS,CAAoB,YAAY,CAAC,CAAC;IACzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,EAAE,CAAC,8BAA+B,IAAI,CAAC,IAAK,EAAE,EAAE;YAC5C,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;YACnE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAEjE,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;YAC3F,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnG,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash.d.ts b/lib.esm/_tests/test-hash.d.ts
deleted file mode 100644
index ca5de7ae..00000000
--- a/lib.esm/_tests/test-hash.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-hash.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash.d.ts.map b/lib.esm/_tests/test-hash.d.ts.map
deleted file mode 100644
index 4edc9d4b..00000000
--- a/lib.esm/_tests/test-hash.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-hash.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash.js b/lib.esm/_tests/test-hash.js
deleted file mode 100644
index 4b5e8d5c..00000000
--- a/lib.esm/_tests/test-hash.js
+++ /dev/null
@@ -1,177 +0,0 @@
-import assert from "assert";
-import { hashMessage, namehash, isValidName, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, isError } from "../index.js";
-import { loadTests } from "./utils.js";
-//import { dnsEncode, isValidName, namehash } from "../index.js";
-describe("Tests Namehash", function () {
- const tests = loadTests("namehash");
- for (const test of tests) {
- if (!test.error) {
- it(`hashes ENS name: ${JSON.stringify(test.name)}`, function () {
- const actual = namehash(test.ensName);
- assert.equal(actual, test.namehash, "namehash");
- // The empty string is not a valid ENS name
- if (test.ensName) {
- assert.ok(isValidName(test.ensName), "isValidName");
- }
- });
- }
- }
- for (const test of tests) {
- if (test.error) {
- it(`correctly fails to hash ENS name: ${test.error} ${JSON.stringify(test.name)}`, function () {
- assert.throws(function () {
- const actual = namehash(test.ensName);
- console.log("Failed to throw", actual);
- }, (error) => {
- return (isError(error, "INVALID_ARGUMENT") &&
- error.argument === "name" && error.value === test.ensName);
- });
- // The empty string is not a valid ENS name
- if (test.ensName) {
- assert.ok(!isValidName(test.ensName), "!isValidName");
- }
- });
- }
- }
-});
-/*
-describe("Tests Bad ENS Names", function() {
- const badTests: Array<{ ensName: any, prefix: string }> = [
- { ensName: ".", prefix: "missing component" },
- { ensName:"..", prefix: "missing component" },
- { ensName:"ricmoo..eth", prefix: "missing component" },
- { ensName:"ricmoo...eth", prefix: "missing component" },
- { ensName:".foo", prefix: "missing component" },
- { ensName:"foo.", prefix: "missing component" },
- { ensName: 1234, prefix: "not a string" },
- { ensName: true, prefix: "not a string" },
- ];
-
- // The empty string is not a valid name, but has a valid namehash
- // (the zero hash) as it is the base case for recursion
- it("empty ENS name", function() {
- assert.ok(!isValidName(""), "!isValidName");
- });
-
- for (const { ensName, prefix } of badTests) {
- it(`fails on bad ENS name: ${ JSON.stringify(ensName) }`, function() {
- assert.ok(!isValidName(ensName), "!isValidName");
- assert.throws(() => {
- const result = namehash(ensName);
- console.log(result);
- }, (error) => {
- const errorPrefix = `invalid ENS name; ${ prefix }`;
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "name" && error.value === ensName &&
- error.message.substring(0, errorPrefix.length) === errorPrefix);
- });
- });
- }
-});
-
-describe("Tests DNS Encoding", function() {
- const tests: Array<{ ensName: string, dnsEncoded: string}> = [
- { ensName: "", dnsEncoded: "0x00" },
- { ensName: "ricmoo.eth", dnsEncoded: "0x067269636d6f6f0365746800" },
- ];
-
- for (const { ensName, dnsEncoded } of tests) {
- it(`computes the DNS Encoding: ${ JSON.stringify(ensName) }`, function() {
- assert.equal(dnsEncode(ensName), dnsEncoded, "dnsEncoded");
- });
- }
-});
-
-describe("Tests DNS Names", function() {
- const badTests: Array<{ ensName: any, prefix: string}> = [
- { ensName: ".", prefix: "invalid DNS name; missing component" },
- { ensName: "foo..bar", prefix: "invalid DNS name; missing component" },
- { ensName: ".foo", prefix: "invalid DNS name; missing component" },
- { ensName: "foo.", prefix: "invalid DNS name; missing component" },
- { ensName: 1234, prefix: "invalid DNS name; not a string" },
- { ensName: true, prefix: "invalid DNS name; not a string" },
- ];
-
- for (const { ensName, prefix } of badTests) {
- it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
- assert.throws(() => {
- const result = dnsEncode(ensName);
- console.log(result);
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "name" && error.value === ensName &&
- error.message.substring(0, prefix.length) === prefix);
- });
- });
- }
-
- {
- const ensName = "foobar012345678901234567890123456789012345678901234567890123456789";
- const prefix = "too long";
- it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
- assert.throws(() => {
- const result = dnsEncode(ensName);
- console.log(result);
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "value" && error.value === ensName &&
- error.message.substring(0, prefix.length) === prefix);
- });
- });
- }
-
-});
-*/
-describe("Test EIP-191 Personal Message Hash", function () {
- const tests = [
- {
- test: "hello-world",
- message: "Hello World",
- hash: "0xca6464b285e602e01f3261caa151da2bd35fe19cb3532f7acd0d594ca0d810c5"
- },
- {
- test: "binary-message",
- message: new Uint8Array([0x42, 0x43]),
- hash: "0xd2ca8706bdbb1255b510b6acf42339faabf95bb8192cc7c562a6019ad8463c60"
- },
- {
- test: "hex-looking-string",
- message: "0x4243",
- hash: "0xcfe58e0f243f48080feeeb86f9b27e35f65955d3b39a644478c376b2733d9804"
- }
- ];
- for (const test of tests) {
- it(`tests hashMessage: ${test.test}`, function () {
- assert.equal(hashMessage(test.message), test.hash);
- });
- }
-});
-describe("Test Solidity Hash functions", function () {
- const tests = loadTests("solidity-hashes");
- for (const test of tests) {
- it(`computes the solidity keccak256: ${test.name}`, function () {
- assert.equal(solidityPackedKeccak256(test.types, test.values), test.keccak256);
- });
- }
- for (const test of tests) {
- it(`computes the solidity sha256: ${test.name}`, function () {
- assert.equal(solidityPackedSha256(test.types, test.values), test.sha256);
- });
- }
- const badTypes = [
- { types: ["uint5"], values: [1] },
- { types: ["bytes0"], values: ["0x"] },
- { types: ["blorb"], values: [false] },
- ];
- for (const { types, values } of badTypes) {
- it("correctly fails on invalid type", function () {
- assert.throws(function () {
- const result = solidityPacked(types, values);
- console.log(result);
- }, function (error) {
- return (isError(error, "INVALID_ARGUMENT") && error.argument === "type");
- });
- });
- }
-});
-//# sourceMappingURL=test-hash.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-hash.js.map b/lib.esm/_tests/test-hash.js.map
deleted file mode 100644
index e3ee6b48..00000000
--- a/lib.esm/_tests/test-hash.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-hash.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,WAAW,EACX,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,uBAAuB,EAAE,oBAAoB,EAC7D,OAAO,EACV,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAKtC,iEAAiE;AAEjE,QAAQ,CAAC,gBAAgB,EAAE;IACvB,MAAM,KAAK,GAAG,SAAS,CAAmB,UAAU,CAAC,CAAC;IAEtD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,EAAE,CAAC,oBAAqB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAE,EAAE,EAAE;gBAClD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAEtC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;gBAEhD,2CAA2C;gBAC3C,IAAI,IAAI,CAAC,OAAO,EAAE;oBACd,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,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,CAAE,EAAE;KAC5C,CAAC;IAEF,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,QAAQ,EAAE;QACtC,EAAE,CAAC,iCAAiC,EAAE;YAClC,MAAM,CAAC,MAAM,CAAC;gBACV,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC,EAAE,UAAU,KAAK;gBACd,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-provider-jsonrpc.d.ts b/lib.esm/_tests/test-provider-jsonrpc.d.ts
deleted file mode 100644
index ea8edddb..00000000
--- a/lib.esm/_tests/test-provider-jsonrpc.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-provider-jsonrpc.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-provider-jsonrpc.d.ts.map b/lib.esm/_tests/test-provider-jsonrpc.d.ts.map
deleted file mode 100644
index f7049a2a..00000000
--- a/lib.esm/_tests/test-provider-jsonrpc.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-provider-jsonrpc.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-provider-jsonrpc.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-provider-jsonrpc.js b/lib.esm/_tests/test-provider-jsonrpc.js
deleted file mode 100644
index 8dab0428..00000000
--- a/lib.esm/_tests/test-provider-jsonrpc.js
+++ /dev/null
@@ -1,159 +0,0 @@
-import assert from "assert";
-import { id, isError, makeError, toUtf8Bytes, toUtf8String, FetchRequest, JsonRpcProvider, Transaction, Wallet } from "../index.js";
-const StatusMessages = {
- 200: "OK",
- 400: "BAD REQUEST",
- 500: "SERVER ERROR",
-};
-const wallet = new Wallet(id("test"));
-function createProvider(testFunc) {
- let blockNumber = 1;
- const ticker = setInterval(() => { blockNumber++; }, 100);
- if (ticker.unref) {
- ticker.unref();
- }
- const processReq = (req) => {
- let result = testFunc(req.method, req.params, blockNumber);
- if (result === undefined) {
- switch (req.method) {
- case "quai_blockNumber":
- result = blockNumber;
- break;
- case "quai_chainId":
- result = "0x1337";
- break;
- case "quai_accounts":
- result = [wallet.address];
- break;
- default:
- console.log("****", req);
- return { id, error: "unsupported", jsonrpc: "2.0" };
- }
- }
- return { id: req.id, result, jsonrpc: "2.0" };
- };
- const req = new FetchRequest("http:/\/localhost:8082/");
- req.getUrlFunc = async (_req, signal) => {
- const req = JSON.parse(_req.hasBody() ? toUtf8String(_req.body) : "");
- let statusCode = 200;
- const headers = {};
- let resp;
- try {
- if (Array.isArray(req)) {
- resp = req.map((r) => processReq(r));
- }
- else {
- resp = processReq(req);
- }
- }
- catch (error) {
- statusCode = 500;
- resp = error.message;
- }
- const body = toUtf8Bytes(JSON.stringify(resp));
- return {
- statusCode,
- statusMessage: StatusMessages[statusCode],
- headers, body
- };
- };
- return new JsonRpcProvider(req, undefined, { cacheTimeout: -1 });
-}
-describe("Ensure Catchable Errors", function () {
- it("Can catch bad broadcast replies", async function () {
- this.timeout(15000);
- const txInfo = {
- chainId: 1337,
- gasLimit: 100000,
- maxFeePerGas: 2000000000,
- maxPriorityFeePerGas: 1000000000,
- to: wallet.address,
- from: wallet.address,
- value: 1,
- };
- const txSign = await wallet.signTransaction(txInfo);
- const txObj = Transaction.from(txSign);
- let count = 0;
- const provider = createProvider((method, params, blockNumber) => {
- switch (method) {
- case "quai_sendTransaction":
- return txObj.hash;
- case "quai_getTransactionByHash": {
- count++;
- // First time; fail!
- if (count === 1) {
- throw makeError("Faux Error", "SERVER_ERROR", {
- request: ({})
- });
- }
- // Second time; return null
- if (count === 2) {
- return null;
- }
- // Return a valid tx...
- const result = Object.assign({}, txObj.toJSON(), txObj.signature.toJSON(), { hash: txObj.hash, from: wallet.address });
- // ...eventually mined
- if (count > 4) {
- result.blockNumber = blockNumber;
- result.blockHash = id("test");
- }
- return result;
- }
- }
- return undefined;
- });
- const signer = await provider.getSigner();
- const tx = await signer.sendTransaction(txInfo);
- assert(tx);
- });
- it("Missing v is recovered", async function () {
- this.timeout(15000);
- const txInfo = {
- chainId: 1337,
- gasLimit: 100000,
- maxFeePerGas: 2000000000,
- maxPriorityFeePerGas: 1000000000,
- to: wallet.address,
- from: wallet.address,
- value: 1,
- };
- const txSign = await wallet.signTransaction(txInfo);
- const txObj = Transaction.from(txSign);
- let count = 0;
- // A provider which is mocked to return a "missing v"
- // in getTransaction
- const provider = createProvider((method, params, blockNumber) => {
- switch (method) {
- case "quai_sendTransaction":
- return txObj.hash;
- case "quai_getTransactionByHash": {
- count++;
- // The fully valid tx response
- const result = Object.assign({}, txObj.toJSON(), txObj.signature.toJSON(), { hash: txObj.hash, from: wallet.address, sig: null });
- // First time; fail with a missing v!
- if (count < 2) {
- delete result.v;
- }
- // Debug
- result._count = count;
- return result;
- }
- }
- return undefined;
- });
- // Track any "missing v" error
- let missingV = null;
- provider.on("error", (e) => {
- if (isError(e, "UNKNOWN_ERROR") && isError(e.error, "INVALID_ARGUMENT")) {
- if (e.error.argument === "signature" && e.error.shortMessage === "missing v") {
- missingV = e.error;
- }
- }
- });
- const signer = await provider.getSigner();
- const tx = await signer.sendTransaction(txInfo);
- assert.ok(!!tx, "we got a transaction");
- assert.ok(!!missingV, "missing v error present");
- });
-});
-//# sourceMappingURL=test-provider-jsonrpc.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-provider-jsonrpc.js.map b/lib.esm/_tests/test-provider-jsonrpc.js.map
deleted file mode 100644
index 42887247..00000000
--- a/lib.esm/_tests/test-provider-jsonrpc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"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AAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-data.d.ts b/lib.esm/_tests/test-providers-data.d.ts
deleted file mode 100644
index c9920ec8..00000000
--- a/lib.esm/_tests/test-providers-data.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-providers-data.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-data.d.ts.map b/lib.esm/_tests/test-providers-data.d.ts.map
deleted file mode 100644
index 6e857143..00000000
--- a/lib.esm/_tests/test-providers-data.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-data.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-data.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-data.js b/lib.esm/_tests/test-providers-data.js
deleted file mode 100644
index 3d74effd..00000000
--- a/lib.esm/_tests/test-providers-data.js
+++ /dev/null
@@ -1,326 +0,0 @@
-import assert from "assert";
-// import {
-// checkProvider, getProvider, providerNames
-// } from "./create-provider.js";
-// import { retryIt } from "./utils.js";
-//import type { Provider } from "../index.js";
-import { getTxType, quais } from "../index.js";
-import axios from 'axios';
-import { stall } from "./utils.js";
-// import {
-// networkFeatureAtBlock, networkNames,
-// testAddress, testBlock, testReceipt, testTransaction
-// } from "./blockchain-data.js";
-// import type { TestBlockchainNetwork } from "./blockchain-data.js";
-//setupProviders();
-const providerC1 = new quais.JsonRpcProvider(process.env.RPC_URL);
-const wallet = new quais.Wallet(process.env.FAUCET_PRIVATEKEY || '', providerC1);
-const destinationC1 = '0x0047f9CEa7662C567188D58640ffC48901cde02a';
-const destinationC2 = '0x011ae0a1Bd5B71b4F16F8FdD3AEF278C3D042449';
-function equals(name, actual, expected) {
- if (expected && expected.eq) {
- if (actual == null) {
- assert.ok(false, name + " - actual big number null");
- }
- expected = BigInt(expected);
- actual = BigInt(actual);
- assert.ok(expected.eq(actual), name + " matches");
- }
- else if (Array.isArray(expected)) {
- if (actual == null) {
- assert.ok(false, name + " - actual array null");
- }
- assert.equal(actual.length, expected.length, name + " array lengths match");
- for (let i = 0; i < expected.length; i++) {
- equals("(" + name + " - item " + i + ")", actual[i], expected[i]);
- }
- }
- else if (typeof (expected) === "object") {
- if (actual == null) {
- if (expected === actual) {
- return;
- }
- assert.ok(false, name + " - actual object null");
- }
- let keys = {};
- Object.keys(expected).forEach((key) => { keys[key] = true; });
- Object.keys(actual).forEach((key) => { keys[key] = true; });
- Object.keys(keys).forEach((key) => {
- if (typeof actual[key] === "string" && actual[key].toLowerCase && key === "type") {
- actual[key] = actual[key].toLowerCase();
- }
- equals("(" + name + " - key + " + key + ")", actual[key], expected[key]);
- });
- }
- else {
- if (actual == null) {
- assert.ok(false, name + " - actual null");
- }
- // Modify this part for case-insensitive comparison for string values
- if (typeof actual === 'string' && typeof expected === 'string') {
- assert.equal(actual.toLowerCase(), expected.toLowerCase(), name + " matches (case-insensitive)");
- }
- else {
- assert.equal(actual, expected, name + " matches");
- }
- }
-}
-async function getRPCGasPrice(url) {
- try {
- let response;
- do {
- response = await axios.post(url || "http://localhost:8610", {
- jsonrpc: "2.0",
- method: "quai_gasPrice",
- params: [],
- id: 1
- });
- } while (response.data.result == null);
- return response.data.result;
- }
- catch (error) {
- throw new Error(`Error fetching block: ${error.message}`);
- }
-}
-async function sendTransaction(to) {
- let txResponse;
- let typeValue;
- try {
- console.log("Nonce: ", await providerC1.getTransactionCount(wallet.address, 'latest'));
- do {
- typeValue = getTxType(wallet.address, to);
- const gas = await getRPCGasPrice(process.env.RPC_URL);
- let tx = {
- from: wallet.address,
- to,
- value: quais.parseEther("0.1"),
- gasPrice: gas * 2,
- maxFeePerGas: quais.parseUnits('20', 'gwei'),
- maxPriorityFeePerGas: quais.parseUnits('20', 'gwei'),
- nonce: await providerC1.getTransactionCount(wallet.address, 'latest'),
- data: '',
- type: typeValue,
- gasLimit: typeValue == 0 ? 21000 : 42000,
- chainId: Number(process.env.CHAIN_ID || 1337),
- };
- txResponse = await wallet.sendTransaction(tx);
- console.log(txResponse);
- await stall(15000);
- } while (txResponse.hash == null);
- console.log(`Transaction hash for type ${typeValue}: `, txResponse.hash);
- return txResponse;
- }
- catch (error) {
- console.error('Failed to send Transaction: ', error);
- return null;
- }
-}
-async function fetchRPCBlock(blockNumber) {
- try {
- let response;
- do {
- response = await axios.post(process.env.RPC_URL || "http://localhost:8610", {
- jsonrpc: "2.0",
- method: "quai_getBlockByNumber",
- params: [
- blockNumber || '0xA',
- false
- ],
- id: 1
- });
- } while (response.data.result.hash == null);
- return response.data.result;
- }
- catch (error) {
- throw error;
- }
-}
-async function fetchRPCBalance(address, url) {
- try {
- let response;
- do {
- response = await axios.post(url, {
- jsonrpc: "2.0",
- method: "quai_getBalance",
- params: [
- address,
- 'latest'
- ],
- id: 1
- });
- } while (response.data.result == null);
- return response.data.result;
- }
- catch (error) {
- throw new Error(`Error fetching block: ${error.message}`);
- }
-}
-async function fetchRPCTxReceipt(hash, url) {
- try {
- let response;
- do {
- response = await axios.post(url, {
- jsonrpc: "2.0",
- method: "quai_getTransactionReceipt",
- params: [
- hash
- ],
- id: 1
- });
- await stall(5000);
- } while (response.data.result.blockHash == null);
- return response.data.result;
- }
- catch (error) {
- throw new Error(`Error fetching block: ${error.message}`);
- }
-}
-describe("Test Provider Block operations", function () {
- let block;
- before(async () => {
- const rpcBlock = await fetchRPCBlock('0xA');
- block = {
- hash: rpcBlock.hash,
- number: rpcBlock.number.map((stringNumber) => Number(stringNumber)),
- transactions: rpcBlock.transactions,
- parentHash: rpcBlock.parentHash,
- parentEntropy: rpcBlock.parentEntropy.map((entropy) => BigInt(entropy)),
- extTransactions: rpcBlock.extTransactions,
- timestamp: Number(rpcBlock.timestamp),
- nonce: rpcBlock.nonce,
- difficulty: BigInt(rpcBlock.difficulty),
- gasLimit: BigInt(rpcBlock.gasLimit),
- gasUsed: BigInt(rpcBlock.gasUsed),
- miner: rpcBlock.miner,
- extraData: rpcBlock.extraData,
- transactionsRoot: rpcBlock.transactionsRoot,
- evmRoot: rpcBlock.stateRoot,
- utxoRoot: rpcBlock.utxoRoot,
- receiptsRoot: rpcBlock.receiptsRoot,
- baseFeePerGas: BigInt(rpcBlock.baseFeePerGas),
- extRollupRoot: rpcBlock.extRollupRoot,
- extTransactionsRoot: rpcBlock.extTransactionsRoot,
- location: rpcBlock.location,
- manifestHash: rpcBlock.manifestHash,
- mixHash: rpcBlock.mixHash,
- order: rpcBlock.order,
- parentDeltaS: rpcBlock.parentDeltaS.map((delta) => BigInt(delta)),
- sha3Uncles: rpcBlock.sha3Uncles,
- size: BigInt(rpcBlock.size),
- uncles: rpcBlock.uncles,
- subManifest: rpcBlock.subManifest,
- totalEntropy: BigInt(rpcBlock.totalEntropy),
- };
- });
- it('should fetch block by number', async function () {
- let responseBlock = await providerC1.getBlock('0,0', '0xA');
- assert.ok(responseBlock != null, "block != null");
- let { provider, ...formatBlock } = {
- ...responseBlock,
- transactions: responseBlock.transactions,
- extTransactions: responseBlock.extTransactions
- };
- equals("Block by Number", formatBlock, block);
- });
- it('should fetch block by hash', async function () {
- assert.ok(block.hash != null, 'block.hash != null');
- let responseBlock = await providerC1.getBlock('0,0', block.hash);
- assert.ok(responseBlock != null, "block != null");
- let { provider, ...formatBlock } = {
- ...responseBlock,
- transactions: responseBlock.transactions,
- extTransactions: responseBlock.extTransactions
- };
- equals("Block by Hash", formatBlock, block);
- });
-});
-describe("Test Transaction operations", function () {
- let internalTx;
- let internalToExternalTx;
- it('should fetch balance after internal tx', async function () {
- this.timeout(60000);
- const oldBal = await fetchRPCBalance(destinationC1, process.env.RPC_URL || "http://localhost:8610");
- internalTx = await sendTransaction(destinationC1);
- await stall(30000);
- const expectedBal = BigInt(internalTx.value);
- const balance = await providerC1.getBalance(destinationC1);
- const actualBal = Number(balance) - Number(oldBal);
- assert.equal(actualBal, Number(expectedBal));
- });
- it('should get transaction receipt for internal tx', async function () {
- this.timeout(60000);
- const receipt = await fetchRPCTxReceipt(internalTx.hash, process.env.RPC_URL || "http://localhost:8610");
- const expectedReceipt = {
- blockHash: receipt.blockHash,
- contractAddress: receipt.contractAddress || null,
- blockNumber: Number(receipt.blockNumber),
- cumulativeGasUsed: BigInt(receipt.cumulativeGasUsed),
- gasPrice: BigInt(receipt.effectiveGasPrice),
- etxs: receipt.etxs,
- gasUsed: BigInt(receipt.gasUsed),
- logs: receipt.logs,
- logsBloom: receipt.logsBloom,
- status: Number(receipt.status),
- to: receipt.to,
- from: receipt.from,
- hash: receipt.transactionHash,
- index: Number(receipt.transactionIndex),
- type: receipt.type,
- };
- const receiptResponse = await providerC1.getTransactionReceipt(internalTx.hash);
- let { provider, ...receiptResult } = {
- ...receiptResponse,
- logs: receiptResponse?.logs
- };
- equals("Internal Tx Receipt", receiptResult, expectedReceipt);
- });
- it("should fetch transaction receipt for internal to external tx", async function () {
- this.timeout(120000);
- internalToExternalTx = await sendTransaction(destinationC2);
- await stall(60000);
- const receipt = await fetchRPCTxReceipt(internalToExternalTx.hash, process.env.RPC_URL || "http://localhost:8610");
- await stall(30000);
- const etx = receipt.etxs[0];
- const expectedReceipt = {
- blockHash: receipt.blockHash,
- blockNumber: Number(receipt.blockNumber),
- contractAddress: receipt.contractAddress || null,
- cumulativeGasUsed: BigInt(receipt.cumulativeGasUsed),
- gasPrice: BigInt(receipt.effectiveGasPrice),
- etxs: [
- {
- type: Number(etx.type),
- nonce: Number(etx.nonce),
- maxPriorityFeePerGas: BigInt(etx.maxPriorityFeePerGas),
- maxFeePerGas: BigInt(etx.maxFeePerGas),
- gas: BigInt(etx.gas),
- value: BigInt(etx.value),
- input: etx.input,
- to: etx.to,
- from: etx.sender,
- hash: etx.hash,
- chainId: Number(etx.chainId),
- accessList: etx.accessList,
- }
- ],
- gasUsed: BigInt(receipt.gasUsed),
- logs: receipt.logs,
- logsBloom: receipt.logsBloom,
- status: Number(receipt.status),
- to: receipt.to,
- from: receipt.from,
- hash: receipt.transactionHash,
- index: Number(receipt.transactionIndex),
- type: Number(receipt.type),
- };
- const receiptResponse = await providerC1.getTransactionReceipt(internalToExternalTx.hash);
- let { provider, ...receiptResult } = {
- ...receiptResponse,
- logs: receiptResponse?.logs
- };
- console.log(receiptResult);
- console.log(expectedReceipt);
- equals("Internal to External Tx Receipt", receiptResult, expectedReceipt);
- });
-});
-//# sourceMappingURL=test-providers-data.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-data.js.map b/lib.esm/_tests/test-providers-data.js.map
deleted file mode 100644
index e046003c..00000000
--- a/lib.esm/_tests/test-providers-data.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-data.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-data.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,WAAW;AACX,gDAAgD;AAChD,iCAAiC;AACjC,wCAAwC;AAExC,8CAA8C;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,WAAW;AACX,2CAA2C;AAC3C,2DAA2D;AAC3D,iCAAiC;AAEjC,qEAAqE;AAGrE,mBAAmB;AAGnB,MAAM,UAAU,GAAG,IAAI,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AACjF,MAAM,aAAa,GAAG,4CAA4C,CAAA;AAClE,MAAM,aAAa,GAAG,4CAA4C,CAAA;AAElE,SAAS,MAAM,CAAC,IAAY,EAAE,MAAW,EAAE,QAAa;IACpD,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;QACzB,IAA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AE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;SAC7B,CAAA;QACD,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC1F,IAAI,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,GAAG;YACjC,GAAG,eAAe;YAClB,IAAI,EAAE,eAAe,EAAE,IAAI;SAC9B,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;QAC5B,MAAM,CAAC,iCAAiC,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAA"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-errors.d.ts b/lib.esm/_tests/test-providers-errors.d.ts
deleted file mode 100644
index c179d1a2..00000000
--- a/lib.esm/_tests/test-providers-errors.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-providers-errors.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-errors.d.ts.map b/lib.esm/_tests/test-providers-errors.d.ts.map
deleted file mode 100644
index efb4ac1b..00000000
--- a/lib.esm/_tests/test-providers-errors.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-errors.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-errors.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-errors.js b/lib.esm/_tests/test-providers-errors.js
deleted file mode 100644
index 89270625..00000000
--- a/lib.esm/_tests/test-providers-errors.js
+++ /dev/null
@@ -1,232 +0,0 @@
-import assert from "assert";
-import { concat, dataSlice, id, toBeArray, zeroPadValue, isCallException, isError, Wallet } from "../index.js";
-import { getProvider, setupProviders, providerNames } from "./create-provider.js";
-import { stall } from "./utils.js";
-//require('dotenv').config();
-import dotenv from "dotenv";
-dotenv.config();
-setupProviders();
-describe("Tests Provider Call Exception", function () {
- const panics = [
- //{ code: 0x00, reason: "GENERIC_PANIC" },
- { code: 0x01, reason: "ASSERT_FALSE" },
- { code: 0x11, reason: "OVERFLOW" },
- { code: 0x12, reason: "DIVIDE_BY_ZERO" },
- //{ code: 0x21, reason: "ENUM_RANGE_ERROR" },
- //{ code: 0x22, reason: "BAD_STORAGE_DATA" },
- { code: 0x31, reason: "STACK_UNDERFLOW" },
- { code: 0x32, reason: "ARRAY_RANGE_ERROR" },
- //{ code: 0x41, reason: "OUT_OF_MEMORY" },
- //{ code: 0x51, reason: "UNINITIALIZED_FUNCTION_CALL" },
- ];
- const testAddr = "0x0aff86a125b29b25a9e418c2fb64f1753532c0ca"; //Cyprus1
- const testAddr2 = "0x0aff86a125b29b25a9e418c2fb64f1753532c0ca"; //Cyprus1
- const networkName = "colosseum";
- for (const { code, reason } of panics) {
- for (const method of ["call", "estimateGas"]) {
- for (const providerName of providerNames) {
- const provider = getProvider(providerName, networkName);
- if (provider == null) {
- continue;
- }
- it(`tests panic code: ${providerName}.${method}.${reason}`, async function () {
- this.timeout(10000);
- const data = concat([
- dataSlice(id("testPanic(uint256)"), 0, 4),
- zeroPadValue(toBeArray(code), 32)
- ]);
- await stall(1000);
- const tx = { to: testAddr, from: testAddr2, data };
- try {
- const result = await (method === "call" ? provider.call(tx) : provider.estimateGas(tx));
- console.log(result);
- assert.ok(false, "panic call did not throw");
- }
- catch (error) {
- assert.ok(isCallException(error), "isCallException");
- // Check some basics
- assert.equal(error.action, method, `error.action == ${method}`);
- assert.equal(error.reason, `Panic due to ${reason}(${code})`, "error.reason");
- // Check the transaciton
- assert.equal(error.transaction.to, tx.to, `error.transaction.to`);
- assert.equal(error.transaction.data, tx.data, `error.transaction.data`);
- // We have no invocation data
- assert.equal(error.invocation, null, `error.invocation != null`);
- // Check the revert
- assert.ok(error.revert != null, "error.revert == null");
- assert.equal(error.revert.name, "Panic", `error.revert.name`);
- assert.equal(error.revert.signature, "Panic(uint256)", `error.revert.signature`);
- assert.equal(error.revert.args.length, 1, `error.revert.args.length`);
- assert.equal(error.revert.args[0], code, `error.revert.args[0]`);
- }
- });
- }
- }
- }
- const customErrors = [
- {
- name: "CustomError1",
- signature: "testCustomError1(bool,uint256,string)",
- data: "0xdb7342480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000b68656c6c6f20776f726c64000000000000000000000000000000000000000000",
- //data: "0x852d0c740000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20576f726c64000000000000000000000000000000000000000000",
- message: `execution reverted (unknown custom error)`,
- reason: null,
- revert: null,
- },
- {
- name: "Error",
- signature: "testErrorString(bool,string)",
- data: "0xb206699b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000b68656c6c6f20776f726c64000000000000000000000000000000000000000000",
- //data: "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b48656c6c6f20576f726c64000000000000000000000000000000000000000000"
- message: `execution reverted: "hello world"`,
- reason: "hello world",
- revert: {
- signature: "Error(string)",
- name: "Error",
- args: ['hello world']
- }
- },
- ];
- for (const { data, message, name, reason, revert } of customErrors) {
- for (const method of ["call", "estimateGas"]) {
- const tx = { to: testAddr, from: testAddr2, data };
- for (const providerName of providerNames) {
- const provider = getProvider(providerName, networkName);
- if (provider == null) {
- continue;
- }
- it(`tests custom errors: ${providerName}.${method}.${name}`, async function () {
- this.timeout(10000);
- try {
- const result = await (method === "call" ? provider.call(tx) : provider.estimateGas(tx));
- console.log(result);
- assert.ok(false, "panic call did not throw");
- }
- catch (error) {
- assert.ok(isCallException(error), "isCallException");
- // Check some basics
- assert.equal(error.action, method, `error.action == ${method}`);
- assert.ok(error.message.startsWith(message), "error.message == message");
- if (reason) {
- assert.equal(error.reason, reason, "error.reason");
- }
- else {
- assert.ok(error.reason == null, "error.reason != null");
- }
- if (revert) {
- assert.ok(error.revert != null, "error.revert == null");
- assert.equal(error.revert.name, revert.name, "error.revert.name");
- assert.equal(error.revert.signature, revert.signature, "error.revert.signature");
- assert.equal(error.revert.args.length, revert.args.length, "error.revert.args.length");
- for (let i = 0; i < revert.args.length; i++) {
- assert.equal(error.revert.args[i], revert.args[i], `error.revert.args[${i}]`);
- }
- }
- else {
- assert.ok(error.revert == null, "error.revert != null");
- }
- }
- });
- }
- }
- }
-});
-describe("Test Provider Blockchain Errors", function () {
- const wallet = new Wallet((process.env.FAUCET_PRIVATEKEY));
- const wallet2 = new Wallet((process.env.FAUCET_PRIVATEKEY));
- const networkName = "colosseum";
- for (const providerName of providerNames) {
- const provider = getProvider(providerName, networkName);
- if (provider == null) {
- continue;
- }
- // The CI runs multiple tests at once; minimize colliding with
- // the initial tx by using a random value, so we can detect
- // replacements we didn't do.
- const value = Math.trunc(Math.random() * 2048) + 2;
- it(`tests underpriced replacement transaction: ${providerName}`, async function () {
- this.timeout(60000);
- const w = wallet.connect(provider);
- let tx1 = null;
- let nonce = null;
- ;
- for (let i = 0; i < 10; i++) {
- nonce = await w.getNonce("pending");
- try {
- tx1 = await w.sendTransaction({
- nonce, to: wallet, from: wallet2, value
- });
- }
- catch (error) {
- // Another CI host beat us to this nonce
- if (isError(error, "REPLACEMENT_UNDERPRICED") || isError(error, "NONCE_EXPIRED")) {
- await stall(1000);
- continue;
- }
- console.log("EE-tx1", nonce, value, error);
- throw error;
- }
- break;
- }
- if (tx1 == null || nonce == null) {
- throw new Error("could not send initial tx");
- }
- const rejection = assert.rejects(async function () {
- // Send another tx with the same nonce
- const tx2 = await w.sendTransaction({
- nonce, to: wallet, from: wallet2, value: 1
- });
- console.log({ tx1, tx2 });
- }, (error) => {
- return isError(error, "REPLACEMENT_UNDERPRICED");
- });
- // Wait for the first tx to get mined so we start with a
- // clean slate on the next provider
- await tx1.wait();
- // This should have already happened
- await rejection;
- });
- }
- for (const providerName of providerNames) {
- const provider = getProvider(providerName, networkName);
- if (provider == null) {
- continue;
- }
- it(`tests insufficient funds: ${providerName}`, async function () {
- this.timeout(60000);
- const w = Wallet.createRandom("m/44'/60'/0'/0/0").connect(provider);
- await assert.rejects(async function () {
- const tx = await w.sendTransaction({
- to: wallet, from: wallet2, value: 1
- });
- console.log(tx);
- }, (error) => {
- return (isError(error, "INSUFFICIENT_FUNDS") &&
- typeof (error.transaction.from) === "string" &&
- error.transaction.from.toLowerCase() === w.address.toLowerCase());
- });
- });
- }
- for (const providerName of providerNames) {
- const provider = getProvider(providerName, networkName);
- if (provider == null) {
- continue;
- }
- it(`tests nonce expired: ${providerName}`, async function () {
- this.timeout(60000);
- const w = wallet.connect(provider);
- await assert.rejects(async function () {
- const tx = await w.sendTransaction({
- to: wallet, from: wallet2, value: 1
- });
- console.log(tx);
- }, (error) => {
- if (!isError(error, "NONCE_EXPIRED")) {
- console.log(error);
- }
- return isError(error, "NONCE_EXPIRED");
- });
- });
- }
-});
-//# sourceMappingURL=test-providers-errors.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-errors.js.map b/lib.esm/_tests/test-providers-errors.js.map
deleted file mode 100644
index ef79323f..00000000
--- a/lib.esm/_tests/test-providers-errors.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-errors.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-errors.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAC9C,eAAe,EAAE,OAAO,EACxB,MAAM,EACT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;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,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AAEL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-fallback.d.ts b/lib.esm/_tests/test-providers-fallback.d.ts
deleted file mode 100644
index 6b3b554a..00000000
--- a/lib.esm/_tests/test-providers-fallback.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { AbstractProvider, Network } from "../index.js";
-import type { PerformActionRequest } from "../index.js";
-export type Performer = (req: PerformActionRequest) => Promise;
-export declare class MockProvider extends AbstractProvider {
- readonly _perform: Performer;
- constructor(perform: Performer);
- _detectNetwork(): Promise;
- perform(req: PerformActionRequest): Promise;
-}
-//# sourceMappingURL=test-providers-fallback.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-fallback.d.ts.map b/lib.esm/_tests/test-providers-fallback.d.ts.map
deleted file mode 100644
index b3469193..00000000
--- a/lib.esm/_tests/test-providers-fallback.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-fallback.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-fallback.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,gBAAgB,EAAoB,OAAO,EAC9C,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACR,oBAAoB,EACvB,MAAM,aAAa,CAAC;AAWrB,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,oBAAoB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAEpE,qBAAa,YAAa,SAAQ,gBAAgB;IAC9C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;gBAEjB,OAAO,EAAE,SAAS;IAKxB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAElC,OAAO,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC;CAGzD"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-fallback.js b/lib.esm/_tests/test-providers-fallback.js
deleted file mode 100644
index 0f1f5acc..00000000
--- a/lib.esm/_tests/test-providers-fallback.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import assert from "assert";
-import { isError, makeError, AbstractProvider, FallbackProvider, Network } from "../index.js";
-const network = Network.from("mainnet");
-function stall(duration) {
- return new Promise((resolve) => { setTimeout(resolve, duration); });
-}
-export class MockProvider extends AbstractProvider {
- _perform;
- constructor(perform) {
- super(network, { cacheTimeout: -1 });
- this._perform = perform;
- }
- async _detectNetwork() { return network; }
- async perform(req) {
- return await this._perform(req);
- }
-}
-describe("Test Fallback broadcast", function () {
- const txHash = "0xe9fb92945282cf04f7bb3027d690fdaab6d601c99a7cdd0a5eb41d1a5c0893d5";
- async function test(actions) {
- const tx = "0x00f8788223288202898504a817c8008504a817c800825208940aff86a125b29b25a9e418c2fb64f1753532c0ca88016345785d8a000080c001a0711d47f0f6828721f336430ca87277534d0134de5f04ce3629085f8d5371c129a061c4838dec40c296cfad6fe771d502c26e209089124e6f702c64353b3ca195c1";
- const providers = actions.map(({ timeout, error }) => {
- return new MockProvider(async (r) => {
- if (r.method === "getBlockNumber") {
- return 1;
- }
- if (r.method === "broadcastTransaction") {
- await stall(timeout);
- if (error) {
- throw error;
- }
- return txHash;
- }
- throw new Error(`unhandled method: ${r.method}`);
- });
- });
- ;
- const provider = new FallbackProvider(providers);
- return await provider.broadcastTransaction('0,1', tx);
- }
- it("picks late non-failed broadcasts", async function () {
- const result = await test([
- { timeout: 200, error: makeError("already seen", "UNKNOWN_ERROR") },
- { timeout: 4000, error: makeError("already seen", "UNKNOWN_ERROR") },
- { timeout: 400 },
- ]);
- assert(result.hash === txHash, "result.hash === txHash");
- });
- it("insufficient funds short-circuit broadcast", async function () {
- await assert.rejects(async function () {
- const result = await test([
- { timeout: 200, error: makeError("is broke", "INSUFFICIENT_FUNDS") },
- { timeout: 400, error: makeError("is broke", "INSUFFICIENT_FUNDS") },
- { timeout: 800 },
- { timeout: 1000 },
- ]);
- console.log(result);
- }, function (error) {
- assert(isError(error, "INSUFFICIENT_FUNDS"));
- return true;
- });
- });
-});
-//# sourceMappingURL=test-providers-fallback.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-providers-fallback.js.map b/lib.esm/_tests/test-providers-fallback.js.map
deleted file mode 100644
index 980cc260..00000000
--- a/lib.esm/_tests/test-providers-fallback.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-providers-fallback.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,OAAO,EAAE,SAAS,EAElB,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAC9C,MAAM,aAAa,CAAC;AAQrB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAExC,SAAS,KAAK,CAAC,QAAgB;IAC3B,OAAQ,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAKD,MAAM,OAAO,YAAa,SAAQ,gBAAgB;IACrC,QAAQ,CAAY;IAE7B,YAAY,OAAkB;QAC1B,KAAK,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,cAAc,KAAuB,OAAO,OAAO,CAAC,CAAC,CAAC;IAE5D,KAAK,CAAC,OAAO,CAAC,GAAyB;QACnC,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;CACJ;AAED,QAAQ,CAAC,yBAAyB,EAAE;IAEhC,MAAM,MAAM,GAAG,oEAAoE,CAAC;IAEpF,KAAK,UAAU,IAAI,CAAC,OAAkD;QAElE,MAAM,EAAE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;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;gBACtB,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,oBAAoB,CAAC,EAAE;gBACpE,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,oBAAoB,CAAC,EAAE;gBACpE,EAAE,OAAO,EAAE,GAAG,EAAE;gBAChB,EAAE,OAAO,EAAE,IAAI,EAAE;aACpB,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC,EAAE,UAAS,KAAc;YACtB,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;YAC7C,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-rlp.d.ts b/lib.esm/_tests/test-rlp.d.ts
deleted file mode 100644
index 2a353b71..00000000
--- a/lib.esm/_tests/test-rlp.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-rlp.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-rlp.d.ts.map b/lib.esm/_tests/test-rlp.d.ts.map
deleted file mode 100644
index 106a294c..00000000
--- a/lib.esm/_tests/test-rlp.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-rlp.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-rlp.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-rlp.js b/lib.esm/_tests/test-rlp.js
deleted file mode 100644
index d83e3b5e..00000000
--- a/lib.esm/_tests/test-rlp.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { decodeRlp, encodeRlp, hexlify } from "../index.js";
-describe("Test RLP Coder", function () {
- const tests = loadTests("rlp");
- tests.forEach(({ name, encoded, decoded }) => {
- it(`encodes RLP: ${name}`, function () {
- assert.equal(encodeRlp(decoded), encoded);
- });
- });
- tests.forEach(({ name, encoded, decoded }) => {
- it(`decodes RLP: ${name}`, function () {
- assert.deepEqual(decodeRlp(encoded), decoded);
- });
- });
-});
-describe("Test bad RLP Data", function () {
- it("correctly fails encoding data with invalid values", function () {
- assert.throws(() => {
- encodeRlp(["0x1234", 1234]);
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.argument === "object" &&
- error.value === 1234);
- });
- });
- it("correctlyfails decoding data with trailing junk", function () {
- assert.throws(() => {
- // Zeros_1
- decodeRlp("0x0042");
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^unexpected junk after rlp payload/) &&
- error.argument === "data" &&
- error.value === "0x0042");
- });
- });
- it("correctlyfails decoding short data", function () {
- assert.throws(() => {
- decodeRlp("0x");
- }, (error) => {
- return (error.code === "BUFFER_OVERRUN" &&
- error.message.match(/^data too short/) &&
- hexlify(error.buffer) === "0x" &&
- error.offset === 1 &&
- error.length === 0);
- });
- });
- it("correctlyfails decoding short data in child", function () {
- assert.throws(() => {
- decodeRlp("0xc8880102030405060708");
- }, (error) => {
- return (error.code === "BUFFER_OVERRUN" &&
- error.message.match(/^child data too short/) &&
- hexlify(error.buffer) === "0xc8880102030405060708" &&
- error.offset === 0 &&
- error.length === 8);
- });
- });
- it("correctlyfails decoding short segment data", function () {
- assert.throws(() => {
- // [["0x4243"], ["0x3145"]] = 0xc8 c3 82 4243 c3 82 3145
- // XXXX
- decodeRlp("0xc8c382c3823145");
- }, (error) => {
- return (error.code === "BUFFER_OVERRUN" &&
- error.message.match(/^data short segment too short/) &&
- hexlify(error.buffer) === "0xc8c382c3823145" &&
- error.offset === 9 &&
- error.length === 7);
- });
- });
-});
-/*
- utils.RLP.encode([["0x4243"], ["0x3145"]])
-
- 0xc8 c3 82 4243 c3 82 3145
-
- {
- "name": "arrayShort2",
- "decoded": [
- "0x48656c6c6f20576f726c64",
- "0x48656c6c6f20576f726c64"
- ],
- "encoded": "0xd8 8b 48656c6c6f20576f726c64 8b 48656c6c6f20576f726c64"
- },
-*/
-//# sourceMappingURL=test-rlp.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-rlp.js.map b/lib.esm/_tests/test-rlp.js.map
deleted file mode 100644
index 7a00597b..00000000
--- a/lib.esm/_tests/test-rlp.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-rlp.js","sourceRoot":"","sources":["../../src.ts/_tests/test-rlp.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI5D,QAAQ,CAAC,gBAAgB,EAAE;IAEvB,MAAM,KAAK,GAAG,SAAS,CAAc,KAAK,CAAC,CAAC;IAE5C,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QACzC,EAAE,CAAC,gBAAiB,IAAK,EAAE,EAAE;YACzB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QACzC,EAAE,CAAC,gBAAiB,IAAK,EAAE,EAAE;YACzB,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE;IAC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CAAE,6CAA6C,EAAE;QAC/C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,wBAAwB,CAAC,CAAC;QACxC,CAAC,EAAE,CAAC,KAAU,EAAE,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB;gBACnC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC;gBAC5C,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,wBAAwB;gBAClD,KAAK,CAAC,MAAM,KAAK,CAAC;gBAClB,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAE,4CAA4C,EAAE;QAC9C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACf,wDAAwD;YACxD,6CAA6C;YAC7C,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAClC,CAAC,EAAE,CAAC,KAAU,EAAE,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB;gBACnC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC;gBACpD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,kBAAkB;gBAC5C,KAAK,CAAC,MAAM,KAAK,CAAC;gBAClB,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;EAaE"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-transaction.d.ts b/lib.esm/_tests/test-transaction.d.ts
deleted file mode 100644
index 5da54786..00000000
--- a/lib.esm/_tests/test-transaction.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-transaction.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-transaction.d.ts.map b/lib.esm/_tests/test-transaction.d.ts.map
deleted file mode 100644
index 0570265f..00000000
--- a/lib.esm/_tests/test-transaction.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-transaction.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-transaction.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-transaction.js b/lib.esm/_tests/test-transaction.js
deleted file mode 100644
index 652bcef5..00000000
--- a/lib.esm/_tests/test-transaction.js
+++ /dev/null
@@ -1,167 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { isError, Transaction } from "../index.js";
-const BN_0 = BigInt(0);
-describe("Tests Unsigned Transaction Serializing", function () {
- const tests = loadTests("transactions");
- for (const test of tests) {
- // Unsupported parameters for EIP-155; i.e. unspecified chain ID
- if (!test.unsignedEip155) {
- continue;
- }
- it(`serialized unsigned EIP-155 transaction: ${test.name}`, function () {
- const txData = Object.assign({}, test.transaction, {
- type: 0,
- accessList: undefined,
- maxFeePerGas: undefined,
- maxPriorityFeePerGas: undefined
- });
- const tx = Transaction.from(txData);
- assert.equal(tx.unsignedSerialized, test.unsignedEip155, "unsignedEip155");
- });
- }
-});
-describe("Tests Signed Transaction Serializing", function () {
- const tests = loadTests("transactions");
- for (const test of tests) {
- if (!test.unsignedEip155) {
- continue;
- }
- it(`serialized signed EIP-155 transaction: ${test.name}`, function () {
- const txData = Object.assign({}, test.transaction, {
- type: 0,
- accessList: [],
- maxFeePerGas: 0,
- maxPriorityFeePerGas: 0,
- signature: test.signatureEip155
- });
- const tx = Transaction.from(txData);
- assert.equal(tx.serialized, test.signedEip155, "signedEip155");
- });
- }
-});
-function assertTxUint(actual, _expected, name) {
- const expected = (_expected != null ? BigInt(_expected) : null);
- assert.equal(actual, expected, name);
-}
-function assertTxEqual(actual, expected) {
- assert.equal(actual.to, expected.to, "to");
- assert.equal(actual.nonce, expected.nonce, "nonce");
- assertTxUint(actual.gasLimit, expected.gasLimit, "gasLimit");
- assertTxUint(actual.gasPrice, expected.gasPrice, "gasPrice");
- assertTxUint(actual.maxFeePerGas, expected.maxFeePerGas, "maxFeePerGas");
- assertTxUint(actual.maxPriorityFeePerGas, expected.maxPriorityFeePerGas, "maxPriorityFeePerGas");
- assert.equal(actual.data, expected.data, "data");
- assertTxUint(actual.value, expected.value, "value");
- if (expected.accessList) {
- assert.equal(JSON.stringify(actual.accessList), JSON.stringify(expected.accessList), "accessList");
- }
- else {
- assert.equal(actual.accessList, null, "accessList:!null");
- }
- assertTxUint(actual.chainId, expected.chainId, "chainId");
-}
-function addDefault(tx, key, defaultValue) {
- if (tx[key] == null) {
- tx[key] = defaultValue;
- }
-}
-function addDefaults(tx) {
- tx = Object.assign({}, tx);
- addDefault(tx, "nonce", 0);
- addDefault(tx, "gasLimit", BN_0);
- addDefault(tx, "maxFeePerGas", BN_0);
- addDefault(tx, "maxPriorityFeePerGas", BN_0);
- addDefault(tx, "value", 0);
- addDefault(tx, "data", "0x");
- addDefault(tx, "accessList", []);
- addDefault(tx, "chainId", BN_0);
- return tx;
-}
-describe("Tests Unsigned Transaction Parsing", function () {
- const tests = loadTests("transactions");
- for (const test of tests) {
- if (!test.unsignedEip155) {
- continue;
- }
- it(`parses unsigned EIP-155 transaction: ${test.name}`, function () {
- const tx = Transaction.from(test.unsignedEip155);
- const expected = addDefaults(test.transaction);
- expected.maxFeePerGas = 0;
- expected.maxPriorityFeePerGas = 0;
- expected.accessList = [];
- assertTxEqual(tx, expected);
- });
- }
-});
-describe("Tests Signed Transaction Parsing", function () {
- const tests = loadTests("transactions");
- for (const test of tests) {
- if (!test.unsignedEip155) {
- continue;
- }
- it(`parses signed EIP-155 transaction: ${test.name}`, function () {
- let tx = Transaction.from(test.signedEip155);
- const expected = addDefaults(test.transaction);
- expected.maxFeePerGas = 0;
- expected.maxPriorityFeePerGas = 0;
- expected.accessList = [];
- for (let i = 0; i < 2; i++) {
- assertTxEqual(tx, expected);
- assert.ok(!!tx.signature, "signature:!null");
- assert.equal(tx.signature.r, test.signatureEip155.r, "signature.r");
- assert.equal(tx.signature.s, test.signatureEip155.s, "signature.s");
- tx = tx.clone();
- }
- });
- }
-});
-describe("Tests Transaction Parameters", function () {
- const badData = [
- {
- name: "accessList=0x09",
- data: "0x00c9010203040580070809",
- message: "invalid access list",
- argument: "accessList"
- },
- {
- name: "accessList=[0x09]",
- data: "0x00ca0102030405800708c109",
- message: "invalid address-slot set",
- argument: "accessList"
- },
- {
- name: "accessList=[0x09,0x10]",
- data: "0x00cb0102030405800708c20910",
- message: "invalid address-slot set",
- argument: "accessList"
- },
- {
- name: "accessList=[0x09,[HASH]] (bad address)",
- data: "0x00ed0102030405800708e4e309e1a024412927c99a717115f5308c0ebd11136659b3cb6291abb4a8f87e9856a12538",
- message: "invalid address",
- argument: "accessList"
- },
- {
- name: "accessList=[ADDR,[0x09]] (bad slot)",
- data: "0x00e10102030405800708d8d794939d33ff01840e9eeeb67525ec2f7035af41a4b1c109",
- message: "invalid slot",
- argument: "accessList"
- }
- ];
- for (const { name, data, argument, message } of badData) {
- it(`correctly fails on bad accessList: ${name}`, function () {
- assert.throws(() => {
- // The access list is a single value: 0x09 instead of
- // structured data
- const result = Transaction.from(data);
- console.log(result);
- }, (error) => {
- return (isError(error, "INVALID_ARGUMENT") &&
- error.argument === argument &&
- (message == null || error.message.startsWith(message)));
- });
- });
- }
-});
-//# sourceMappingURL=test-transaction.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-transaction.js.map b/lib.esm/_tests/test-transaction.js.map
deleted file mode 100644
index 9bbcabfc..00000000
--- a/lib.esm/_tests/test-transaction.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-transaction.js","sourceRoot":"","sources":["../../src.ts/_tests/test-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,WAAW,EA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,EAAE,OAAO,EAAE,IAAI,OAAO,EAAE;QACrD,EAAE,CAAE,sCAAuC,IAAK,EAAE,EAAE;YAChD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;gBACf,qDAAqD;gBACrD,kBAAkB;gBAClB,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACvB,CAAC,EAAE,CAAC,KAAU,EAAE,EAAE;gBACd,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC;oBACtC,KAAK,CAAC,QAAQ,KAAK,QAAQ;oBAC3B,CAAC,OAAO,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KAEN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-maths.d.ts b/lib.esm/_tests/test-utils-maths.d.ts
deleted file mode 100644
index af3decaf..00000000
--- a/lib.esm/_tests/test-utils-maths.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-utils-maths.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-maths.d.ts.map b/lib.esm/_tests/test-utils-maths.d.ts.map
deleted file mode 100644
index b8c57056..00000000
--- a/lib.esm/_tests/test-utils-maths.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-maths.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-maths.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-maths.js b/lib.esm/_tests/test-utils-maths.js
deleted file mode 100644
index b237c1a2..00000000
--- a/lib.esm/_tests/test-utils-maths.js
+++ /dev/null
@@ -1,189 +0,0 @@
-import assert from "assert";
-import { isError, fromTwos, toTwos, getBigInt, getNumber, toBeArray, toBeHex, toQuantity, } from "../index.js";
-describe("Tests Quantity Functions", function () {
- const quantities = [
- {
- name: "zero number",
- value: 0,
- expected: "0x0"
- },
- {
- name: "zero single hex",
- value: "0x0",
- expected: "0x0"
- },
- {
- name: "zero double hex",
- value: "0x00",
- expected: "0x0"
- },
- {
- name: "zero array(0)",
- value: new Uint8Array([]),
- expected: "0x0"
- },
- {
- name: "zero array(1)",
- value: new Uint8Array([0]),
- expected: "0x0"
- },
- {
- name: "single hex digit",
- value: 0x5,
- expected: "0x5"
- },
- {
- name: "double hex digit",
- value: 0x42,
- expected: "0x42"
- },
- {
- name: "big array, odd output",
- value: new Uint8Array([0x0f, 254, 253, 252]),
- expected: "0xffefdfc"
- },
- {
- name: "big array, even output",
- value: new Uint8Array([255, 254, 253, 252]),
- expected: "0xfffefdfc"
- },
- ];
- for (const { name, value, expected } of quantities) {
- it(`computes quantity: ${name}`, function () {
- assert.equal(toQuantity(value), expected);
- });
- }
-});
-describe("Tests Bad Math Values", function () {
- const badBigInts = [
- {
- name: "empty string",
- value: "",
- error: "invalid BigNumberish string"
- },
- {
- name: "non-numeric string",
- value: "foobar",
- error: "invalid BigNumberish string"
- },
- {
- name: "double negative sign",
- value: "--42",
- error: "invalid BigNumberish string"
- },
- {
- name: "non-numeric thing",
- value: true,
- error: "invalid BigNumberish value"
- },
- ];
- for (const { name, value, error } of badBigInts) {
- it(`correctly fails on bad bigint: ${name}`, function () {
- assert.throws(() => {
- const result = getBigInt(value);
- console.log(result);
- }, (e) => {
- return (isError(e, "INVALID_ARGUMENT") &&
- e.message.startsWith(error));
- });
- });
- }
- const badNumbers = [
- {
- name: "empty string",
- value: "",
- error: "invalid numeric string"
- },
- {
- name: "non-numeric string",
- value: "foobar",
- error: "invalid numeric string"
- },
- {
- name: "double negative sign",
- value: "--42",
- error: "invalid numeric string"
- },
- {
- name: "non-numeric thing",
- value: true,
- error: "invalid numeric value"
- },
- {
- name: "too big",
- value: Number.MAX_SAFE_INTEGER + 10,
- error: "overflow"
- },
- {
- name: "too small",
- value: -Number.MAX_SAFE_INTEGER - 10,
- error: "overflow"
- },
- ];
- for (const { name, value, error } of badNumbers) {
- it(`correctly fails on bad numeric: ${name}`, function () {
- assert.throws(() => {
- const result = getNumber(value);
- console.log(result);
- }, (e) => {
- return (isError(e, "INVALID_ARGUMENT") &&
- e.message.startsWith(error));
- });
- });
- }
- const badHex = [
- {
- name: "negative value",
- value: -4,
- error: "unsigned value cannot be negative"
- },
- {
- name: "width too short",
- value: 0x123456,
- width: 2,
- error: "value exceeds width"
- },
- ];
- for (const { name, value, error, width } of badHex) {
- it(`correctly fails on bad toBeHex values: ${name}`, function () {
- assert.throws(() => {
- const result = toBeHex(value, width);
- console.log(result);
- }, (e) => {
- return (isError(e, "NUMERIC_FAULT") && e.fault === "overflow" &&
- e.message.startsWith(error));
- });
- });
- }
- it(`correctly fails on nad toBeArray values: negative value`, function () {
- assert.throws(() => {
- const result = toBeArray(-4);
- console.log(result);
- }, (e) => {
- return (isError(e, "NUMERIC_FAULT") && e.fault === "overflow" &&
- e.message.startsWith("unsigned value cannot be negative"));
- });
- });
-});
-describe("Tests Twos Compliemnts Functions", function () {
- const tests = [
- { width: 8, value: 0, twos: 0 },
- { width: 8, value: 1, twos: 1 },
- { width: 8, value: -1, twos: 0xff },
- { width: 8, value: 127, twos: 127 },
- { width: 8, value: -128, twos: 0x80 },
- ];
- for (const { twos, width, value } of tests) {
- it(`computes twos compliment values: ${value}[${width} bits]`, function () {
- const result = toTwos(value, width);
- assert.equal(result, twos);
- });
- }
- for (const { twos, width, value } of tests) {
- it(`computes values from twos compliment: ${value}[${width} bits]`, function () {
- const result = fromTwos(twos, width);
- assert.equal(result, value);
- });
- }
-});
-//# sourceMappingURL=test-utils-maths.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-maths.js.map b/lib.esm/_tests/test-utils-maths.js.map
deleted file mode 100644
index c9274912..00000000
--- a/lib.esm/_tests/test-utils-maths.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-maths.js","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-maths.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,OAAO,EACP,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,GACvD,MAAM,aAAa,CAAC;AAErB,QAAQ,CAAC,0BAA0B,EAAE;IACjC,MAAM,UAAU,GAA0D;QACtE;YACI,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC;YACR,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,IAAI,UAAU,CAAC,EAAG,CAAC;YAC1B,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,CAAC,CAAE,CAAC;YAC5B,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,MAAM;SACnB;QACD;YACI,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAE,CAAC;YAC9C,QAAQ,EAAE,WAAW;SACxB;QACD;YACI,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,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AAC,EAAE,IAAI,EAAE,CAAC,EAAE;QAC/B,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QAC/B,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;QACnC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE;QACnC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;KACxC,CAAC;IAEF,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,KAAK,EAAE;QACxC,EAAE,CAAC,oCAAqC,KAAM,IAAK,KAAM,QAAQ,EAAE;YAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;KACN;IAED,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,KAAK,EAAE;QACxC,EAAE,CAAC,yCAA0C,KAAM,IAAK,KAAM,QAAQ,EAAE;YACpE,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACrC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-misc.d.ts b/lib.esm/_tests/test-utils-misc.d.ts
deleted file mode 100644
index db713523..00000000
--- a/lib.esm/_tests/test-utils-misc.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-utils-misc.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-misc.d.ts.map b/lib.esm/_tests/test-utils-misc.d.ts.map
deleted file mode 100644
index 4bc46ddc..00000000
--- a/lib.esm/_tests/test-utils-misc.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-misc.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-misc.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-misc.js b/lib.esm/_tests/test-utils-misc.js
deleted file mode 100644
index 0fd005e2..00000000
--- a/lib.esm/_tests/test-utils-misc.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import assert from "assert";
-import { decodeBase64, encodeBase64, defineProperties, isError, toUtf8Bytes } from "../index.js";
-describe("Base64 Coding", function () {
- const tests = [
- {
- name: "wikipedia",
- plaintext: toUtf8Bytes("Many hands make light work."),
- encoded: "TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu"
- }
- ];
- for (const test of tests) {
- it(`encodes base64: ${test.name}`, function () {
- assert.equal(encodeBase64(test.plaintext), test.encoded);
- });
- }
- for (const test of tests) {
- it(`decodes base64: ${test.name}`, function () {
- const decoded = decodeBase64(test.encoded);
- assert.equal(decoded.length, test.plaintext.length, "data.length");
- for (let i = 0; i < decoded.length; i++) {
- assert.equal(decoded[i], test.plaintext[i]);
- }
- });
- }
-});
-describe("Test Minor Features", function () {
- it("checks types in defineProperties", function () {
- const any = {};
- const values = {
- vAny: any,
- vBigint: BigInt(60),
- vBoolean: true,
- vNumber: 42,
- vString: "some string",
- };
- const item = {};
- defineProperties(item, values, {
- vAny: "any",
- vBigint: "bigint",
- vBoolean: "boolean",
- vNumber: "number",
- vString: "string"
- });
- assert.equal(item.vAny, any, "vAny");
- assert.equal(item.vBoolean, true, "vBoolenay");
- assert.equal(item.vNumber, 42, "nNumber");
- assert.equal(item.vString, "some string", "any");
- });
- it("correctly throws if defineProperty type mismatch", function () {
- assert.throws(() => {
- const item = {};
- const values = { vBoolean: 42 };
- defineProperties(item, values, { vBoolean: "boolean" });
- console.log(values);
- }, (error) => {
- return (isError(error, "INVALID_ARGUMENT") &&
- error.argument === "value.vBoolean" &&
- error.value === 42);
- });
- });
-});
-//# sourceMappingURL=test-utils-misc.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-misc.js.map b/lib.esm/_tests/test-utils-misc.js.map
deleted file mode 100644
index 1ab62bba..00000000
--- a/lib.esm/_tests/test-utils-misc.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-misc.js","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-misc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,OAAO,EACzB,WAAW,EACd,MAAM,aAAa,CAAC;AAGrB,QAAQ,CAAC,eAAe,EAAE;IACtB,MAAM,KAAK,GAAG;QACV;YACI,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,WAAW,CAAC,6BAA6B,CAAC;YACrD,OAAO,EAAE,sCAAsC;SAClD;KACJ,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,EAAE,CAAC,mBAAoB,IAAI,CAAC,IAAK,EAAE,EAAE;YACjC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;KACN;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,EAAE,CAAC,mBAAoB,IAAI,CAAC,IAAK,EAAE,EAAE;YACjC,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACnE,KAAK,IAAI,CAA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AAM,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;YAChC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;YAExD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;YACT,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC;gBACtC,KAAK,CAAC,QAAQ,KAAK,gBAAgB;gBACnC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-units.d.ts b/lib.esm/_tests/test-utils-units.d.ts
deleted file mode 100644
index 989039c0..00000000
--- a/lib.esm/_tests/test-utils-units.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-utils-units.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-units.d.ts.map b/lib.esm/_tests/test-utils-units.d.ts.map
deleted file mode 100644
index 4d2654fd..00000000
--- a/lib.esm/_tests/test-utils-units.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-units.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-units.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-units.js b/lib.esm/_tests/test-utils-units.js
deleted file mode 100644
index 114a1e03..00000000
--- a/lib.esm/_tests/test-utils-units.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { formatEther, formatUnits, parseEther, parseUnits } from "../index.js";
-describe("Tests unit conversion", function () {
- const tests = loadTests("units");
- const units = [
- { unit: "ether", format: "ether_format", decimals: 18 },
- { unit: "kwei", format: "kwei_format", decimals: 3 },
- { unit: "mwei", format: "mwei_format", decimals: 6 },
- { unit: "gwei", format: "gwei_format", decimals: 9 },
- { unit: "szabo", format: "szabo_format", decimals: 12 },
- { unit: "finney", format: "finney_format", decimals: 15 },
- ];
- for (const { unit, format, decimals } of units) {
- for (const test of tests) {
- const str = (test[format]);
- if (str == null) {
- continue;
- }
- it(`converts wei to ${unit} string: ${test.name}`, function () {
- const wei = BigInt(test.wei);
- if (decimals === 18) {
- assert.equal(formatEther(wei), str, "formatEther");
- assert.equal(formatUnits(wei), str, "formatUnits");
- }
- assert.equal(formatUnits(wei, unit), str, `formatUnits(${unit})`);
- assert.equal(formatUnits(wei, decimals), str, `formatUnits(${decimals})`);
- });
- }
- for (const test of tests) {
- const str = (test[format]);
- if (str == null) {
- continue;
- }
- it(`converts ${format} string to wei: ${test.name}`, function () {
- const wei = BigInt(test.wei);
- if (decimals === 18) {
- assert.equal(parseEther(str), wei, "parseEther");
- assert.equal(parseUnits(str), wei, "parseUnits");
- }
- assert.equal(parseUnits(str, unit), wei, `parseUnits(${unit})`);
- assert.equal(parseUnits(str, decimals), wei, `parseUnits(${decimals})`);
- });
- }
- }
-});
-describe("Tests bad unit conversion", function () {
- it("correctly fails to convert non-string value", function () {
- assert.throws(() => {
- parseUnits(3, "ether");
- }, (error) => {
- return error.message.startsWith("value must be a string");
- });
- });
- it("correctly fails to convert unknown unit", function () {
- assert.throws(() => {
- parseUnits("3", "foobar");
- }, (error) => {
- return error.message.startsWith("invalid unit");
- });
- });
-});
-//# sourceMappingURL=test-utils-units.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-units.js.map b/lib.esm/_tests/test-utils-units.js.map
deleted file mode 100644
index 91609190..00000000
--- a/lib.esm/_tests/test-utils-units.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-units.js","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-units.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,E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QAAQ,CAAC,2BAA2B,EAAE;IAClC,EAAE,CAAC,6CAA6C,EAAE;QAC9C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACf,UAAU,CAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC,EAAE,CAAC,KAAU,EAAE,EAAE;YACd,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE;QAC1C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACf,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC9B,CAAC,EAAE,CAAC,KAAU,EAAE,EAAE;YACd,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-utf8.d.ts b/lib.esm/_tests/test-utils-utf8.d.ts
deleted file mode 100644
index 04d7c492..00000000
--- a/lib.esm/_tests/test-utils-utf8.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export type TestCaseBadString = {
- name: string;
- bytes: Uint8Array;
- ignore: string;
- replace: string;
- error: string;
-};
-export type TestCaseCodePoints = {
- name: string;
- text: string;
- codepoints: Array;
-};
-//# sourceMappingURL=test-utils-utf8.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-utf8.d.ts.map b/lib.esm/_tests/test-utils-utf8.d.ts.map
deleted file mode 100644
index 9dca561a..00000000
--- a/lib.esm/_tests/test-utils-utf8.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-utf8.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-utf8.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAA;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-utf8.js b/lib.esm/_tests/test-utils-utf8.js
deleted file mode 100644
index eb53d787..00000000
--- a/lib.esm/_tests/test-utils-utf8.js
+++ /dev/null
@@ -1,126 +0,0 @@
-import assert from "assert";
-import { toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs } from "../index.js";
-describe("Tests UTF-8 bad strings", function () {
- const tests = [
- {
- name: "unexpected continue",
- bytes: new Uint8Array([0x41, 0x80, 0x42, 0x43]),
- ignore: "ABC",
- replace: "A\ufffdBC",
- error: "UNEXPECTED_CONTINUE"
- },
- {
- name: "bad prefix",
- bytes: new Uint8Array([0x41, 0xf8, 0x42, 0x43]),
- ignore: "ABC",
- replace: "A\ufffdBC",
- error: "BAD_PREFIX"
- },
- {
- name: "bad prefix (multiple)",
- bytes: new Uint8Array([0x41, 0xf8, 0x88, 0x88, 0x42, 0x43]),
- ignore: "ABC",
- replace: "A\ufffdBC",
- error: "BAD_PREFIX"
- },
- {
- name: "OVERRUN",
- bytes: new Uint8Array([0x41, 0x42, 0xe2, 0x82 /* 0xac */]),
- ignore: "AB",
- replace: "AB\ufffd",
- error: "OVERRUN"
- },
- {
- name: "missing continue",
- bytes: new Uint8Array([0x41, 0x42, 0xe2, 0xe2, 0x82, 0xac, 0x43]),
- ignore: "AB\u20acC",
- replace: "AB\ufffd\u20acC",
- error: "MISSING_CONTINUE"
- },
- {
- name: "out-of-range",
- bytes: new Uint8Array([0x41, 0x42, 0xf7, 0xbf, 0xbf, 0xbf, 0x43]),
- ignore: "ABC",
- replace: "AB\ufffdC",
- error: "OUT_OF_RANGE"
- },
- {
- name: "UTF-16 surrogate (low)",
- bytes: new Uint8Array([0x41, 0x42, 0xed, 0xa0, 0x80, 0x43]),
- ignore: "ABC",
- replace: "AB\ufffdC",
- error: "UTF16_SURROGATE"
- },
- {
- name: "UTF-16 surrogate (high)",
- bytes: new Uint8Array([0x41, 0x42, 0xed, 0xbf, 0xbf, 0x43]),
- ignore: "ABC",
- replace: "AB\ufffdC",
- error: "UTF16_SURROGATE"
- },
- {
- name: "overlong",
- bytes: new Uint8Array([0xf0, 0x82, 0x82, 0xac]),
- ignore: "",
- replace: "\u20ac",
- error: "OVERLONG"
- }
- ];
- for (const { name, bytes, ignore, replace, error } of tests) {
- it(`correctly handles ${name}: replace strategy`, function () {
- const result = toUtf8String(bytes, Utf8ErrorFuncs.replace);
- assert.equal(result, replace);
- });
- it(`correctly handles ${name}: ignore strategy`, function () {
- const result = toUtf8String(bytes, Utf8ErrorFuncs.ignore);
- assert.equal(result, ignore);
- });
- it(`correctly handles ${name}: error strategy`, function () {
- assert.throws(() => {
- const result = toUtf8String(bytes);
- console.log(result);
- }, (e) => {
- return (e.message.indexOf(error) >= 0);
- });
- });
- }
- it("correctly fails to get UTF-8 bytes from incomplete surrogate", function () {
- assert.throws(() => {
- const text = String.fromCharCode(0xd800);
- ;
- const result = toUtf8Bytes(text);
- console.log(result);
- }, (error) => {
- return (error.message.startsWith("invalid surrogate pair"));
- });
- });
- it("correctly fails to get UTF-8 bytes from invalid surrogate pair", function () {
- assert.throws(() => {
- const text = String.fromCharCode(0xd800, 0xdbff);
- ;
- const result = toUtf8Bytes(text);
- console.log(result);
- }, (error) => {
- return (error.message.startsWith("invalid surrogate pair"));
- });
- });
-});
-describe("Tests UTF-8 bad strings", function () {
- const tests = [
- {
- name: "the Euro symbol",
- text: "AB\u20acC",
- codepoints: [0x41, 0x42, 0x20ac, 0x43]
- },
- ];
- for (const { name, text, codepoints } of tests) {
- it(`expands strings to codepoints: ${name}`, function () {
- const result = toUtf8CodePoints(text);
- assert.equal(result.length, codepoints.length, "codepoints.length");
- for (let i = 0; i < result.length; i++) {
- assert.equal(result[i], codepoints[i], `codepoints[${i}]`);
- }
- });
- }
-});
-//# sourceMappingURL=test-utils-utf8.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utils-utf8.js.map b/lib.esm/_tests/test-utils-utf8.js.map
deleted file mode 100644
index 70f34fda..00000000
--- a/lib.esm/_tests/test-utils-utf8.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utils-utf8.js","sourceRoot":"","sources":["../../src.ts/_tests/test-utils-utf8.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAC3C,cAAc,EACjB,MAAM,aAAa,CAAC;AAgBrB,QAAQ,CAAC,yBAAyB,EAAE;IAEhC,MAAM,KAAK,GAA6B;QACpC;YACI,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,IAAI,EAAG,IAAI,EAAG,IAAI,EAAG,IAAI,CAAE,CAAC;YACpD,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,qBAAqB;SAC/B;QACD;YACI,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,IAAI,EAAG,IAAI,EAAG,IAAI,EAAG,IAAI,CAAE,CAAC;YACpD,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,YAAY;SACtB;QACD;YACI,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,IAAI,UAAU,CAAC,CAAE,IAAI,EAAG,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAG,IAAI,CAAE,CAAC;YAC/D,MA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,mBAAmB,CAAC,CAAC;YACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,cAAe,CAAE,GAAG,CAAC,CAAC;aAChE;QACL,CAAC,CAAC,CAAC;KACN;AAEL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utxo-coinselection.d.ts b/lib.esm/_tests/test-utxo-coinselection.d.ts
deleted file mode 100644
index c1dd221a..00000000
--- a/lib.esm/_tests/test-utxo-coinselection.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-utxo-coinselection.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utxo-coinselection.d.ts.map b/lib.esm/_tests/test-utxo-coinselection.d.ts.map
deleted file mode 100644
index a0513c5c..00000000
--- a/lib.esm/_tests/test-utxo-coinselection.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utxo-coinselection.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-utxo-coinselection.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utxo-coinselection.js b/lib.esm/_tests/test-utxo-coinselection.js
deleted file mode 100644
index 98879c90..00000000
--- a/lib.esm/_tests/test-utxo-coinselection.js
+++ /dev/null
@@ -1,98 +0,0 @@
-import assert from "assert";
-import { FewestCoinSelector } from "../transaction/coinselector-fewest";
-import { denominations } from "../transaction/utxo";
-const TEST_SPEND_ADDRESS = "0x00539bc2CE3eD0FD039c582CB700EF5398bB0491";
-const TEST_RECEIVE_ADDRESS = "0x02b9B1D30B6cCdc7d908B82739ce891463c3FA19";
-// Utility function to create UTXOs (adjust as necessary)
-function createUTXOs(denominations) {
- return denominations.map(denomination => ({
- denomination,
- address: TEST_SPEND_ADDRESS
- }));
-}
-describe("FewestCoinSelector", function () {
- describe("Selecting valid UTXOs", function () {
- it("selects a single UTXO that exactly matches the target amount", function () {
- const availableUTXOs = createUTXOs([denominations[1], denominations[2], denominations[3]]); // .065 Qi
- const targetSpend = { value: denominations[3], address: TEST_RECEIVE_ADDRESS }; // .05 Qi
- const selector = new FewestCoinSelector(availableUTXOs);
- const result = selector.performSelection(targetSpend);
- // A single 0.05 Qi UTXO should have been selected
- assert.strictEqual(result.inputs.length, 1);
- assert.strictEqual(result.inputs[0].denomination, denominations[3]);
- // A single new 0.05 Qi UTXO should have been outputed
- assert.strictEqual(result.spendOutputs.length, 1);
- assert.strictEqual(result.spendOutputs[0].denomination, denominations[3]);
- // No change should be returned
- assert.strictEqual(result.changeOutputs.length, 0);
- });
- it("selects multiple UTXOs whose combined value meets the target amount", function () {
- const availableUTXOs = createUTXOs([denominations[1], denominations[2], denominations[2], denominations[3]]); // .075 Qi
- const targetSpend = { value: denominations[2] + denominations[3], address: TEST_RECEIVE_ADDRESS }; // .06 Qi
- const selector = new FewestCoinSelector(availableUTXOs);
- const result = selector.performSelection(targetSpend);
- // 2 UTXOs should have been selected for a total of .06 Qi
- assert.strictEqual(result.inputs.length, 2);
- const inputValue = result.inputs[0].denomination + result.inputs[1].denomination;
- assert.strictEqual(inputValue, denominations[2] + denominations[3]);
- // 2 new UTxOs should have been outputed for a total of .06 Qi
- assert.strictEqual(result.spendOutputs.length, 2);
- const spendValue = result.spendOutputs[0].denomination + result.spendOutputs[1].denomination;
- assert.strictEqual(spendValue, denominations[2] + denominations[3]);
- // No change should be returned
- assert.strictEqual(result.changeOutputs.length, 0);
- });
- it("selects a single UTXO that is larger than the target amount, ensuring change is correctly calculated", function () {
- const availableUTXOs = createUTXOs([denominations[2], denominations[4]]); // .11 Qi
- const targetSpend = { value: denominations[3], address: TEST_RECEIVE_ADDRESS }; // .05 Qi
- const selector = new FewestCoinSelector(availableUTXOs);
- const result = selector.performSelection(targetSpend);
- // A single 0.1 Qi UTXO should have been selected
- assert.strictEqual(result.inputs.length, 1);
- assert.strictEqual(result.inputs[0].denomination, denominations[4]);
- // A single new 0.05 Qi UTXO should have been outputed
- assert.strictEqual(result.spendOutputs.length, 1);
- assert.strictEqual(result.spendOutputs[0].denomination, denominations[3]);
- // 0.05 Qi should be returned in change
- assert.strictEqual(result.changeOutputs.length, 1);
- assert.strictEqual(result.changeOutputs[0].denomination, denominations[3]);
- });
- it("selects multiple UTXOs where the total exceeds the target amount, ensuring change is correctly calculated", function () {
- const availableUTXOs = createUTXOs([
- denominations[2],
- denominations[4],
- denominations[4],
- denominations[4],
- denominations[5]
- ]); // .56 Qi
- const targetSpend = { value: denominations[6], address: TEST_RECEIVE_ADDRESS }; // .5 Qi
- const selector = new FewestCoinSelector(availableUTXOs);
- const result = selector.performSelection(targetSpend);
- // 4 UTXOs should have been selected for a total of .55 Qi
- assert.strictEqual(result.inputs.length, 4);
- const inputValue = result.inputs[0].denomination + result.inputs[1].denomination + result.inputs[2].denomination + result.inputs[3].denomination;
- assert.strictEqual(inputValue, denominations[4] + denominations[4] + denominations[4] + denominations[5]);
- // A single new 0.5 Qi UTXO should have been outputed
- assert.strictEqual(result.spendOutputs.length, 1);
- assert.strictEqual(result.spendOutputs[0].denomination, denominations[6]);
- // 0.05 Qi should be returned in change
- assert.strictEqual(result.changeOutputs.length, 1);
- assert.strictEqual(result.changeOutputs[0].denomination, denominations[3]);
- });
- });
- describe("Selecting valid UTXOs", function () {
- it("throws an error when there are insufficient funds", function () {
- const selector = new FewestCoinSelector(createUTXOs([denominations[0], denominations[0]]));
- assert.throws(() => selector.performSelection({ value: denominations[3], address: TEST_RECEIVE_ADDRESS }), /Insufficient funds/);
- });
- it("throws an error when no UTXOs are available", function () {
- const selector = new FewestCoinSelector([]);
- assert.throws(() => selector.performSelection({ value: denominations[2], address: TEST_RECEIVE_ADDRESS }), /No UTXOs available/);
- });
- it("throws an error when the target amount is negative", function () {
- const selector = new FewestCoinSelector(createUTXOs([denominations[2], denominations[2]]));
- assert.throws(() => selector.performSelection({ value: -denominations[1], address: TEST_RECEIVE_ADDRESS }), /Target amount must be greater than 0/);
- });
- });
-});
-//# sourceMappingURL=test-utxo-coinselection.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-utxo-coinselection.js.map b/lib.esm/_tests/test-utxo-coinselection.js.map
deleted file mode 100644
index 0c56d7cb..00000000
--- a/lib.esm/_tests/test-utxo-coinselection.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-utxo-coinselection.js","sourceRoot":"","sources":["../../src.ts/_tests/test-utxo-coinselection.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,kBAAkB,GAAG,4CAA4C,CAAC;AACxE,MAAM,oBAAoB,GAAG,4CAA4C,CAAC;AAE1E,yDAAyD;AACzD,SAAS,WAAW,CAAC,aAAuB;IACxC,OAAO,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACtC,YAAY;QACZ,OAAO,EAAE,kBAAkB;KAC9B,CAAC,CAAC,CAAC;AACR,CAAC;AAED,QAAQ,CAAC,oBAAoB,EAAE;IAC3B,QAAQ,CAAC,uBAAuB,EAAE;QAC9B,EAAE,CAAC,8DAA8D,EAAE;YAC/D,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU;YACtG,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC,SAAS;YACzF,MAAM,QAAQ,GAAG,IAAI,kBAAkB,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oB,EAAE,CAAC,EAAE,oBAAoB,CAAC,CAAC;QACrI,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6CAA6C,EAAE;YAC9C,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,EAAE,CAAC,CAAC;YAC5C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,CAAC,CAAC;QACrI,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oDAAoD,EAAE;YACrD,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3F,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,EAAE,sCAAsC,CAAC,CAAC;QACxJ,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-hd.d.ts b/lib.esm/_tests/test-wallet-hd.d.ts
deleted file mode 100644
index da7ceeb0..00000000
--- a/lib.esm/_tests/test-wallet-hd.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-wallet-hd.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-hd.d.ts.map b/lib.esm/_tests/test-wallet-hd.d.ts.map
deleted file mode 100644
index f42ecbbc..00000000
--- a/lib.esm/_tests/test-wallet-hd.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-hd.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-hd.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-hd.js b/lib.esm/_tests/test-wallet-hd.js
deleted file mode 100644
index a4b1ba62..00000000
--- a/lib.esm/_tests/test-wallet-hd.js
+++ /dev/null
@@ -1,119 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { getBytes, wordlists, HDNodeWallet, HDNodeVoidWallet, Mnemonic } from "../index.js";
-const decoder = new TextDecoder();
-function fromHex(hex) {
- const data = getBytes(hex);
- return decoder.decode(data);
-}
-describe("Test HDWallets", function () {
- function checkWallet(wallet, test) {
- assert.equal(wallet.chainCode, test.chainCode, "chainCode");
- assert.equal(wallet.depth, test.depth, "depth");
- assert.equal(wallet.index, test.index, "index");
- assert.equal(wallet.fingerprint, test.fingerprint, "fingerprint");
- assert.equal(wallet.accountFingerprint, test.parentFingerprint, "parentFingerprint");
- assert.equal(wallet.publicKey, test.publicKey, "publicKey");
- if (wallet instanceof HDNodeWallet) {
- assert.equal(wallet.extendedKey, test.xpriv, "xpriv");
- assert.equal(wallet.privateKey, test.privateKey, "privateKey");
- assert.equal(wallet.neuter().extendedKey, test.xpub, "xpub");
- }
- else if (wallet instanceof HDNodeVoidWallet) {
- assert.equal(wallet.extendedKey, test.xpub, "xpub");
- }
- }
- const tests = loadTests("mnemonics");
- const checks = [];
- tests.forEach((test) => {
- // The phrase and password are stored in the test as hex so they
- // are safe as ascii7 values for viewing, printing, etc.
- const phrase = fromHex(test.phrase);
- const password = fromHex(test.password);
- const wordlist = wordlists[test.locale];
- if (wordlist == null) {
- it(`tests ${test.name}`, function () {
- this.skip();
- });
- return;
- }
- const mnemonic = Mnemonic.fromPhrase(phrase, password, wordlist);
- function checkMnemonic(actual) {
- assert.equal(actual.phrase, phrase, "phrase");
- assert.equal(actual.password, password, "password");
- assert.equal(actual.wordlist.locale, test.locale, "locale");
- assert.equal(actual.entropy, mnemonic.entropy, "entropy");
- assert.equal(actual.computeSeed(), mnemonic.computeSeed(), "seed");
- }
- checks.push({
- phrase, password, wordlist, mnemonic, checkMnemonic, test
- });
- });
- for (const { test, checkMnemonic, phrase, password, wordlist } of checks) {
- it(`computes the HD keys by mnemonic: ${test.name}`, function () {
- for (const subtest of test.nodes) {
- const w = HDNodeWallet.fromPhrase(phrase, password, subtest.path, wordlist);
- assert.ok(w instanceof HDNodeWallet, "instanceof HDNodeWallet");
- assert.equal(w.path, subtest.path, "path");
- checkWallet(w, subtest);
- assert.ok(!!w.mnemonic, "has mnemonic");
- checkMnemonic(w.mnemonic);
- }
- });
- }
- for (const { test } of checks) {
- it(`computes the HD keys by entropy: ${test.name}`, function () {
- const seedRoot = HDNodeWallet.fromSeed(test.seed);
- for (const subtest of test.nodes) {
- const w = seedRoot.derivePath(subtest.path);
- assert.ok(w instanceof HDNodeWallet, "instanceof HDNodeWallet");
- assert.equal(w.path, subtest.path, "path");
- checkWallet(w, subtest);
- assert.equal(w.mnemonic, null);
- }
- });
- }
- for (const { test } of checks) {
- it(`computes the HD keys by enxtended private key: ${test.name}`, function () {
- for (const subtest of test.nodes) {
- const w = HDNodeWallet.fromExtendedKey(subtest.xpriv);
- assert.ok(w instanceof HDNodeWallet, "instanceof HDNodeWallet");
- checkWallet(w, subtest);
- assert.equal(w.mnemonic, null);
- }
- });
- }
- for (const { test, phrase, password, wordlist } of checks) {
- it(`computes the neutered HD keys by paths: ${test.name}`, function () {
- const root = HDNodeWallet.fromPhrase(phrase, password, "m", wordlist).neuter();
- for (const subtest of test.nodes) {
- if (subtest.path.indexOf("'") >= 0) {
- assert.throws(() => {
- const w = root.derivePath(subtest.path);
- console.log(w);
- }, (error) => {
- return (error.code === "UNSUPPORTED_OPERATION" &&
- error.message.match(/^cannot derive child of neutered node/) &&
- error.operation === "deriveChild");
- });
- }
- else {
- const w = root.derivePath(subtest.path);
- assert.ok(w instanceof HDNodeVoidWallet, "instanceof HDNodeVoidWallet");
- assert.equal(w.path, subtest.path, "path");
- checkWallet(w, subtest);
- }
- }
- });
- }
- for (const { test } of checks) {
- it(`computes the neutered HD keys by enxtended public key: ${test.name}`, function () {
- for (const subtest of test.nodes) {
- const w = HDNodeWallet.fromExtendedKey(subtest.xpub);
- assert.ok(w instanceof HDNodeVoidWallet, "instanceof HDNodeVoidWallet");
- checkWallet(w, subtest);
- }
- });
- }
-});
-//# sourceMappingURL=test-wallet-hd.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-hd.js.map b/lib.esm/_tests/test-wallet-hd.js.map
deleted file mode 100644
index 764a6700..00000000
--- a/lib.esm/_tests/test-wallet-hd.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-hd.js","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-hd.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EACH,QAAQ,EAAE,SAAS,EACnB,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAC3C,MAAM,aAAa,CAAC;AAOrB,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,SAAS,OAAO,CAAC,GAAW;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAWD,QAAQ,CAAC,gBAAgB,EAAE;IACvB,SAAS,WAAW,CAAC,MAAuC,EAAE,IAA0B;QACpF,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC5D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,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,MAAM,CAAC,EAAE,CAAC,CAAC,YAAY,gBAAgB,EAAE,6BAA6B,CAAC,CAAC;oBACxE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;oBAC1C,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;iBAC3B;aACJ;QACL,CAAC,CAAC,CAAC;KACN;IAED,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,MAAM,EAAE;QAC3B,EAAE,CAAC,0DAA2D,IAAI,CAAC,IAAK,EAAE,EAAE;YACxE,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE;gBAC9B,MAAM,CAAC,GAAG,YAAY,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACrD,MAAM,CAAC,EAAE,CAAC,CAAC,YAAY,gBAAgB,EAAE,6BAA6B,CAAC,CAAC;gBACxE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;aAC3B;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-json.d.ts b/lib.esm/_tests/test-wallet-json.d.ts
deleted file mode 100644
index f6b292db..00000000
--- a/lib.esm/_tests/test-wallet-json.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-wallet-json.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-json.d.ts.map b/lib.esm/_tests/test-wallet-json.d.ts.map
deleted file mode 100644
index d0e81890..00000000
--- a/lib.esm/_tests/test-wallet-json.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-json.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-json.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-json.js b/lib.esm/_tests/test-wallet-json.js
deleted file mode 100644
index d3d1ccf1..00000000
--- a/lib.esm/_tests/test-wallet-json.js
+++ /dev/null
@@ -1,164 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { isError, getBytes, decryptCrowdsaleJson, decryptKeystoreJson, decryptKeystoreJsonSync, encryptKeystoreJson, encryptKeystoreJsonSync, isCrowdsaleJson, HDNodeWallet, Wallet } from "../index.js";
-describe("Tests JSON Wallet Formats", function () {
- const tests = loadTests("wallets");
- tests.forEach((test) => {
- if (test.type !== "crowdsale") {
- return;
- }
- it(`tests decrypting Crowdsale JSON: ${test.name}`, async function () {
- const password = getBytes(test.password);
- const account = decryptCrowdsaleJson(test.content, password);
- assert.equal(account.address, test.address, "address");
- });
- });
- tests.forEach((test) => {
- if (test.type !== "keystore") {
- return;
- }
- it(`tests decrypting Keystore JSON (sync): ${test.name}`, function () {
- this.timeout(20000);
- const password = getBytes(test.password);
- const account = decryptKeystoreJsonSync(test.content, password);
- //console.log(account);
- assert.equal(account.address, test.address, "address");
- });
- });
- tests.forEach((test) => {
- if (test.type !== "keystore") {
- return;
- }
- it(`tests decrypting Keystore JSON (async): ${test.name}`, async function () {
- this.timeout(20000);
- const password = getBytes(test.password);
- const account = await decryptKeystoreJson(test.content, password);
- //console.log(account);
- assert.equal(account.address, test.address, "address");
- });
- });
- tests.forEach((test) => {
- it(`tests decrypting JSON (sync): ${test.name}`, function () {
- this.timeout(20000);
- const password = getBytes(test.password);
- const wallet = Wallet.fromEncryptedJsonSync(test.content, password);
- //console.log(wallet);
- assert.equal(wallet.address, test.address, "address");
- });
- });
- tests.forEach((test) => {
- it(`tests decrypting JSON (async): ${test.name}`, async function () {
- this.timeout(20000);
- const password = getBytes(test.password);
- const wallet = await Wallet.fromEncryptedJson(test.content, password);
- //console.log(wallet);
- assert.equal(wallet.address, test.address, "address");
- });
- });
- it("tests encrypting wallet with mnemonic", function () {
- this.timeout(20000);
- const wallet = HDNodeWallet.createRandom("m/44'/60'/0'/0/0");
- assert.ok(wallet.mnemonic, "mnemonic");
- const phrase = wallet.mnemonic.phrase;
- const json = wallet.encryptSync("foobar");
- const wallet2 = Wallet.fromEncryptedJsonSync(json, "foobar");
- assert.ok(wallet2 instanceof HDNodeWallet && wallet2.mnemonic);
- assert.equal(wallet2.mnemonic.phrase, phrase, "phrase");
- assert.equal(wallet2.address, wallet.address, "address");
- });
-});
-describe("Tests Extra JSON Wallet Functions", function () {
- const badCrowdsales = [
- {
- name: "undefined",
- value: undefined
- },
- {
- name: "junk string",
- value: "junk!"
- },
- {
- name: "non-string",
- value: 42
- },
- {
- name: "JSON without encseed",
- value: JSON.stringify({ foo: "bar" })
- },
- ];
- for (const { name, value } of badCrowdsales) {
- it(`tests the invalid isCrowdsale wallet: ${name}`, function () {
- assert.equal(isCrowdsaleJson(value), false);
- });
- }
- const badKeystoreOptions = [
- {
- name: "invalid salt type",
- options: { salt: 42 },
- error: "invalid BytesLike value"
- },
- {
- name: "invalid uuid type",
- options: { uuid: 42 },
- error: "invalid BytesLike value"
- },
- {
- name: "invalid uuid length",
- options: { uuid: "0x1234" },
- error: "invalid options.uuid"
- },
- {
- name: "invalid iv type",
- options: { iv: 42 },
- error: "invalid BytesLike value"
- },
- {
- name: "invalid iv length",
- options: { iv: "0x1234" },
- error: "invalid options.iv"
- },
- {
- name: "invalid scrypt N (non-one-hot-encoded)",
- options: { scrypt: { N: 1023 } },
- error: "invalid scrypt N parameter"
- },
- {
- name: "invalid scrypt N (non-integer)",
- options: { scrypt: { N: 1.5 } },
- error: "invalid scrypt N parameter"
- },
- {
- name: "invalid scrypt r",
- options: { scrypt: { r: 1.5 } },
- error: "invalid scrypt r parameter"
- },
- {
- name: "invalid scrypt p",
- options: { scrypt: { p: 1.5 } },
- error: "invalid scrypt p parameter"
- },
- ];
- const wallet = Wallet.createRandom("m/44'/994'/0'/0");
- const account = { address: wallet.address, privateKey: wallet.privateKey };
- const password = "foobar";
- for (const { name, options, error } of badKeystoreOptions) {
- it(`tests bad keystore options: ${name}`, function () {
- assert.throws(() => {
- const result = encryptKeystoreJsonSync(account, password, options);
- console.log(result);
- }, (e) => {
- return (isError(e, "INVALID_ARGUMENT") &&
- e.message.startsWith(error));
- });
- });
- }
- // Mainly to round out weird edge cases in coverage
- it("tests encryption with options (sync)", function () {
- assert.ok(encryptKeystoreJsonSync(account, password));
- });
- // Mainly to round out weird edge cases in coverage
- it("tests encryption with options (async)", async function () {
- assert.ok(await encryptKeystoreJson(account, password));
- });
-});
-//# sourceMappingURL=test-wallet-json.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-json.js.map b/lib.esm/_tests/test-wallet-json.js.map
deleted file mode 100644
index 5c07918c..00000000
--- a/lib.esm/_tests/test-wallet-json.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-json.js","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EACH,OAAO,EACP,QAAQ,EAER,oBAAoB,EAAE,mBAAmB,EAAE,uBAAuB,EAClE,mBAAmB,EAAE,uBAAuB,EAC5C,eAAe,EACf,YAAY,EAAE,MAAM,EACvB,MAAM,aAAa,CAAC;AAGrB,QAAQ,CAAC,2BAA2B,EAAE;IACjC,MAAM,KAAK,GAAG,SAAS,CAAiB,SAAS,CAAC,CAAC;IACnD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;YAAE,OAAO;SAAE;QAC1C,EAAE,CAAC,oCAAqC,IAAI,CAAC,IAAK,EAAE,EAAE,KAAK;YACvD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzC,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC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AAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,kBAAkB,EAAE;QACvD,EAAE,CAAC,+BAAgC,IAAK,EAAE,EAAE;YACxC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;gBACf,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;gBACnE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC,EAAE,CAAC,CAAM,EAAE,EAAE;gBACV,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,CAAC;oBAClC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;IAED,mDAAmD;IACnD,EAAE,CAAC,sCAAsC,EAAE;QACvC,MAAM,CAAC,EAAE,CAAC,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,mDAAmD;IACnD,EAAE,CAAC,uCAAuC,EAAE,KAAK;QAC7C,MAAM,CAAC,EAAE,CAAC,MAAM,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-mnemonic.d.ts b/lib.esm/_tests/test-wallet-mnemonic.d.ts
deleted file mode 100644
index 7b51aeda..00000000
--- a/lib.esm/_tests/test-wallet-mnemonic.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-wallet-mnemonic.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-mnemonic.d.ts.map b/lib.esm/_tests/test-wallet-mnemonic.d.ts.map
deleted file mode 100644
index ebe4e424..00000000
--- a/lib.esm/_tests/test-wallet-mnemonic.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-mnemonic.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-mnemonic.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-mnemonic.js b/lib.esm/_tests/test-wallet-mnemonic.js
deleted file mode 100644
index e27d082f..00000000
--- a/lib.esm/_tests/test-wallet-mnemonic.js
+++ /dev/null
@@ -1,118 +0,0 @@
-import assert from "assert";
-import { getBytes, sha256, toUtf8Bytes, Mnemonic, wordlists, } from "../index.js";
-import { loadTests } from "./utils.js";
-const decoder = new TextDecoder();
-function fromHex(hex) {
- const data = getBytes(hex);
- return decoder.decode(data);
-}
-function repeat(text, length) {
- const result = [];
- while (result.length < length) {
- result.push(text);
- }
- return result;
-}
-describe("Tests Mnemonics", function () {
- const tests = loadTests("mnemonics");
- function runTest(phrase, mnemonic, test) {
- assert.ok(Mnemonic.isValidMnemonic(phrase, mnemonic.wordlist), "isValidMnemonic");
- if (test.locale === "en") {
- assert.ok(Mnemonic.isValidMnemonic(phrase), "isValidMnemonic (default)");
- }
- assert.equal(mnemonic.wordlist.locale, test.locale, "locale");
- assert.equal(mnemonic.entropy, test.entropy, "entropy");
- assert.equal(mnemonic.computeSeed(), test.seed, "seed");
- assert.equal(sha256(toUtf8Bytes(phrase)), test.phraseHash, "phraseHash");
- }
- for (const test of tests) {
- const wordlist = wordlists[test.locale];
- it(`computes mnemonic from phrase: ${test.name}`, function () {
- if (wordlist == null) {
- this.skip();
- return;
- }
- const phrase = fromHex(test.phrase);
- const password = fromHex(test.password);
- const mnemonic = Mnemonic.fromPhrase(phrase, password, wordlist);
- runTest(phrase, mnemonic, test);
- });
- }
- for (const test of tests) {
- const wordlist = wordlists[test.locale];
- it(`computes mnemonic from entropy: ${test.name}`, function () {
- if (wordlist == null) {
- this.skip();
- return;
- }
- const phrase = fromHex(test.phrase);
- const password = fromHex(test.password);
- const mnemonic = Mnemonic.fromEntropy(test.entropy, password, wordlist);
- runTest(phrase, mnemonic, test);
- });
- }
-});
-describe("Tests Bad Mnemonics Fail", function () {
- const badLengths = [
- repeat("abandon", 9),
- repeat("abandon", 16),
- repeat("abandon", 27), // 27 words; too long
- ];
- for (const _phrase of badLengths) {
- const phrase = _phrase.join(" ");
- it(`correctly fails on invalid mnemonic length: ${_phrase.length}`, function () {
- assert.ok(!Mnemonic.isValidMnemonic(phrase));
- assert.throws(function () {
- Mnemonic.fromPhrase(phrase);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid mnemonic length/) &&
- error.argument === "mnemonic" &&
- error.value === "[ REDACTED ]");
- });
- });
- }
- it("correctly fails on invalid mnemonic word", function () {
- const phrase = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon wagmi";
- assert.ok(!Mnemonic.isValidMnemonic(phrase));
- assert.throws(function () {
- Mnemonic.fromPhrase(phrase);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid mnemonic word at index 11/) &&
- error.argument === "mnemonic" &&
- error.value === "[ REDACTED ]");
- });
- });
- it("correctly fails on invalid mnemonic checksum", function () {
- const phrase = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon";
- assert.ok(!Mnemonic.isValidMnemonic(phrase));
- assert.throws(function () {
- Mnemonic.fromPhrase(phrase);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid mnemonic checksum/) &&
- error.argument === "mnemonic" &&
- error.value === "[ REDACTED ]");
- });
- });
- const badEntropyLengths = [
- repeat("42", 12),
- repeat("42", 15),
- repeat("42", 36), // 36 bytes; too long
- ];
- for (const _entropy of badEntropyLengths) {
- const entropy = "0x" + _entropy.join("");
- it(`correctly fails on invalid entropy length: ${_entropy.length}`, function () {
- assert.throws(function () {
- Mnemonic.fromEntropy(entropy);
- }, function (error) {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid entropy size/) &&
- error.argument === "entropy" &&
- error.value === "[ REDACTED ]");
- });
- });
- }
-});
-//# sourceMappingURL=test-wallet-mnemonic.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet-mnemonic.js.map b/lib.esm/_tests/test-wallet-mnemonic.js.map
deleted file mode 100644
index bf35663b..00000000
--- a/lib.esm/_tests/test-wallet-mnemonic.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet-mnemonic.js","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet-mnemonic.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,QAAQ,EAAE,MAAM,EAAE,WAAW,EAC7B,QAAQ,EAAE,SAAS,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,SAAS,OAAO,CAAC,GAAW;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,MAAM,CAAC,IAAY,EAAE,MAAc;IACxC,MAAM,MAAM,GAAkB,EAAG,CAAC;IAClC,OAAO,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAAE;IACrD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,QAAQ,CAAC,iBAAiB,EAAE;IACxB,MAAM,KAAK,GAAG,SAAS,CAAmB,WAAW,CAAC,CAAC;IAEvD,SAAS,OAAO,CAAC,MAAc,EAAE,QAAkB,EAAE,IAAsB;QACvE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAClF,IAAI,IAAI,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C,IAAI,EAAE,EAAE,CAAC;QAChB,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,EAAG,qBAAqB;KAC3C,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,iBAAiB,EAAE;QACtC,MAAM,OAAO,GAAG,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzC,EAAE,CAAC,8CAA+C,QAAQ,CAAC,MAAO,EAAE,EAAE;YAClE,MAAM,CAAC,MAAM,CAAC;gBACV,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC,EAAE,UAAS,KAAU;gBAClB,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,kBAAkB;oBACrC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC;oBAC5C,KAAK,CAAC,QAAQ,KAAK,SAAS;oBAC5B,KAAK,CAAC,KAAK,KAAK,cAAc,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAA"}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet.d.ts b/lib.esm/_tests/test-wallet.d.ts
deleted file mode 100644
index 918eb2f0..00000000
--- a/lib.esm/_tests/test-wallet.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-wallet.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet.d.ts.map b/lib.esm/_tests/test-wallet.d.ts.map
deleted file mode 100644
index c63929ce..00000000
--- a/lib.esm/_tests/test-wallet.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet.js b/lib.esm/_tests/test-wallet.js
deleted file mode 100644
index 067c4d3d..00000000
--- a/lib.esm/_tests/test-wallet.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import assert from "assert";
-import { loadTests } from "./utils.js";
-import { hexlify, randomBytes, Wallet } from "../index.js";
-describe("Test Private Key Wallet", function () {
- const tests = loadTests("accounts");
- tests.forEach(({ name, privateKey, address }) => {
- it(`creates wallet: ${name}`, function () {
- const wallet = new Wallet(privateKey);
- assert.equal(wallet.privateKey, privateKey);
- assert.equal(wallet.address, address);
- });
- });
-});
-describe("Test Transaction Signing", function () {
- const tests = loadTests("transactions");
- for (const test of tests) {
- if (!test.signedEip155) {
- continue;
- }
- it(`tests signing an EIP-155 transaction: ${test.name}`, async function () {
- const wallet = new Wallet(test.privateKey);
- const txData = Object.assign({}, test.transaction, { type: 0, accessList: [], maxFeePerGas: 0, maxPriorityFeePerGas: 0 });
- const signed = await wallet.signTransaction(txData);
- // let parsed = Transaction.from(signed);
- // // console.log('txData: ', JSON.stringify(parsed))
- // // console.log('EXPECTED: ', test.signedEip155)
- // // console.log("ACTUAL: ", signed)
- assert.equal(signed, test.signedEip155, "signedEip155");
- });
- }
-});
-describe("Test Message Signing (EIP-191)", function () {
-});
-describe("Test Typed-Data Signing (EIP-712)", function () {
- const tests = loadTests("typed-data");
- for (const test of tests) {
- const { privateKey, signature } = test;
- if (privateKey == null || signature == null) {
- continue;
- }
- it(`tests signing typed-data: ${test.name}`, async function () {
- const wallet = new Wallet(privateKey);
- const sig = await wallet.signTypedData(test.domain, test.types, test.data);
- assert.equal(sig, signature, "signature");
- });
- }
-});
-describe("Test Wallet Encryption", function () {
- const password = "foobar";
- // Loop:
- // 1 : random wallet (uses HDNodeWallet under the hood)
- // 2 : Wallet using private key (uses Wallet explicitly)
- for (let i = 0; i < 2; i++) {
- let wallet = Wallet.createRandom("m/44'/994'/0'/0");
- it("encrypts a random wallet: sync", function () {
- this.timeout(30000);
- const json = wallet.encryptSync(password);
- const decrypted = Wallet.fromEncryptedJsonSync(json, password);
- assert.equal(decrypted.address, wallet.address, "address");
- });
- it("encrypts a random wallet: async", async function () {
- this.timeout(30000);
- const json = await wallet.encrypt(password);
- const decrypted = await Wallet.fromEncryptedJson(json, password);
- assert.equal(decrypted.address, wallet.address, "address");
- });
- wallet = new Wallet(hexlify(randomBytes(32)));
- }
-});
-//# sourceMappingURL=test-wallet.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wallet.js.map b/lib.esm/_tests/test-wallet.js.map
deleted file mode 100644
index ab550703..00000000
--- a/lib.esm/_tests/test-wallet.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wallet.js","sourceRoot":"","sources":["../../src.ts/_tests/test-wallet.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAK3D,QAAQ,CAAC,yBAAyB,EAAE;IAChC,MAAM,KAAK,GAAG,SAAS,CAAkB,UAAU,CAAC,CAAC;IAErD,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QAC5C,EAAE,CAAC,mBAAoB,IAAK,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE;IACjC,MAAM,KAAK,GAAG,SAAS,CAAsB,cAAc,CAAC,CAAC;IAE7D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YAAE,SA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/lib.esm/_tests/test-wordlists.d.ts b/lib.esm/_tests/test-wordlists.d.ts
deleted file mode 100644
index ea3f51d4..00000000
--- a/lib.esm/_tests/test-wordlists.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export {};
-//# sourceMappingURL=test-wordlists.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wordlists.d.ts.map b/lib.esm/_tests/test-wordlists.d.ts.map
deleted file mode 100644
index 244454d5..00000000
--- a/lib.esm/_tests/test-wordlists.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wordlists.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/test-wordlists.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wordlists.js b/lib.esm/_tests/test-wordlists.js
deleted file mode 100644
index 7c451644..00000000
--- a/lib.esm/_tests/test-wordlists.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import assert from "assert";
-import { wordlists } from "../index.js";
-import { loadTests } from "./utils.js";
-describe('Check Wordlists', function () {
- const tests = loadTests("wordlists");
- tests.forEach((test) => {
- let wordlist = wordlists[test.locale];
- if (wordlist == null) {
- return;
- }
- it(`matches wordlists: ${test.locale}`, function () {
- const words = test.content.split('\n');
- let check = "";
- for (let i = 0; i < 2048; i++) {
- let word = wordlist.getWord(i);
- check += (word + "\n");
- assert.equal(word, words[i]);
- assert.equal(wordlist.getWordIndex(word), i);
- }
- assert.equal(check, test.content);
- });
- });
- tests.forEach((test) => {
- let wordlist = wordlists[test.locale];
- if (wordlist == null) {
- return;
- }
- it(`splitting and joining are equivalent: ${test.locale}`, function () {
- const words = [];
- for (let i = 0; i < 12; i++) {
- words.push(wordlist.getWord(i));
- }
- const phrase = wordlist.join(words);
- const words2 = wordlist.split(phrase);
- const phrase2 = wordlist.join(words2);
- assert.deepEqual(words2, words, "split words");
- assert.deepEqual(phrase2, phrase, "re-joined words");
- });
- });
- tests.forEach((test) => {
- let wordlist = wordlists[test.locale];
- if (wordlist == null) {
- return;
- }
- it(`handles out-of-range values: ${test.locale}`, function () {
- assert.equal(wordlist.getWordIndex("foobar"), -1);
- assert.throws(() => {
- wordlist.getWord(-1);
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid word index/) &&
- error.argument === "index" &&
- error.value === -1);
- });
- assert.throws(() => {
- wordlist.getWord(2048);
- }, (error) => {
- return (error.code === "INVALID_ARGUMENT" &&
- error.message.match(/^invalid word index/) &&
- error.argument === "index" &&
- error.value === 2048);
- });
- });
- });
-});
-//# sourceMappingURL=test-wordlists.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/test-wordlists.js.map b/lib.esm/_tests/test-wordlists.js.map
deleted file mode 100644
index 53e07fb8..00000000
--- a/lib.esm/_tests/test-wordlists.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"test-wordlists.js","sourceRoot":"","sources":["../../src.ts/_tests/test-wordlists.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,QAAQ,CAAC,iBAAiB,EAAE;IACxB,MAAM,KAAK,GAAG,SAAS,CAAmB,WAAW,CAAC,CAAC;IAEvD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,IAAI,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,QAAQ,IAAI,IAAI,EAAE;YAAE,OAAO;SAAE;QAEjC,EAAE,CAAC,sBAAuB,IAAI,CAAC,MAAO,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAEvC,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GA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types.d.ts b/lib.esm/_tests/types.d.ts
deleted file mode 100644
index fcd151ca..00000000
--- a/lib.esm/_tests/types.d.ts
+++ /dev/null
@@ -1,218 +0,0 @@
-export type TestCaseAbiVerbose = {
- type: "address" | "hexstring" | "number" | "string";
- value: string;
-} | {
- type: "boolean";
- value: boolean;
-} | {
- type: "array";
- value: Array;
-} | {
- type: "object";
- value: Array;
-};
-export interface TestCaseAbi {
- name: string;
- type: string;
- value: any;
- verbose: TestCaseAbiVerbose;
- bytecode: string;
- encoded: string;
-}
-export interface TestCaseAccount {
- name: string;
- privateKey: string;
- address: string;
- icap: string;
-}
-export type TestCaseCreate = {
- sender: string;
- creates: Array<{
- name: string;
- nonce: number;
- address: string;
- }>;
-};
-export type TestCaseCreate2 = {
- sender: string;
- creates: Array<{
- name: string;
- salt: string;
- initCode: string;
- initCodeHash: string;
- address: string;
- }>;
-};
-export interface TestCaseHash {
- name: string;
- data: string;
- sha256: string;
- sha512: string;
- ripemd160: string;
- keccak256: string;
-}
-export interface TestCasePbkdf {
- name: string;
- password: string;
- salt: string;
- dkLen: number;
- pbkdf2: {
- iterations: number;
- algorithm: "sha256" | "sha512";
- key: string;
- };
- scrypt: {
- N: number;
- r: number;
- p: number;
- key: string;
- };
-}
-export interface TestCaseHmac {
- name: string;
- data: string;
- key: string;
- algorithm: "sha256" | "sha512";
- hmac: string;
-}
-export interface TestCaseHash {
- name: string;
- data: string;
- sha256: string;
- sha512: string;
- ripemd160: string;
- keccak256: string;
-}
-export interface TestCaseNamehash {
- name: string;
- ensName: string;
- error?: string;
- namehash?: string;
-}
-export interface TestCaseTypedDataDomain {
- name?: string;
- version?: string;
- chainId?: number;
- verifyingContract?: string;
- salt?: string;
-}
-export interface TestCaseTypedDataType {
- name: string;
- type: string;
-}
-export interface TestCaseTypedData {
- name: string;
- domain: TestCaseTypedDataDomain;
- primaryType: string;
- types: Record>;
- data: any;
- encoded: string;
- digest: string;
- privateKey?: string;
- signature?: string;
-}
-export interface TestCaseSolidityHash {
- name: string;
- types: Array;
- keccak256: string;
- ripemd160: string;
- sha256: string;
- values: Array;
-}
-export interface TestCaseUnit {
- name: string;
- wei: string;
- quais: string;
- ether_format: string;
- kwei?: string;
- mwei?: string;
- gwei?: string;
- szabo?: string;
- finney?: string;
- finney_format?: string;
- szabo_format?: string;
- gwei_format?: string;
- mwei_format?: string;
- kwei_format?: string;
-}
-export type NestedHexString = string | Array;
-export interface TestCaseRlp {
- name: string;
- encoded: string;
- decoded: NestedHexString;
-}
-export interface TestCaseTransactionTx {
- to?: string;
- from: string;
- nonce?: number;
- gasLimit?: string;
- gasPrice?: string;
- maxFeePerGas?: string;
- maxPriorityFeePerGas?: string;
- data?: string;
- value?: string;
- accessList?: Array<{
- address: string;
- storageKeys: Array;
- }>;
- chainId?: string;
-}
-export interface TestCaseTransactionSig {
- r: string;
- s: string;
- v: string;
-}
-export interface TestCaseTransaction {
- name: string;
- transaction: TestCaseTransactionTx;
- privateKey: string;
- unsignedLegacy: string;
- signedLegacy: string;
- unsignedEip155: string;
- signedEip155: string;
- unsignedBerlin: string;
- signedBerlin: string;
- unsignedLondon: string;
- signedLondon: string;
- signatureLegacy: TestCaseTransactionSig;
- signatureEip155: TestCaseTransactionSig;
- signatureBerlin: TestCaseTransactionSig;
- signatureLondon: TestCaseTransactionSig;
-}
-export interface TestCaseMnemonicNode {
- path: string;
- chainCode: string;
- depth: number;
- index: number;
- parentFingerprint: string;
- fingerprint: string;
- publicKey: string;
- privateKey: string;
- xpriv: string;
- xpub: string;
-}
-export interface TestCaseMnemonic {
- name: string;
- phrase: string;
- phraseHash: string;
- password: string;
- locale: string;
- entropy: string;
- seed: string;
- nodes: Array;
-}
-export interface TestCaseWallet {
- name: string;
- filename: string;
- type: string;
- address: string;
- password: string;
- content: string;
-}
-export interface TestCaseWordlist {
- name: string;
- filename: string;
- locale: string;
- content: string;
-}
-//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/types.d.ts.map b/lib.esm/_tests/types.d.ts.map
deleted file mode 100644
index 53aa7770..00000000
--- a/lib.esm/_tests/types.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpD,KAAK,EAAE,MAAM,CAAA;CAChB,GAAG;IACA,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,OAAO,CAAA;CACjB,GAAG;IACA,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACnC,GAAG;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB;AAKD,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAA;KAClB,CAAC,CAAC;CACN,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QACX,IAAI,E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AO,EAAE,MAAM,CAAC;CACnB;AAKD,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACnB"}
\ No newline at end of file
diff --git a/lib.esm/_tests/types.js b/lib.esm/_tests/types.js
deleted file mode 100644
index 4f418f71..00000000
--- a/lib.esm/_tests/types.js
+++ /dev/null
@@ -1,3 +0,0 @@
-;
-export {};
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/types.js.map b/lib.esm/_tests/types.js.map
deleted file mode 100644
index 68216b0f..00000000
--- a/lib.esm/_tests/types.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AA6PC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_tests/utils.d.ts b/lib.esm/_tests/utils.d.ts
deleted file mode 100644
index 4621f777..00000000
--- a/lib.esm/_tests/utils.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export declare function loadTests(tag: string): Array;
-export declare function log(context: any, text: string): void;
-export declare function stall(duration: number): Promise;
-export interface MochaRunnable {
- timeout: (value: number) => void;
- skip: () => void;
-}
-export declare function retryIt(name: string, func: (this: MochaRunnable) => Promise): Promise;
-//# sourceMappingURL=utils.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_tests/utils.d.ts.map b/lib.esm/_tests/utils.d.ts.map
deleted file mode 100644
index 16e81ace..00000000
--- a/lib.esm/_tests/utils.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/utils.ts"],"names":[],"mappings":"AAoBA,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAGlD;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAMpD;AAED,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,IAAI,CAAC;CACpB;AAGD,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCvG"}
\ No newline at end of file
diff --git a/lib.esm/_tests/utils.js b/lib.esm/_tests/utils.js
deleted file mode 100644
index e579f4bb..00000000
--- a/lib.esm/_tests/utils.js
+++ /dev/null
@@ -1,125 +0,0 @@
-import fs from "fs";
-import path from "path";
-import zlib from "zlib";
-// Find the package root (based on the nyc output/ folder)
-const root = (function () {
- let root = process.cwd();
- while (true) {
- if (fs.existsSync(path.join(root, "output"))) {
- return root;
- }
- const parent = path.join(root, "..");
- if (parent === root) {
- break;
- }
- root = parent;
- }
- throw new Error("could not find root");
-})();
-// Load the tests
-export function loadTests(tag) {
- const filename = path.resolve(root, "testcases", tag + ".json.gz");
- return JSON.parse(zlib.gunzipSync(fs.readFileSync(filename)).toString());
-}
-export function log(context, text) {
- if (context && context.test && typeof (context.test._quaisLog) === "function") {
- context.test._quaisLog(text);
- }
- else {
- console.log(text);
- }
-}
-export async function stall(duration) {
- return new Promise((resolve) => { setTimeout(resolve, duration); });
-}
-const ATTEMPTS = 5;
-export async function retryIt(name, func) {
- //const errors: Array = [ ];
- it(name, async function () {
- this.timeout(ATTEMPTS * 5000);
- for (let i = 0; i < ATTEMPTS; i++) {
- try {
- await func.call(this);
- return;
- }
- catch (error) {
- if (error.message === "sync skip; aborting execution") {
- // Skipping a test; let mocha handle it
- throw error;
- }
- else if (error.code === "ERR_ASSERTION") {
- // Assertion error; let mocha scold us
- throw error;
- }
- else {
- //errors.push(error);
- if (i === ATTEMPTS - 1) {
- throw error;
- //stats.pushRetry(i, name, error);
- }
- else {
- await stall(500 * (1 << i));
- //stats.pushRetry(i, name, null);
- }
- }
- }
- }
- // All hope is lost.
- throw new Error(`Failed after ${ATTEMPTS} attempts; ${name}`);
- });
-}
-/*
-export interface StatSet {
- name: string;
- retries: Array<{ message: string, error: null | Error }>;
-}
-
-const _guard = { };
-
-export class Stats {
-// #stats: Array;
-
- constructor(guard: any) {
- if (guard !== _guard) { throw new Error("private constructor"); }
-// this.#stats = [ ];
- }
-
- #currentStats(): StatSet {
- if (this.#stats.length === 0) { throw new Error("no active stats"); }
- return this.#stats[this.#stats.length - 1];
- }
-
- pushRetry(attempt: number, line: string, error: null | Error): void {
- const { retries } = this.#currentStats();
-
- if (attempt > 0) { retries.pop(); }
- if (retries.length < 100) {
- retries.push({
- message: `${ attempt + 1 } failures: ${ line }`,
- error
- });
- }
- }
-
- start(name: string): void {
- this.#stats.push({ name, retries: [ ] });
- }
-
- end(context?: any): void {
- let log = console.log.bind(console);
- if (context && typeof(context._quaisLog) === "function") {
- log = context._quaisLog;
- }
- const { name, retries } = this.#currentStats();
- if (retries.length === 0) { return; }
- log(`Warning: The following tests required retries (${ name })`);
- retries.forEach(({ error, message }) => {
- log(" " + message);
- if (error) { log(error); }
- });
- }
-}
-
-export const stats = new Stats(_guard);
-*/
-//# sourceMappingURL=utils.js.map
\ No newline at end of file
diff --git a/lib.esm/_tests/utils.js.map b/lib.esm/_tests/utils.js.map
deleted file mode 100644
index 1c0d2f86..00000000
--- a/lib.esm/_tests/utils.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src.ts/_tests/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,O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_version.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- * The current version of quais.
- */
-export declare const version: string;
-//# sourceMappingURL=_version.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/_version.d.ts.map b/lib.esm/_version.d.ts.map
deleted file mode 100644
index 502b731b..00000000
--- a/lib.esm/_version.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAgB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/_version.js b/lib.esm/_version.js
deleted file mode 100644
index 08ec83bf..00000000
--- a/lib.esm/_version.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
-/**
- * The current version of quais.
- */
-export const version = "0.0.1";
-//# sourceMappingURL=_version.js.map
\ No newline at end of file
diff --git a/lib.esm/_version.js.map b/lib.esm/_version.js.map
deleted file mode 100644
index 360ba34f..00000000
--- a/lib.esm/_version.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAW,OAAO,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/abi/abi-coder.d.ts b/lib.esm/abi/abi-coder.d.ts
deleted file mode 100644
index 106f2166..00000000
--- a/lib.esm/abi/abi-coder.d.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * When sending values to or receiving values from a [[Contract]], the
- * data is generally encoded using the [ABI standard](link-solc-abi).
- *
- * The AbiCoder provides a utility to encode values to ABI data and
- * decode values from ABI data.
- *
- * Most of the time, developers should favour the [[Contract]] class,
- * which further abstracts a lot of the finer details of ABI data.
- *
- * @_section api/abi/abi-coder:ABI Encoding
- */
-import { Result } from "./coders/abstract-coder.js";
-import { ParamType } from "./fragments.js";
-import type { BytesLike, CallExceptionAction, CallExceptionError } from "../utils/index.js";
-/**
- * The **AbiCoder** is a low-level class responsible for encoding JavaScript
- * values into binary data and decoding binary data into JavaScript values.
- */
-export declare class AbiCoder {
- #private;
- /**
- * Get the default values for the given %%types%%.
- *
- * For example, a ``uint`` is by default ``0`` and ``bool``
- * is by default ``false``.
- */
- getDefaultValue(types: ReadonlyArray): Result;
- /**
- * Encode the %%values%% as the %%types%% into ABI data.
- *
- * @returns DataHexstring
- */
- encode(types: ReadonlyArray, values: ReadonlyArray): string;
- /**
- * Decode the ABI %%data%% as the %%types%% into values.
- *
- * If %%loose%% decoding is enabled, then strict padding is
- * not enforced. Some older versions of Solidity incorrectly
- * padded event data emitted from ``external`` functions.
- */
- decode(types: ReadonlyArray, data: BytesLike, loose?: boolean): Result;
- static _setDefaultMaxInflation(value: number): void;
- /**
- * Returns the shared singleton instance of a default [[AbiCoder]].
- *
- * On the first call, the instance is created internally.
- */
- static defaultAbiCoder(): AbiCoder;
- /**
- * Returns an quais-compatible [[CallExceptionError]] Error for the given
- * result %%data%% for the [[CallExceptionAction]] %%action%% against
- * the Transaction %%tx%%.
- */
- static getBuiltinCallException(action: CallExceptionAction, tx: {
- to?: null | string;
- from?: null | string;
- data?: string;
- }, data: null | BytesLike): CallExceptionError;
-}
-//# sourceMappingURL=abi-coder.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/abi-coder.d.ts.map b/lib.esm/abi/abi-coder.d.ts.map
deleted file mode 100644
index 0a0c483e..00000000
--- a/lib.esm/abi/abi-coder.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"abi-coder.d.ts","sourceRoot":"","sources":["../../src.ts/abi/abi-coder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAiB,MAAM,EAAU,MAAM,4BAA4B,CAAC;AAU3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,OAAO,KAAK,EACR,SAAS,EACT,mBAAmB,EAAE,kBAAkB,EAC1C,MAAM,mBAAmB,CAAC;AAuF3B;;;GAGG;AACH,qBAAa,QAAQ;;IA4CjB;;;;;OAKG;IACH,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM;IAMjE;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM;IAWpF;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM;IAM1F,MAAM,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKnD;;;;OAIG;IACH,MAAM,CAAC,eAAe,IAAI,QAAQ;IAOlC;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAAC,MAAM,EAAE,mBAAmB,EAAE,EAAE,EAAE;QAAE,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,kBAAkB;CAG3K"}
\ No newline at end of file
diff --git a/lib.esm/abi/abi-coder.js b/lib.esm/abi/abi-coder.js
deleted file mode 100644
index 4276f444..00000000
--- a/lib.esm/abi/abi-coder.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * When sending values to or receiving values from a [[Contract]], the
- * data is generally encoded using the [ABI standard](link-solc-abi).
- *
- * The AbiCoder provides a utility to encode values to ABI data and
- * decode values from ABI data.
- *
- * Most of the time, developers should favour the [[Contract]] class,
- * which further abstracts a lot of the finer details of ABI data.
- *
- * @_section api/abi/abi-coder:ABI Encoding
- */
-// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
-import { assertArgumentCount, assertArgument } from "../utils/index.js";
-import { Reader, Writer } from "./coders/abstract-coder.js";
-import { AddressCoder } from "./coders/address.js";
-import { ArrayCoder } from "./coders/array.js";
-import { BooleanCoder } from "./coders/boolean.js";
-import { BytesCoder } from "./coders/bytes.js";
-import { FixedBytesCoder } from "./coders/fixed-bytes.js";
-import { NullCoder } from "./coders/null.js";
-import { NumberCoder } from "./coders/number.js";
-import { StringCoder } from "./coders/string.js";
-import { TupleCoder } from "./coders/tuple.js";
-import { ParamType } from "./fragments.js";
-import { getAddress } from "../address/index.js";
-import { getBytes, hexlify, makeError } from "../utils/index.js";
-// https://docs.soliditylang.org/en/v0.8.17/control-structures.html
-const PanicReasons = new Map();
-PanicReasons.set(0x00, "GENERIC_PANIC");
-PanicReasons.set(0x01, "ASSERT_FALSE");
-PanicReasons.set(0x11, "OVERFLOW");
-PanicReasons.set(0x12, "DIVIDE_BY_ZERO");
-PanicReasons.set(0x21, "ENUM_RANGE_ERROR");
-PanicReasons.set(0x22, "BAD_STORAGE_DATA");
-PanicReasons.set(0x31, "STACK_UNDERFLOW");
-PanicReasons.set(0x32, "ARRAY_RANGE_ERROR");
-PanicReasons.set(0x41, "OUT_OF_MEMORY");
-PanicReasons.set(0x51, "UNINITIALIZED_FUNCTION_CALL");
-const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
-const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
-let defaultCoder = null;
-let defaultMaxInflation = 1024;
-function getBuiltinCallException(action, tx, data, abiCoder) {
- let message = "missing revert data";
- let reason = null;
- const invocation = null;
- let revert = null;
- if (data) {
- message = "execution reverted";
- const bytes = getBytes(data);
- data = hexlify(data);
- if (bytes.length === 0) {
- message += " (no data present; likely require(false) occurred";
- reason = "require(false)";
- }
- else if (bytes.length % 32 !== 4) {
- message += " (could not decode reason; invalid data length)";
- }
- else if (hexlify(bytes.slice(0, 4)) === "0x08c379a0") {
- // Error(string)
- try {
- reason = abiCoder.decode(["string"], bytes.slice(4))[0];
- revert = {
- signature: "Error(string)",
- name: "Error",
- args: [reason]
- };
- message += `: ${JSON.stringify(reason)}`;
- }
- catch (error) {
- message += " (could not decode reason; invalid string data)";
- }
- }
- else if (hexlify(bytes.slice(0, 4)) === "0x4e487b71") {
- // Panic(uint256)
- try {
- const code = Number(abiCoder.decode(["uint256"], bytes.slice(4))[0]);
- revert = {
- signature: "Panic(uint256)",
- name: "Panic",
- args: [code]
- };
- reason = `Panic due to ${PanicReasons.get(code) || "UNKNOWN"}(${code})`;
- message += `: ${reason}`;
- }
- catch (error) {
- message += " (could not decode panic code)";
- }
- }
- else {
- message += " (unknown custom error)";
- }
- }
- const transaction = {
- to: (tx.to ? getAddress(tx.to) : null),
- data: (tx.data || "0x")
- };
- if (tx.from) {
- transaction.from = getAddress(tx.from);
- }
- return makeError(message, "CALL_EXCEPTION", {
- action, data, reason, transaction, invocation, revert
- });
-}
-/**
- * The **AbiCoder** is a low-level class responsible for encoding JavaScript
- * values into binary data and decoding binary data into JavaScript values.
- */
-export class AbiCoder {
- #getCoder(param) {
- if (param.isArray()) {
- return new ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);
- }
- if (param.isTuple()) {
- return new TupleCoder(param.components.map((c) => this.#getCoder(c)), param.name);
- }
- switch (param.baseType) {
- case "address":
- return new AddressCoder(param.name);
- case "bool":
- return new BooleanCoder(param.name);
- case "string":
- return new StringCoder(param.name);
- case "bytes":
- return new BytesCoder(param.name);
- case "":
- return new NullCoder(param.name);
- }
- // u?int[0-9]*
- let match = param.type.match(paramTypeNumber);
- if (match) {
- let size = parseInt(match[2] || "256");
- assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, "invalid " + match[1] + " bit length", "param", param);
- return new NumberCoder(size / 8, (match[1] === "int"), param.name);
- }
- // bytes[0-9]+
- match = param.type.match(paramTypeBytes);
- if (match) {
- let size = parseInt(match[1]);
- assertArgument(size !== 0 && size <= 32, "invalid bytes length", "param", param);
- return new FixedBytesCoder(size, param.name);
- }
- assertArgument(false, "invalid type", "type", param.type);
- }
- /**
- * Get the default values for the given %%types%%.
- *
- * For example, a ``uint`` is by default ``0`` and ``bool``
- * is by default ``false``.
- */
- getDefaultValue(types) {
- const coders = types.map((type) => this.#getCoder(ParamType.from(type)));
- const coder = new TupleCoder(coders, "_");
- return coder.defaultValue();
- }
- /**
- * Encode the %%values%% as the %%types%% into ABI data.
- *
- * @returns DataHexstring
- */
- encode(types, values) {
- assertArgumentCount(values.length, types.length, "types/values length mismatch");
- const coders = types.map((type) => this.#getCoder(ParamType.from(type)));
- const coder = (new TupleCoder(coders, "_"));
- const writer = new Writer();
- coder.encode(writer, values);
- return writer.data;
- }
- /**
- * Decode the ABI %%data%% as the %%types%% into values.
- *
- * If %%loose%% decoding is enabled, then strict padding is
- * not enforced. Some older versions of Solidity incorrectly
- * padded event data emitted from ``external`` functions.
- */
- decode(types, data, loose) {
- const coders = types.map((type) => this.#getCoder(ParamType.from(type)));
- const coder = new TupleCoder(coders, "_");
- return coder.decode(new Reader(data, loose, defaultMaxInflation));
- }
- static _setDefaultMaxInflation(value) {
- assertArgument(typeof (value) === "number" && Number.isInteger(value), "invalid defaultMaxInflation factor", "value", value);
- defaultMaxInflation = value;
- }
- /**
- * Returns the shared singleton instance of a default [[AbiCoder]].
- *
- * On the first call, the instance is created internally.
- */
- static defaultAbiCoder() {
- if (defaultCoder == null) {
- defaultCoder = new AbiCoder();
- }
- return defaultCoder;
- }
- /**
- * Returns an quais-compatible [[CallExceptionError]] Error for the given
- * result %%data%% for the [[CallExceptionAction]] %%action%% against
- * the Transaction %%tx%%.
- */
- static getBuiltinCallException(action, tx, data) {
- return getBuiltinCallException(action, tx, data, AbiCoder.defaultAbiCoder());
- }
-}
-//# sourceMappingURL=abi-coder.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/abi-coder.js.map b/lib.esm/abi/abi-coder.js.map
deleted file mode 100644
index db43966e..00000000
--- a/lib.esm/abi/abi-coder.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"abi-coder.js","sourceRoot":"","sources":["../../src.ts/abi/abi-coder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,mEAAmE;AAEnE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAS,MAAM,EAAU,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOjE,mEAAmE;AACnE,MAAM,YAAY,GAAwB,IAAI,GAAG,EAAE,CAAC;AACpD,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AACxC,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACvC,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AACnC,YAAY,CA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QACxC,cAAc,CAAC,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,oCAAoC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAC5H,mBAAmB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,eAAe;QAClB,IAAI,YAAY,IAAI,IAAI,EAAE;YACtB,YAAY,GAAG,IAAI,QAAQ,EAAE,CAAC;SACjC;QACD,OAAO,YAAY,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAAC,MAA2B,EAAE,EAA+D,EAAE,IAAsB;QAC/I,OAAO,uBAAuB,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;IACjF,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/bytes32.d.ts b/lib.esm/abi/bytes32.d.ts
deleted file mode 100644
index 73455cb5..00000000
--- a/lib.esm/abi/bytes32.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * About bytes32 strings...
- *
- * @_docloc: api/utils:Bytes32 Strings
- */
-import type { BytesLike } from "../utils/index.js";
-/**
- * Encodes %%text%% as a Bytes32 string.
- */
-export declare function encodeBytes32String(text: string): string;
-/**
- * Encodes the Bytes32-encoded %%bytes%% into a string.
- */
-export declare function decodeBytes32String(_bytes: BytesLike): string;
-//# sourceMappingURL=bytes32.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/bytes32.d.ts.map b/lib.esm/abi/bytes32.d.ts.map
deleted file mode 100644
index 1d56cd6f..00000000
--- a/lib.esm/abi/bytes32.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bytes32.d.ts","sourceRoot":"","sources":["../../src.ts/abi/bytes32.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAa7D"}
\ No newline at end of file
diff --git a/lib.esm/abi/bytes32.js b/lib.esm/abi/bytes32.js
deleted file mode 100644
index 20d586bf..00000000
--- a/lib.esm/abi/bytes32.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * About bytes32 strings...
- *
- * @_docloc: api/utils:Bytes32 Strings
- */
-import { getBytes, toUtf8Bytes, toUtf8String, zeroPadBytes } from "../utils/index.js";
-/**
- * Encodes %%text%% as a Bytes32 string.
- */
-export function encodeBytes32String(text) {
- // Get the bytes
- const bytes = toUtf8Bytes(text);
- // Check we have room for null-termination
- if (bytes.length > 31) {
- throw new Error("bytes32 string must be less than 32 bytes");
- }
- // Zero-pad (implicitly null-terminates)
- return zeroPadBytes(bytes, 32);
-}
-/**
- * Encodes the Bytes32-encoded %%bytes%% into a string.
- */
-export function decodeBytes32String(_bytes) {
- const data = getBytes(_bytes, "bytes");
- // Must be 32 bytes with a null-termination
- if (data.length !== 32) {
- throw new Error("invalid bytes32 - not 32 bytes long");
- }
- if (data[31] !== 0) {
- throw new Error("invalid bytes32 string - no null terminator");
- }
- // Find the null termination
- let length = 31;
- while (data[length - 1] === 0) {
- length--;
- }
- // Determine the string value
- return toUtf8String(data.slice(0, length));
-}
-//# sourceMappingURL=bytes32.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/bytes32.js.map b/lib.esm/abi/bytes32.js.map
deleted file mode 100644
index 98e8316f..00000000
--- a/lib.esm/abi/bytes32.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bytes32.js","sourceRoot":"","sources":["../../src.ts/abi/bytes32.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACH,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EACpD,MAAM,mBAAmB,CAAC;AAI3B;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAE5C,gBAAgB;IAChB,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAEhC,0CAA0C;IAC1C,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAAE;IAExF,wCAAwC;IACxC,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC,2CAA2C;IAC3C,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAAE;IACnF,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAAE;IAEvF,4BAA4B;IAC5B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,CAAC;KAAE;IAE5C,6BAA6B;IAC7B,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/abstract-coder.d.ts b/lib.esm/abi/coders/abstract-coder.d.ts
deleted file mode 100644
index 3eaa07c2..00000000
--- a/lib.esm/abi/coders/abstract-coder.d.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import type { BigNumberish, BytesLike } from "../../utils/index.js";
-/**
- * @_ignore:
- */
-export declare const WordSize: number;
-/**
- * A [[Result]] is a sub-class of Array, which allows accessing any
- * of its values either positionally by its index or, if keys are
- * provided by its name.
- *
- * @_docloc: api/abi
- */
-export declare class Result extends Array {
- #private;
- [K: string | number]: any;
- /**
- * @private
- */
- constructor(...args: Array);
- /**
- * Returns the Result as a normal Array.
- *
- * This will throw if there are any outstanding deferred
- * errors.
- */
- toArray(): Array;
- /**
- * Returns the Result as an Object with each name-value pair.
- *
- * This will throw if any value is unnamed, or if there are
- * any outstanding deferred errors.
- */
- toObject(): Record;
- /**
- * @_ignore
- */
- slice(start?: number | undefined, end?: number | undefined): Result;
- /**
- * @_ignore
- */
- filter(callback: (el: any, index: number, array: Result) => boolean, thisArg?: any): Result;
- /**
- * @_ignore
- */
- map(callback: (el: any, index: number, array: Result) => T, thisArg?: any): Array;
- /**
- * Returns the value for %%name%%.
- *
- * Since it is possible to have a key whose name conflicts with
- * a method on a [[Result]] or its superclass Array, or any
- * JavaScript keyword, this ensures all named values are still
- * accessible by name.
- */
- getValue(name: string): any;
- /**
- * Creates a new [[Result]] for %%items%% with each entry
- * also accessible by its corresponding name in %%keys%%.
- */
- static fromItems(items: Array, keys?: Array): Result;
-}
-/**
- * Returns all errors found in a [[Result]].
- *
- * Since certain errors encountered when creating a [[Result]] do
- * not impact the ability to continue parsing data, they are
- * deferred until they are actually accessed. Hence a faulty string
- * in an Event that is never used does not impact the program flow.
- *
- * However, sometimes it may be useful to access, identify or
- * validate correctness of a [[Result]].
- *
- * @_docloc api/abi
- */
-export declare function checkResultErrors(result: Result): Array<{
- path: Array;
- error: Error;
-}>;
-/**
- * @_ignore
- */
-export declare abstract class Coder {
- readonly name: string;
- readonly type: string;
- readonly localName: string;
- readonly dynamic: boolean;
- constructor(name: string, type: string, localName: string, dynamic: boolean);
- _throwError(message: string, value: any): never;
- abstract encode(writer: Writer, value: any): number;
- abstract decode(reader: Reader): any;
- abstract defaultValue(): any;
-}
-/**
- * @_ignore
- */
-export declare class Writer {
- #private;
- constructor();
- get data(): string;
- get length(): number;
- appendWriter(writer: Writer): number;
- writeBytes(value: BytesLike): number;
- writeValue(value: BigNumberish): number;
- writeUpdatableValue(): (value: BigNumberish) => void;
-}
-/**
- * @_ignore
- */
-export declare class Reader {
- #private;
- readonly allowLoose: boolean;
- constructor(data: BytesLike, allowLoose?: boolean, maxInflation?: number);
- get data(): string;
- get dataLength(): number;
- get consumed(): number;
- get bytes(): Uint8Array;
- subReader(offset: number): Reader;
- readBytes(length: number, loose?: boolean): Uint8Array;
- readValue(): bigint;
- readIndex(): number;
-}
-//# sourceMappingURL=abstract-coder.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/abstract-coder.d.ts.map b/lib.esm/abi/coders/abstract-coder.d.ts.map
deleted file mode 100644
index 4e4cc78c..00000000
--- a/lib.esm/abi/coders/abstract-coder.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"abstract-coder.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/abstract-coder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAW,CAAC;AAenC;;;;;;GAMG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,GAAG,CAAC;;IAGlC,CAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAI,GAAG,CAAA;IAE3B;;OAEG;gBACS,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAyF/B;;;;;OAKG;IACH,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC;IASrB;;;;;OAKG;IACH,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAe/B;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAuBnE;;OAEG;IACH,MAAM,CAAC,QAAQ,EA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GAAG,GAAG,MAAM;IACnD,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;IAEpC,QAAQ,CAAC,YAAY,IAAI,GAAG;CAC/B;AAED;;GAEG;AACH,qBAAa,MAAM;;;IAUf,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,MAAM,IAAI,MAAM,CAA6B;IAQjD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAKpC,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAUpC,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM;IAMvC,mBAAmB,IAAI,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI;CAQvD;AAED;;GAEG;AACH,qBAAa,MAAM;;IAKf,QAAQ,CAAC,UAAU,EAAG,OAAO,CAAC;gBASlB,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM;IAWxE,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,IAAI,UAAU,IAAI,MAAM,CAA8B;IACtD,IAAI,QAAQ,IAAI,MAAM,CAAyB;IAC/C,IAAI,KAAK,IAAI,UAAU,CAAuC;IAkC9D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAOjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU;IAStD,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;CAGtB"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/abstract-coder.js b/lib.esm/abi/coders/abstract-coder.js
deleted file mode 100644
index fcfb5845..00000000
--- a/lib.esm/abi/coders/abstract-coder.js
+++ /dev/null
@@ -1,422 +0,0 @@
-import { defineProperties, concat, getBytesCopy, getNumber, hexlify, toBeArray, toBigInt, toNumber, assert, assertArgument } from "../../utils/index.js";
-/**
- * @_ignore:
- */
-export const WordSize = 32;
-const Padding = new Uint8Array(WordSize);
-// Properties used to immediate pass through to the underlying object
-// - `then` is used to detect if an object is a Promise for await
-const passProperties = ["then"];
-const _guard = {};
-function throwError(name, error) {
- const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);
- wrapped.error = error;
- throw wrapped;
-}
-/**
- * A [[Result]] is a sub-class of Array, which allows accessing any
- * of its values either positionally by its index or, if keys are
- * provided by its name.
- *
- * @_docloc: api/abi
- */
-export class Result extends Array {
- #names;
- /**
- * @private
- */
- constructor(...args) {
- // To properly sub-class Array so the other built-in
- // functions work, the constructor has to behave fairly
- // well. So, in the event we are created via fromItems()
- // we build the read-only Result object we want, but on
- // any other input, we use the default constructor
- // constructor(guard: any, items: Array, keys?: Array);
- const guard = args[0];
- let items = args[1];
- let names = (args[2] || []).slice();
- let wrap = true;
- if (guard !== _guard) {
- items = args;
- names = [];
- wrap = false;
- }
- // Can't just pass in ...items since an array of length 1
- // is a special case in the super.
- super(items.length);
- items.forEach((item, index) => { this[index] = item; });
- // Find all unique keys
- const nameCounts = names.reduce((accum, name) => {
- if (typeof (name) === "string") {
- accum.set(name, (accum.get(name) || 0) + 1);
- }
- return accum;
- }, (new Map()));
- // Remove any key thats not unique
- this.#names = Object.freeze(items.map((item, index) => {
- const name = names[index];
- if (name != null && nameCounts.get(name) === 1) {
- return name;
- }
- return null;
- }));
- if (!wrap) {
- return;
- }
- // A wrapped Result is immutable
- Object.freeze(this);
- // Proxy indices and names so we can trap deferred errors
- return new Proxy(this, {
- get: (target, prop, receiver) => {
- if (typeof (prop) === "string") {
- // Index accessor
- if (prop.match(/^[0-9]+$/)) {
- const index = getNumber(prop, "%index");
- if (index < 0 || index >= this.length) {
- throw new RangeError("out of result range");
- }
- const item = target[index];
- if (item instanceof Error) {
- throwError(`index ${index}`, item);
- }
- return item;
- }
- // Pass important checks (like `then` for Promise) through
- if (passProperties.indexOf(prop) >= 0) {
- return Reflect.get(target, prop, receiver);
- }
- const value = target[prop];
- if (value instanceof Function) {
- // Make sure functions work with private variables
- // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding
- return function (...args) {
- return value.apply((this === receiver) ? target : this, args);
- };
- }
- else if (!(prop in target)) {
- // Possible name accessor
- return target.getValue.apply((this === receiver) ? target : this, [prop]);
- }
- }
- return Reflect.get(target, prop, receiver);
- }
- });
- }
- /**
- * Returns the Result as a normal Array.
- *
- * This will throw if there are any outstanding deferred
- * errors.
- */
- toArray() {
- const result = [];
- this.forEach((item, index) => {
- if (item instanceof Error) {
- throwError(`index ${index}`, item);
- }
- result.push(item);
- });
- return result;
- }
- /**
- * Returns the Result as an Object with each name-value pair.
- *
- * This will throw if any value is unnamed, or if there are
- * any outstanding deferred errors.
- */
- toObject() {
- return this.#names.reduce((accum, name, index) => {
- assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
- operation: "toObject()"
- });
- // Add values for names that don't conflict
- if (!(name in accum)) {
- accum[name] = this.getValue(name);
- }
- return accum;
- }, {});
- }
- /**
- * @_ignore
- */
- slice(start, end) {
- if (start == null) {
- start = 0;
- }
- if (start < 0) {
- start += this.length;
- if (start < 0) {
- start = 0;
- }
- }
- if (end == null) {
- end = this.length;
- }
- if (end < 0) {
- end += this.length;
- if (end < 0) {
- end = 0;
- }
- }
- if (end > this.length) {
- end = this.length;
- }
- const result = [], names = [];
- for (let i = start; i < end; i++) {
- result.push(this[i]);
- names.push(this.#names[i]);
- }
- return new Result(_guard, result, names);
- }
- /**
- * @_ignore
- */
- filter(callback, thisArg) {
- const result = [], names = [];
- for (let i = 0; i < this.length; i++) {
- const item = this[i];
- if (item instanceof Error) {
- throwError(`index ${i}`, item);
- }
- if (callback.call(thisArg, item, i, this)) {
- result.push(item);
- names.push(this.#names[i]);
- }
- }
- return new Result(_guard, result, names);
- }
- /**
- * @_ignore
- */
- map(callback, thisArg) {
- const result = [];
- for (let i = 0; i < this.length; i++) {
- const item = this[i];
- if (item instanceof Error) {
- throwError(`index ${i}`, item);
- }
- result.push(callback.call(thisArg, item, i, this));
- }
- return result;
- }
- /**
- * Returns the value for %%name%%.
- *
- * Since it is possible to have a key whose name conflicts with
- * a method on a [[Result]] or its superclass Array, or any
- * JavaScript keyword, this ensures all named values are still
- * accessible by name.
- */
- getValue(name) {
- const index = this.#names.indexOf(name);
- if (index === -1) {
- return undefined;
- }
- const value = this[index];
- if (value instanceof Error) {
- throwError(`property ${JSON.stringify(name)}`, value.error);
- }
- return value;
- }
- /**
- * Creates a new [[Result]] for %%items%% with each entry
- * also accessible by its corresponding name in %%keys%%.
- */
- static fromItems(items, keys) {
- return new Result(_guard, items, keys);
- }
-}
-/**
- * Returns all errors found in a [[Result]].
- *
- * Since certain errors encountered when creating a [[Result]] do
- * not impact the ability to continue parsing data, they are
- * deferred until they are actually accessed. Hence a faulty string
- * in an Event that is never used does not impact the program flow.
- *
- * However, sometimes it may be useful to access, identify or
- * validate correctness of a [[Result]].
- *
- * @_docloc api/abi
- */
-export function checkResultErrors(result) {
- // Find the first error (if any)
- const errors = [];
- const checkErrors = function (path, object) {
- if (!Array.isArray(object)) {
- return;
- }
- for (let key in object) {
- const childPath = path.slice();
- childPath.push(key);
- try {
- checkErrors(childPath, object[key]);
- }
- catch (error) {
- errors.push({ path: childPath, error: error });
- }
- }
- };
- checkErrors([], result);
- return errors;
-}
-function getValue(value) {
- let bytes = toBeArray(value);
- assert(bytes.length <= WordSize, "value out-of-bounds", "BUFFER_OVERRUN", { buffer: bytes, length: WordSize, offset: bytes.length });
- if (bytes.length !== WordSize) {
- bytes = getBytesCopy(concat([Padding.slice(bytes.length % WordSize), bytes]));
- }
- return bytes;
-}
-/**
- * @_ignore
- */
-export class Coder {
- // The coder name:
- // - address, uint256, tuple, array, etc.
- name;
- // The fully expanded type, including composite types:
- // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.
- type;
- // The localName bound in the signature, in this example it is "baz":
- // - tuple(address foo, uint bar) baz
- localName;
- // Whether this type is dynamic:
- // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.
- // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)
- dynamic;
- constructor(name, type, localName, dynamic) {
- defineProperties(this, { name, type, localName, dynamic }, {
- name: "string", type: "string", localName: "string", dynamic: "boolean"
- });
- }
- _throwError(message, value) {
- assertArgument(false, message, this.localName, value);
- }
-}
-/**
- * @_ignore
- */
-export class Writer {
- // An array of WordSize lengthed objects to concatenation
- #data;
- #dataLength;
- constructor() {
- this.#data = [];
- this.#dataLength = 0;
- }
- get data() {
- return concat(this.#data);
- }
- get length() { return this.#dataLength; }
- #writeData(data) {
- this.#data.push(data);
- this.#dataLength += data.length;
- return data.length;
- }
- appendWriter(writer) {
- return this.#writeData(getBytesCopy(writer.data));
- }
- // Arrayish item; pad on the right to *nearest* WordSize
- writeBytes(value) {
- let bytes = getBytesCopy(value);
- const paddingOffset = bytes.length % WordSize;
- if (paddingOffset) {
- bytes = getBytesCopy(concat([bytes, Padding.slice(paddingOffset)]));
- }
- return this.#writeData(bytes);
- }
- // Numeric item; pad on the left *to* WordSize
- writeValue(value) {
- return this.#writeData(getValue(value));
- }
- // Inserts a numeric place-holder, returning a callback that can
- // be used to asjust the value later
- writeUpdatableValue() {
- const offset = this.#data.length;
- this.#data.push(Padding);
- this.#dataLength += WordSize;
- return (value) => {
- this.#data[offset] = getValue(value);
- };
- }
-}
-/**
- * @_ignore
- */
-export class Reader {
- // Allows incomplete unpadded data to be read; otherwise an error
- // is raised if attempting to overrun the buffer. This is required
- // to deal with an old Solidity bug, in which event data for
- // external (not public thoguh) was tightly packed.
- allowLoose;
- #data;
- #offset;
- #bytesRead;
- #parent;
- #maxInflation;
- constructor(data, allowLoose, maxInflation) {
- defineProperties(this, { allowLoose: !!allowLoose });
- this.#data = getBytesCopy(data);
- this.#bytesRead = 0;
- this.#parent = null;
- this.#maxInflation = (maxInflation != null) ? maxInflation : 1024;
- this.#offset = 0;
- }
- get data() { return hexlify(this.#data); }
- get dataLength() { return this.#data.length; }
- get consumed() { return this.#offset; }
- get bytes() { return new Uint8Array(this.#data); }
- #incrementBytesRead(count) {
- if (this.#parent) {
- return this.#parent.#incrementBytesRead(count);
- }
- this.#bytesRead += count;
- // Check for excessive inflation (see: #4537)
- assert(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https:/\/github.com/ethers-io/ethers.js/issues/4537 )`, "BUFFER_OVERRUN", {
- buffer: getBytesCopy(this.#data), offset: this.#offset,
- length: count, info: {
- bytesRead: this.#bytesRead,
- dataLength: this.dataLength
- }
- });
- }
- #peekBytes(offset, length, loose) {
- let alignedLength = Math.ceil(length / WordSize) * WordSize;
- if (this.#offset + alignedLength > this.#data.length) {
- if (this.allowLoose && loose && this.#offset + length <= this.#data.length) {
- alignedLength = length;
- }
- else {
- assert(false, "data out-of-bounds", "BUFFER_OVERRUN", {
- buffer: getBytesCopy(this.#data),
- length: this.#data.length,
- offset: this.#offset + alignedLength
- });
- }
- }
- return this.#data.slice(this.#offset, this.#offset + alignedLength);
- }
- // Create a sub-reader with the same underlying data, but offset
- subReader(offset) {
- const reader = new Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);
- reader.#parent = this;
- return reader;
- }
- // Read bytes
- readBytes(length, loose) {
- let bytes = this.#peekBytes(0, length, !!loose);
- this.#incrementBytesRead(length);
- this.#offset += bytes.length;
- // @TODO: Make sure the length..end bytes are all 0?
- return bytes.slice(0, length);
- }
- // Read a numeric values
- readValue() {
- return toBigInt(this.readBytes(WordSize));
- }
- readIndex() {
- return toNumber(this.readBytes(WordSize));
- }
-}
-//# sourceMappingURL=abstract-coder.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/abstract-coder.js.map b/lib.esm/abi/coders/abstract-coder.js.map
deleted file mode 100644
index 5be124dd..00000000
--- a/lib.esm/abi/coders/abstract-coder.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"abstract-coder.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CAAC,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;QAC7B,oDAAoD;QACpD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,wBAAwB;IACxB,SAAS;QACL,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,SAAS;QACL,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9C,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/address.d.ts b/lib.esm/abi/coders/address.d.ts
deleted file mode 100644
index 8befac03..00000000
--- a/lib.esm/abi/coders/address.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class AddressCoder extends Coder {
- constructor(localName: string);
- defaultValue(): string;
- encode(writer: Writer, _value: string | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=address.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/address.d.ts.map b/lib.esm/abi/coders/address.d.ts.map
deleted file mode 100644
index f86c8f18..00000000
--- a/lib.esm/abi/coders/address.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/address.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM;IAUtD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/address.js b/lib.esm/abi/coders/address.js
deleted file mode 100644
index 445029c9..00000000
--- a/lib.esm/abi/coders/address.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import { getAddress } from "../../address/index.js";
-import { toBeHex } from "../../utils/maths.js";
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export class AddressCoder extends Coder {
- constructor(localName) {
- super("address", "address", localName, false);
- }
- defaultValue() {
- return "0x0000000000000000000000000000000000000000";
- }
- encode(writer, _value) {
- let value = Typed.dereference(_value, "string");
- try {
- value = getAddress(value);
- }
- catch (error) {
- return this._throwError(error.message, _value);
- }
- return writer.writeValue(value);
- }
- decode(reader) {
- return getAddress(toBeHex(reader.readValue(), 20));
- }
-}
-//# sourceMappingURL=address.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/address.js.map b/lib.esm/abi/coders/address.js.map
deleted file mode 100644
index 4d5cae70..00000000
--- a/lib.esm/abi/coders/address.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAK5C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnC,YAAY,SAAiB;QACzB,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,YAAY;QACR,OAAO,4CAA4C,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAsB;QACzC,IAAI,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI;YACA,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;SAC7B;QAAC,OAAO,KAAU,EAAE;YACjB,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SAClD;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/anonymous.d.ts b/lib.esm/abi/coders/anonymous.d.ts
deleted file mode 100644
index 554bf03f..00000000
--- a/lib.esm/abi/coders/anonymous.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * Clones the functionality of an existing Coder, but without a localName
- *
- * @_ignore
- */
-export declare class AnonymousCoder extends Coder {
- private coder;
- constructor(coder: Coder);
- defaultValue(): any;
- encode(writer: Writer, value: any): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=anonymous.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/anonymous.d.ts.map b/lib.esm/abi/coders/anonymous.d.ts.map
deleted file mode 100644
index f150f060..00000000
--- a/lib.esm/abi/coders/anonymous.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"anonymous.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/anonymous.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACrC,OAAO,CAAC,KAAK,CAAQ;gBAET,KAAK,EAAE,KAAK;IAKxB,YAAY,IAAI,GAAG;IAInB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/anonymous.js b/lib.esm/abi/coders/anonymous.js
deleted file mode 100644
index b6d95326..00000000
--- a/lib.esm/abi/coders/anonymous.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Coder } from "./abstract-coder.js";
-/**
- * Clones the functionality of an existing Coder, but without a localName
- *
- * @_ignore
- */
-export class AnonymousCoder extends Coder {
- coder;
- constructor(coder) {
- super(coder.name, coder.type, "_", coder.dynamic);
- this.coder = coder;
- }
- defaultValue() {
- return this.coder.defaultValue();
- }
- encode(writer, value) {
- return this.coder.encode(writer, value);
- }
- decode(reader) {
- return this.coder.decode(reader);
- }
-}
-//# sourceMappingURL=anonymous.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/anonymous.js.map b/lib.esm/abi/coders/anonymous.js.map
deleted file mode 100644
index ac81d99b..00000000
--- a/lib.esm/abi/coders/anonymous.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"anonymous.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/anonymous.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IAC7B,KAAK,CAAQ;IAErB,YAAY,KAAY;QACpB,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/array.d.ts b/lib.esm/abi/coders/array.d.ts
deleted file mode 100644
index 954c4e17..00000000
--- a/lib.esm/abi/coders/array.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder, Result, Writer } from "./abstract-coder.js";
-import type { Reader } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare function pack(writer: Writer, coders: ReadonlyArray, values: Array | {
- [name: string]: any;
-}): number;
-/**
- * @_ignore
- */
-export declare function unpack(reader: Reader, coders: ReadonlyArray): Result;
-/**
- * @_ignore
- */
-export declare class ArrayCoder extends Coder {
- readonly coder: Coder;
- readonly length: number;
- constructor(coder: Coder, length: number, localName: string);
- defaultValue(): Array;
- encode(writer: Writer, _value: Array | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=array.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/array.d.ts.map b/lib.esm/abi/coders/array.d.ts.map
deleted file mode 100644
index c3a6d622..00000000
--- a/lib.esm/abi/coders/array.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/array.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD;;GAEG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;IAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;CAAE,GAAG,MAAM,CA2DzH;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,MAAM,CAoD3E;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,KAAK,EAAG,KAAK,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;gBAEb,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAO3D,YAAY,IAAI,KAAK,CAAC,GAAG,CAAC;IAW1B,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,MAAM;IAsB1D,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAkB9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/array.js b/lib.esm/abi/coders/array.js
deleted file mode 100644
index 576f40f1..00000000
--- a/lib.esm/abi/coders/array.js
+++ /dev/null
@@ -1,159 +0,0 @@
-import { defineProperties, isError, assert, assertArgument, assertArgumentCount } from "../../utils/index.js";
-import { Typed } from "../typed.js";
-import { Coder, Result, WordSize, Writer } from "./abstract-coder.js";
-import { AnonymousCoder } from "./anonymous.js";
-/**
- * @_ignore
- */
-export function pack(writer, coders, values) {
- let arrayValues = [];
- if (Array.isArray(values)) {
- arrayValues = values;
- }
- else if (values && typeof (values) === "object") {
- let unique = {};
- arrayValues = coders.map((coder) => {
- const name = coder.localName;
- assert(name, "cannot encode object for signature with missing names", "INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
- assert(!unique[name], "cannot encode object for signature with duplicate names", "INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
- unique[name] = true;
- return values[name];
- });
- }
- else {
- assertArgument(false, "invalid tuple value", "tuple", values);
- }
- assertArgument(coders.length === arrayValues.length, "types/value length mismatch", "tuple", values);
- let staticWriter = new Writer();
- let dynamicWriter = new Writer();
- let updateFuncs = [];
- coders.forEach((coder, index) => {
- let value = arrayValues[index];
- if (coder.dynamic) {
- // Get current dynamic offset (for the future pointer)
- let dynamicOffset = dynamicWriter.length;
- // Encode the dynamic value into the dynamicWriter
- coder.encode(dynamicWriter, value);
- // Prepare to populate the correct offset once we are done
- let updateFunc = staticWriter.writeUpdatableValue();
- updateFuncs.push((baseOffset) => {
- updateFunc(baseOffset + dynamicOffset);
- });
- }
- else {
- coder.encode(staticWriter, value);
- }
- });
- // Backfill all the dynamic offsets, now that we know the static length
- updateFuncs.forEach((func) => { func(staticWriter.length); });
- let length = writer.appendWriter(staticWriter);
- length += writer.appendWriter(dynamicWriter);
- return length;
-}
-/**
- * @_ignore
- */
-export function unpack(reader, coders) {
- let values = [];
- let keys = [];
- // A reader anchored to this base
- let baseReader = reader.subReader(0);
- coders.forEach((coder) => {
- let value = null;
- if (coder.dynamic) {
- let offset = reader.readIndex();
- let offsetReader = baseReader.subReader(offset);
- try {
- value = coder.decode(offsetReader);
- }
- catch (error) {
- // Cannot recover from this
- if (isError(error, "BUFFER_OVERRUN")) {
- throw error;
- }
- value = error;
- value.baseType = coder.name;
- value.name = coder.localName;
- value.type = coder.type;
- }
- }
- else {
- try {
- value = coder.decode(reader);
- }
- catch (error) {
- // Cannot recover from this
- if (isError(error, "BUFFER_OVERRUN")) {
- throw error;
- }
- value = error;
- value.baseType = coder.name;
- value.name = coder.localName;
- value.type = coder.type;
- }
- }
- if (value == undefined) {
- throw new Error("investigate");
- }
- values.push(value);
- keys.push(coder.localName || null);
- });
- return Result.fromItems(values, keys);
-}
-/**
- * @_ignore
- */
-export class ArrayCoder extends Coder {
- coder;
- length;
- constructor(coder, length, localName) {
- const type = (coder.type + "[" + (length >= 0 ? length : "") + "]");
- const dynamic = (length === -1 || coder.dynamic);
- super("array", type, localName, dynamic);
- defineProperties(this, { coder, length });
- }
- defaultValue() {
- // Verifies the child coder is valid (even if the array is dynamic or 0-length)
- const defaultChild = this.coder.defaultValue();
- const result = [];
- for (let i = 0; i < this.length; i++) {
- result.push(defaultChild);
- }
- return result;
- }
- encode(writer, _value) {
- const value = Typed.dereference(_value, "array");
- if (!Array.isArray(value)) {
- this._throwError("expected array value", value);
- }
- let count = this.length;
- if (count === -1) {
- count = value.length;
- writer.writeValue(value.length);
- }
- assertArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : ""));
- let coders = [];
- for (let i = 0; i < value.length; i++) {
- coders.push(this.coder);
- }
- return pack(writer, coders, value);
- }
- decode(reader) {
- let count = this.length;
- if (count === -1) {
- count = reader.readIndex();
- // Check that there is *roughly* enough data to ensure
- // stray random data is not being read as a length. Each
- // slot requires at least 32 bytes for their value (or 32
- // bytes as a link to the data). This could use a much
- // tighter bound, but we are erroring on the side of safety.
- assert(count * WordSize <= reader.dataLength, "insufficient data length", "BUFFER_OVERRUN", { buffer: reader.bytes, offset: count * WordSize, length: reader.dataLength });
- }
- let coders = [];
- for (let i = 0; i < count; i++) {
- coders.push(new AnonymousCoder(this.coder));
- }
- return unpack(reader, coders);
- }
-}
-//# sourceMappingURL=array.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/array.js.map b/lib.esm/abi/coders/array.js.map
deleted file mode 100644
index 5cab086f..00000000
--- a/lib.esm/abi/coders/array.js.map
+++ /dev/null
@@ -1 +0,0 @@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AAK,GAAG,QAAQ,IAAI,MAAM,CAAC,UAAU,EAAE,0BAA0B,EACpE,gBAAgB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;SACxG;QACD,IAAI,MAAM,GAAiB,EAAE,CAAC;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;SAAE;QAEhF,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/boolean.d.ts b/lib.esm/abi/coders/boolean.d.ts
deleted file mode 100644
index f073e37e..00000000
--- a/lib.esm/abi/coders/boolean.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class BooleanCoder extends Coder {
- constructor(localName: string);
- defaultValue(): boolean;
- encode(writer: Writer, _value: boolean | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=boolean.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/boolean.d.ts.map b/lib.esm/abi/coders/boolean.d.ts.map
deleted file mode 100644
index b1b5811e..00000000
--- a/lib.esm/abi/coders/boolean.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;gBAEvB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,OAAO;IAIvB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM;IAKvD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/boolean.js b/lib.esm/abi/coders/boolean.js
deleted file mode 100644
index 3992319f..00000000
--- a/lib.esm/abi/coders/boolean.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export class BooleanCoder extends Coder {
- constructor(localName) {
- super("bool", "bool", localName, false);
- }
- defaultValue() {
- return false;
- }
- encode(writer, _value) {
- const value = Typed.dereference(_value, "bool");
- return writer.writeValue(value ? 1 : 0);
- }
- decode(reader) {
- return !!reader.readValue();
- }
-}
-//# sourceMappingURL=boolean.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/boolean.js.map b/lib.esm/abi/coders/boolean.js.map
deleted file mode 100644
index 52b0ce29..00000000
--- a/lib.esm/abi/coders/boolean.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnC,YAAY,SAAiB;QACzB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,YAAY;QACR,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAuB;QAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;IAChC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/bytes.d.ts b/lib.esm/abi/coders/bytes.d.ts
deleted file mode 100644
index 1e554582..00000000
--- a/lib.esm/abi/coders/bytes.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class DynamicBytesCoder extends Coder {
- constructor(type: string, localName: string);
- defaultValue(): string;
- encode(writer: Writer, value: any): number;
- decode(reader: Reader): any;
-}
-/**
- * @_ignore
- */
-export declare class BytesCoder extends DynamicBytesCoder {
- constructor(localName: string);
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=bytes.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/bytes.d.ts.map b/lib.esm/abi/coders/bytes.d.ts.map
deleted file mode 100644
index f1696167..00000000
--- a/lib.esm/abi/coders/bytes.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/bytes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC5B,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAI3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAO1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,iBAAiB;gBACjC,SAAS,EAAE,MAAM;IAI7B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/bytes.js b/lib.esm/abi/coders/bytes.js
deleted file mode 100644
index 01aad879..00000000
--- a/lib.esm/abi/coders/bytes.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import { getBytesCopy, hexlify } from "../../utils/index.js";
-import { Coder } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export class DynamicBytesCoder extends Coder {
- constructor(type, localName) {
- super(type, type, localName, true);
- }
- defaultValue() {
- return "0x";
- }
- encode(writer, value) {
- value = getBytesCopy(value);
- let length = writer.writeValue(value.length);
- length += writer.writeBytes(value);
- return length;
- }
- decode(reader) {
- return reader.readBytes(reader.readIndex(), true);
- }
-}
-/**
- * @_ignore
- */
-export class BytesCoder extends DynamicBytesCoder {
- constructor(localName) {
- super("bytes", localName);
- }
- decode(reader) {
- return hexlify(super.decode(reader));
- }
-}
-//# sourceMappingURL=bytes.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/bytes.js.map b/lib.esm/abi/coders/bytes.js.map
deleted file mode 100644
index d3462ecf..00000000
--- a/lib.esm/abi/coders/bytes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/bytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAK5C;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACxC,YAAY,IAAY,EAAE,SAAiB;QACxC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAC7C,YAAY,SAAiB;QACzB,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACzC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/fixed-bytes.d.ts b/lib.esm/abi/coders/fixed-bytes.d.ts
deleted file mode 100644
index 5c485fef..00000000
--- a/lib.esm/abi/coders/fixed-bytes.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import type { BytesLike } from "../../utils/index.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class FixedBytesCoder extends Coder {
- readonly size: number;
- constructor(size: number, localName: string);
- defaultValue(): string;
- encode(writer: Writer, _value: BytesLike | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=fixed-bytes.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/fixed-bytes.d.ts.map b/lib.esm/abi/coders/fixed-bytes.d.ts.map
deleted file mode 100644
index fcf0893d..00000000
--- a/lib.esm/abi/coders/fixed-bytes.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"fixed-bytes.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/fixed-bytes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAC;gBAEX,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM3C,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM;IAMzD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/fixed-bytes.js b/lib.esm/abi/coders/fixed-bytes.js
deleted file mode 100644
index 08dd20b6..00000000
--- a/lib.esm/abi/coders/fixed-bytes.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { defineProperties, getBytesCopy, hexlify } from "../../utils/index.js";
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export class FixedBytesCoder extends Coder {
- size;
- constructor(size, localName) {
- let name = "bytes" + String(size);
- super(name, name, localName, false);
- defineProperties(this, { size }, { size: "number" });
- }
- defaultValue() {
- return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2);
- }
- encode(writer, _value) {
- let data = getBytesCopy(Typed.dereference(_value, this.type));
- if (data.length !== this.size) {
- this._throwError("incorrect data length", _value);
- }
- return writer.writeBytes(data);
- }
- decode(reader) {
- return hexlify(reader.readBytes(this.size));
- }
-}
-//# sourceMappingURL=fixed-bytes.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/fixed-bytes.js.map b/lib.esm/abi/coders/fixed-bytes.js.map
deleted file mode 100644
index bb22c492..00000000
--- a/lib.esm/abi/coders/fixed-bytes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"fixed-bytes.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/fixed-bytes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAO5C;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC7B,IAAI,CAAU;IAEvB,YAAY,IAAY,EAAE,SAAiB;QACvC,IAAI,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACpC,gBAAgB,CAAkB,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,YAAY;QACR,OAAO,CAAC,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAClH,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAyB;QAC5C,IAAI,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;SAAE;QACrF,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/null.d.ts b/lib.esm/abi/coders/null.d.ts
deleted file mode 100644
index 5df5da34..00000000
--- a/lib.esm/abi/coders/null.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class NullCoder extends Coder {
- constructor(localName: string);
- defaultValue(): null;
- encode(writer: Writer, value: any): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=null.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/null.d.ts.map b/lib.esm/abi/coders/null.d.ts.map
deleted file mode 100644
index 4c87b845..00000000
--- a/lib.esm/abi/coders/null.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"null.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/null.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI1D;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;gBAEpB,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,IAAI;IAIpB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAK1C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAI9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/null.js b/lib.esm/abi/coders/null.js
deleted file mode 100644
index 5b7d867a..00000000
--- a/lib.esm/abi/coders/null.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Coder } from "./abstract-coder.js";
-const Empty = new Uint8Array([]);
-/**
- * @_ignore
- */
-export class NullCoder extends Coder {
- constructor(localName) {
- super("null", "", localName, false);
- }
- defaultValue() {
- return null;
- }
- encode(writer, value) {
- if (value != null) {
- this._throwError("not null", value);
- }
- return writer.writeBytes(Empty);
- }
- decode(reader) {
- reader.readBytes(0);
- return null;
- }
-}
-//# sourceMappingURL=null.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/null.js.map b/lib.esm/abi/coders/null.js.map
deleted file mode 100644
index 6afd520c..00000000
--- a/lib.esm/abi/coders/null.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"null.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/null.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAG,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEhC,YAAY,SAAiB;QACzB,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,KAAU;QAC7B,IAAI,KAAK,IAAI,IAAI,EAAE;YAAE,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;SAAE;QAC3D,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/number.d.ts b/lib.esm/abi/coders/number.d.ts
deleted file mode 100644
index 822cc6df..00000000
--- a/lib.esm/abi/coders/number.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import type { BigNumberish } from "../../utils/index.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class NumberCoder extends Coder {
- readonly size: number;
- readonly signed: boolean;
- constructor(size: number, signed: boolean, localName: string);
- defaultValue(): number;
- encode(writer: Writer, _value: BigNumberish | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=number.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/number.d.ts.map b/lib.esm/abi/coders/number.d.ts.map
deleted file mode 100644
index a02820f6..00000000
--- a/lib.esm/abi/coders/number.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/number.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO1D;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAG,OAAO,CAAC;gBAEd,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM;IAO5D,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,GAAG,MAAM;IAkB5D,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAS9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/number.js b/lib.esm/abi/coders/number.js
deleted file mode 100644
index 52f5a46b..00000000
--- a/lib.esm/abi/coders/number.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import { defineProperties, fromTwos, getBigInt, mask, toTwos } from "../../utils/index.js";
-import { Typed } from "../typed.js";
-import { Coder, WordSize } from "./abstract-coder.js";
-const BN_0 = BigInt(0);
-const BN_1 = BigInt(1);
-const BN_MAX_UINT256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
-/**
- * @_ignore
- */
-export class NumberCoder extends Coder {
- size;
- signed;
- constructor(size, signed, localName) {
- const name = ((signed ? "int" : "uint") + (size * 8));
- super(name, name, localName, false);
- defineProperties(this, { size, signed }, { size: "number", signed: "boolean" });
- }
- defaultValue() {
- return 0;
- }
- encode(writer, _value) {
- let value = getBigInt(Typed.dereference(_value, this.type));
- // Check bounds are safe for encoding
- let maxUintValue = mask(BN_MAX_UINT256, WordSize * 8);
- if (this.signed) {
- let bounds = mask(maxUintValue, (this.size * 8) - 1);
- if (value > bounds || value < -(bounds + BN_1)) {
- this._throwError("value out-of-bounds", _value);
- }
- value = toTwos(value, 8 * WordSize);
- }
- else if (value < BN_0 || value > mask(maxUintValue, this.size * 8)) {
- this._throwError("value out-of-bounds", _value);
- }
- return writer.writeValue(value);
- }
- decode(reader) {
- let value = mask(reader.readValue(), this.size * 8);
- if (this.signed) {
- value = fromTwos(value, this.size * 8);
- }
- return value;
- }
-}
-//# sourceMappingURL=number.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/number.js.map b/lib.esm/abi/coders/number.js.map
deleted file mode 100644
index 5ecd80d4..00000000
--- a/lib.esm/abi/coders/number.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src.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IAAI,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACrD,IAAI,KAAK,GAAG,MAAM,IAAI,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE;gBAC5C,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;aACnD;YACD,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC;SACvC;aAAM,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE;YAClE,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;SACnD;QAED,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QAEpD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;SAC1C;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/string.d.ts b/lib.esm/abi/coders/string.d.ts
deleted file mode 100644
index 8e1c6359..00000000
--- a/lib.esm/abi/coders/string.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Typed } from "../typed.js";
-import { DynamicBytesCoder } from "./bytes.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class StringCoder extends DynamicBytesCoder {
- constructor(localName: string);
- defaultValue(): string;
- encode(writer: Writer, _value: string | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=string.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/string.d.ts.map b/lib.esm/abi/coders/string.d.ts.map
deleted file mode 100644
index 8141f2ea..00000000
--- a/lib.esm/abi/coders/string.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/string.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AACH,qBAAa,WAAY,SAAQ,iBAAiB;gBAElC,SAAS,EAAE,MAAM;IAI7B,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM;IAItD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/string.js b/lib.esm/abi/coders/string.js
deleted file mode 100644
index cd8c4bd5..00000000
--- a/lib.esm/abi/coders/string.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { toUtf8Bytes, toUtf8String } from "../../utils/utf8.js";
-import { Typed } from "../typed.js";
-import { DynamicBytesCoder } from "./bytes.js";
-/**
- * @_ignore
- */
-export class StringCoder extends DynamicBytesCoder {
- constructor(localName) {
- super("string", localName);
- }
- defaultValue() {
- return "";
- }
- encode(writer, _value) {
- return super.encode(writer, toUtf8Bytes(Typed.dereference(_value, "string")));
- }
- decode(reader) {
- return toUtf8String(super.decode(reader));
- }
-}
-//# sourceMappingURL=string.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/string.js.map b/lib.esm/abi/coders/string.js.map
deleted file mode 100644
index f0a168f9..00000000
--- a/lib.esm/abi/coders/string.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAE9C,YAAY,SAAiB;QACzB,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,YAAY;QACR,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAsB;QACzC,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/tuple.d.ts b/lib.esm/abi/coders/tuple.d.ts
deleted file mode 100644
index fe3ec032..00000000
--- a/lib.esm/abi/coders/tuple.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import type { Reader, Writer } from "./abstract-coder.js";
-/**
- * @_ignore
- */
-export declare class TupleCoder extends Coder {
- readonly coders: ReadonlyArray;
- constructor(coders: Array, localName: string);
- defaultValue(): any;
- encode(writer: Writer, _value: Array | {
- [name: string]: any;
- } | Typed): number;
- decode(reader: Reader): any;
-}
-//# sourceMappingURL=tuple.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/tuple.d.ts.map b/lib.esm/abi/coders/tuple.d.ts.map
deleted file mode 100644
index a7a22ec0..00000000
--- a/lib.esm/abi/coders/tuple.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/tuple.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC,QAAQ,CAAC,MAAM,EAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBAE3B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM;IAanD,YAAY,IAAI,GAAG;IA+BnB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG;QAAE,CAAE,IAAI,EAAE,MAAM,GAAI,GAAG,CAAA;KAAE,GAAG,KAAK,GAAG,MAAM;IAKtF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;CAG9B"}
\ No newline at end of file
diff --git a/lib.esm/abi/coders/tuple.js b/lib.esm/abi/coders/tuple.js
deleted file mode 100644
index 9215603f..00000000
--- a/lib.esm/abi/coders/tuple.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import { defineProperties } from "../../utils/properties.js";
-import { Typed } from "../typed.js";
-import { Coder } from "./abstract-coder.js";
-import { pack, unpack } from "./array.js";
-/**
- * @_ignore
- */
-export class TupleCoder extends Coder {
- coders;
- constructor(coders, localName) {
- let dynamic = false;
- const types = [];
- coders.forEach((coder) => {
- if (coder.dynamic) {
- dynamic = true;
- }
- types.push(coder.type);
- });
- const type = ("tuple(" + types.join(",") + ")");
- super("tuple", type, localName, dynamic);
- defineProperties(this, { coders: Object.freeze(coders.slice()) });
- }
- defaultValue() {
- const values = [];
- this.coders.forEach((coder) => {
- values.push(coder.defaultValue());
- });
- // We only output named properties for uniquely named coders
- const uniqueNames = this.coders.reduce((accum, coder) => {
- const name = coder.localName;
- if (name) {
- if (!accum[name]) {
- accum[name] = 0;
- }
- accum[name]++;
- }
- return accum;
- }, {});
- // Add named values
- this.coders.forEach((coder, index) => {
- let name = coder.localName;
- if (!name || uniqueNames[name] !== 1) {
- return;
- }
- if (name === "length") {
- name = "_length";
- }
- if (values[name] != null) {
- return;
- }
- values[name] = values[index];
- });
- return Object.freeze(values);
- }
- encode(writer, _value) {
- const value = Typed.dereference(_value, "tuple");
- return pack(writer, this.coders, value);
- }
- decode(reader) {
- return unpack(reader, this.coders);
- }
-}
-//# sourceMappingURL=tuple.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/coders/tuple.js.map b/lib.esm/abi/coders/tuple.js.map
deleted file mode 100644
index a9be35f2..00000000
--- a/lib.esm/abi/coders/tuple.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../../src.ts/abi/coders/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAI1C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACxB,MAAM,CAAwB;IAEvC,YAAY,MAAoB,EAAE,SAAiB;QAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,KAAK,GAAkB,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,IAAI,KAAK,CAAC,OAAO,EAAE;gBAAE,OAAO,GAAG,IAAI,CAAC;aAAE;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E;YAEjD,IAAI,IAAI,KAAK,QAAQ,EAAE;gBAAE,IAAI,GAAG,SAAS,CAAC;aAAE;YAE5C,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE;gBAAE,OAAO;aAAE;YAErC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAsD;QACzE,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/fragments.d.ts b/lib.esm/abi/fragments.d.ts
deleted file mode 100644
index 26058058..00000000
--- a/lib.esm/abi/fragments.d.ts
+++ /dev/null
@@ -1,466 +0,0 @@
-/**
- * A fragment is a single item from an ABI, which may represent any of:
- *
- * - [Functions](FunctionFragment)
- * - [Events](EventFragment)
- * - [Constructors](ConstructorFragment)
- * - Custom [Errors](ErrorFragment)
- * - [Fallback or Receive](FallbackFragment) functions
- *
- * @_subsection api/abi/abi-coder:Fragments [about-fragments]
- */
-/**
- * A Type description in a [JSON ABI format](link-solc-jsonabi).
- */
-export interface JsonFragmentType {
- /**
- * The parameter name.
- */
- readonly name?: string;
- /**
- * If the parameter is indexed.
- */
- readonly indexed?: boolean;
- /**
- * The type of the parameter.
- */
- readonly type?: string;
- /**
- * The internal Solidity type.
- */
- readonly internalType?: string;
- /**
- * The components for a tuple.
- */
- readonly components?: ReadonlyArray;
-}
-/**
- * A fragment for a method, event or error in a [JSON ABI format](link-solc-jsonabi).
- */
-export interface JsonFragment {
- /**
- * The name of the error, event, function, etc.
- */
- readonly name?: string;
- /**
- * The type of the fragment (e.g. ``event``, ``"function"``, etc.)
- */
- readonly type?: string;
- /**
- * If the event is anonymous.
- */
- readonly anonymous?: boolean;
- /**
- * If the function is payable.
- */
- readonly payable?: boolean;
- /**
- * If the function is constant.
- */
- readonly constant?: boolean;
- /**
- * The mutability state of the function.
- */
- readonly stateMutability?: string;
- /**
- * The input parameters.
- */
- readonly inputs?: ReadonlyArray;
- /**
- * The output parameters.
- */
- readonly outputs?: ReadonlyArray;
- /**
- * The gas limit to use when sending a transaction for this function.
- */
- readonly gas?: string;
-}
-/**
- * The format to serialize the output as.
- *
- * **``"sighash"``** - the bare formatting, used to compute the selector
- * or topic hash; this format cannot be reversed (as it discards ``indexed``)
- * so cannot by used to export an [[Interface]].
- *
- * **``"minimal"``** - Human-Readable ABI with minimal spacing and without
- * names, so it is compact, but will result in Result objects that cannot
- * be accessed by name.
- *
- * **``"full"``** - Full Human-Readable ABI, with readable spacing and names
- * intact; this is generally the recommended format.
- *
- * **``"json"``** - The [JSON ABI format](link-solc-jsonabi).
- */
-export type FormatType = "sighash" | "minimal" | "full" | "json";
-/**
- * When [walking](ParamType-walk) a [[ParamType]], this is called
- * on each component.
- */
-export type ParamTypeWalkFunc = (type: string, value: any) => any;
-/**
- * When [walking asynchronously](ParamType-walkAsync) a [[ParamType]],
- * this is called on each component.
- */
-export type ParamTypeWalkAsyncFunc = (type: string, value: any) => any | Promise;
-/**
- * Each input and output of a [[Fragment]] is an Array of **ParamType**.
- */
-export declare class ParamType {
- #private;
- /**
- * The local name of the parameter (or ``""`` if unbound)
- */
- readonly name: string;
- /**
- * The fully qualified type (e.g. ``"address"``, ``"tuple(address)"``,
- * ``"uint256[3][]"``)
- */
- readonly type: string;
- /**
- * The base type (e.g. ``"address"``, ``"tuple"``, ``"array"``)
- */
- readonly baseType: string;
- /**
- * True if the parameters is indexed.
- *
- * For non-indexable types this is ``null``.
- */
- readonly indexed: null | boolean;
- /**
- * The components for the tuple.
- *
- * For non-tuple types this is ``null``.
- */
- readonly components: null | ReadonlyArray;
- /**
- * The array length, or ``-1`` for dynamic-lengthed arrays.
- *
- * For non-array types this is ``null``.
- */
- readonly arrayLength: null | number;
- /**
- * The type of each child in the array.
- *
- * For non-array types this is ``null``.
- */
- readonly arrayChildren: null | ParamType;
- /**
- * @private
- */
- constructor(guard: any, name: string, type: string, baseType: string, indexed: null | boolean, components: null | ReadonlyArray, arrayLength: null | number, arrayChildren: null | ParamType);
- /**
- * Return a string representation of this type.
- *
- * For example,
- *
- * ``sighash" => "(uint256,address)"``
- *
- * ``"minimal" => "tuple(uint256,address) indexed"``
- *
- * ``"full" => "tuple(uint256 foo, address bar) indexed baz"``
- */
- format(format?: FormatType): string;
- /**
- * Returns true if %%this%% is an Array type.
- *
- * This provides a type gaurd ensuring that [[arrayChildren]]
- * and [[arrayLength]] are non-null.
- */
- isArray(): this is (ParamType & {
- arrayChildren: ParamType;
- arrayLength: number;
- });
- /**
- * Returns true if %%this%% is a Tuple type.
- *
- * This provides a type gaurd ensuring that [[components]]
- * is non-null.
- */
- isTuple(): this is (ParamType & {
- components: ReadonlyArray;
- });
- /**
- * Returns true if %%this%% is an Indexable type.
- *
- * This provides a type gaurd ensuring that [[indexed]]
- * is non-null.
- */
- isIndexable(): this is (ParamType & {
- indexed: boolean;
- });
- /**
- * Walks the **ParamType** with %%value%%, calling %%process%%
- * on each type, destructing the %%value%% recursively.
- */
- walk(value: any, process: ParamTypeWalkFunc): any;
- /**
- * Walks the **ParamType** with %%value%%, asynchronously calling
- * %%process%% on each type, destructing the %%value%% recursively.
- *
- * This can be used to resolve ENS naes by walking and resolving each
- * ``"address"`` type.
- */
- walkAsync(value: any, process: ParamTypeWalkAsyncFunc): Promise;
- /**
- * Creates a new **ParamType** for %%obj%%.
- *
- * If %%allowIndexed%% then the ``indexed`` keyword is permitted,
- * otherwise the ``indexed`` keyword will throw an error.
- */
- static from(obj: any, allowIndexed?: boolean): ParamType;
- /**
- * Returns true if %%value%% is a **ParamType**.
- */
- static isParamType(value: any): value is ParamType;
-}
-/**
- * The type of a [[Fragment]].
- */
-export type FragmentType = "constructor" | "error" | "event" | "fallback" | "function" | "struct";
-/**
- * An abstract class to represent An individual fragment from a parse ABI.
- */
-export declare abstract class Fragment {
- /**
- * The type of the fragment.
- */
- readonly type: FragmentType;
- /**
- * The inputs for the fragment.
- */
- readonly inputs: ReadonlyArray;
- /**
- * @private
- */
- constructor(guard: any, type: FragmentType, inputs: ReadonlyArray);
- /**
- * Returns a string representation of this fragment as %%format%%.
- */
- abstract format(format?: FormatType): string;
- /**
- * Creates a new **Fragment** for %%obj%%, wich can be any supported
- * ABI frgament type.
- */
- static from(obj: any): Fragment;
- /**
- * Returns true if %%value%% is a [[ConstructorFragment]].
- */
- static isConstructor(value: any): value is ConstructorFragment;
- /**
- * Returns true if %%value%% is an [[ErrorFragment]].
- */
- static isError(value: any): value is ErrorFragment;
- /**
- * Returns true if %%value%% is an [[EventFragment]].
- */
- static isEvent(value: any): value is EventFragment;
- /**
- * Returns true if %%value%% is a [[FunctionFragment]].
- */
- static isFunction(value: any): value is FunctionFragment;
- /**
- * Returns true if %%value%% is a [[StructFragment]].
- */
- static isStruct(value: any): value is StructFragment;
-}
-/**
- * An abstract class to represent An individual fragment
- * which has a name from a parse ABI.
- */
-export declare abstract class NamedFragment extends Fragment {
- /**
- * The name of the fragment.
- */
- readonly name: string;
- /**
- * @private
- */
- constructor(guard: any, type: FragmentType, name: string, inputs: ReadonlyArray);
-}
-/**
- * A Fragment which represents a //Custom Error//.
- */
-export declare class ErrorFragment extends NamedFragment {
- /**
- * @private
- */
- constructor(guard: any, name: string, inputs: ReadonlyArray);
- /**
- * The Custom Error selector.
- */
- get selector(): string;
- /**
- * Returns a string representation of this fragment as %%format%%.
- */
- format(format?: FormatType): string;
- /**
- * Returns a new **ErrorFragment** for %%obj%%.
- */
- static from(obj: any): ErrorFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is an
- * **ErrorFragment**.
- */
- static isFragment(value: any): value is ErrorFragment;
-}
-/**
- * A Fragment which represents an Event.
- */
-export declare class EventFragment extends NamedFragment {
- /**
- * Whether this event is anonymous.
- */
- readonly anonymous: boolean;
- /**
- * @private
- */
- constructor(guard: any, name: string, inputs: ReadonlyArray, anonymous: boolean);
- /**
- * The Event topic hash.
- */
- get topicHash(): string;
- /**
- * Returns a string representation of this event as %%format%%.
- */
- format(format?: FormatType): string;
- /**
- * Return the topic hash for an event with %%name%% and %%params%%.
- */
- static getTopicHash(name: string, params?: Array): string;
- /**
- * Returns a new **EventFragment** for %%obj%%.
- */
- static from(obj: any): EventFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is an
- * **EventFragment**.
- */
- static isFragment(value: any): value is EventFragment;
-}
-/**
- * A Fragment which represents a constructor.
- */
-export declare class ConstructorFragment extends Fragment {
- /**
- * Whether the constructor can receive an endowment.
- */
- readonly payable: boolean;
- /**
- * The recommended gas limit for deployment or ``null``.
- */
- readonly gas: null | bigint;
- /**
- * @private
- */
- constructor(guard: any, type: FragmentType, inputs: ReadonlyArray, payable: boolean, gas: null | bigint);
- /**
- * Returns a string representation of this constructor as %%format%%.
- */
- format(format?: FormatType): string;
- /**
- * Returns a new **ConstructorFragment** for %%obj%%.
- */
- static from(obj: any): ConstructorFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **ConstructorFragment**.
- */
- static isFragment(value: any): value is ConstructorFragment;
-}
-/**
- * A Fragment which represents a method.
- */
-export declare class FallbackFragment extends Fragment {
- /**
- * If the function can be sent value during invocation.
- */
- readonly payable: boolean;
- constructor(guard: any, inputs: ReadonlyArray, payable: boolean);
- /**
- * Returns a string representation of this fallback as %%format%%.
- */
- format(format?: FormatType): string;
- /**
- * Returns a new **FallbackFragment** for %%obj%%.
- */
- static from(obj: any): FallbackFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **FallbackFragment**.
- */
- static isFragment(value: any): value is FallbackFragment;
-}
-/**
- * A Fragment which represents a method.
- */
-export declare class FunctionFragment extends NamedFragment {
- /**
- * If the function is constant (e.g. ``pure`` or ``view`` functions).
- */
- readonly constant: boolean;
- /**
- * The returned types for the result of calling this function.
- */
- readonly outputs: ReadonlyArray;
- /**
- * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``
- * or ``pure``)
- */
- readonly stateMutability: "payable" | "nonpayable" | "view" | "pure";
- /**
- * If the function can be sent value during invocation.
- */
- readonly payable: boolean;
- /**
- * The recommended gas limit to send when calling this function.
- */
- readonly gas: null | bigint;
- /**
- * @private
- */
- constructor(guard: any, name: string, stateMutability: "payable" | "nonpayable" | "view" | "pure", inputs: ReadonlyArray, outputs: ReadonlyArray, gas: null | bigint);
- /**
- * The Function selector.
- */
- get selector(): string;
- /**
- * Returns a string representation of this function as %%format%%.
- */
- format(format?: FormatType): string;
- /**
- * Return the selector for a function with %%name%% and %%params%%.
- */
- static getSelector(name: string, params?: Array): string;
- /**
- * Returns a new **FunctionFragment** for %%obj%%.
- */
- static from(obj: any): FunctionFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **FunctionFragment**.
- */
- static isFragment(value: any): value is FunctionFragment;
-}
-/**
- * A Fragment which represents a structure.
- */
-export declare class StructFragment extends NamedFragment {
- /**
- * @private
- */
- constructor(guard: any, name: string, inputs: ReadonlyArray);
- /**
- * Returns a string representation of this struct as %%format%%.
- */
- format(): string;
- /**
- * Returns a new **StructFragment** for %%obj%%.
- */
- static from(obj: any): StructFragment;
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **StructFragment**.
- */
- static isFragment(value: any): value is FunctionFragment;
-}
-//# sourceMappingURL=fragments.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/fragments.d.ts.map b/lib.esm/abi/fragments.d.ts.map
deleted file mode 100644
index 44e68b3c..00000000
--- a/lib.esm/abi/fragments.d.ts.map
+++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AuDvC;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB;CAG3D;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAE7C;;OAEG;gBACS,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC;IAKtE;;OAEG;IACH,MAAM,IAAI,MAAM;IAIhB;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,cAAc;IAmBrC;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,gBAAgB;CAG3D"}
\ No newline at end of file
diff --git a/lib.esm/abi/fragments.js b/lib.esm/abi/fragments.js
deleted file mode 100644
index 80da4761..00000000
--- a/lib.esm/abi/fragments.js
+++ /dev/null
@@ -1,1318 +0,0 @@
-/**
- * A fragment is a single item from an ABI, which may represent any of:
- *
- * - [Functions](FunctionFragment)
- * - [Events](EventFragment)
- * - [Constructors](ConstructorFragment)
- * - Custom [Errors](ErrorFragment)
- * - [Fallback or Receive](FallbackFragment) functions
- *
- * @_subsection api/abi/abi-coder:Fragments [about-fragments]
- */
-import { defineProperties, getBigInt, getNumber, assert, assertPrivate, assertArgument } from "../utils/index.js";
-import { id } from "../hash/index.js";
-;
-// [ "a", "b" ] => { "a": 1, "b": 1 }
-function setify(items) {
- const result = new Set();
- items.forEach((k) => result.add(k));
- return Object.freeze(result);
-}
-const _kwVisibDeploy = "external public payable";
-const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
-// Visibility Keywords
-const _kwVisib = "constant external internal payable private public pure view";
-const KwVisib = setify(_kwVisib.split(" "));
-const _kwTypes = "constructor error event fallback function receive struct";
-const KwTypes = setify(_kwTypes.split(" "));
-const _kwModifiers = "calldata memory storage payable indexed";
-const KwModifiers = setify(_kwModifiers.split(" "));
-const _kwOther = "tuple returns";
-// All Keywords
-const _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(" ");
-const Keywords = setify(_keywords.split(" "));
-// Single character tokens
-const SimpleTokens = {
- "(": "OPEN_PAREN", ")": "CLOSE_PAREN",
- "[": "OPEN_BRACKET", "]": "CLOSE_BRACKET",
- ",": "COMMA", "@": "AT"
-};
-// Parser regexes to consume the next token
-const regexWhitespacePrefix = new RegExp("^(\\s*)");
-const regexNumberPrefix = new RegExp("^([0-9]+)");
-const regexIdPrefix = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)");
-// Parser regexs to check validity
-const regexId = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$");
-const regexType = new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");
-class TokenString {
- #offset;
- #tokens;
- get offset() { return this.#offset; }
- get length() { return this.#tokens.length - this.#offset; }
- constructor(tokens) {
- this.#offset = 0;
- this.#tokens = tokens.slice();
- }
- clone() { return new TokenString(this.#tokens); }
- reset() { this.#offset = 0; }
- #subTokenString(from = 0, to = 0) {
- return new TokenString(this.#tokens.slice(from, to).map((t) => {
- return Object.freeze(Object.assign({}, t, {
- match: (t.match - from),
- linkBack: (t.linkBack - from),
- linkNext: (t.linkNext - from),
- }));
- }));
- }
- // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens
- popKeyword(allowed) {
- const top = this.peek();
- if (top.type !== "KEYWORD" || !allowed.has(top.text)) {
- throw new Error(`expected keyword ${top.text}`);
- }
- return this.pop().text;
- }
- // Pops and returns the value of the next token if it is `type`; throws if out of tokens
- popType(type) {
- if (this.peek().type !== type) {
- throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`);
- }
- return this.pop().text;
- }
- // Pops and returns a "(" TOKENS ")"
- popParen() {
- const top = this.peek();
- if (top.type !== "OPEN_PAREN") {
- throw new Error("bad start");
- }
- const result = this.#subTokenString(this.#offset + 1, top.match + 1);
- this.#offset = top.match + 1;
- return result;
- }
- // Pops and returns the items within "(" ITEM1 "," ITEM2 "," ... ")"
- popParams() {
- const top = this.peek();
- if (top.type !== "OPEN_PAREN") {
- throw new Error("bad start");
- }
- const result = [];
- while (this.#offset < top.match - 1) {
- const link = this.peek().linkNext;
- result.push(this.#subTokenString(this.#offset + 1, link));
- this.#offset = link;
- }
- this.#offset = top.match + 1;
- return result;
- }
- // Returns the top Token, throwing if out of tokens
- peek() {
- if (this.#offset >= this.#tokens.length) {
- throw new Error("out-of-bounds");
- }
- return this.#tokens[this.#offset];
- }
- // Returns the next value, if it is a keyword in `allowed`
- peekKeyword(allowed) {
- const top = this.peekType("KEYWORD");
- return (top != null && allowed.has(top)) ? top : null;
- }
- // Returns the value of the next token if it is `type`
- peekType(type) {
- if (this.length === 0) {
- return null;
- }
- const top = this.peek();
- return (top.type === type) ? top.text : null;
- }
- // Returns the next token; throws if out of tokens
- pop() {
- const result = this.peek();
- this.#offset++;
- return result;
- }
- toString() {
- const tokens = [];
- for (let i = this.#offset; i < this.#tokens.length; i++) {
- const token = this.#tokens[i];
- tokens.push(`${token.type}:${token.text}`);
- }
- return ``;
- }
-}
-function lex(text) {
- const tokens = [];
- const throwError = (message) => {
- const token = (offset < text.length) ? JSON.stringify(text[offset]) : "$EOI";
- throw new Error(`invalid token ${token} at ${offset}: ${message}`);
- };
- let brackets = [];
- let commas = [];
- let offset = 0;
- while (offset < text.length) {
- // Strip off any leading whitespace
- let cur = text.substring(offset);
- let match = cur.match(regexWhitespacePrefix);
- if (match) {
- offset += match[1].length;
- cur = text.substring(offset);
- }
- const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: "", text: "", offset, value: -1 };
- tokens.push(token);
- let type = (SimpleTokens[cur[0]] || "");
- if (type) {
- token.type = type;
- token.text = cur[0];
- offset++;
- if (type === "OPEN_PAREN") {
- brackets.push(tokens.length - 1);
- commas.push(tokens.length - 1);
- }
- else if (type == "CLOSE_PAREN") {
- if (brackets.length === 0) {
- throwError("no matching open bracket");
- }
- token.match = brackets.pop();
- (tokens[token.match]).match = tokens.length - 1;
- token.depth--;
- token.linkBack = commas.pop();
- (tokens[token.linkBack]).linkNext = tokens.length - 1;
- }
- else if (type === "COMMA") {
- token.linkBack = commas.pop();
- (tokens[token.linkBack]).linkNext = tokens.length - 1;
- commas.push(tokens.length - 1);
- }
- else if (type === "OPEN_BRACKET") {
- token.type = "BRACKET";
- }
- else if (type === "CLOSE_BRACKET") {
- // Remove the CLOSE_BRACKET
- let suffix = tokens.pop().text;
- if (tokens.length > 0 && tokens[tokens.length - 1].type === "NUMBER") {
- const value = tokens.pop().text;
- suffix = value + suffix;
- (tokens[tokens.length - 1]).value = getNumber(value);
- }
- if (tokens.length === 0 || tokens[tokens.length - 1].type !== "BRACKET") {
- throw new Error("missing opening bracket");
- }
- (tokens[tokens.length - 1]).text += suffix;
- }
- continue;
- }
- match = cur.match(regexIdPrefix);
- if (match) {
- token.text = match[1];
- offset += token.text.length;
- if (Keywords.has(token.text)) {
- token.type = "KEYWORD";
- continue;
- }
- if (token.text.match(regexType)) {
- token.type = "TYPE";
- continue;
- }
- token.type = "ID";
- continue;
- }
- match = cur.match(regexNumberPrefix);
- if (match) {
- token.text = match[1];
- token.type = "NUMBER";
- offset += token.text.length;
- continue;
- }
- throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);
- }
- return new TokenString(tokens.map((t) => Object.freeze(t)));
-}
-// Check only one of `allowed` is in `set`
-function allowSingle(set, allowed) {
- let included = [];
- for (const key in allowed.keys()) {
- if (set.has(key)) {
- included.push(key);
- }
- }
- if (included.length > 1) {
- throw new Error(`conflicting types: ${included.join(", ")}`);
- }
-}
-// Functions to process a Solidity Signature TokenString from left-to-right for...
-// ...the name with an optional type, returning the name
-function consumeName(type, tokens) {
- if (tokens.peekKeyword(KwTypes)) {
- const keyword = tokens.pop().text;
- if (keyword !== type) {
- throw new Error(`expected ${type}, got ${keyword}`);
- }
- }
- return tokens.popType("ID");
-}
-// ...all keywords matching allowed, returning the keywords
-function consumeKeywords(tokens, allowed) {
- const keywords = new Set();
- while (true) {
- const keyword = tokens.peekType("KEYWORD");
- if (keyword == null || (allowed && !allowed.has(keyword))) {
- break;
- }
- tokens.pop();
- if (keywords.has(keyword)) {
- throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);
- }
- keywords.add(keyword);
- }
- return Object.freeze(keywords);
-}
-// ...all visibility keywords, returning the coalesced mutability
-function consumeMutability(tokens) {
- let modifiers = consumeKeywords(tokens, KwVisib);
- // Detect conflicting modifiers
- allowSingle(modifiers, setify("constant payable nonpayable".split(" ")));
- allowSingle(modifiers, setify("pure view payable nonpayable".split(" ")));
- // Process mutability states
- if (modifiers.has("view")) {
- return "view";
- }
- if (modifiers.has("pure")) {
- return "pure";
- }
- if (modifiers.has("payable")) {
- return "payable";
- }
- if (modifiers.has("nonpayable")) {
- return "nonpayable";
- }
- // Process legacy `constant` last
- if (modifiers.has("constant")) {
- return "view";
- }
- return "nonpayable";
-}
-// ...a parameter list, returning the ParamType list
-function consumeParams(tokens, allowIndexed) {
- return tokens.popParams().map((t) => ParamType.from(t, allowIndexed));
-}
-// ...a gas limit, returning a BigNumber or null if none
-function consumeGas(tokens) {
- if (tokens.peekType("AT")) {
- tokens.pop();
- if (tokens.peekType("NUMBER")) {
- return getBigInt(tokens.pop().text);
- }
- throw new Error("invalid gas");
- }
- return null;
-}
-function consumeEoi(tokens) {
- if (tokens.length) {
- throw new Error(`unexpected tokens: ${tokens.toString()}`);
- }
-}
-const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);
-function verifyBasicType(type) {
- const match = type.match(regexType);
- assertArgument(match, "invalid type", "type", type);
- if (type === "uint") {
- return "uint256";
- }
- if (type === "int") {
- return "int256";
- }
- if (match[2]) {
- // bytesXX
- const length = parseInt(match[2]);
- assertArgument(length !== 0 && length <= 32, "invalid bytes length", "type", type);
- }
- else if (match[3]) {
- // intXX or uintXX
- const size = parseInt(match[3]);
- assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, "invalid numeric width", "type", type);
- }
- return type;
-}
-// Make the Fragment constructors effectively private
-const _guard = {};
-const internal = Symbol.for("_quais_internal");
-const ParamTypeInternal = "_ParamTypeInternal";
-const ErrorFragmentInternal = "_ErrorInternal";
-const EventFragmentInternal = "_EventInternal";
-const ConstructorFragmentInternal = "_ConstructorInternal";
-const FallbackFragmentInternal = "_FallbackInternal";
-const FunctionFragmentInternal = "_FunctionInternal";
-const StructFragmentInternal = "_StructInternal";
-/**
- * Each input and output of a [[Fragment]] is an Array of **ParamType**.
- */
-export class ParamType {
- /**
- * The local name of the parameter (or ``""`` if unbound)
- */
- name;
- /**
- * The fully qualified type (e.g. ``"address"``, ``"tuple(address)"``,
- * ``"uint256[3][]"``)
- */
- type;
- /**
- * The base type (e.g. ``"address"``, ``"tuple"``, ``"array"``)
- */
- baseType;
- /**
- * True if the parameters is indexed.
- *
- * For non-indexable types this is ``null``.
- */
- indexed;
- /**
- * The components for the tuple.
- *
- * For non-tuple types this is ``null``.
- */
- components;
- /**
- * The array length, or ``-1`` for dynamic-lengthed arrays.
- *
- * For non-array types this is ``null``.
- */
- arrayLength;
- /**
- * The type of each child in the array.
- *
- * For non-array types this is ``null``.
- */
- arrayChildren;
- /**
- * @private
- */
- constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {
- assertPrivate(guard, _guard, "ParamType");
- Object.defineProperty(this, internal, { value: ParamTypeInternal });
- if (components) {
- components = Object.freeze(components.slice());
- }
- if (baseType === "array") {
- if (arrayLength == null || arrayChildren == null) {
- throw new Error("");
- }
- }
- else if (arrayLength != null || arrayChildren != null) {
- throw new Error("");
- }
- if (baseType === "tuple") {
- if (components == null) {
- throw new Error("");
- }
- }
- else if (components != null) {
- throw new Error("");
- }
- defineProperties(this, {
- name, type, baseType, indexed, components, arrayLength, arrayChildren
- });
- }
- /**
- * Return a string representation of this type.
- *
- * For example,
- *
- * ``sighash" => "(uint256,address)"``
- *
- * ``"minimal" => "tuple(uint256,address) indexed"``
- *
- * ``"full" => "tuple(uint256 foo, address bar) indexed baz"``
- */
- format(format) {
- if (format == null) {
- format = "sighash";
- }
- if (format === "json") {
- const name = this.name || "";
- if (this.isArray()) {
- const result = JSON.parse(this.arrayChildren.format("json"));
- result.name = name;
- result.type += `[${(this.arrayLength < 0 ? "" : String(this.arrayLength))}]`;
- return JSON.stringify(result);
- }
- const result = {
- type: ((this.baseType === "tuple") ? "tuple" : this.type),
- name
- };
- if (typeof (this.indexed) === "boolean") {
- result.indexed = this.indexed;
- }
- if (this.isTuple()) {
- result.components = this.components.map((c) => JSON.parse(c.format(format)));
- }
- return JSON.stringify(result);
- }
- let result = "";
- // Array
- if (this.isArray()) {
- result += this.arrayChildren.format(format);
- result += `[${(this.arrayLength < 0 ? "" : String(this.arrayLength))}]`;
- }
- else {
- if (this.isTuple()) {
- result += "(" + this.components.map((comp) => comp.format(format)).join((format === "full") ? ", " : ",") + ")";
- }
- else {
- result += this.type;
- }
- }
- if (format !== "sighash") {
- if (this.indexed === true) {
- result += " indexed";
- }
- if (format === "full" && this.name) {
- result += " " + this.name;
- }
- }
- return result;
- }
- /**
- * Returns true if %%this%% is an Array type.
- *
- * This provides a type gaurd ensuring that [[arrayChildren]]
- * and [[arrayLength]] are non-null.
- */
- isArray() {
- return (this.baseType === "array");
- }
- /**
- * Returns true if %%this%% is a Tuple type.
- *
- * This provides a type gaurd ensuring that [[components]]
- * is non-null.
- */
- isTuple() {
- return (this.baseType === "tuple");
- }
- /**
- * Returns true if %%this%% is an Indexable type.
- *
- * This provides a type gaurd ensuring that [[indexed]]
- * is non-null.
- */
- isIndexable() {
- return (this.indexed != null);
- }
- /**
- * Walks the **ParamType** with %%value%%, calling %%process%%
- * on each type, destructing the %%value%% recursively.
- */
- walk(value, process) {
- if (this.isArray()) {
- if (!Array.isArray(value)) {
- throw new Error("invalid array value");
- }
- if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
- throw new Error("array is wrong length");
- }
- const _this = this;
- return value.map((v) => (_this.arrayChildren.walk(v, process)));
- }
- if (this.isTuple()) {
- if (!Array.isArray(value)) {
- throw new Error("invalid tuple value");
- }
- if (value.length !== this.components.length) {
- throw new Error("array is wrong length");
- }
- const _this = this;
- return value.map((v, i) => (_this.components[i].walk(v, process)));
- }
- return process(this.type, value);
- }
- #walkAsync(promises, value, process, setValue) {
- if (this.isArray()) {
- if (!Array.isArray(value)) {
- throw new Error("invalid array value");
- }
- if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
- throw new Error("array is wrong length");
- }
- const childType = this.arrayChildren;
- const result = value.slice();
- result.forEach((value, index) => {
- childType.#walkAsync(promises, value, process, (value) => {
- result[index] = value;
- });
- });
- setValue(result);
- return;
- }
- if (this.isTuple()) {
- const components = this.components;
- // Convert the object into an array
- let result;
- if (Array.isArray(value)) {
- result = value.slice();
- }
- else {
- if (value == null || typeof (value) !== "object") {
- throw new Error("invalid tuple value");
- }
- result = components.map((param) => {
- if (!param.name) {
- throw new Error("cannot use object value with unnamed components");
- }
- if (!(param.name in value)) {
- throw new Error(`missing value for component ${param.name}`);
- }
- return value[param.name];
- });
- }
- if (result.length !== this.components.length) {
- throw new Error("array is wrong length");
- }
- result.forEach((value, index) => {
- components[index].#walkAsync(promises, value, process, (value) => {
- result[index] = value;
- });
- });
- setValue(result);
- return;
- }
- const result = process(this.type, value);
- if (result.then) {
- promises.push((async function () { setValue(await result); })());
- }
- else {
- setValue(result);
- }
- }
- /**
- * Walks the **ParamType** with %%value%%, asynchronously calling
- * %%process%% on each type, destructing the %%value%% recursively.
- *
- * This can be used to resolve ENS naes by walking and resolving each
- * ``"address"`` type.
- */
- async walkAsync(value, process) {
- const promises = [];
- const result = [value];
- this.#walkAsync(promises, value, process, (value) => {
- result[0] = value;
- });
- if (promises.length) {
- await Promise.all(promises);
- }
- return result[0];
- }
- /**
- * Creates a new **ParamType** for %%obj%%.
- *
- * If %%allowIndexed%% then the ``indexed`` keyword is permitted,
- * otherwise the ``indexed`` keyword will throw an error.
- */
- static from(obj, allowIndexed) {
- if (ParamType.isParamType(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- try {
- return ParamType.from(lex(obj), allowIndexed);
- }
- catch (error) {
- assertArgument(false, "invalid param type", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- let type = "", baseType = "";
- let comps = null;
- if (consumeKeywords(obj, setify(["tuple"])).has("tuple") || obj.peekType("OPEN_PAREN")) {
- // Tuple
- baseType = "tuple";
- comps = obj.popParams().map((t) => ParamType.from(t));
- type = `tuple(${comps.map((c) => c.format()).join(",")})`;
- }
- else {
- // Normal
- type = verifyBasicType(obj.popType("TYPE"));
- baseType = type;
- }
- // Check for Array
- let arrayChildren = null;
- let arrayLength = null;
- while (obj.length && obj.peekType("BRACKET")) {
- const bracket = obj.pop(); //arrays[i];
- arrayChildren = new ParamType(_guard, "", type, baseType, null, comps, arrayLength, arrayChildren);
- arrayLength = bracket.value;
- type += bracket.text;
- baseType = "array";
- comps = null;
- }
- let indexed = null;
- const keywords = consumeKeywords(obj, KwModifiers);
- if (keywords.has("indexed")) {
- if (!allowIndexed) {
- throw new Error("");
- }
- indexed = true;
- }
- const name = (obj.peekType("ID") ? obj.pop().text : "");
- if (obj.length) {
- throw new Error("leftover tokens");
- }
- return new ParamType(_guard, name, type, baseType, indexed, comps, arrayLength, arrayChildren);
- }
- const name = obj.name;
- assertArgument(!name || (typeof (name) === "string" && name.match(regexId)), "invalid name", "obj.name", name);
- let indexed = obj.indexed;
- if (indexed != null) {
- assertArgument(allowIndexed, "parameter cannot be indexed", "obj.indexed", obj.indexed);
- indexed = !!indexed;
- }
- let type = obj.type;
- let arrayMatch = type.match(regexArrayType);
- if (arrayMatch) {
- const arrayLength = parseInt(arrayMatch[2] || "-1");
- const arrayChildren = ParamType.from({
- type: arrayMatch[1],
- components: obj.components
- });
- return new ParamType(_guard, name || "", type, "array", indexed, null, arrayLength, arrayChildren);
- }
- if (type === "tuple" || type.startsWith("tuple(" /* fix: ) */) || type.startsWith("(" /* fix: ) */)) {
- const comps = (obj.components != null) ? obj.components.map((c) => ParamType.from(c)) : null;
- const tuple = new ParamType(_guard, name || "", type, "tuple", indexed, comps, null, null);
- // @TODO: use lexer to validate and normalize type
- return tuple;
- }
- type = verifyBasicType(obj.type);
- return new ParamType(_guard, name || "", type, type, indexed, null, null, null);
- }
- /**
- * Returns true if %%value%% is a **ParamType**.
- */
- static isParamType(value) {
- return (value && value[internal] === ParamTypeInternal);
- }
-}
-/**
- * An abstract class to represent An individual fragment from a parse ABI.
- */
-export class Fragment {
- /**
- * The type of the fragment.
- */
- type;
- /**
- * The inputs for the fragment.
- */
- inputs;
- /**
- * @private
- */
- constructor(guard, type, inputs) {
- assertPrivate(guard, _guard, "Fragment");
- inputs = Object.freeze(inputs.slice());
- defineProperties(this, { type, inputs });
- }
- /**
- * Creates a new **Fragment** for %%obj%%, wich can be any supported
- * ABI frgament type.
- */
- static from(obj) {
- if (typeof (obj) === "string") {
- // Try parsing JSON...
- try {
- Fragment.from(JSON.parse(obj));
- }
- catch (e) { }
- // ...otherwise, use the human-readable lexer
- return Fragment.from(lex(obj));
- }
- if (obj instanceof TokenString) {
- // Human-readable ABI (already lexed)
- const type = obj.peekKeyword(KwTypes);
- switch (type) {
- case "constructor": return ConstructorFragment.from(obj);
- case "error": return ErrorFragment.from(obj);
- case "event": return EventFragment.from(obj);
- case "fallback":
- case "receive":
- return FallbackFragment.from(obj);
- case "function": return FunctionFragment.from(obj);
- case "struct": return StructFragment.from(obj);
- }
- }
- else if (typeof (obj) === "object") {
- // JSON ABI
- switch (obj.type) {
- case "constructor": return ConstructorFragment.from(obj);
- case "error": return ErrorFragment.from(obj);
- case "event": return EventFragment.from(obj);
- case "fallback":
- case "receive":
- return FallbackFragment.from(obj);
- case "function": return FunctionFragment.from(obj);
- case "struct": return StructFragment.from(obj);
- }
- assert(false, `unsupported type: ${obj.type}`, "UNSUPPORTED_OPERATION", {
- operation: "Fragment.from"
- });
- }
- assertArgument(false, "unsupported frgament object", "obj", obj);
- }
- /**
- * Returns true if %%value%% is a [[ConstructorFragment]].
- */
- static isConstructor(value) {
- return ConstructorFragment.isFragment(value);
- }
- /**
- * Returns true if %%value%% is an [[ErrorFragment]].
- */
- static isError(value) {
- return ErrorFragment.isFragment(value);
- }
- /**
- * Returns true if %%value%% is an [[EventFragment]].
- */
- static isEvent(value) {
- return EventFragment.isFragment(value);
- }
- /**
- * Returns true if %%value%% is a [[FunctionFragment]].
- */
- static isFunction(value) {
- return FunctionFragment.isFragment(value);
- }
- /**
- * Returns true if %%value%% is a [[StructFragment]].
- */
- static isStruct(value) {
- return StructFragment.isFragment(value);
- }
-}
-/**
- * An abstract class to represent An individual fragment
- * which has a name from a parse ABI.
- */
-export class NamedFragment extends Fragment {
- /**
- * The name of the fragment.
- */
- name;
- /**
- * @private
- */
- constructor(guard, type, name, inputs) {
- super(guard, type, inputs);
- assertArgument(typeof (name) === "string" && name.match(regexId), "invalid identifier", "name", name);
- inputs = Object.freeze(inputs.slice());
- defineProperties(this, { name });
- }
-}
-function joinParams(format, params) {
- return "(" + params.map((p) => p.format(format)).join((format === "full") ? ", " : ",") + ")";
-}
-/**
- * A Fragment which represents a //Custom Error//.
- */
-export class ErrorFragment extends NamedFragment {
- /**
- * @private
- */
- constructor(guard, name, inputs) {
- super(guard, "error", name, inputs);
- Object.defineProperty(this, internal, { value: ErrorFragmentInternal });
- }
- /**
- * The Custom Error selector.
- */
- get selector() {
- return id(this.format("sighash")).substring(0, 10);
- }
- /**
- * Returns a string representation of this fragment as %%format%%.
- */
- format(format) {
- if (format == null) {
- format = "sighash";
- }
- if (format === "json") {
- return JSON.stringify({
- type: "error",
- name: this.name,
- inputs: this.inputs.map((input) => JSON.parse(input.format(format))),
- });
- }
- const result = [];
- if (format !== "sighash") {
- result.push("error");
- }
- result.push(this.name + joinParams(format, this.inputs));
- return result.join(" ");
- }
- /**
- * Returns a new **ErrorFragment** for %%obj%%.
- */
- static from(obj) {
- if (ErrorFragment.isFragment(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- return ErrorFragment.from(lex(obj));
- }
- else if (obj instanceof TokenString) {
- const name = consumeName("error", obj);
- const inputs = consumeParams(obj);
- consumeEoi(obj);
- return new ErrorFragment(_guard, name, inputs);
- }
- return new ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);
- }
- /**
- * Returns ``true`` and provides a type guard if %%value%% is an
- * **ErrorFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === ErrorFragmentInternal);
- }
-}
-/**
- * A Fragment which represents an Event.
- */
-export class EventFragment extends NamedFragment {
- /**
- * Whether this event is anonymous.
- */
- anonymous;
- /**
- * @private
- */
- constructor(guard, name, inputs, anonymous) {
- super(guard, "event", name, inputs);
- Object.defineProperty(this, internal, { value: EventFragmentInternal });
- defineProperties(this, { anonymous });
- }
- /**
- * The Event topic hash.
- */
- get topicHash() {
- return id(this.format("sighash"));
- }
- /**
- * Returns a string representation of this event as %%format%%.
- */
- format(format) {
- if (format == null) {
- format = "sighash";
- }
- if (format === "json") {
- return JSON.stringify({
- type: "event",
- anonymous: this.anonymous,
- name: this.name,
- inputs: this.inputs.map((i) => JSON.parse(i.format(format)))
- });
- }
- const result = [];
- if (format !== "sighash") {
- result.push("event");
- }
- result.push(this.name + joinParams(format, this.inputs));
- if (format !== "sighash" && this.anonymous) {
- result.push("anonymous");
- }
- return result.join(" ");
- }
- /**
- * Return the topic hash for an event with %%name%% and %%params%%.
- */
- static getTopicHash(name, params) {
- params = (params || []).map((p) => ParamType.from(p));
- const fragment = new EventFragment(_guard, name, params, false);
- return fragment.topicHash;
- }
- /**
- * Returns a new **EventFragment** for %%obj%%.
- */
- static from(obj) {
- if (EventFragment.isFragment(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- try {
- return EventFragment.from(lex(obj));
- }
- catch (error) {
- assertArgument(false, "invalid event fragment", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- const name = consumeName("event", obj);
- const inputs = consumeParams(obj, true);
- const anonymous = !!consumeKeywords(obj, setify(["anonymous"])).has("anonymous");
- consumeEoi(obj);
- return new EventFragment(_guard, name, inputs, anonymous);
- }
- return new EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p) => ParamType.from(p, true)) : [], !!obj.anonymous);
- }
- /**
- * Returns ``true`` and provides a type guard if %%value%% is an
- * **EventFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === EventFragmentInternal);
- }
-}
-/**
- * A Fragment which represents a constructor.
- */
-export class ConstructorFragment extends Fragment {
- /**
- * Whether the constructor can receive an endowment.
- */
- payable;
- /**
- * The recommended gas limit for deployment or ``null``.
- */
- gas;
- /**
- * @private
- */
- constructor(guard, type, inputs, payable, gas) {
- super(guard, type, inputs);
- Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });
- defineProperties(this, { payable, gas });
- }
- /**
- * Returns a string representation of this constructor as %%format%%.
- */
- format(format) {
- assert(format != null && format !== "sighash", "cannot format a constructor for sighash", "UNSUPPORTED_OPERATION", { operation: "format(sighash)" });
- if (format === "json") {
- return JSON.stringify({
- type: "constructor",
- stateMutability: (this.payable ? "payable" : "undefined"),
- payable: this.payable,
- gas: ((this.gas != null) ? this.gas : undefined),
- inputs: this.inputs.map((i) => JSON.parse(i.format(format)))
- });
- }
- const result = [`constructor${joinParams(format, this.inputs)}`];
- if (this.payable) {
- result.push("payable");
- }
- if (this.gas != null) {
- result.push(`@${this.gas.toString()}`);
- }
- return result.join(" ");
- }
- /**
- * Returns a new **ConstructorFragment** for %%obj%%.
- */
- static from(obj) {
- if (ConstructorFragment.isFragment(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- try {
- return ConstructorFragment.from(lex(obj));
- }
- catch (error) {
- assertArgument(false, "invalid constuctor fragment", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- consumeKeywords(obj, setify(["constructor"]));
- const inputs = consumeParams(obj);
- const payable = !!consumeKeywords(obj, KwVisibDeploy).has("payable");
- const gas = consumeGas(obj);
- consumeEoi(obj);
- return new ConstructorFragment(_guard, "constructor", inputs, payable, gas);
- }
- return new ConstructorFragment(_guard, "constructor", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, (obj.gas != null) ? obj.gas : null);
- }
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **ConstructorFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === ConstructorFragmentInternal);
- }
-}
-/**
- * A Fragment which represents a method.
- */
-export class FallbackFragment extends Fragment {
- /**
- * If the function can be sent value during invocation.
- */
- payable;
- constructor(guard, inputs, payable) {
- super(guard, "fallback", inputs);
- Object.defineProperty(this, internal, { value: FallbackFragmentInternal });
- defineProperties(this, { payable });
- }
- /**
- * Returns a string representation of this fallback as %%format%%.
- */
- format(format) {
- const type = ((this.inputs.length === 0) ? "receive" : "fallback");
- if (format === "json") {
- const stateMutability = (this.payable ? "payable" : "nonpayable");
- return JSON.stringify({ type, stateMutability });
- }
- return `${type}()${this.payable ? " payable" : ""}`;
- }
- /**
- * Returns a new **FallbackFragment** for %%obj%%.
- */
- static from(obj) {
- if (FallbackFragment.isFragment(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- try {
- return FallbackFragment.from(lex(obj));
- }
- catch (error) {
- assertArgument(false, "invalid fallback fragment", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- const errorObj = obj.toString();
- const topIsValid = obj.peekKeyword(setify(["fallback", "receive"]));
- assertArgument(topIsValid, "type must be fallback or receive", "obj", errorObj);
- const type = obj.popKeyword(setify(["fallback", "receive"]));
- // receive()
- if (type === "receive") {
- const inputs = consumeParams(obj);
- assertArgument(inputs.length === 0, `receive cannot have arguments`, "obj.inputs", inputs);
- consumeKeywords(obj, setify(["payable"]));
- consumeEoi(obj);
- return new FallbackFragment(_guard, [], true);
- }
- // fallback() [payable]
- // fallback(bytes) [payable] returns (bytes)
- let inputs = consumeParams(obj);
- if (inputs.length) {
- assertArgument(inputs.length === 1 && inputs[0].type === "bytes", "invalid fallback inputs", "obj.inputs", inputs.map((i) => i.format("minimal")).join(", "));
- }
- else {
- inputs = [ParamType.from("bytes")];
- }
- const mutability = consumeMutability(obj);
- assertArgument(mutability === "nonpayable" || mutability === "payable", "fallback cannot be constants", "obj.stateMutability", mutability);
- if (consumeKeywords(obj, setify(["returns"])).has("returns")) {
- const outputs = consumeParams(obj);
- assertArgument(outputs.length === 1 && outputs[0].type === "bytes", "invalid fallback outputs", "obj.outputs", outputs.map((i) => i.format("minimal")).join(", "));
- }
- consumeEoi(obj);
- return new FallbackFragment(_guard, inputs, mutability === "payable");
- }
- if (obj.type === "receive") {
- return new FallbackFragment(_guard, [], true);
- }
- if (obj.type === "fallback") {
- const inputs = [ParamType.from("bytes")];
- const payable = (obj.stateMutability === "payable");
- return new FallbackFragment(_guard, inputs, payable);
- }
- assertArgument(false, "invalid fallback description", "obj", obj);
- }
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **FallbackFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === FallbackFragmentInternal);
- }
-}
-/**
- * A Fragment which represents a method.
- */
-export class FunctionFragment extends NamedFragment {
- /**
- * If the function is constant (e.g. ``pure`` or ``view`` functions).
- */
- constant;
- /**
- * The returned types for the result of calling this function.
- */
- outputs;
- /**
- * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``
- * or ``pure``)
- */
- stateMutability;
- /**
- * If the function can be sent value during invocation.
- */
- payable;
- /**
- * The recommended gas limit to send when calling this function.
- */
- gas;
- /**
- * @private
- */
- constructor(guard, name, stateMutability, inputs, outputs, gas) {
- super(guard, "function", name, inputs);
- Object.defineProperty(this, internal, { value: FunctionFragmentInternal });
- outputs = Object.freeze(outputs.slice());
- const constant = (stateMutability === "view" || stateMutability === "pure");
- const payable = (stateMutability === "payable");
- defineProperties(this, { constant, gas, outputs, payable, stateMutability });
- }
- /**
- * The Function selector.
- */
- get selector() {
- return id(this.format("sighash")).substring(0, 10);
- }
- /**
- * Returns a string representation of this function as %%format%%.
- */
- format(format) {
- if (format == null) {
- format = "sighash";
- }
- if (format === "json") {
- return JSON.stringify({
- type: "function",
- name: this.name,
- constant: this.constant,
- stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined),
- payable: this.payable,
- gas: ((this.gas != null) ? this.gas : undefined),
- inputs: this.inputs.map((i) => JSON.parse(i.format(format))),
- outputs: this.outputs.map((o) => JSON.parse(o.format(format))),
- });
- }
- const result = [];
- if (format !== "sighash") {
- result.push("function");
- }
- result.push(this.name + joinParams(format, this.inputs));
- if (format !== "sighash") {
- if (this.stateMutability !== "nonpayable") {
- result.push(this.stateMutability);
- }
- if (this.outputs && this.outputs.length) {
- result.push("returns");
- result.push(joinParams(format, this.outputs));
- }
- if (this.gas != null) {
- result.push(`@${this.gas.toString()}`);
- }
- }
- return result.join(" ");
- }
- /**
- * Return the selector for a function with %%name%% and %%params%%.
- */
- static getSelector(name, params) {
- params = (params || []).map((p) => ParamType.from(p));
- const fragment = new FunctionFragment(_guard, name, "view", params, [], null);
- return fragment.selector;
- }
- /**
- * Returns a new **FunctionFragment** for %%obj%%.
- */
- static from(obj) {
- if (FunctionFragment.isFragment(obj)) {
- return obj;
- }
- if (typeof (obj) === "string") {
- try {
- return FunctionFragment.from(lex(obj));
- }
- catch (error) {
- assertArgument(false, "invalid function fragment", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- const name = consumeName("function", obj);
- const inputs = consumeParams(obj);
- const mutability = consumeMutability(obj);
- let outputs = [];
- if (consumeKeywords(obj, setify(["returns"])).has("returns")) {
- outputs = consumeParams(obj);
- }
- const gas = consumeGas(obj);
- consumeEoi(obj);
- return new FunctionFragment(_guard, name, mutability, inputs, outputs, gas);
- }
- let stateMutability = obj.stateMutability;
- // Use legacy Solidity ABI logic if stateMutability is missing
- if (stateMutability == null) {
- stateMutability = "payable";
- if (typeof (obj.constant) === "boolean") {
- stateMutability = "view";
- if (!obj.constant) {
- stateMutability = "payable";
- if (typeof (obj.payable) === "boolean" && !obj.payable) {
- stateMutability = "nonpayable";
- }
- }
- }
- else if (typeof (obj.payable) === "boolean" && !obj.payable) {
- stateMutability = "nonpayable";
- }
- }
- // @TODO: verifyState for stateMutability (e.g. throw if
- // payable: false but stateMutability is "nonpayable")
- return new FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], (obj.gas != null) ? obj.gas : null);
- }
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **FunctionFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === FunctionFragmentInternal);
- }
-}
-/**
- * A Fragment which represents a structure.
- */
-export class StructFragment extends NamedFragment {
- /**
- * @private
- */
- constructor(guard, name, inputs) {
- super(guard, "struct", name, inputs);
- Object.defineProperty(this, internal, { value: StructFragmentInternal });
- }
- /**
- * Returns a string representation of this struct as %%format%%.
- */
- format() {
- throw new Error("@TODO");
- }
- /**
- * Returns a new **StructFragment** for %%obj%%.
- */
- static from(obj) {
- if (typeof (obj) === "string") {
- try {
- return StructFragment.from(lex(obj));
- }
- catch (error) {
- assertArgument(false, "invalid struct fragment", "obj", obj);
- }
- }
- else if (obj instanceof TokenString) {
- const name = consumeName("struct", obj);
- const inputs = consumeParams(obj);
- consumeEoi(obj);
- return new StructFragment(_guard, name, inputs);
- }
- return new StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);
- }
- // @TODO: fix this return type
- /**
- * Returns ``true`` and provides a type guard if %%value%% is a
- * **StructFragment**.
- */
- static isFragment(value) {
- return (value && value[internal] === StructFragmentInternal);
- }
-}
-//# sourceMappingURL=fragments.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/fragments.js.map b/lib.esm/abi/fragments.js.map
deleted file mode 100644
index 21a436d8..00000000
--- a/lib.esm/abi/fragments.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"fragments.js","sourceRoot":"","sources":["../../src.ts/abi/fragments.ts"],"names":[],"m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AED;;OAEG;IACH,MAAM;QACF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,GAAQ;QAChB,IAAI,OAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YAC1B,IAAI;gBACA,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;aACxC;YAAC,OAAO,KAAK,EAAE;gBACZ,cAAc,CAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;aAChE;SAEJ;aAAM,IAAI,GAAG,YAAY,WAAW,EAAE;YACnC,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;YAClC,UAAU,CAAC,GAAG,CAAC,CAAC;YAChB,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,EAAG,CAAC,CAAC;IAClG,CAAC;IAEL,8BAA8B;IAC1B;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,KAAU;QACxB,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,sBAAsB,CAAC,CAAC;IACjE,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/index.d.ts b/lib.esm/abi/index.d.ts
deleted file mode 100644
index 2bf39932..00000000
--- a/lib.esm/abi/index.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * The Application Binary Interface (ABI) describes how method input
- * parameters should be encoded, their results decoded, and how to
- * decode events and errors.
- *
- * See [About ABIs](docs-abi) for more details how they are used.
- *
- * @_section api/abi:Application Binary Interface [about-abi]
- * @_navTitle: ABI
- */
-export { AbiCoder } from "./abi-coder.js";
-export { decodeBytes32String, encodeBytes32String } from "./bytes32.js";
-export { ConstructorFragment, ErrorFragment, EventFragment, FallbackFragment, Fragment, FunctionFragment, NamedFragment, ParamType, StructFragment, } from "./fragments.js";
-export { checkResultErrors, Indexed, Interface, ErrorDescription, LogDescription, TransactionDescription, Result } from "./interface.js";
-export { Typed } from "./typed.js";
-export type { JsonFragment, JsonFragmentType, FormatType, FragmentType, ParamTypeWalkAsyncFunc, ParamTypeWalkFunc } from "./fragments.js";
-export type { InterfaceAbi, } from "./interface.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/index.d.ts.map b/lib.esm/abi/index.d.ts.map
deleted file mode 100644
index 0d99c19b..00000000
--- a/lib.esm/abi/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/abi/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EACH,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EACnE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,GACvE,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,gBAAgB,EAAE,cAAc,EAAE,sBAAsB,EACxD,MAAM,EACT,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,YAAY,EACR,YAAY,EAAE,gBAAgB,EAC9B,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EACtE,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACR,YAAY,GACf,MAAM,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/abi/index.js b/lib.esm/abi/index.js
deleted file mode 100644
index 312d4d10..00000000
--- a/lib.esm/abi/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * The Application Binary Interface (ABI) describes how method input
- * parameters should be encoded, their results decoded, and how to
- * decode events and errors.
- *
- * See [About ABIs](docs-abi) for more details how they are used.
- *
- * @_section api/abi:Application Binary Interface [about-abi]
- * @_navTitle: ABI
- */
-//////
-export { AbiCoder } from "./abi-coder.js";
-export { decodeBytes32String, encodeBytes32String } from "./bytes32.js";
-export { ConstructorFragment, ErrorFragment, EventFragment, FallbackFragment, Fragment, FunctionFragment, NamedFragment, ParamType, StructFragment, } from "./fragments.js";
-export { checkResultErrors, Indexed, Interface, ErrorDescription, LogDescription, TransactionDescription, Result } from "./interface.js";
-export { Typed } from "./typed.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/index.js.map b/lib.esm/abi/index.js.map
deleted file mode 100644
index e4533c50..00000000
--- a/lib.esm/abi/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/abi/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,MAAM;AACN,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EACH,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EACnE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,GACvE,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,gBAAgB,EAAE,cAAc,EAAE,sBAAsB,EACxD,MAAM,EACT,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/abi/interface.d.ts b/lib.esm/abi/interface.d.ts
deleted file mode 100644
index 1412d7fb..00000000
--- a/lib.esm/abi/interface.d.ts
+++ /dev/null
@@ -1,382 +0,0 @@
-/**
- * The Interface class is a low-level class that accepts an
- * ABI and provides all the necessary functionality to encode
- * and decode paramaters to and results from methods, events
- * and errors.
- *
- * It also provides several convenience methods to automatically
- * search and find matching transactions and events to parse them.
- *
- * @_subsection api/abi:Interfaces [interfaces]
- */
-import { AbiCoder } from "./abi-coder.js";
-import { checkResultErrors, Result } from "./coders/abstract-coder.js";
-import { ConstructorFragment, ErrorFragment, EventFragment, FallbackFragment, Fragment, FunctionFragment, ParamType } from "./fragments.js";
-import { Typed } from "./typed.js";
-import type { BigNumberish, BytesLike, CallExceptionError, CallExceptionTransaction } from "../utils/index.js";
-import type { JsonFragment } from "./fragments.js";
-export { checkResultErrors, Result };
-/**
- * When using the [[Interface-parseLog]] to automatically match a Log to its event
- * for parsing, a **LogDescription** is returned.
- */
-export declare class LogDescription {
- /**
- * The matching fragment for the ``topic0``.
- */
- readonly fragment: EventFragment;
- /**
- * The name of the Event.
- */
- readonly name: string;
- /**
- * The full Event signature.
- */
- readonly signature: string;
- /**
- * The topic hash for the Event.
- */
- readonly topic: string;
- /**
- * The arguments passed into the Event with ``emit``.
- */
- readonly args: Result;
- /**
- * @_ignore:
- */
- constructor(fragment: EventFragment, topic: string, args: Result);
-}
-/**
- * When using the [[Interface-parseTransaction]] to automatically match
- * a transaction data to its function for parsing,
- * a **TransactionDescription** is returned.
- */
-export declare class TransactionDescription {
- /**
- * The matching fragment from the transaction ``data``.
- */
- readonly fragment: FunctionFragment;
- /**
- * The name of the Function from the transaction ``data``.
- */
- readonly name: string;
- /**
- * The arguments passed to the Function from the transaction ``data``.
- */
- readonly args: Result;
- /**
- * The full Function signature from the transaction ``data``.
- */
- readonly signature: string;
- /**
- * The selector for the Function from the transaction ``data``.
- */
- readonly selector: string;
- /**
- * The ``value`` (in wei) from the transaction.
- */
- readonly value: bigint;
- /**
- * @_ignore:
- */
- constructor(fragment: FunctionFragment, selector: string, args: Result, value: bigint);
-}
-/**
- * When using the [[Interface-parseError]] to automatically match an
- * error for a call result for parsing, an **ErrorDescription** is returned.
- */
-export declare class ErrorDescription {
- /**
- * The matching fragment.
- */
- readonly fragment: ErrorFragment;
- /**
- * The name of the Error.
- */
- readonly name: string;
- /**
- * The arguments passed to the Error with ``revert``.
- */
- readonly args: Result;
- /**
- * The full Error signature.
- */
- readonly signature: string;
- /**
- * The selector for the Error.
- */
- readonly selector: string;
- /**
- * @_ignore:
- */
- constructor(fragment: ErrorFragment, selector: string, args: Result);
-}
-/**
- * An **Indexed** is used as a value when a value that does not
- * fit within a topic (i.e. not a fixed-length, 32-byte type). It
- * is the ``keccak256`` of the value, and used for types such as
- * arrays, tuples, bytes and strings.
- */
-export declare class Indexed {
- /**
- * The ``keccak256`` of the value logged.
- */
- readonly hash: null | string;
- /**
- * @_ignore:
- */
- readonly _isIndexed: boolean;
- /**
- * Returns ``true`` if %%value%% is an **Indexed**.
- *
- * This provides a Type Guard for property access.
- */
- static isIndexed(value: any): value is Indexed;
- /**
- * @_ignore:
- */
- constructor(hash: null | string);
-}
-/**
- * An **InterfaceAbi** may be any supported ABI format.
- *
- * A string is expected to be a JSON string, which will be parsed
- * using ``JSON.parse``. This means that the value **must** be a valid
- * JSON string, with no stray commas, etc.
- *
- * An array may contain any combination of:
- * - Human-Readable fragments
- * - Parsed JSON fragment
- * - [[Fragment]] instances
- *
- * A **Human-Readable Fragment** is a string which resembles a Solidity
- * signature and is introduced in [this blog entry](link-ricmoo-humanreadableabi).
- * For example, ``function balanceOf(address) view returns (uint)``.
- *
- * A **Parsed JSON Fragment** is a JavaScript Object desribed in the
- * [Solidity documentation](link-solc-jsonabi).
- */
-export type InterfaceAbi = string | ReadonlyArray;
-/**
- * An Interface abstracts many of the low-level details for
- * encoding and decoding the data on the blockchain.
- *
- * An ABI provides information on how to encode data to send to
- * a Contract, how to decode the results and events and how to
- * interpret revert errors.
- *
- * The ABI can be specified by [any supported format](InterfaceAbi).
- */
-export declare class Interface {
- #private;
- /**
- * All the Contract ABI members (i.e. methods, events, errors, etc).
- */
- readonly fragments: ReadonlyArray;
- /**
- * The Contract constructor.
- */
- readonly deploy: ConstructorFragment;
- /**
- * The Fallback method, if any.
- */
- readonly fallback: null | FallbackFragment;
- /**
- * If receiving ether is supported.
- */
- readonly receive: boolean;
- /**
- * Create a new Interface for the %%fragments%%.
- */
- constructor(fragments: InterfaceAbi);
- /**
- * Returns the entire Human-Readable ABI, as an array of
- * signatures, optionally as %%minimal%% strings, which
- * removes parameter names and unneceesary spaces.
- */
- format(minimal?: boolean): Array;
- /**
- * Return the JSON-encoded ABI. This is the format Solidiy
- * returns.
- */
- formatJson(): string;
- /**
- * The ABI coder that will be used to encode and decode binary
- * data.
- */
- getAbiCoder(): AbiCoder;
- /**
- * Get the function name for %%key%%, which may be a function selector,
- * function name or function signature that belongs to the ABI.
- */
- getFunctionName(key: string): string;
- /**
- * Returns true if %%key%% (a function selector, function name or
- * function signature) is present in the ABI.
- *
- * In the case of a function name, the name may be ambiguous, so
- * accessing the [[FunctionFragment]] may require refinement.
- */
- hasFunction(key: string): boolean;
- /**
- * Get the [[FunctionFragment]] for %%key%%, which may be a function
- * selector, function name or function signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple functions match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single function in
- * the ABI, this will throw.
- */
- getFunction(key: string, values?: Array): null | FunctionFragment;
- /**
- * Iterate over all functions, calling %%callback%%, sorted by their name.
- */
- forEachFunction(callback: (func: FunctionFragment, index: number) => void): void;
- /**
- * Get the event name for %%key%%, which may be a topic hash,
- * event name or event signature that belongs to the ABI.
- */
- getEventName(key: string): string;
- /**
- * Returns true if %%key%% (an event topic hash, event name or
- * event signature) is present in the ABI.
- *
- * In the case of an event name, the name may be ambiguous, so
- * accessing the [[EventFragment]] may require refinement.
- */
- hasEvent(key: string): boolean;
- /**
- * Get the [[EventFragment]] for %%key%%, which may be a topic hash,
- * event name or event signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple events match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single event in
- * the ABI, this will throw.
- */
- getEvent(key: string, values?: Array): null | EventFragment;
- /**
- * Iterate over all events, calling %%callback%%, sorted by their name.
- */
- forEachEvent(callback: (func: EventFragment, index: number) => void): void;
- /**
- * Get the [[ErrorFragment]] for %%key%%, which may be an error
- * selector, error name or error signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple errors match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single error in
- * the ABI, this will throw.
- */
- getError(key: string, values?: Array): null | ErrorFragment;
- /**
- * Iterate over all errors, calling %%callback%%, sorted by their name.
- */
- forEachError(callback: (func: ErrorFragment, index: number) => void): void;
- _decodeParams(params: ReadonlyArray, data: BytesLike): Result;
- _encodeParams(params: ReadonlyArray, values: ReadonlyArray): string;
- /**
- * Encodes a ``tx.data`` object for deploying the Contract with
- * the %%values%% as the constructor arguments.
- */
- encodeDeploy(values?: ReadonlyArray): string;
- /**
- * Decodes the result %%data%% (e.g. from an ``quai_call``) for the
- * specified error (see [[getError]] for valid values for
- * %%key%%).
- *
- * Most developers should prefer the [[parseCallResult]] method instead,
- * which will automatically detect a ``CALL_EXCEPTION`` and throw the
- * corresponding error.
- */
- decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result;
- /**
- * Encodes the transaction revert data for a call result that
- * reverted from the the Contract with the sepcified %%error%%
- * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.
- *
- * This is generally not used by most developers, unless trying to mock
- * a result from a Contract.
- */
- encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray): string;
- /**
- * Decodes the %%data%% from a transaction ``tx.data`` for
- * the function specified (see [[getFunction]] for valid values
- * for %%fragment%%).
- *
- * Most developers should prefer the [[parseTransaction]] method
- * instead, which will automatically detect the fragment.
- */
- decodeFunctionData(fragment: FunctionFragment | string, data: BytesLike): Result;
- /**
- * Encodes the ``tx.data`` for a transaction that calls the function
- * specified (see [[getFunction]] for valid values for %%fragment%%) with
- * the %%values%%.
- */
- encodeFunctionData(fragment: FunctionFragment | string, values?: ReadonlyArray): string;
- /**
- * Decodes the result %%data%% (e.g. from an ``quai_call``) for the
- * specified function (see [[getFunction]] for valid values for
- * %%key%%).
- *
- * Most developers should prefer the [[parseCallResult]] method instead,
- * which will automatically detect a ``CALL_EXCEPTION`` and throw the
- * corresponding error.
- */
- decodeFunctionResult(fragment: FunctionFragment | string, data: BytesLike): Result;
- makeError(_data: BytesLike, tx: CallExceptionTransaction): CallExceptionError;
- /**
- * Encodes the result data (e.g. from an ``quai_call``) for the
- * specified function (see [[getFunction]] for valid values
- * for %%fragment%%) with %%values%%.
- *
- * This is generally not used by most developers, unless trying to mock
- * a result from a Contract.
- */
- encodeFunctionResult(fragment: FunctionFragment | string, values?: ReadonlyArray): string;
- encodeFilterTopics(fragment: EventFragment | string, values: ReadonlyArray): Array>;
- encodeEventLog(fragment: EventFragment | string, values: ReadonlyArray): {
- data: string;
- topics: Array;
- };
- decodeEventLog(fragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray): Result;
- /**
- * Parses a transaction, finding the matching function and extracts
- * the parameter values along with other useful function details.
- *
- * If the matching function cannot be found, return null.
- */
- parseTransaction(tx: {
- data: string;
- value?: BigNumberish;
- }): null | TransactionDescription;
- parseCallResult(data: BytesLike): Result;
- /**
- * Parses a receipt log, finding the matching event and extracts
- * the parameter values along with other useful event details.
- *
- * If the matching event cannot be found, returns null.
- */
- parseLog(log: {
- topics: Array;
- data: string;
- }): null | LogDescription;
- /**
- * Parses a revert data, finding the matching error and extracts
- * the parameter values along with other useful error details.
- *
- * If the matching error cannot be found, returns null.
- */
- parseError(data: BytesLike): null | ErrorDescription;
- /**
- * Creates a new [[Interface]] from the ABI %%value%%.
- *
- * The %%value%% may be provided as an existing [[Interface]] object,
- * a JSON-encoded ABI or any Human-Readable ABI format.
- */
- static from(value: InterfaceAbi | Interface): Interface;
-}
-//# sourceMappingURL=interface.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/interface.d.ts.map b/lib.esm/abi/interface.d.ts.map
deleted file mode 100644
index e88d9350..00000000
--- a/lib.esm/abi/interface.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src.ts/abi/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EACH,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EACnE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EACxC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC;AAErC;;;GAGG;AACH,qBAAa,cAAc;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAG,aAAa,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAG,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,KAA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CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,GAAG,cAAc;IAa5E;;;;;OAKG;IACH,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,gBAAgB;IAWpD;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS;CAe1D"}
\ No newline at end of file
diff --git a/lib.esm/abi/interface.js b/lib.esm/abi/interface.js
deleted file mode 100644
index d0cd034c..00000000
--- a/lib.esm/abi/interface.js
+++ /dev/null
@@ -1,1097 +0,0 @@
-/**
- * The Interface class is a low-level class that accepts an
- * ABI and provides all the necessary functionality to encode
- * and decode paramaters to and results from methods, events
- * and errors.
- *
- * It also provides several convenience methods to automatically
- * search and find matching transactions and events to parse them.
- *
- * @_subsection api/abi:Interfaces [interfaces]
- */
-import { keccak256 } from "../crypto/index.js";
-import { id } from "../hash/index.js";
-import { concat, dataSlice, getBigInt, getBytes, getBytesCopy, hexlify, zeroPadBytes, zeroPadValue, isHexString, defineProperties, assertArgument, toBeHex, assert } from "../utils/index.js";
-import { AbiCoder } from "./abi-coder.js";
-import { checkResultErrors, Result } from "./coders/abstract-coder.js";
-import { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType } from "./fragments.js";
-import { Typed } from "./typed.js";
-export { checkResultErrors, Result };
-/**
- * When using the [[Interface-parseLog]] to automatically match a Log to its event
- * for parsing, a **LogDescription** is returned.
- */
-export class LogDescription {
- /**
- * The matching fragment for the ``topic0``.
- */
- fragment;
- /**
- * The name of the Event.
- */
- name;
- /**
- * The full Event signature.
- */
- signature;
- /**
- * The topic hash for the Event.
- */
- topic;
- /**
- * The arguments passed into the Event with ``emit``.
- */
- args;
- /**
- * @_ignore:
- */
- constructor(fragment, topic, args) {
- const name = fragment.name, signature = fragment.format();
- defineProperties(this, {
- fragment, name, signature, topic, args
- });
- }
-}
-/**
- * When using the [[Interface-parseTransaction]] to automatically match
- * a transaction data to its function for parsing,
- * a **TransactionDescription** is returned.
- */
-export class TransactionDescription {
- /**
- * The matching fragment from the transaction ``data``.
- */
- fragment;
- /**
- * The name of the Function from the transaction ``data``.
- */
- name;
- /**
- * The arguments passed to the Function from the transaction ``data``.
- */
- args;
- /**
- * The full Function signature from the transaction ``data``.
- */
- signature;
- /**
- * The selector for the Function from the transaction ``data``.
- */
- selector;
- /**
- * The ``value`` (in wei) from the transaction.
- */
- value;
- /**
- * @_ignore:
- */
- constructor(fragment, selector, args, value) {
- const name = fragment.name, signature = fragment.format();
- defineProperties(this, {
- fragment, name, args, signature, selector, value
- });
- }
-}
-/**
- * When using the [[Interface-parseError]] to automatically match an
- * error for a call result for parsing, an **ErrorDescription** is returned.
- */
-export class ErrorDescription {
- /**
- * The matching fragment.
- */
- fragment;
- /**
- * The name of the Error.
- */
- name;
- /**
- * The arguments passed to the Error with ``revert``.
- */
- args;
- /**
- * The full Error signature.
- */
- signature;
- /**
- * The selector for the Error.
- */
- selector;
- /**
- * @_ignore:
- */
- constructor(fragment, selector, args) {
- const name = fragment.name, signature = fragment.format();
- defineProperties(this, {
- fragment, name, args, signature, selector
- });
- }
-}
-/**
- * An **Indexed** is used as a value when a value that does not
- * fit within a topic (i.e. not a fixed-length, 32-byte type). It
- * is the ``keccak256`` of the value, and used for types such as
- * arrays, tuples, bytes and strings.
- */
-export class Indexed {
- /**
- * The ``keccak256`` of the value logged.
- */
- hash;
- /**
- * @_ignore:
- */
- _isIndexed;
- /**
- * Returns ``true`` if %%value%% is an **Indexed**.
- *
- * This provides a Type Guard for property access.
- */
- static isIndexed(value) {
- return !!(value && value._isIndexed);
- }
- /**
- * @_ignore:
- */
- constructor(hash) {
- defineProperties(this, { hash, _isIndexed: true });
- }
-}
-// https://docs.soliditylang.org/en/v0.8.13/control-structures.html?highlight=panic#panic-via-assert-and-error-via-require
-const PanicReasons = {
- "0": "generic panic",
- "1": "assert(false)",
- "17": "arithmetic overflow",
- "18": "division or modulo by zero",
- "33": "enum overflow",
- "34": "invalid encoded storage byte array accessed",
- "49": "out-of-bounds array access; popping on an empty array",
- "50": "out-of-bounds access of an array or bytesN",
- "65": "out of memory",
- "81": "uninitialized function",
-};
-const BuiltinErrors = {
- "0x08c379a0": {
- signature: "Error(string)",
- name: "Error",
- inputs: ["string"],
- reason: (message) => {
- return `reverted with reason string ${JSON.stringify(message)}`;
- }
- },
- "0x4e487b71": {
- signature: "Panic(uint256)",
- name: "Panic",
- inputs: ["uint256"],
- reason: (code) => {
- let reason = "unknown panic code";
- if (code >= 0 && code <= 0xff && PanicReasons[code.toString()]) {
- reason = PanicReasons[code.toString()];
- }
- return `reverted with panic code 0x${code.toString(16)} (${reason})`;
- }
- }
-};
-/**
- * An Interface abstracts many of the low-level details for
- * encoding and decoding the data on the blockchain.
- *
- * An ABI provides information on how to encode data to send to
- * a Contract, how to decode the results and events and how to
- * interpret revert errors.
- *
- * The ABI can be specified by [any supported format](InterfaceAbi).
- */
-export class Interface {
- /**
- * All the Contract ABI members (i.e. methods, events, errors, etc).
- */
- fragments;
- /**
- * The Contract constructor.
- */
- deploy;
- /**
- * The Fallback method, if any.
- */
- fallback;
- /**
- * If receiving ether is supported.
- */
- receive;
- #errors;
- #events;
- #functions;
- // #structs: Map;
- #abiCoder;
- /**
- * Create a new Interface for the %%fragments%%.
- */
- constructor(fragments) {
- let abi = [];
- if (typeof (fragments) === "string") {
- abi = JSON.parse(fragments);
- }
- else {
- abi = fragments;
- }
- this.#functions = new Map();
- this.#errors = new Map();
- this.#events = new Map();
- // this.#structs = new Map();
- const frags = [];
- for (const a of abi) {
- try {
- frags.push(Fragment.from(a));
- }
- catch (error) {
- console.log("EE", error);
- }
- }
- defineProperties(this, {
- fragments: Object.freeze(frags)
- });
- let fallback = null;
- let receive = false;
- this.#abiCoder = this.getAbiCoder();
- // Add all fragments by their signature
- this.fragments.forEach((fragment, index) => {
- let bucket;
- switch (fragment.type) {
- case "constructor":
- if (this.deploy) {
- console.log("duplicate definition - constructor");
- return;
- }
- //checkNames(fragment, "input", fragment.inputs);
- defineProperties(this, { deploy: fragment });
- return;
- case "fallback":
- if (fragment.inputs.length === 0) {
- receive = true;
- }
- else {
- assertArgument(!fallback || fragment.payable !== fallback.payable, "conflicting fallback fragments", `fragments[${index}]`, fragment);
- fallback = fragment;
- receive = fallback.payable;
- }
- return;
- case "function":
- //checkNames(fragment, "input", fragment.inputs);
- //checkNames(fragment, "output", (fragment).outputs);
- bucket = this.#functions;
- break;
- case "event":
- //checkNames(fragment, "input", fragment.inputs);
- bucket = this.#events;
- break;
- case "error":
- bucket = this.#errors;
- break;
- default:
- return;
- }
- // Two identical entries; ignore it
- const signature = fragment.format();
- if (bucket.has(signature)) {
- return;
- }
- bucket.set(signature, fragment);
- });
- // If we do not have a constructor add a default
- if (!this.deploy) {
- defineProperties(this, {
- deploy: ConstructorFragment.from("constructor()")
- });
- }
- defineProperties(this, { fallback, receive });
- }
- /**
- * Returns the entire Human-Readable ABI, as an array of
- * signatures, optionally as %%minimal%% strings, which
- * removes parameter names and unneceesary spaces.
- */
- format(minimal) {
- const format = (minimal ? "minimal" : "full");
- const abi = this.fragments.map((f) => f.format(format));
- return abi;
- }
- /**
- * Return the JSON-encoded ABI. This is the format Solidiy
- * returns.
- */
- formatJson() {
- const abi = this.fragments.map((f) => f.format("json"));
- // We need to re-bundle the JSON fragments a bit
- return JSON.stringify(abi.map((j) => JSON.parse(j)));
- }
- /**
- * The ABI coder that will be used to encode and decode binary
- * data.
- */
- getAbiCoder() {
- return AbiCoder.defaultAbiCoder();
- }
- // Find a function definition by any means necessary (unless it is ambiguous)
- #getFunction(key, values, forceUnique) {
- // Selector
- if (isHexString(key)) {
- const selector = key.toLowerCase();
- for (const fragment of this.#functions.values()) {
- if (selector === fragment.selector) {
- return fragment;
- }
- }
- return null;
- }
- // It is a bare name, look up the function (will return null if ambiguous)
- if (key.indexOf("(") === -1) {
- const matching = [];
- for (const [name, fragment] of this.#functions) {
- if (name.split("(" /* fix:) */)[0] === key) {
- matching.push(fragment);
- }
- }
- if (values) {
- const lastValue = (values.length > 0) ? values[values.length - 1] : null;
- let valueLength = values.length;
- let allowOptions = true;
- if (Typed.isTyped(lastValue) && lastValue.type === "overrides") {
- allowOptions = false;
- valueLength--;
- }
- // Remove all matches that don't have a compatible length. The args
- // may contain an overrides, so the match may have n or n - 1 parameters
- for (let i = matching.length - 1; i >= 0; i--) {
- const inputs = matching[i].inputs.length;
- if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {
- matching.splice(i, 1);
- }
- }
- // Remove all matches that don't match the Typed signature
- for (let i = matching.length - 1; i >= 0; i--) {
- const inputs = matching[i].inputs;
- for (let j = 0; j < values.length; j++) {
- // Not a typed value
- if (!Typed.isTyped(values[j])) {
- continue;
- }
- // We are past the inputs
- if (j >= inputs.length) {
- if (values[j].type === "overrides") {
- continue;
- }
- matching.splice(i, 1);
- break;
- }
- // Make sure the value type matches the input type
- if (values[j].type !== inputs[j].baseType) {
- matching.splice(i, 1);
- break;
- }
- }
- }
- }
- // We found a single matching signature with an overrides, but the
- // last value is something that cannot possibly be an options
- if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {
- const lastArg = values[values.length - 1];
- if (lastArg == null || Array.isArray(lastArg) || typeof (lastArg) !== "object") {
- matching.splice(0, 1);
- }
- }
- if (matching.length === 0) {
- return null;
- }
- if (matching.length > 1 && forceUnique) {
- const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", ");
- assertArgument(false, `ambiguous function description (i.e. matches ${matchStr})`, "key", key);
- }
- return matching[0];
- }
- // Normalize the signature and lookup the function
- const result = this.#functions.get(FunctionFragment.from(key).format());
- if (result) {
- return result;
- }
- return null;
- }
- /**
- * Get the function name for %%key%%, which may be a function selector,
- * function name or function signature that belongs to the ABI.
- */
- getFunctionName(key) {
- const fragment = this.#getFunction(key, null, false);
- assertArgument(fragment, "no matching function", "key", key);
- return fragment.name;
- }
- /**
- * Returns true if %%key%% (a function selector, function name or
- * function signature) is present in the ABI.
- *
- * In the case of a function name, the name may be ambiguous, so
- * accessing the [[FunctionFragment]] may require refinement.
- */
- hasFunction(key) {
- return !!this.#getFunction(key, null, false);
- }
- /**
- * Get the [[FunctionFragment]] for %%key%%, which may be a function
- * selector, function name or function signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple functions match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single function in
- * the ABI, this will throw.
- */
- getFunction(key, values) {
- return this.#getFunction(key, values || null, true);
- }
- /**
- * Iterate over all functions, calling %%callback%%, sorted by their name.
- */
- forEachFunction(callback) {
- const names = Array.from(this.#functions.keys());
- names.sort((a, b) => a.localeCompare(b));
- for (let i = 0; i < names.length; i++) {
- const name = names[i];
- callback((this.#functions.get(name)), i);
- }
- }
- // Find an event definition by any means necessary (unless it is ambiguous)
- #getEvent(key, values, forceUnique) {
- // EventTopic
- if (isHexString(key)) {
- const eventTopic = key.toLowerCase();
- for (const fragment of this.#events.values()) {
- if (eventTopic === fragment.topicHash) {
- return fragment;
- }
- }
- return null;
- }
- // It is a bare name, look up the function (will return null if ambiguous)
- if (key.indexOf("(") === -1) {
- const matching = [];
- for (const [name, fragment] of this.#events) {
- if (name.split("(" /* fix:) */)[0] === key) {
- matching.push(fragment);
- }
- }
- if (values) {
- // Remove all matches that don't have a compatible length.
- for (let i = matching.length - 1; i >= 0; i--) {
- if (matching[i].inputs.length < values.length) {
- matching.splice(i, 1);
- }
- }
- // Remove all matches that don't match the Typed signature
- for (let i = matching.length - 1; i >= 0; i--) {
- const inputs = matching[i].inputs;
- for (let j = 0; j < values.length; j++) {
- // Not a typed value
- if (!Typed.isTyped(values[j])) {
- continue;
- }
- // Make sure the value type matches the input type
- if (values[j].type !== inputs[j].baseType) {
- matching.splice(i, 1);
- break;
- }
- }
- }
- }
- if (matching.length === 0) {
- return null;
- }
- if (matching.length > 1 && forceUnique) {
- const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", ");
- assertArgument(false, `ambiguous event description (i.e. matches ${matchStr})`, "key", key);
- }
- return matching[0];
- }
- // Normalize the signature and lookup the function
- const result = this.#events.get(EventFragment.from(key).format());
- if (result) {
- return result;
- }
- return null;
- }
- /**
- * Get the event name for %%key%%, which may be a topic hash,
- * event name or event signature that belongs to the ABI.
- */
- getEventName(key) {
- const fragment = this.#getEvent(key, null, false);
- assertArgument(fragment, "no matching event", "key", key);
- return fragment.name;
- }
- /**
- * Returns true if %%key%% (an event topic hash, event name or
- * event signature) is present in the ABI.
- *
- * In the case of an event name, the name may be ambiguous, so
- * accessing the [[EventFragment]] may require refinement.
- */
- hasEvent(key) {
- return !!this.#getEvent(key, null, false);
- }
- /**
- * Get the [[EventFragment]] for %%key%%, which may be a topic hash,
- * event name or event signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple events match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single event in
- * the ABI, this will throw.
- */
- getEvent(key, values) {
- return this.#getEvent(key, values || null, true);
- }
- /**
- * Iterate over all events, calling %%callback%%, sorted by their name.
- */
- forEachEvent(callback) {
- const names = Array.from(this.#events.keys());
- names.sort((a, b) => a.localeCompare(b));
- for (let i = 0; i < names.length; i++) {
- const name = names[i];
- callback((this.#events.get(name)), i);
- }
- }
- /**
- * Get the [[ErrorFragment]] for %%key%%, which may be an error
- * selector, error name or error signature that belongs to the ABI.
- *
- * If %%values%% is provided, it will use the Typed API to handle
- * ambiguous cases where multiple errors match by name.
- *
- * If the %%key%% and %%values%% do not refine to a single error in
- * the ABI, this will throw.
- */
- getError(key, values) {
- if (isHexString(key)) {
- const selector = key.toLowerCase();
- if (BuiltinErrors[selector]) {
- return ErrorFragment.from(BuiltinErrors[selector].signature);
- }
- for (const fragment of this.#errors.values()) {
- if (selector === fragment.selector) {
- return fragment;
- }
- }
- return null;
- }
- // It is a bare name, look up the function (will return null if ambiguous)
- if (key.indexOf("(") === -1) {
- const matching = [];
- for (const [name, fragment] of this.#errors) {
- if (name.split("(" /* fix:) */)[0] === key) {
- matching.push(fragment);
- }
- }
- if (matching.length === 0) {
- if (key === "Error") {
- return ErrorFragment.from("error Error(string)");
- }
- if (key === "Panic") {
- return ErrorFragment.from("error Panic(uint256)");
- }
- return null;
- }
- else if (matching.length > 1) {
- const matchStr = matching.map((m) => JSON.stringify(m.format())).join(", ");
- assertArgument(false, `ambiguous error description (i.e. ${matchStr})`, "name", key);
- }
- return matching[0];
- }
- // Normalize the signature and lookup the function
- key = ErrorFragment.from(key).format();
- if (key === "Error(string)") {
- return ErrorFragment.from("error Error(string)");
- }
- if (key === "Panic(uint256)") {
- return ErrorFragment.from("error Panic(uint256)");
- }
- const result = this.#errors.get(key);
- if (result) {
- return result;
- }
- return null;
- }
- /**
- * Iterate over all errors, calling %%callback%%, sorted by their name.
- */
- forEachError(callback) {
- const names = Array.from(this.#errors.keys());
- names.sort((a, b) => a.localeCompare(b));
- for (let i = 0; i < names.length; i++) {
- const name = names[i];
- callback((this.#errors.get(name)), i);
- }
- }
- // Get the 4-byte selector used by Solidity to identify a function
- /*
-getSelector(fragment: ErrorFragment | FunctionFragment): string {
- if (typeof(fragment) === "string") {
- const matches: Array = [ ];
-
- try { matches.push(this.getFunction(fragment)); } catch (error) { }
- try { matches.push(this.getError(fragment)); } catch (_) { }
-
- if (matches.length === 0) {
- logger.throwArgumentError("unknown fragment", "key", fragment);
- } else if (matches.length > 1) {
- logger.throwArgumentError("ambiguous fragment matches function and error", "key", fragment);
- }
-
- fragment = matches[0];
- }
-
- return dataSlice(id(fragment.format()), 0, 4);
-}
- */
- // Get the 32-byte topic hash used by Solidity to identify an event
- /*
- getEventTopic(fragment: EventFragment): string {
- //if (typeof(fragment) === "string") { fragment = this.getEvent(eventFragment); }
- return id(fragment.format());
- }
- */
- _decodeParams(params, data) {
- return this.#abiCoder.decode(params, data);
- }
- _encodeParams(params, values) {
- return this.#abiCoder.encode(params, values);
- }
- /**
- * Encodes a ``tx.data`` object for deploying the Contract with
- * the %%values%% as the constructor arguments.
- */
- encodeDeploy(values) {
- return this._encodeParams(this.deploy.inputs, values || []);
- }
- /**
- * Decodes the result %%data%% (e.g. from an ``quai_call``) for the
- * specified error (see [[getError]] for valid values for
- * %%key%%).
- *
- * Most developers should prefer the [[parseCallResult]] method instead,
- * which will automatically detect a ``CALL_EXCEPTION`` and throw the
- * corresponding error.
- */
- decodeErrorResult(fragment, data) {
- if (typeof (fragment) === "string") {
- const f = this.getError(fragment);
- assertArgument(f, "unknown error", "fragment", fragment);
- fragment = f;
- }
- assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, "data", data);
- return this._decodeParams(fragment.inputs, dataSlice(data, 4));
- }
- /**
- * Encodes the transaction revert data for a call result that
- * reverted from the the Contract with the sepcified %%error%%
- * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.
- *
- * This is generally not used by most developers, unless trying to mock
- * a result from a Contract.
- */
- encodeErrorResult(fragment, values) {
- if (typeof (fragment) === "string") {
- const f = this.getError(fragment);
- assertArgument(f, "unknown error", "fragment", fragment);
- fragment = f;
- }
- return concat([
- fragment.selector,
- this._encodeParams(fragment.inputs, values || [])
- ]);
- }
- /**
- * Decodes the %%data%% from a transaction ``tx.data`` for
- * the function specified (see [[getFunction]] for valid values
- * for %%fragment%%).
- *
- * Most developers should prefer the [[parseTransaction]] method
- * instead, which will automatically detect the fragment.
- */
- decodeFunctionData(fragment, data) {
- if (typeof (fragment) === "string") {
- const f = this.getFunction(fragment);
- assertArgument(f, "unknown function", "fragment", fragment);
- fragment = f;
- }
- assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, "data", data);
- return this._decodeParams(fragment.inputs, dataSlice(data, 4));
- }
- /**
- * Encodes the ``tx.data`` for a transaction that calls the function
- * specified (see [[getFunction]] for valid values for %%fragment%%) with
- * the %%values%%.
- */
- encodeFunctionData(fragment, values) {
- if (typeof (fragment) === "string") {
- const f = this.getFunction(fragment);
- assertArgument(f, "unknown function", "fragment", fragment);
- fragment = f;
- }
- return concat([
- fragment.selector,
- this._encodeParams(fragment.inputs, values || [])
- ]);
- }
- /**
- * Decodes the result %%data%% (e.g. from an ``quai_call``) for the
- * specified function (see [[getFunction]] for valid values for
- * %%key%%).
- *
- * Most developers should prefer the [[parseCallResult]] method instead,
- * which will automatically detect a ``CALL_EXCEPTION`` and throw the
- * corresponding error.
- */
- decodeFunctionResult(fragment, data) {
- if (typeof (fragment) === "string") {
- const f = this.getFunction(fragment);
- assertArgument(f, "unknown function", "fragment", fragment);
- fragment = f;
- }
- let message = "invalid length for result data";
- const bytes = getBytesCopy(data);
- if ((bytes.length % 32) === 0) {
- try {
- return this.#abiCoder.decode(fragment.outputs, bytes);
- }
- catch (error) {
- message = "could not decode result data";
- }
- }
- // Call returned data with no error, but the data is junk
- assert(false, message, "BAD_DATA", {
- value: hexlify(bytes),
- info: { method: fragment.name, signature: fragment.format() }
- });
- }
- makeError(_data, tx) {
- const data = getBytes(_data, "data");
- const error = AbiCoder.getBuiltinCallException("call", tx, data);
- // Not a built-in error; try finding a custom error
- const customPrefix = "execution reverted (unknown custom error)";
- if (error.message.startsWith(customPrefix)) {
- const selector = hexlify(data.slice(0, 4));
- const ef = this.getError(selector);
- if (ef) {
- try {
- const args = this.#abiCoder.decode(ef.inputs, data.slice(4));
- error.revert = {
- name: ef.name, signature: ef.format(), args
- };
- error.reason = error.revert.signature;
- error.message = `execution reverted: ${error.reason}`;
- }
- catch (e) {
- error.message = `execution reverted (coult not decode custom error)`;
- }
- }
- }
- // Add the invocation, if available
- const parsed = this.parseTransaction(tx);
- if (parsed) {
- error.invocation = {
- method: parsed.name,
- signature: parsed.signature,
- args: parsed.args
- };
- }
- return error;
- }
- /**
- * Encodes the result data (e.g. from an ``quai_call``) for the
- * specified function (see [[getFunction]] for valid values
- * for %%fragment%%) with %%values%%.
- *
- * This is generally not used by most developers, unless trying to mock
- * a result from a Contract.
- */
- encodeFunctionResult(fragment, values) {
- if (typeof (fragment) === "string") {
- const f = this.getFunction(fragment);
- assertArgument(f, "unknown function", "fragment", fragment);
- fragment = f;
- }
- return hexlify(this.#abiCoder.encode(fragment.outputs, values || []));
- }
- /*
- spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {
- const promises: Array> = [ ];
- const process = function(type: ParamType, value: any): any {
- if (type.baseType === "array") {
- return descend(type.child
- }
- if (type. === "address") {
- }
- };
-
- const descend = function (inputs: Array, values: ReadonlyArray) {
- if (inputs.length !== values.length) { throw new Error("length mismatch"); }
-
- };
-
- const result: Array = [ ];
- values.forEach((value, index) => {
- if (value == null) {
- topics.push(null);
- } else if (param.baseType === "array" || param.baseType === "tuple") {
- logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
- } else if (Array.isArray(value)) {
- topics.push(value.map((value) => encodeTopic(param, value)));
- } else {
- topics.push(encodeTopic(param, value));
- }
- });
- }
- */
- // Create the filter for the event with search criteria (e.g. for quai_filterLog)
- encodeFilterTopics(fragment, values) {
- if (typeof (fragment) === "string") {
- const f = this.getEvent(fragment);
- assertArgument(f, "unknown event", "eventFragment", fragment);
- fragment = f;
- }
- assert(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, "UNEXPECTED_ARGUMENT", { count: values.length, expectedCount: fragment.inputs.length });
- const topics = [];
- if (!fragment.anonymous) {
- topics.push(fragment.topicHash);
- }
- // @TODO: Use the coders for this; to properly support tuples, etc.
- const encodeTopic = (param, value) => {
- if (param.type === "string") {
- return id(value);
- }
- else if (param.type === "bytes") {
- return keccak256(hexlify(value));
- }
- if (param.type === "bool" && typeof (value) === "boolean") {
- value = (value ? "0x01" : "0x00");
- }
- else if (param.type.match(/^u?int/)) {
- value = toBeHex(value); // @TODO: Should this toTwos??
- }
- else if (param.type.match(/^bytes/)) {
- value = zeroPadBytes(value, 32);
- }
- else if (param.type === "address") {
- // Check addresses are valid
- this.#abiCoder.encode(["address"], [value]);
- }
- return zeroPadValue(hexlify(value), 32);
- };
- values.forEach((value, index) => {
- const param = fragment.inputs[index];
- if (!param.indexed) {
- assertArgument(value == null, "cannot filter non-indexed parameters; must be null", ("contract." + param.name), value);
- return;
- }
- if (value == null) {
- topics.push(null);
- }
- else if (param.baseType === "array" || param.baseType === "tuple") {
- assertArgument(false, "filtering with tuples or arrays not supported", ("contract." + param.name), value);
- }
- else if (Array.isArray(value)) {
- topics.push(value.map((value) => encodeTopic(param, value)));
- }
- else {
- topics.push(encodeTopic(param, value));
- }
- });
- // Trim off trailing nulls
- while (topics.length && topics[topics.length - 1] === null) {
- topics.pop();
- }
- return topics;
- }
- encodeEventLog(fragment, values) {
- if (typeof (fragment) === "string") {
- const f = this.getEvent(fragment);
- assertArgument(f, "unknown event", "eventFragment", fragment);
- fragment = f;
- }
- const topics = [];
- const dataTypes = [];
- const dataValues = [];
- if (!fragment.anonymous) {
- topics.push(fragment.topicHash);
- }
- assertArgument(values.length === fragment.inputs.length, "event arguments/values mismatch", "values", values);
- fragment.inputs.forEach((param, index) => {
- const value = values[index];
- if (param.indexed) {
- if (param.type === "string") {
- topics.push(id(value));
- }
- else if (param.type === "bytes") {
- topics.push(keccak256(value));
- }
- else if (param.baseType === "tuple" || param.baseType === "array") {
- // @TODO
- throw new Error("not implemented");
- }
- else {
- topics.push(this.#abiCoder.encode([param.type], [value]));
- }
- }
- else {
- dataTypes.push(param);
- dataValues.push(value);
- }
- });
- return {
- data: this.#abiCoder.encode(dataTypes, dataValues),
- topics: topics
- };
- }
- // Decode a filter for the event and the search criteria
- decodeEventLog(fragment, data, topics) {
- if (typeof (fragment) === "string") {
- const f = this.getEvent(fragment);
- assertArgument(f, "unknown event", "eventFragment", fragment);
- fragment = f;
- }
- if (topics != null && !fragment.anonymous) {
- const eventTopic = fragment.topicHash;
- assertArgument(isHexString(topics[0], 32) && topics[0].toLowerCase() === eventTopic, "fragment/topic mismatch", "topics[0]", topics[0]);
- topics = topics.slice(1);
- }
- const indexed = [];
- const nonIndexed = [];
- const dynamic = [];
- fragment.inputs.forEach((param, index) => {
- if (param.indexed) {
- if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") {
- indexed.push(ParamType.from({ type: "bytes32", name: param.name }));
- dynamic.push(true);
- }
- else {
- indexed.push(param);
- dynamic.push(false);
- }
- }
- else {
- nonIndexed.push(param);
- dynamic.push(false);
- }
- });
- const resultIndexed = (topics != null) ? this.#abiCoder.decode(indexed, concat(topics)) : null;
- const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);
- //const result: (Array & { [ key: string ]: any }) = [ ];
- const values = [];
- const keys = [];
- let nonIndexedIndex = 0, indexedIndex = 0;
- fragment.inputs.forEach((param, index) => {
- let value = null;
- if (param.indexed) {
- if (resultIndexed == null) {
- value = new Indexed(null);
- }
- else if (dynamic[index]) {
- value = new Indexed(resultIndexed[indexedIndex++]);
- }
- else {
- try {
- value = resultIndexed[indexedIndex++];
- }
- catch (error) {
- value = error;
- }
- }
- }
- else {
- try {
- value = resultNonIndexed[nonIndexedIndex++];
- }
- catch (error) {
- value = error;
- }
- }
- values.push(value);
- keys.push(param.name || null);
- });
- return Result.fromItems(values, keys);
- }
- /**
- * Parses a transaction, finding the matching function and extracts
- * the parameter values along with other useful function details.
- *
- * If the matching function cannot be found, return null.
- */
- parseTransaction(tx) {
- const data = getBytes(tx.data, "tx.data");
- const value = getBigInt((tx.value != null) ? tx.value : 0, "tx.value");
- const fragment = this.getFunction(hexlify(data.slice(0, 4)));
- if (!fragment) {
- return null;
- }
- const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));
- return new TransactionDescription(fragment, fragment.selector, args, value);
- }
- parseCallResult(data) {
- throw new Error("@TODO");
- }
- /**
- * Parses a receipt log, finding the matching event and extracts
- * the parameter values along with other useful event details.
- *
- * If the matching event cannot be found, returns null.
- */
- parseLog(log) {
- const fragment = this.getEvent(log.topics[0]);
- if (!fragment || fragment.anonymous) {
- return null;
- }
- // @TODO: If anonymous, and the only method, and the input count matches, should we parse?
- // Probably not, because just because it is the only event in the ABI does
- // not mean we have the full ABI; maybe just a fragment?
- return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));
- }
- /**
- * Parses a revert data, finding the matching error and extracts
- * the parameter values along with other useful error details.
- *
- * If the matching error cannot be found, returns null.
- */
- parseError(data) {
- const hexData = hexlify(data);
- const fragment = this.getError(dataSlice(hexData, 0, 4));
- if (!fragment) {
- return null;
- }
- const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4));
- return new ErrorDescription(fragment, fragment.selector, args);
- }
- /**
- * Creates a new [[Interface]] from the ABI %%value%%.
- *
- * The %%value%% may be provided as an existing [[Interface]] object,
- * a JSON-encoded ABI or any Human-Readable ABI format.
- */
- static from(value) {
- // Already an Interface, which is immutable
- if (value instanceof Interface) {
- return value;
- }
- // JSON
- if (typeof (value) === "string") {
- return new Interface(JSON.parse(value));
- }
- // Maybe an interface from an older version, or from a symlinked copy
- if (typeof (value.format) === "function") {
- return new Interface(value.format("json"));
- }
- // Array of fragments
- return new Interface(value);
- }
-}
-//# sourceMappingURL=interface.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/interface.js.map b/lib.esm/abi/interface.js.map
deleted file mode 100644
index 08b6d906..00000000
--- a/lib.esm/abi/interface.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src.ts/abi/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACrC,OAAO,EACH,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EACpD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAClE,cAAc,EAAE,OAAO,EAAE,MAAM,EAClC,MAAM,mBAAmB,CAAC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AAM,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;YAC5C,OAAO,IAAI,SAAS,CAAO,KAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;SACrD;QAED,qBAAqB;QACrB,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/abi/typed.d.ts b/lib.esm/abi/typed.d.ts
deleted file mode 100644
index 8707a62f..00000000
--- a/lib.esm/abi/typed.d.ts
+++ /dev/null
@@ -1,570 +0,0 @@
-/**
- * A Typed object allows a value to have its type explicitly
- * specified.
- *
- * For example, in Solidity, the value ``45`` could represent a
- * ``uint8`` or a ``uint256``. The value ``0x1234`` could represent
- * a ``bytes2`` or ``bytes``.
- *
- * Since JavaScript has no meaningful way to explicitly inform any
- * APIs which what the type is, this allows transparent interoperation
- * with Soldity.
- *
- * @_subsection: api/abi:Typed Values
- */
-import type { Addressable } from "../address/index.js";
-import type { BigNumberish, BytesLike } from "../utils/index.js";
-import type { Result } from "./coders/abstract-coder.js";
-/**
- * @_ignore:
- */
-export interface TypedNumber extends Typed {
- value: number;
- defaultValue(): number;
- minValue(): number;
- maxValue(): number;
-}
-/**
- * A **Typed** that represents a numeric value.
- */
-export interface TypedBigInt extends Typed {
- /**
- * The value.
- */
- value: bigint;
- /**
- * The default value for all numeric types is ``0``.
- */
- defaultValue(): bigint;
- /**
- * The minimum value for this type, accounting for bit-width and signed-ness.
- */
- minValue(): bigint;
- /**
- * The minimum value for this type, accounting for bit-width.
- */
- maxValue(): bigint;
-}
-/**
- * A **Typed** that represents a binary sequence of data as bytes.
- */
-export interface TypedData extends Typed {
- /**
- * The value.
- */
- value: string;
- /**
- * The default value for this type.
- */
- defaultValue(): string;
-}
-/**
- * A **Typed** that represents a UTF-8 sequence of bytes.
- */
-export interface TypedString extends Typed {
- /**
- * The value.
- */
- value: string;
- /**
- * The default value for the string type is the empty string (i.e. ``""``).
- */
- defaultValue(): string;
-}
-/**
- * The **Typed** class to wrap values providing explicit type information.
- */
-export declare class Typed {
- #private;
- /**
- * The type, as a Solidity-compatible type.
- */
- readonly type: string;
- /**
- * The actual value.
- */
- readonly value: any;
- /**
- * @_ignore:
- */
- readonly _typedSymbol: Symbol;
- /**
- * @_ignore:
- */
- constructor(gaurd: any, type: string, value: any, options?: any);
- /**
- * Format the type as a Human-Readable type.
- */
- format(): string;
- /**
- * The default value returned by this type.
- */
- defaultValue(): string | number | bigint | Result;
- /**
- * The minimum value for numeric types.
- */
- minValue(): string | number | bigint;
- /**
- * The maximum value for numeric types.
- */
- maxValue(): string | number | bigint;
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].
- */
- isBigInt(): this is TypedBigInt;
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedData]].
- */
- isData(): this is TypedData;
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedString]].
- */
- isString(): this is TypedString;
- /**
- * Returns the tuple name, if this is a tuple. Throws otherwise.
- */
- get tupleName(): null | string;
- /**
- * Returns the length of the array type or ``-1`` if it is dynamic.
- *
- * Throws if the type is not an array.
- */
- get arrayLength(): null | number;
- /**
- * Returns a new **Typed** of %%type%% with the %%value%%.
- */
- static from(type: string, value: any): Typed;
- /**
- * Return a new ``uint8`` type for %%v%%.
- */
- static uint8(v: BigNumberish): Typed;
- /**
- * Return a new ``uint16`` type for %%v%%.
- */
- static uint16(v: BigNumberish): Typed;
- /**
- * Return a new ``uint24`` type for %%v%%.
- */
- static uint24(v: BigNumberish): Typed;
- /**
- * Return a new ``uint32`` type for %%v%%.
- */
- static uint32(v: BigNumberish): Typed;
- /**
- * Return a new ``uint40`` type for %%v%%.
- */
- static uint40(v: BigNumberish): Typed;
- /**
- * Return a new ``uint48`` type for %%v%%.
- */
- static uint48(v: BigNumberish): Typed;
- /**
- * Return a new ``uint56`` type for %%v%%.
- */
- static uint56(v: BigNumberish): Typed;
- /**
- * Return a new ``uint64`` type for %%v%%.
- */
- static uint64(v: BigNumberish): Typed;
- /**
- * Return a new ``uint72`` type for %%v%%.
- */
- static uint72(v: BigNumberish): Typed;
- /**
- * Return a new ``uint80`` type for %%v%%.
- */
- static uint80(v: BigNumberish): Typed;
- /**
- * Return a new ``uint88`` type for %%v%%.
- */
- static uint88(v: BigNumberish): Typed;
- /**
- * Return a new ``uint96`` type for %%v%%.
- */
- static uint96(v: BigNumberish): Typed;
- /**
- * Return a new ``uint104`` type for %%v%%.
- */
- static uint104(v: BigNumberish): Typed;
- /**
- * Return a new ``uint112`` type for %%v%%.
- */
- static uint112(v: BigNumberish): Typed;
- /**
- * Return a new ``uint120`` type for %%v%%.
- */
- static uint120(v: BigNumberish): Typed;
- /**
- * Return a new ``uint128`` type for %%v%%.
- */
- static uint128(v: BigNumberish): Typed;
- /**
- * Return a new ``uint136`` type for %%v%%.
- */
- static uint136(v: BigNumberish): Typed;
- /**
- * Return a new ``uint144`` type for %%v%%.
- */
- static uint144(v: BigNumberish): Typed;
- /**
- * Return a new ``uint152`` type for %%v%%.
- */
- static uint152(v: BigNumberish): Typed;
- /**
- * Return a new ``uint160`` type for %%v%%.
- */
- static uint160(v: BigNumberish): Typed;
- /**
- * Return a new ``uint168`` type for %%v%%.
- */
- static uint168(v: BigNumberish): Typed;
- /**
- * Return a new ``uint176`` type for %%v%%.
- */
- static uint176(v: BigNumberish): Typed;
- /**
- * Return a new ``uint184`` type for %%v%%.
- */
- static uint184(v: BigNumberish): Typed;
- /**
- * Return a new ``uint192`` type for %%v%%.
- */
- static uint192(v: BigNumberish): Typed;
- /**
- * Return a new ``uint200`` type for %%v%%.
- */
- static uint200(v: BigNumberish): Typed;
- /**
- * Return a new ``uint208`` type for %%v%%.
- */
- static uint208(v: BigNumberish): Typed;
- /**
- * Return a new ``uint216`` type for %%v%%.
- */
- static uint216(v: BigNumberish): Typed;
- /**
- * Return a new ``uint224`` type for %%v%%.
- */
- static uint224(v: BigNumberish): Typed;
- /**
- * Return a new ``uint232`` type for %%v%%.
- */
- static uint232(v: BigNumberish): Typed;
- /**
- * Return a new ``uint240`` type for %%v%%.
- */
- static uint240(v: BigNumberish): Typed;
- /**
- * Return a new ``uint248`` type for %%v%%.
- */
- static uint248(v: BigNumberish): Typed;
- /**
- * Return a new ``uint256`` type for %%v%%.
- */
- static uint256(v: BigNumberish): Typed;
- /**
- * Return a new ``uint256`` type for %%v%%.
- */
- static uint(v: BigNumberish): Typed;
- /**
- * Return a new ``int8`` type for %%v%%.
- */
- static int8(v: BigNumberish): Typed;
- /**
- * Return a new ``int16`` type for %%v%%.
- */
- static int16(v: BigNumberish): Typed;
- /**
- * Return a new ``int24`` type for %%v%%.
- */
- static int24(v: BigNumberish): Typed;
- /**
- * Return a new ``int32`` type for %%v%%.
- */
- static int32(v: BigNumberish): Typed;
- /**
- * Return a new ``int40`` type for %%v%%.
- */
- static int40(v: BigNumberish): Typed;
- /**
- * Return a new ``int48`` type for %%v%%.
- */
- static int48(v: BigNumberish): Typed;
- /**
- * Return a new ``int56`` type for %%v%%.
- */
- static int56(v: BigNumberish): Typed;
- /**
- * Return a new ``int64`` type for %%v%%.
- */
- static int64(v: BigNumberish): Typed;
- /**
- * Return a new ``int72`` type for %%v%%.
- */
- static int72(v: BigNumberish): Typed;
- /**
- * Return a new ``int80`` type for %%v%%.
- */
- static int80(v: BigNumberish): Typed;
- /**
- * Return a new ``int88`` type for %%v%%.
- */
- static int88(v: BigNumberish): Typed;
- /**
- * Return a new ``int96`` type for %%v%%.
- */
- static int96(v: BigNumberish): Typed;
- /**
- * Return a new ``int104`` type for %%v%%.
- */
- static int104(v: BigNumberish): Typed;
- /**
- * Return a new ``int112`` type for %%v%%.
- */
- static int112(v: BigNumberish): Typed;
- /**
- * Return a new ``int120`` type for %%v%%.
- */
- static int120(v: BigNumberish): Typed;
- /**
- * Return a new ``int128`` type for %%v%%.
- */
- static int128(v: BigNumberish): Typed;
- /**
- * Return a new ``int136`` type for %%v%%.
- */
- static int136(v: BigNumberish): Typed;
- /**
- * Return a new ``int144`` type for %%v%%.
- */
- static int144(v: BigNumberish): Typed;
- /**
- * Return a new ``int52`` type for %%v%%.
- */
- static int152(v: BigNumberish): Typed;
- /**
- * Return a new ``int160`` type for %%v%%.
- */
- static int160(v: BigNumberish): Typed;
- /**
- * Return a new ``int168`` type for %%v%%.
- */
- static int168(v: BigNumberish): Typed;
- /**
- * Return a new ``int176`` type for %%v%%.
- */
- static int176(v: BigNumberish): Typed;
- /**
- * Return a new ``int184`` type for %%v%%.
- */
- static int184(v: BigNumberish): Typed;
- /**
- * Return a new ``int92`` type for %%v%%.
- */
- static int192(v: BigNumberish): Typed;
- /**
- * Return a new ``int200`` type for %%v%%.
- */
- static int200(v: BigNumberish): Typed;
- /**
- * Return a new ``int208`` type for %%v%%.
- */
- static int208(v: BigNumberish): Typed;
- /**
- * Return a new ``int216`` type for %%v%%.
- */
- static int216(v: BigNumberish): Typed;
- /**
- * Return a new ``int224`` type for %%v%%.
- */
- static int224(v: BigNumberish): Typed;
- /**
- * Return a new ``int232`` type for %%v%%.
- */
- static int232(v: BigNumberish): Typed;
- /**
- * Return a new ``int240`` type for %%v%%.
- */
- static int240(v: BigNumberish): Typed;
- /**
- * Return a new ``int248`` type for %%v%%.
- */
- static int248(v: BigNumberish): Typed;
- /**
- * Return a new ``int256`` type for %%v%%.
- */
- static int256(v: BigNumberish): Typed;
- /**
- * Return a new ``int256`` type for %%v%%.
- */
- static int(v: BigNumberish): Typed;
- /**
- * Return a new ``bytes1`` type for %%v%%.
- */
- static bytes1(v: BytesLike): Typed;
- /**
- * Return a new ``bytes2`` type for %%v%%.
- */
- static bytes2(v: BytesLike): Typed;
- /**
- * Return a new ``bytes3`` type for %%v%%.
- */
- static bytes3(v: BytesLike): Typed;
- /**
- * Return a new ``bytes4`` type for %%v%%.
- */
- static bytes4(v: BytesLike): Typed;
- /**
- * Return a new ``bytes5`` type for %%v%%.
- */
- static bytes5(v: BytesLike): Typed;
- /**
- * Return a new ``bytes6`` type for %%v%%.
- */
- static bytes6(v: BytesLike): Typed;
- /**
- * Return a new ``bytes7`` type for %%v%%.
- */
- static bytes7(v: BytesLike): Typed;
- /**
- * Return a new ``bytes8`` type for %%v%%.
- */
- static bytes8(v: BytesLike): Typed;
- /**
- * Return a new ``bytes9`` type for %%v%%.
- */
- static bytes9(v: BytesLike): Typed;
- /**
- * Return a new ``bytes10`` type for %%v%%.
- */
- static bytes10(v: BytesLike): Typed;
- /**
- * Return a new ``bytes11`` type for %%v%%.
- */
- static bytes11(v: BytesLike): Typed;
- /**
- * Return a new ``bytes12`` type for %%v%%.
- */
- static bytes12(v: BytesLike): Typed;
- /**
- * Return a new ``bytes13`` type for %%v%%.
- */
- static bytes13(v: BytesLike): Typed;
- /**
- * Return a new ``bytes14`` type for %%v%%.
- */
- static bytes14(v: BytesLike): Typed;
- /**
- * Return a new ``bytes15`` type for %%v%%.
- */
- static bytes15(v: BytesLike): Typed;
- /**
- * Return a new ``bytes16`` type for %%v%%.
- */
- static bytes16(v: BytesLike): Typed;
- /**
- * Return a new ``bytes17`` type for %%v%%.
- */
- static bytes17(v: BytesLike): Typed;
- /**
- * Return a new ``bytes18`` type for %%v%%.
- */
- static bytes18(v: BytesLike): Typed;
- /**
- * Return a new ``bytes19`` type for %%v%%.
- */
- static bytes19(v: BytesLike): Typed;
- /**
- * Return a new ``bytes20`` type for %%v%%.
- */
- static bytes20(v: BytesLike): Typed;
- /**
- * Return a new ``bytes21`` type for %%v%%.
- */
- static bytes21(v: BytesLike): Typed;
- /**
- * Return a new ``bytes22`` type for %%v%%.
- */
- static bytes22(v: BytesLike): Typed;
- /**
- * Return a new ``bytes23`` type for %%v%%.
- */
- static bytes23(v: BytesLike): Typed;
- /**
- * Return a new ``bytes24`` type for %%v%%.
- */
- static bytes24(v: BytesLike): Typed;
- /**
- * Return a new ``bytes25`` type for %%v%%.
- */
- static bytes25(v: BytesLike): Typed;
- /**
- * Return a new ``bytes26`` type for %%v%%.
- */
- static bytes26(v: BytesLike): Typed;
- /**
- * Return a new ``bytes27`` type for %%v%%.
- */
- static bytes27(v: BytesLike): Typed;
- /**
- * Return a new ``bytes28`` type for %%v%%.
- */
- static bytes28(v: BytesLike): Typed;
- /**
- * Return a new ``bytes29`` type for %%v%%.
- */
- static bytes29(v: BytesLike): Typed;
- /**
- * Return a new ``bytes30`` type for %%v%%.
- */
- static bytes30(v: BytesLike): Typed;
- /**
- * Return a new ``bytes31`` type for %%v%%.
- */
- static bytes31(v: BytesLike): Typed;
- /**
- * Return a new ``bytes32`` type for %%v%%.
- */
- static bytes32(v: BytesLike): Typed;
- /**
- * Return a new ``address`` type for %%v%%.
- */
- static address(v: string | Addressable): Typed;
- /**
- * Return a new ``bool`` type for %%v%%.
- */
- static bool(v: any): Typed;
- /**
- * Return a new ``bytes`` type for %%v%%.
- */
- static bytes(v: BytesLike): Typed;
- /**
- * Return a new ``string`` type for %%v%%.
- */
- static string(v: string): Typed;
- /**
- * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.
- */
- static array(v: Array, dynamic?: null | boolean): Typed;
- /**
- * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.
- */
- static tuple(v: Array | Record, name?: string): Typed;
- /**
- * Return a new ``uint8`` type for %%v%%.
- */
- static overrides(v: Record): Typed;
- /**
- * Returns true only if %%value%% is a [[Typed]] instance.
- */
- static isTyped(value: any): value is Typed;
- /**
- * If the value is a [[Typed]] instance, validates the underlying value
- * and returns it, otherwise returns value directly.
- *
- * This is useful for functions that with to accept either a [[Typed]]
- * object or values.
- */
- static dereference(value: Typed | T, type: string): T;
-}
-//# sourceMappingURL=typed.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/abi/typed.d.ts.map b/lib.esm/abi/typed.d.ts.map
deleted file mode 100644
index d7d2b42a..00000000
--- a/lib.esm/abi/typed.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../src.ts/abi/typed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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AAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAS3D"}
\ No newline at end of file
diff --git a/lib.esm/abi/typed.js b/lib.esm/abi/typed.js
deleted file mode 100644
index 2a53017a..00000000
--- a/lib.esm/abi/typed.js
+++ /dev/null
@@ -1,602 +0,0 @@
-/**
- * A Typed object allows a value to have its type explicitly
- * specified.
- *
- * For example, in Solidity, the value ``45`` could represent a
- * ``uint8`` or a ``uint256``. The value ``0x1234`` could represent
- * a ``bytes2`` or ``bytes``.
- *
- * Since JavaScript has no meaningful way to explicitly inform any
- * APIs which what the type is, this allows transparent interoperation
- * with Soldity.
- *
- * @_subsection: api/abi:Typed Values
- */
-import { assertPrivate, defineProperties } from "../utils/index.js";
-const _gaurd = {};
-function n(value, width) {
- let signed = false;
- if (width < 0) {
- signed = true;
- width *= -1;
- }
- // @TODO: Check range is valid for value
- return new Typed(_gaurd, `${signed ? "" : "u"}int${width}`, value, { signed, width });
-}
-function b(value, size) {
- // @TODO: Check range is valid for value
- return new Typed(_gaurd, `bytes${(size) ? size : ""}`, value, { size });
-}
-const _typedSymbol = Symbol.for("_quais_typed");
-/**
- * The **Typed** class to wrap values providing explicit type information.
- */
-export class Typed {
- /**
- * The type, as a Solidity-compatible type.
- */
- type;
- /**
- * The actual value.
- */
- value;
- #options;
- /**
- * @_ignore:
- */
- _typedSymbol;
- /**
- * @_ignore:
- */
- constructor(gaurd, type, value, options) {
- if (options == null) {
- options = null;
- }
- assertPrivate(_gaurd, gaurd, "Typed");
- defineProperties(this, { _typedSymbol, type, value });
- this.#options = options;
- // Check the value is valid
- this.format();
- }
- /**
- * Format the type as a Human-Readable type.
- */
- format() {
- if (this.type === "array") {
- throw new Error("");
- }
- else if (this.type === "dynamicArray") {
- throw new Error("");
- }
- else if (this.type === "tuple") {
- return `tuple(${this.value.map((v) => v.format()).join(",")})`;
- }
- return this.type;
- }
- /**
- * The default value returned by this type.
- */
- defaultValue() {
- return 0;
- }
- /**
- * The minimum value for numeric types.
- */
- minValue() {
- return 0;
- }
- /**
- * The maximum value for numeric types.
- */
- maxValue() {
- return 0;
- }
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].
- */
- isBigInt() {
- return !!(this.type.match(/^u?int[0-9]+$/));
- }
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedData]].
- */
- isData() {
- return this.type.startsWith("bytes");
- }
- /**
- * Returns ``true`` and provides a type guard is this is a [[TypedString]].
- */
- isString() {
- return (this.type === "string");
- }
- /**
- * Returns the tuple name, if this is a tuple. Throws otherwise.
- */
- get tupleName() {
- if (this.type !== "tuple") {
- throw TypeError("not a tuple");
- }
- return this.#options;
- }
- // Returns the length of this type as an array
- // - `null` indicates the length is unforced, it could be dynamic
- // - `-1` indicates the length is dynamic
- // - any other value indicates it is a static array and is its length
- /**
- * Returns the length of the array type or ``-1`` if it is dynamic.
- *
- * Throws if the type is not an array.
- */
- get arrayLength() {
- if (this.type !== "array") {
- throw TypeError("not an array");
- }
- if (this.#options === true) {
- return -1;
- }
- if (this.#options === false) {
- return (this.value).length;
- }
- return null;
- }
- /**
- * Returns a new **Typed** of %%type%% with the %%value%%.
- */
- static from(type, value) {
- return new Typed(_gaurd, type, value);
- }
- /**
- * Return a new ``uint8`` type for %%v%%.
- */
- static uint8(v) { return n(v, 8); }
- /**
- * Return a new ``uint16`` type for %%v%%.
- */
- static uint16(v) { return n(v, 16); }
- /**
- * Return a new ``uint24`` type for %%v%%.
- */
- static uint24(v) { return n(v, 24); }
- /**
- * Return a new ``uint32`` type for %%v%%.
- */
- static uint32(v) { return n(v, 32); }
- /**
- * Return a new ``uint40`` type for %%v%%.
- */
- static uint40(v) { return n(v, 40); }
- /**
- * Return a new ``uint48`` type for %%v%%.
- */
- static uint48(v) { return n(v, 48); }
- /**
- * Return a new ``uint56`` type for %%v%%.
- */
- static uint56(v) { return n(v, 56); }
- /**
- * Return a new ``uint64`` type for %%v%%.
- */
- static uint64(v) { return n(v, 64); }
- /**
- * Return a new ``uint72`` type for %%v%%.
- */
- static uint72(v) { return n(v, 72); }
- /**
- * Return a new ``uint80`` type for %%v%%.
- */
- static uint80(v) { return n(v, 80); }
- /**
- * Return a new ``uint88`` type for %%v%%.
- */
- static uint88(v) { return n(v, 88); }
- /**
- * Return a new ``uint96`` type for %%v%%.
- */
- static uint96(v) { return n(v, 96); }
- /**
- * Return a new ``uint104`` type for %%v%%.
- */
- static uint104(v) { return n(v, 104); }
- /**
- * Return a new ``uint112`` type for %%v%%.
- */
- static uint112(v) { return n(v, 112); }
- /**
- * Return a new ``uint120`` type for %%v%%.
- */
- static uint120(v) { return n(v, 120); }
- /**
- * Return a new ``uint128`` type for %%v%%.
- */
- static uint128(v) { return n(v, 128); }
- /**
- * Return a new ``uint136`` type for %%v%%.
- */
- static uint136(v) { return n(v, 136); }
- /**
- * Return a new ``uint144`` type for %%v%%.
- */
- static uint144(v) { return n(v, 144); }
- /**
- * Return a new ``uint152`` type for %%v%%.
- */
- static uint152(v) { return n(v, 152); }
- /**
- * Return a new ``uint160`` type for %%v%%.
- */
- static uint160(v) { return n(v, 160); }
- /**
- * Return a new ``uint168`` type for %%v%%.
- */
- static uint168(v) { return n(v, 168); }
- /**
- * Return a new ``uint176`` type for %%v%%.
- */
- static uint176(v) { return n(v, 176); }
- /**
- * Return a new ``uint184`` type for %%v%%.
- */
- static uint184(v) { return n(v, 184); }
- /**
- * Return a new ``uint192`` type for %%v%%.
- */
- static uint192(v) { return n(v, 192); }
- /**
- * Return a new ``uint200`` type for %%v%%.
- */
- static uint200(v) { return n(v, 200); }
- /**
- * Return a new ``uint208`` type for %%v%%.
- */
- static uint208(v) { return n(v, 208); }
- /**
- * Return a new ``uint216`` type for %%v%%.
- */
- static uint216(v) { return n(v, 216); }
- /**
- * Return a new ``uint224`` type for %%v%%.
- */
- static uint224(v) { return n(v, 224); }
- /**
- * Return a new ``uint232`` type for %%v%%.
- */
- static uint232(v) { return n(v, 232); }
- /**
- * Return a new ``uint240`` type for %%v%%.
- */
- static uint240(v) { return n(v, 240); }
- /**
- * Return a new ``uint248`` type for %%v%%.
- */
- static uint248(v) { return n(v, 248); }
- /**
- * Return a new ``uint256`` type for %%v%%.
- */
- static uint256(v) { return n(v, 256); }
- /**
- * Return a new ``uint256`` type for %%v%%.
- */
- static uint(v) { return n(v, 256); }
- /**
- * Return a new ``int8`` type for %%v%%.
- */
- static int8(v) { return n(v, -8); }
- /**
- * Return a new ``int16`` type for %%v%%.
- */
- static int16(v) { return n(v, -16); }
- /**
- * Return a new ``int24`` type for %%v%%.
- */
- static int24(v) { return n(v, -24); }
- /**
- * Return a new ``int32`` type for %%v%%.
- */
- static int32(v) { return n(v, -32); }
- /**
- * Return a new ``int40`` type for %%v%%.
- */
- static int40(v) { return n(v, -40); }
- /**
- * Return a new ``int48`` type for %%v%%.
- */
- static int48(v) { return n(v, -48); }
- /**
- * Return a new ``int56`` type for %%v%%.
- */
- static int56(v) { return n(v, -56); }
- /**
- * Return a new ``int64`` type for %%v%%.
- */
- static int64(v) { return n(v, -64); }
- /**
- * Return a new ``int72`` type for %%v%%.
- */
- static int72(v) { return n(v, -72); }
- /**
- * Return a new ``int80`` type for %%v%%.
- */
- static int80(v) { return n(v, -80); }
- /**
- * Return a new ``int88`` type for %%v%%.
- */
- static int88(v) { return n(v, -88); }
- /**
- * Return a new ``int96`` type for %%v%%.
- */
- static int96(v) { return n(v, -96); }
- /**
- * Return a new ``int104`` type for %%v%%.
- */
- static int104(v) { return n(v, -104); }
- /**
- * Return a new ``int112`` type for %%v%%.
- */
- static int112(v) { return n(v, -112); }
- /**
- * Return a new ``int120`` type for %%v%%.
- */
- static int120(v) { return n(v, -120); }
- /**
- * Return a new ``int128`` type for %%v%%.
- */
- static int128(v) { return n(v, -128); }
- /**
- * Return a new ``int136`` type for %%v%%.
- */
- static int136(v) { return n(v, -136); }
- /**
- * Return a new ``int144`` type for %%v%%.
- */
- static int144(v) { return n(v, -144); }
- /**
- * Return a new ``int52`` type for %%v%%.
- */
- static int152(v) { return n(v, -152); }
- /**
- * Return a new ``int160`` type for %%v%%.
- */
- static int160(v) { return n(v, -160); }
- /**
- * Return a new ``int168`` type for %%v%%.
- */
- static int168(v) { return n(v, -168); }
- /**
- * Return a new ``int176`` type for %%v%%.
- */
- static int176(v) { return n(v, -176); }
- /**
- * Return a new ``int184`` type for %%v%%.
- */
- static int184(v) { return n(v, -184); }
- /**
- * Return a new ``int92`` type for %%v%%.
- */
- static int192(v) { return n(v, -192); }
- /**
- * Return a new ``int200`` type for %%v%%.
- */
- static int200(v) { return n(v, -200); }
- /**
- * Return a new ``int208`` type for %%v%%.
- */
- static int208(v) { return n(v, -208); }
- /**
- * Return a new ``int216`` type for %%v%%.
- */
- static int216(v) { return n(v, -216); }
- /**
- * Return a new ``int224`` type for %%v%%.
- */
- static int224(v) { return n(v, -224); }
- /**
- * Return a new ``int232`` type for %%v%%.
- */
- static int232(v) { return n(v, -232); }
- /**
- * Return a new ``int240`` type for %%v%%.
- */
- static int240(v) { return n(v, -240); }
- /**
- * Return a new ``int248`` type for %%v%%.
- */
- static int248(v) { return n(v, -248); }
- /**
- * Return a new ``int256`` type for %%v%%.
- */
- static int256(v) { return n(v, -256); }
- /**
- * Return a new ``int256`` type for %%v%%.
- */
- static int(v) { return n(v, -256); }
- /**
- * Return a new ``bytes1`` type for %%v%%.
- */
- static bytes1(v) { return b(v, 1); }
- /**
- * Return a new ``bytes2`` type for %%v%%.
- */
- static bytes2(v) { return b(v, 2); }
- /**
- * Return a new ``bytes3`` type for %%v%%.
- */
- static bytes3(v) { return b(v, 3); }
- /**
- * Return a new ``bytes4`` type for %%v%%.
- */
- static bytes4(v) { return b(v, 4); }
- /**
- * Return a new ``bytes5`` type for %%v%%.
- */
- static bytes5(v) { return b(v, 5); }
- /**
- * Return a new ``bytes6`` type for %%v%%.
- */
- static bytes6(v) { return b(v, 6); }
- /**
- * Return a new ``bytes7`` type for %%v%%.
- */
- static bytes7(v) { return b(v, 7); }
- /**
- * Return a new ``bytes8`` type for %%v%%.
- */
- static bytes8(v) { return b(v, 8); }
- /**
- * Return a new ``bytes9`` type for %%v%%.
- */
- static bytes9(v) { return b(v, 9); }
- /**
- * Return a new ``bytes10`` type for %%v%%.
- */
- static bytes10(v) { return b(v, 10); }
- /**
- * Return a new ``bytes11`` type for %%v%%.
- */
- static bytes11(v) { return b(v, 11); }
- /**
- * Return a new ``bytes12`` type for %%v%%.
- */
- static bytes12(v) { return b(v, 12); }
- /**
- * Return a new ``bytes13`` type for %%v%%.
- */
- static bytes13(v) { return b(v, 13); }
- /**
- * Return a new ``bytes14`` type for %%v%%.
- */
- static bytes14(v) { return b(v, 14); }
- /**
- * Return a new ``bytes15`` type for %%v%%.
- */
- static bytes15(v) { return b(v, 15); }
- /**
- * Return a new ``bytes16`` type for %%v%%.
- */
- static bytes16(v) { return b(v, 16); }
- /**
- * Return a new ``bytes17`` type for %%v%%.
- */
- static bytes17(v) { return b(v, 17); }
- /**
- * Return a new ``bytes18`` type for %%v%%.
- */
- static bytes18(v) { return b(v, 18); }
- /**
- * Return a new ``bytes19`` type for %%v%%.
- */
- static bytes19(v) { return b(v, 19); }
- /**
- * Return a new ``bytes20`` type for %%v%%.
- */
- static bytes20(v) { return b(v, 20); }
- /**
- * Return a new ``bytes21`` type for %%v%%.
- */
- static bytes21(v) { return b(v, 21); }
- /**
- * Return a new ``bytes22`` type for %%v%%.
- */
- static bytes22(v) { return b(v, 22); }
- /**
- * Return a new ``bytes23`` type for %%v%%.
- */
- static bytes23(v) { return b(v, 23); }
- /**
- * Return a new ``bytes24`` type for %%v%%.
- */
- static bytes24(v) { return b(v, 24); }
- /**
- * Return a new ``bytes25`` type for %%v%%.
- */
- static bytes25(v) { return b(v, 25); }
- /**
- * Return a new ``bytes26`` type for %%v%%.
- */
- static bytes26(v) { return b(v, 26); }
- /**
- * Return a new ``bytes27`` type for %%v%%.
- */
- static bytes27(v) { return b(v, 27); }
- /**
- * Return a new ``bytes28`` type for %%v%%.
- */
- static bytes28(v) { return b(v, 28); }
- /**
- * Return a new ``bytes29`` type for %%v%%.
- */
- static bytes29(v) { return b(v, 29); }
- /**
- * Return a new ``bytes30`` type for %%v%%.
- */
- static bytes30(v) { return b(v, 30); }
- /**
- * Return a new ``bytes31`` type for %%v%%.
- */
- static bytes31(v) { return b(v, 31); }
- /**
- * Return a new ``bytes32`` type for %%v%%.
- */
- static bytes32(v) { return b(v, 32); }
- /**
- * Return a new ``address`` type for %%v%%.
- */
- static address(v) { return new Typed(_gaurd, "address", v); }
- /**
- * Return a new ``bool`` type for %%v%%.
- */
- static bool(v) { return new Typed(_gaurd, "bool", !!v); }
- /**
- * Return a new ``bytes`` type for %%v%%.
- */
- static bytes(v) { return new Typed(_gaurd, "bytes", v); }
- /**
- * Return a new ``string`` type for %%v%%.
- */
- static string(v) { return new Typed(_gaurd, "string", v); }
- /**
- * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.
- */
- static array(v, dynamic) {
- throw new Error("not implemented yet");
- return new Typed(_gaurd, "array", v, dynamic);
- }
- /**
- * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.
- */
- static tuple(v, name) {
- throw new Error("not implemented yet");
- return new Typed(_gaurd, "tuple", v, name);
- }
- /**
- * Return a new ``uint8`` type for %%v%%.
- */
- static overrides(v) {
- return new Typed(_gaurd, "overrides", Object.assign({}, v));
- }
- /**
- * Returns true only if %%value%% is a [[Typed]] instance.
- */
- static isTyped(value) {
- return (value
- && typeof (value) === "object"
- && "_typedSymbol" in value
- && value._typedSymbol === _typedSymbol);
- }
- /**
- * If the value is a [[Typed]] instance, validates the underlying value
- * and returns it, otherwise returns value directly.
- *
- * This is useful for functions that with to accept either a [[Typed]]
- * object or values.
- */
- static dereference(value, type) {
- if (Typed.isTyped(value)) {
- if (value.type !== type) {
- throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);
- }
- return value.value;
- }
- return value;
- }
-}
-//# sourceMappingURL=typed.js.map
\ No newline at end of file
diff --git a/lib.esm/abi/typed.js.map b/lib.esm/abi/typed.js.map
deleted file mode 100644
index 04384f2d..00000000
--- a/lib.esm/abi/typed.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typed.js","sourceRoot":"","sources":["../../src.ts/abi/typed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOpE,MAAM,MAAM,GAAG,EAAG,CAAC;AAEnB,SAAS,CAAC,CAAC,KAAmB,EAAE,KAAa;IACzC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,KAAK,GAAG,CAAC,EAAE;QACX,MAAM,GAAG,IAAI,CAAC;QACd,KAAK,IAAI,CAAC,CAAC,CAAC;KACf;IAED,wCAAwC;IACxC,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE,GAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA,CAAC,CAAC,GAAI,MAAO,KAAM,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7F,CAAC;AAED,SAAS,CAAC,CAAC,KAAgB,EAAE,IAAa;IACtC,wCAAwC;IACxC,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE,QAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,CAAC,CAAC,EAAG,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,CAAC;AAoED,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,KAAK;IAEd;;OAEG;IACM,IAAI,CAAU;IAEvB;;OAEG;IACM,KAAK,CAAO;IAEZ,QAAQ,CAAM;IAEvB;;OAEG;IACM,YAAY,CAAU;IAE/B;;OAEG;IACH,YAAY,KAAU,EAAE,IAAY,EAAE,KAAU,EAAE,OAAa;QAC3D,IAAI,OAAO,IAAI,IAAI,EAA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AAI,KAAK;eACvB,KAAK,CAAC,YAAY,KAAK,YAAY,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAI,KAAgB,EAAE,IAAY;QAChD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACtB,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;gBACrB,MAAM,IAAI,KAAK,CAAC,0BAA2B,IAAK,SAAU,KAAK,CAAC,IAAK,EAAE,CAAC,CAAC;aAC5E;YACD,OAAO,KAAK,CAAC,KAAK,CAAC;SACtB;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/address/address.d.ts b/lib.esm/address/address.d.ts
deleted file mode 100644
index 87efe465..00000000
--- a/lib.esm/address/address.d.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { BytesLike, BigNumberish } from "../utils/index.js";
-/**
- * Returns a normalized and checksumed address for %%address%%.
- * This accepts non-checksum addresses, checksum addresses and
- * [[getIcapAddress]] formats.
- *
- * The checksum in Ethereum uses the capitalization (upper-case
- * vs lower-case) of the characters within an address to encode
- * its checksum, which offers, on average, a checksum of 15-bits.
- *
- * If %%address%% contains both upper-case and lower-case, it is
- * assumed to already be a checksum address and its checksum is
- * validated, and if the address fails its expected checksum an
- * error is thrown.
- *
- * If you wish the checksum of %%address%% to be ignore, it should
- * be converted to lower-case (i.e. ``.toLowercase()``) before
- * being passed in. This should be a very rare situation though,
- * that you wish to bypass the safegaurds in place to protect
- * against an address that has been incorrectly copied from another
- * source.
- *
- * @example:
- * // Adds the checksum (via upper-casing specific letters)
- * getAddress("0x8ba1f109551bd432803012645ac136ddd64dba72")
- * //_result:
- *
- * // Converts ICAP address and adds checksum
- * getAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
- * //_result:
- *
- * // Throws an error if an address contains mixed case,
- * // but the checksum fails
- * getAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_error:
- */
-export declare function getAddress(address: string): string;
-export declare function getContractAddress(from: string, nonce: BigNumberish, data: BytesLike): string;
-//# sourceMappingURL=address.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/address/address.d.ts.map b/lib.esm/address/address.d.ts.map
deleted file mode 100644
index 1c0aaec1..00000000
--- a/lib.esm/address/address.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src.ts/address/address.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,SAAS,EAAmC,YAAY,EAAqC,MAAM,mBAAmB,CAAC;AA8B1J;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmBlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAG7F"}
\ No newline at end of file
diff --git a/lib.esm/address/address.js b/lib.esm/address/address.js
deleted file mode 100644
index d7c904df..00000000
--- a/lib.esm/address/address.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import { keccak256 } from "../crypto/index.js";
-import { getBytes, assertArgument, concat, zeroPadValue, dataSlice, toBigInt, toBeHex, stripZerosLeft } from "../utils/index.js";
-function getChecksumAddress(address) {
- // if (!isHexString(address, 20)) {
- // logger.throwArgumentError("invalid address", "address", address);
- // }
- address = address.toLowerCase();
- const chars = address.substring(2).split("");
- const expanded = new Uint8Array(40);
- for (let i = 0; i < 40; i++) {
- expanded[i] = chars[i].charCodeAt(0);
- }
- const hashed = getBytes(keccak256(expanded));
- for (let i = 0; i < 40; i += 2) {
- if ((hashed[i >> 1] >> 4) >= 8) {
- chars[i] = chars[i].toUpperCase();
- }
- if ((hashed[i >> 1] & 0x0f) >= 8) {
- chars[i + 1] = chars[i + 1].toUpperCase();
- }
- }
- return "0x" + chars.join("");
-}
-/**
- * Returns a normalized and checksumed address for %%address%%.
- * This accepts non-checksum addresses, checksum addresses and
- * [[getIcapAddress]] formats.
- *
- * The checksum in Ethereum uses the capitalization (upper-case
- * vs lower-case) of the characters within an address to encode
- * its checksum, which offers, on average, a checksum of 15-bits.
- *
- * If %%address%% contains both upper-case and lower-case, it is
- * assumed to already be a checksum address and its checksum is
- * validated, and if the address fails its expected checksum an
- * error is thrown.
- *
- * If you wish the checksum of %%address%% to be ignore, it should
- * be converted to lower-case (i.e. ``.toLowercase()``) before
- * being passed in. This should be a very rare situation though,
- * that you wish to bypass the safegaurds in place to protect
- * against an address that has been incorrectly copied from another
- * source.
- *
- * @example:
- * // Adds the checksum (via upper-casing specific letters)
- * getAddress("0x8ba1f109551bd432803012645ac136ddd64dba72")
- * //_result:
- *
- * // Converts ICAP address and adds checksum
- * getAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
- * //_result:
- *
- * // Throws an error if an address contains mixed case,
- * // but the checksum fails
- * getAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_error:
- */
-export function getAddress(address) {
- assertArgument(typeof (address) === "string", "invalid address", "address", address);
- if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
- // Missing the 0x prefix
- if (!address.startsWith("0x")) {
- address = "0x" + address;
- }
- const result = getChecksumAddress(address);
- // It is a checksummed address with a bad checksum
- assertArgument(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, "bad address checksum", "address", address);
- return result;
- }
- assertArgument(false, "invalid address", "address", address);
-}
-export function getContractAddress(from, nonce, data) {
- const nonceBytes = zeroPadValue(toBeHex(toBigInt(nonce)), 8);
- return getAddress(dataSlice(keccak256(concat([getAddress(from), nonceBytes, stripZerosLeft(data)])), 12));
-}
-//# sourceMappingURL=address.js.map
\ No newline at end of file
diff --git a/lib.esm/address/address.js.map b/lib.esm/address/address.js.map
deleted file mode 100644
index e9342db0..00000000
--- a/lib.esm/address/address.js.map
+++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file
diff --git a/lib.esm/address/checks.d.ts b/lib.esm/address/checks.d.ts
deleted file mode 100644
index cf18c0e3..00000000
--- a/lib.esm/address/checks.d.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import type { Addressable, AddressLike } from "./index.js";
-/**
- * Returns true if %%value%% is an object which implements the
- * [[Addressable]] interface.
- *
- * @example:
- * // Wallets and AbstractSigner sub-classes
- * isAddressable(Wallet.createRandom())
- * //_result:
- *
- * // Contracts
- * contract = new Contract("dai.tokens.quais.eth", [ ], provider)
- * isAddressable(contract)
- * //_result:
- */
-export declare function isAddressable(value: any): value is Addressable;
-/**
- * Returns true if %%value%% is a valid address.
- *
- * @example:
- * // Valid address
- * isAddress("0x8ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_result:
- *
- * // Valid ICAP address
- * isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36")
- * //_result:
- *
- * // Invalid checksum
- * isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBa72")
- * //_result:
- *
- * // Invalid ICAP checksum
- * isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_result:
- *
- * // Not an address (an ENS name requires a provided and an
- * // asynchronous API to access)
- * isAddress("ricmoo.eth")
- * //_result:
- */
-export declare function isAddress(value: any): value is string;
-/**
- * Resolves to an address for the %%target%%, which may be any
- * supported address type, an [[Addressable]] or a Promise which
- * resolves to an address.
- *
- * If an ENS name is provided, but that name has not been correctly
- * configured a [[UnconfiguredNameError]] is thrown.
- *
- * @example:
- * addr = "0x6B175474E89094C44Da98b954EedeAC495271d0F"
- *
- * // Addresses are return synchronously
- * resolveAddress(addr, provider)
- * //_result:
- *
- * // Address promises are resolved asynchronously
- * resolveAddress(Promise.resolve(addr))
- * //_result:
- *
- * // ENS names are resolved asynchronously
- * resolveAddress("dai.tokens.quais.eth", provider)
- * //_result:
- *
- * // Addressable objects are resolved asynchronously
- * contract = new Contract(addr, [ ])
- * resolveAddress(contract, provider)
- * //_result:
- *
- * // Unconfigured ENS names reject
- * resolveAddress("nothing-here.ricmoo.eth", provider)
- * //_error:
- *
- * // ENS names require a NameResolver object passed in
- * // (notice the provider was omitted)
- * resolveAddress("nothing-here.ricmoo.eth")
- * //_error:
- */
-export declare function resolveAddress(target: AddressLike): string | Promise;
-//# sourceMappingURL=checks.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/address/checks.d.ts.map b/lib.esm/address/checks.d.ts.map
deleted file mode 100644
index 71acded0..00000000
--- a/lib.esm/address/checks.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src.ts/address/checks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAE9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAMrD;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAa5E"}
\ No newline at end of file
diff --git a/lib.esm/address/checks.js b/lib.esm/address/checks.js
deleted file mode 100644
index f272bd08..00000000
--- a/lib.esm/address/checks.js
+++ /dev/null
@@ -1,111 +0,0 @@
-import { assertArgument } from "../utils/index.js";
-import { getAddress } from "./address.js";
-/**
- * Returns true if %%value%% is an object which implements the
- * [[Addressable]] interface.
- *
- * @example:
- * // Wallets and AbstractSigner sub-classes
- * isAddressable(Wallet.createRandom())
- * //_result:
- *
- * // Contracts
- * contract = new Contract("dai.tokens.quais.eth", [ ], provider)
- * isAddressable(contract)
- * //_result:
- */
-export function isAddressable(value) {
- return (value && typeof (value.getAddress) === "function");
-}
-/**
- * Returns true if %%value%% is a valid address.
- *
- * @example:
- * // Valid address
- * isAddress("0x8ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_result:
- *
- * // Valid ICAP address
- * isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36")
- * //_result:
- *
- * // Invalid checksum
- * isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBa72")
- * //_result:
- *
- * // Invalid ICAP checksum
- * isAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72")
- * //_result:
- *
- * // Not an address (an ENS name requires a provided and an
- * // asynchronous API to access)
- * isAddress("ricmoo.eth")
- * //_result:
- */
-export function isAddress(value) {
- try {
- getAddress(value);
- return true;
- }
- catch (error) { }
- return false;
-}
-async function checkAddress(target, promise) {
- const result = await promise;
- if (result == null || result === "0x0000000000000000000000000000000000000000") {
- assertArgument(false, "invalid AddressLike value; did not resolve to a value address", "target", target);
- }
- return getAddress(result);
-}
-/**
- * Resolves to an address for the %%target%%, which may be any
- * supported address type, an [[Addressable]] or a Promise which
- * resolves to an address.
- *
- * If an ENS name is provided, but that name has not been correctly
- * configured a [[UnconfiguredNameError]] is thrown.
- *
- * @example:
- * addr = "0x6B175474E89094C44Da98b954EedeAC495271d0F"
- *
- * // Addresses are return synchronously
- * resolveAddress(addr, provider)
- * //_result:
- *
- * // Address promises are resolved asynchronously
- * resolveAddress(Promise.resolve(addr))
- * //_result:
- *
- * // ENS names are resolved asynchronously
- * resolveAddress("dai.tokens.quais.eth", provider)
- * //_result:
- *
- * // Addressable objects are resolved asynchronously
- * contract = new Contract(addr, [ ])
- * resolveAddress(contract, provider)
- * //_result:
- *
- * // Unconfigured ENS names reject
- * resolveAddress("nothing-here.ricmoo.eth", provider)
- * //_error:
- *
- * // ENS names require a NameResolver object passed in
- * // (notice the provider was omitted)
- * resolveAddress("nothing-here.ricmoo.eth")
- * //_error:
- */
-export function resolveAddress(target) {
- if (typeof (target) === "string") {
- if (target.match(/^0x[0-9a-f]{40}$/i)) {
- return getAddress(target);
- }
- }
- else if (isAddressable(target)) {
- return checkAddress(target, target.getAddress());
- }
- else if (target && typeof (target.then) === "function") {
- return checkAddress(target, target);
- }
- assertArgument(false, "unsupported addressable value", "target", target);
-}
-//# sourceMappingURL=checks.js.map
\ No newline at end of file
diff --git a/lib.esm/address/checks.js.map b/lib.esm/address/checks.js.map
deleted file mode 100644
index fcc87da3..00000000
--- a/lib.esm/address/checks.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src.ts/address/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,KAAU;IACpC,OAAO,CAAC,KAAK,IAAI,OAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,UAAU,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAU;IAChC,IAAI;QACA,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE,GAAG;IACnB,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,MAAW,EAAE,OAA+B;IACpE,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;IAC7B,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,4CAA4C,EAAE;QAC3E,cAAc,CAAC,KAAK,EAAE,+DAA+D,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC5G;IACD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,cAAc,CAAC,MAAmB;IAE9C,IAAI,OAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;QAC7B,IAAI,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;SAAE;KAExE;SAAM,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;QAC9B,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;KAEpD;SAAM,IAAI,MAAM,IAAI,OAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE;QACrD,OAAO,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACvC;IAED,cAAc,CAAC,KAAK,EAAE,+BAA+B,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/address/contract-address.d.ts b/lib.esm/address/contract-address.d.ts
deleted file mode 100644
index 42b36f7f..00000000
--- a/lib.esm/address/contract-address.d.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import type { BigNumberish, BytesLike } from "../utils/index.js";
-/**
- * Returns the address that would result from a ``CREATE`` for %%tx%%.
- *
- * This can be used to compute the address a contract will be
- * deployed to by an EOA when sending a deployment transaction (i.e.
- * when the ``to`` address is ``null``).
- *
- * This can also be used to compute the address a contract will be
- * deployed to by a contract, by using the contract's address as the
- * ``to`` and the contract's nonce.
- *
- * @example
- * from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
- * nonce = 5;
- *
- * getCreateAddress({ from, nonce });
- * //_result:
- */
-export declare function getCreateAddress(tx: {
- from: string;
- nonce: BigNumberish;
-}): string;
-/**
- * Returns the address that would result from a ``CREATE2`` operation
- * with the given %%from%%, %%salt%% and %%initCodeHash%%.
- *
- * To compute the %%initCodeHash%% from a contract's init code, use
- * the [[keccak256]] function.
- *
- * For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].
- *
- * @example
- * // The address of the contract
- * from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"
- *
- * // The salt
- * salt = id("HelloWorld")
- *
- * // The hash of the initCode
- * initCode = "0x6394198df16000526103ff60206004601c335afa6040516060f3";
- * initCodeHash = keccak256(initCode)
- *
- * getCreate2Address(from, salt, initCodeHash)
- * //_result:
- */
-export declare function getCreate2Address(_from: string, _salt: BytesLike, _initCodeHash: BytesLike): string;
-//# sourceMappingURL=contract-address.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/address/contract-address.d.ts.map b/lib.esm/address/contract-address.d.ts.map
deleted file mode 100644
index 624f8426..00000000
--- a/lib.esm/address/contract-address.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"contract-address.d.ts","sourceRoot":"","sources":["../../src.ts/address/contract-address.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKjE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG,MAAM,CAclF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,GAAG,MAAM,CAUnG"}
\ No newline at end of file
diff --git a/lib.esm/address/contract-address.js b/lib.esm/address/contract-address.js
deleted file mode 100644
index a8cd679f..00000000
--- a/lib.esm/address/contract-address.js
+++ /dev/null
@@ -1,69 +0,0 @@
-import { keccak256 } from "../crypto/index.js";
-import { concat, dataSlice, getBigInt, getBytes, assertArgument, encodeProto } from "../utils/index.js";
-import { getAddress } from "./address.js";
-// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed
-/**
- * Returns the address that would result from a ``CREATE`` for %%tx%%.
- *
- * This can be used to compute the address a contract will be
- * deployed to by an EOA when sending a deployment transaction (i.e.
- * when the ``to`` address is ``null``).
- *
- * This can also be used to compute the address a contract will be
- * deployed to by a contract, by using the contract's address as the
- * ``to`` and the contract's nonce.
- *
- * @example
- * from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
- * nonce = 5;
- *
- * getCreateAddress({ from, nonce });
- * //_result:
- */
-export function getCreateAddress(tx) {
- const from = getAddress(tx.from);
- const nonce = getBigInt(tx.nonce, "tx.nonce");
- let nonceHex = nonce.toString(16);
- if (nonceHex === "0") {
- nonceHex = "0x";
- }
- else if (nonceHex.length % 2) {
- nonceHex = "0x0" + nonceHex;
- }
- else {
- nonceHex = "0x" + nonceHex;
- }
- return getAddress(dataSlice(keccak256(encodeProto([from, nonceHex])), 12));
-}
-/**
- * Returns the address that would result from a ``CREATE2`` operation
- * with the given %%from%%, %%salt%% and %%initCodeHash%%.
- *
- * To compute the %%initCodeHash%% from a contract's init code, use
- * the [[keccak256]] function.
- *
- * For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].
- *
- * @example
- * // The address of the contract
- * from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"
- *
- * // The salt
- * salt = id("HelloWorld")
- *
- * // The hash of the initCode
- * initCode = "0x6394198df16000526103ff60206004601c335afa6040516060f3";
- * initCodeHash = keccak256(initCode)
- *
- * getCreate2Address(from, salt, initCodeHash)
- * //_result:
- */
-export function getCreate2Address(_from, _salt, _initCodeHash) {
- const from = getAddress(_from);
- const salt = getBytes(_salt, "salt");
- const initCodeHash = getBytes(_initCodeHash, "initCodeHash");
- assertArgument(salt.length === 32, "salt must be 32 bytes", "salt", _salt);
- assertArgument(initCodeHash.length === 32, "initCodeHash must be 32 bytes", "initCodeHash", _initCodeHash);
- return getAddress(dataSlice(keccak256(concat(["0xff", from, salt, initCodeHash])), 12));
-}
-//# sourceMappingURL=contract-address.js.map
\ No newline at end of file
diff --git a/lib.esm/address/contract-address.js.map b/lib.esm/address/contract-address.js.map
deleted file mode 100644
index 8a17e864..00000000
--- a/lib.esm/address/contract-address.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"contract-address.js","sourceRoot":"","sources":["../../src.ts/address/contract-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EACtE,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,sGAAsG;AAEtG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAyC;IACtE,MAAM,IAAI,GAAG,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAE9C,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,IAAI,QAAQ,KAAK,GAAG,EAAE;QAClB,QAAQ,GAAG,IAAI,CAAC;KACnB;SAAM,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QAC5B,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;KAC/B;SAAM;QACH,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;KAC9B;IAED,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,CAAE,IAAI,EAAE,QAAQ,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACjF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,KAAgB,EAAE,aAAwB;IACvF,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAE7D,cAAc,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE,uBAAuB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAE3E,cAAc,CAAC,YAAY,CAAC,MAAM,KAAK,EAAE,EAAE,+BAA+B,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;IAE3G,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC7F,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/address/index.d.ts b/lib.esm/address/index.d.ts
deleted file mode 100644
index 5f90df4f..00000000
--- a/lib.esm/address/index.d.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Addresses are a fundamental part of interacting with Ethereum. They
- * represent the gloabal identity of Externally Owned Accounts (accounts
- * backed by a private key) and contracts.
- *
- * The Ethereum Naming Service (ENS) provides an interconnected ecosystem
- * of contracts, standards and libraries which enable looking up an
- * address for an ENS name.
- *
- * These functions help convert between various formats, validate
- * addresses and safely resolve ENS names.
- *
- * @_section: api/address:Addresses [about-addresses]
- */
-/**
- * An interface for objects which have an address, and can
- * resolve it asyncronously.
- *
- * This allows objects such as [[Signer]] or [[Contract]] to
- * be used most places an address can be, for example getting
- * the [balance](Provider-getBalance).
- */
-export interface Addressable {
- /**
- * Get the object address.
- */
- getAddress(): Promise;
-}
-/**
- * Anything that can be used to return or resolve an address.
- */
-export type AddressLike = string | Promise | Addressable;
-export { getAddress } from "./address.js";
-export { getCreateAddress, getCreate2Address } from "./contract-address.js";
-export { isAddressable, isAddress, resolveAddress } from "./checks.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/address/index.d.ts.map b/lib.esm/address/index.d.ts.map
deleted file mode 100644
index 39267153..00000000
--- a/lib.esm/address/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/address/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/address/index.js b/lib.esm/address/index.js
deleted file mode 100644
index 82db321a..00000000
--- a/lib.esm/address/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Addresses are a fundamental part of interacting with Ethereum. They
- * represent the gloabal identity of Externally Owned Accounts (accounts
- * backed by a private key) and contracts.
- *
- * The Ethereum Naming Service (ENS) provides an interconnected ecosystem
- * of contracts, standards and libraries which enable looking up an
- * address for an ENS name.
- *
- * These functions help convert between various formats, validate
- * addresses and safely resolve ENS names.
- *
- * @_section: api/address:Addresses [about-addresses]
- */
-null;
-export { getAddress } from "./address.js";
-export { getCreateAddress, getCreate2Address } from "./contract-address.js";
-export { isAddressable, isAddress, resolveAddress } from "./checks.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/address/index.js.map b/lib.esm/address/index.js.map
deleted file mode 100644
index e32236c2..00000000
--- a/lib.esm/address/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/address/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,IAAI,CAAC;AAsBL,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/addresses.d.ts b/lib.esm/constants/addresses.d.ts
deleted file mode 100644
index a32d6be0..00000000
--- a/lib.esm/constants/addresses.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * A constant for the zero address.
- *
- * (**i.e.** ``"0x0000000000000000000000000000000000000000"``)
- */
-export declare const ZeroAddress: string;
-//# sourceMappingURL=addresses.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/addresses.d.ts.map b/lib.esm/constants/addresses.d.ts.map
deleted file mode 100644
index 35a5c221..00000000
--- a/lib.esm/constants/addresses.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../src.ts/constants/addresses.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,MAAqD,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/addresses.js b/lib.esm/constants/addresses.js
deleted file mode 100644
index 45345cb6..00000000
--- a/lib.esm/constants/addresses.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * A constant for the zero address.
- *
- * (**i.e.** ``"0x0000000000000000000000000000000000000000"``)
- */
-export const ZeroAddress = "0x0000000000000000000000000000000000000000";
-//# sourceMappingURL=addresses.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/addresses.js.map b/lib.esm/constants/addresses.js.map
deleted file mode 100644
index 9fb48ce8..00000000
--- a/lib.esm/constants/addresses.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../src.ts/constants/addresses.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAW,4CAA4C,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/hashes.d.ts b/lib.esm/constants/hashes.d.ts
deleted file mode 100644
index 784df715..00000000
--- a/lib.esm/constants/hashes.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * A constant for the zero hash.
- *
- * (**i.e.** ``"0x0000000000000000000000000000000000000000000000000000000000000000"``)
- */
-export declare const ZeroHash: string;
-//# sourceMappingURL=hashes.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/hashes.d.ts.map b/lib.esm/constants/hashes.d.ts.map
deleted file mode 100644
index 23f5213c..00000000
--- a/lib.esm/constants/hashes.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../../src.ts/constants/hashes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAA6E,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/hashes.js b/lib.esm/constants/hashes.js
deleted file mode 100644
index 95bca98a..00000000
--- a/lib.esm/constants/hashes.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * A constant for the zero hash.
- *
- * (**i.e.** ``"0x0000000000000000000000000000000000000000000000000000000000000000"``)
- */
-export const ZeroHash = "0x0000000000000000000000000000000000000000000000000000000000000000";
-//# sourceMappingURL=hashes.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/hashes.js.map b/lib.esm/constants/hashes.js.map
deleted file mode 100644
index b198ca1b..00000000
--- a/lib.esm/constants/hashes.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hashes.js","sourceRoot":"","sources":["../../src.ts/constants/hashes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAW,oEAAoE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/index.d.ts b/lib.esm/constants/index.d.ts
deleted file mode 100644
index 13668c61..00000000
--- a/lib.esm/constants/index.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Some common constants useful for Ethereum.
- *
- * @_section: api/constants: Constants [about-constants]
- */
-export { ZeroAddress } from "./addresses.js";
-export { ZeroHash } from "./hashes.js";
-export { N, WeiPerEther, MaxUint256, MinInt256, MaxInt256 } from "./numbers.js";
-export { quaisymbol, MessagePrefix } from "./strings.js";
-export { ShardData } from "./shards.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/index.d.ts.map b/lib.esm/constants/index.d.ts.map
deleted file mode 100644
index 799432a6..00000000
--- a/lib.esm/constants/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/constants/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACH,CAAC,EACD,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/index.js b/lib.esm/constants/index.js
deleted file mode 100644
index c1977869..00000000
--- a/lib.esm/constants/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Some common constants useful for Ethereum.
- *
- * @_section: api/constants: Constants [about-constants]
- */
-export { ZeroAddress } from "./addresses.js";
-export { ZeroHash } from "./hashes.js";
-export { N, WeiPerEther, MaxUint256, MinInt256, MaxInt256 } from "./numbers.js";
-export { quaisymbol, MessagePrefix } from "./strings.js";
-export { ShardData } from "./shards.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/index.js.map b/lib.esm/constants/index.js.map
deleted file mode 100644
index 303e90da..00000000
--- a/lib.esm/constants/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/constants/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACH,CAAC,EACD,WAAW,EACX,UAAU,EACV,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/numbers.d.ts b/lib.esm/constants/numbers.d.ts
deleted file mode 100644
index 7c84eaa6..00000000
--- a/lib.esm/constants/numbers.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * A constant for the order N for the secp256k1 curve.
- *
- * (**i.e.** ``0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n``)
- */
-export declare const N: bigint;
-/**
- * A constant for the number of wei in a single ether.
- *
- * (**i.e.** ``1000000000000000000n``)
- */
-export declare const WeiPerEther: bigint;
-/**
- * A constant for the maximum value for a ``uint256``.
- *
- * (**i.e.** ``0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
- */
-export declare const MaxUint256: bigint;
-/**
- * A constant for the minimum value for an ``int256``.
- *
- * (**i.e.** ``-8000000000000000000000000000000000000000000000000000000000000000n``)
- */
-export declare const MinInt256: bigint;
-/**
- * A constant for the maximum value for an ``int256``.
- *
- * (**i.e.** ``0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
- */
-export declare const MaxInt256: bigint;
-//# sourceMappingURL=numbers.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/numbers.d.ts.map b/lib.esm/constants/numbers.d.ts.map
deleted file mode 100644
index 6391e1fd..00000000
--- a/lib.esm/constants/numbers.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src.ts/constants/numbers.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,eAAO,MAAM,CAAC,EAAE,MAAqF,CAAC;AAEtG;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,MAAsC,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,MAAqF,CAAC;AAE/G;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,MAAkG,CAAC;AAE3H;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,MAAqF,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/numbers.js b/lib.esm/constants/numbers.js
deleted file mode 100644
index 753e9fb9..00000000
--- a/lib.esm/constants/numbers.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * A constant for the order N for the secp256k1 curve.
- *
- * (**i.e.** ``0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n``)
- */
-export const N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
-/**
- * A constant for the number of wei in a single ether.
- *
- * (**i.e.** ``1000000000000000000n``)
- */
-export const WeiPerEther = BigInt("1000000000000000000");
-/**
- * A constant for the maximum value for a ``uint256``.
- *
- * (**i.e.** ``0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
- */
-export const MaxUint256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
-/**
- * A constant for the minimum value for an ``int256``.
- *
- * (**i.e.** ``-8000000000000000000000000000000000000000000000000000000000000000n``)
- */
-export const MinInt256 = BigInt("0x8000000000000000000000000000000000000000000000000000000000000000") * BigInt(-1);
-/**
- * A constant for the maximum value for an ``int256``.
- *
- * (**i.e.** ``0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
- */
-export const MaxInt256 = BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
-//# sourceMappingURL=numbers.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/numbers.js.map b/lib.esm/constants/numbers.js.map
deleted file mode 100644
index 8e868180..00000000
--- a/lib.esm/constants/numbers.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src.ts/constants/numbers.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,GAAW,MAAM,CAAC,oEAAoE,CAAC,CAAC;AAEtG;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAW,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW,MAAM,CAAC,oEAAoE,CAAC,CAAC;AAE/G;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAW,MAAM,CAAC,oEAAoE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3H;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAW,MAAM,CAAC,oEAAoE,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/shards.d.ts b/lib.esm/constants/shards.d.ts
deleted file mode 100644
index f23153aa..00000000
--- a/lib.esm/constants/shards.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export declare const ShardData: {
- name: string;
- nickname: string;
- shard: string;
- context: number;
- byte: string;
-}[];
-//# sourceMappingURL=shards.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/shards.d.ts.map b/lib.esm/constants/shards.d.ts.map
deleted file mode 100644
index 09ab3283..00000000
--- a/lib.esm/constants/shards.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"shards.d.ts","sourceRoot":"","sources":["../../src.ts/constants/shards.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;GAuErB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/shards.js b/lib.esm/constants/shards.js
deleted file mode 100644
index 3fca26af..00000000
--- a/lib.esm/constants/shards.js
+++ /dev/null
@@ -1,73 +0,0 @@
-export const ShardData = [
- {
- name: "Cyprus One",
- nickname: 'cyprus1',
- shard: "zone-0-0",
- context: 2,
- byte: "0x00" //0000 0000 region-0 zone-0
- },
- {
- name: "Cyprus Two",
- nickname: 'cyprus2',
- shard: "zone-0-1",
- context: 2,
- byte: "0x01" // 0000 0001 region-0 zone-1
- },
- {
- name: "Cyprus Three",
- nickname: 'cyprus3',
- shard: "zone-0-2",
- context: 2,
- byte: "0x02" // 0000 0010 region-0 zone-2
- },
- {
- name: "Paxos One",
- nickname: 'paxos1',
- shard: "zone-1-0",
- context: 2,
- byte: "0x10" // 0001 0000 region-1 zone-0
- },
- {
- name: "Paxos Two",
- nickname: 'paxos2',
- shard: "zone-1-1",
- context: 2,
- byte: "0x11" // 0001 0001 region-1 zone-1
- },
- {
- name: "Paxos Three",
- nickname: 'paxos3',
- shard: "zone-1-2",
- context: 2,
- byte: "0x12" // 0001 0010 region-1 zone-2
- },
- {
- name: "Hydra One",
- nickname: 'hydra1',
- shard: "zone-2-0",
- context: 2,
- byte: "0x20" // 0010 0000 region-2 zone-0
- },
- {
- name: "Hydra Two",
- nickname: 'hydra2',
- shard: "zone-2-1",
- context: 2,
- byte: "0x21" // 0010 0001 region-2 zone-1
- },
- {
- name: "Hydra Three",
- nickname: 'hydra3',
- shard: "zone-2-2",
- context: 2,
- byte: "0x22" // 0010 0010 region-2 zone-2
- },
- {
- name: "Prime",
- nickname: 'prime',
- shard: "prime",
- context: 2,
- byte: "0x"
- }
-];
-//# sourceMappingURL=shards.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/shards.js.map b/lib.esm/constants/shards.js.map
deleted file mode 100644
index 941d338e..00000000
--- a/lib.esm/constants/shards.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"shards.js","sourceRoot":"","sources":["../../src.ts/constants/shards.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACI,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,2BAA2B;KAC3C;IACD;QACI,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,4BAA4B;KAC5C;IACD;QACI,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,IAAI;KACb;CACF,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/strings.d.ts b/lib.esm/constants/strings.d.ts
deleted file mode 100644
index f6a232bb..00000000
--- a/lib.esm/constants/strings.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * A constant for the ether symbol (normalized using NFKC).
- *
- * (**i.e.** ``"\\u039e"``)
- */
-export declare const quaisymbol: string;
-/**
- * A constant for the [[link-eip-191]] personal message prefix.
- *
- * (**i.e.** ``"\\x19Ethereum Signed Message:\\n"``)
- */
-export declare const MessagePrefix: string;
-//# sourceMappingURL=strings.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/constants/strings.d.ts.map b/lib.esm/constants/strings.d.ts.map
deleted file mode 100644
index 86f37410..00000000
--- a/lib.esm/constants/strings.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src.ts/constants/strings.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,MAAiB,CAAC;AAG3C;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAqC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/constants/strings.js b/lib.esm/constants/strings.js
deleted file mode 100644
index 7ad47320..00000000
--- a/lib.esm/constants/strings.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// NFKC (composed) // (decomposed)
-/**
- * A constant for the ether symbol (normalized using NFKC).
- *
- * (**i.e.** ``"\\u039e"``)
- */
-export const quaisymbol = "\u039e"; // "\uD835\uDF63";
-/**
- * A constant for the [[link-eip-191]] personal message prefix.
- *
- * (**i.e.** ``"\\x19Ethereum Signed Message:\\n"``)
- */
-export const MessagePrefix = "\x19Quai Signed Message:\n";
-//# sourceMappingURL=strings.js.map
\ No newline at end of file
diff --git a/lib.esm/constants/strings.js.map b/lib.esm/constants/strings.js.map
deleted file mode 100644
index 3e5e0146..00000000
--- a/lib.esm/constants/strings.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src.ts/constants/strings.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW,QAAQ,CAAC,CAAE,kBAAkB;AAG/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAW,4BAA4B,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/contract/contract.d.ts b/lib.esm/contract/contract.d.ts
deleted file mode 100644
index 72b82bbf..00000000
--- a/lib.esm/contract/contract.d.ts
+++ /dev/null
@@ -1,168 +0,0 @@
-import { Interface } from "../abi/index.js";
-import { Log, TransactionResponse } from "../providers/provider.js";
-import { ContractTransactionResponse, EventLog } from "./wrappers.js";
-import type { EventFragment, FunctionFragment, InterfaceAbi, ParamType } from "../abi/index.js";
-import type { Addressable } from "../address/index.js";
-import type { EventEmitterable, Listener } from "../utils/index.js";
-import type { BlockTag, ContractRunner } from "../providers/index.js";
-import type { ContractEventName, ContractInterface, ContractMethod, ContractEvent, ContractTransaction, WrappedFallback } from "./types.js";
-/**
- * @_ignore:
- */
-export declare function copyOverrides(arg: any, allowed?: Array): Promise>;
-/**
- * @_ignore:
- */
-export declare function resolveArgs(_runner: null | ContractRunner, inputs: ReadonlyArray, args: Array): Promise>;
-declare const internal: unique symbol;
-export declare class BaseContract implements Addressable, EventEmitterable {
- /**
- * The target to connect to.
- *
- * This can be an address, ENS name or any [[Addressable]], such as
- * another contract. To get the resovled address, use the ``getAddress``
- * method.
- */
- readonly target: string | Addressable;
- /**
- * The contract Interface.
- */
- readonly interface: Interface;
- /**
- * The connected runner. This is generally a [[Provider]] or a
- * [[Signer]], which dictates what operations are supported.
- *
- * For example, a **Contract** connected to a [[Provider]] may
- * only execute read-only operations.
- */
- readonly runner: null | ContractRunner;
- /**
- * All the Events available on this contract.
- */
- readonly filters: Record;
- /**
- * @_ignore:
- */
- readonly [internal]: any;
- /**
- * The fallback or receive function if any.
- */
- readonly fallback: null | WrappedFallback;
- /**
- * Creates a new contract connected to %%target%% with the %%abi%% and
- * optionally connected to a %%runner%% to perform operations on behalf
- * of.
- */
- constructor(target: string | Addressable, abi: Interface | InterfaceAbi, runner?: null | ContractRunner, _deployTx?: null | TransactionResponse);
- /**
- * Return a new Contract instance with the same target and ABI, but
- * a different %%runner%%.
- */
- connect(runner: null | ContractRunner): BaseContract;
- /**
- * Return a new Contract instance with the same ABI and runner, but
- * a different %%target%%.
- */
- attach(target: string | Addressable): BaseContract;
- /**
- * Return the resolved address of this Contract.
- */
- getAddress(): Promise;
- /**
- * Return the deployed bytecode or null if no bytecode is found.
- */
- getDeployedCode(): Promise;
- /**
- * Resolve to this Contract once the bytecode has been deployed, or
- * resolve immediately if already deployed.
- */
- waitForDeployment(): Promise;
- /**
- * Return the transaction used to deploy this contract.
- *
- * This is only available if this instance was returned from a
- * [[ContractFactory]].
- */
- deploymentTransaction(): null | ContractTransactionResponse;
- /**
- * Return the function for a given name. This is useful when a contract
- * method name conflicts with a JavaScript name such as ``prototype`` or
- * when using a Contract programatically.
- */
- getFunction(key: string | FunctionFragment): T;
- /**
- * Return the event for a given name. This is useful when a contract
- * event name conflicts with a JavaScript name such as ``prototype`` or
- * when using a Contract programatically.
- */
- getEvent(key: string | EventFragment): ContractEvent;
- /**
- * @_ignore:
- */
- queryTransaction(hash: string): Promise>;
- /**
- * Provide historic access to event data for %%event%% in the range
- * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``"latest"``)
- * inclusive.
- */
- queryFilter(shard: string, event: ContractEventName, fromBlock?: BlockTag, toBlock?: BlockTag): Promise>;
- /**
- * Add an event %%listener%% for the %%event%%.
- */
- on(event: ContractEventName, listener: Listener): Promise;
- /**
- * Add an event %%listener%% for the %%event%%, but remove the listener
- * after it is fired once.
- */
- once(event: ContractEventName, listener: Listener): Promise;
- /**
- * Emit an %%event%% calling all listeners with %%args%%.
- *
- * Resolves to ``true`` if any listeners were called.
- */
- emit(event: ContractEventName, ...args: Array): Promise;
- /**
- * Resolves to the number of listeners of %%event%% or the total number
- * of listeners if unspecified.
- */
- listenerCount(event?: ContractEventName): Promise;
- /**
- * Resolves to the listeners subscribed to %%event%% or all listeners
- * if unspecified.
- */
- listeners(event?: ContractEventName): Promise>;
- /**
- * Remove the %%listener%% from the listeners for %%event%% or remove
- * all listeners if unspecified.
- */
- off(event: ContractEventName, listener?: Listener): Promise;
- /**
- * Remove all the listeners for %%event%% or remove all listeners if
- * unspecified.
- */
- removeAllListeners(event?: ContractEventName): Promise;
- /**
- * Alias for [on].
- */
- addListener(event: ContractEventName, listener: Listener): Promise;
- /**
- * Alias for [off].
- */
- removeListener(event: ContractEventName, listener: Listener): Promise;
- /**
- * Create a new Class for the %%abi%%.
- */
- static buildClass(abi: Interface | InterfaceAbi): new (target: string, runner?: null | ContractRunner) => BaseContract & Omit;
- /**
- * Create a new BaseContract with a specified Interface.
- */
- static from(target: string, abi: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit;
-}
-declare const Contract_base: new (target: string, abi: InterfaceAbi | Interface, runner?: ContractRunner | null | undefined) => BaseContract & Omit;
-/**
- * A [[BaseContract]] with no type guards on its methods or events.
- */
-export declare class Contract extends Contract_base {
-}
-export {};
-//# sourceMappingURL=contract.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/contract/contract.d.ts.map b/lib.esm/contract/contract.d.ts.map
deleted file mode 100644
index 6f86a294..00000000
--- a/lib.esm/contract/contract.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src.ts/contract/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAS,MAAM,iBAAiB,CAAC;AAInD,OAAO,EAAe,GAAG,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMjF,OAAO,EAEH,2BAA2B,EAC3B,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAU,MAAM,iBAAiB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACR,QAAQ,EAAE,cAAc,EAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAER,iBAAiB,EACjB,iBAAiB,EAEjB,cAAc,EAEd,aAAa,EACb,mBAAmB,EAEnB,eAAe,EAClB,MAAM,YAAY,CAAC;AAqFpB;;GAEG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,CAkB9I;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,GAAG,cAAc,EAAE,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,C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EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9E;;OAEG;IACG,cAAc,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjF;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,YAAY,GAAG,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,KAAK,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;IAS3K;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,YAAY,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc,GAAG,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;CAKhK;;AAMD;;GAEG;AACH,qBAAa,QAAS,SAAQ,aAAe;CAAI"}
\ No newline at end of file
diff --git a/lib.esm/contract/contract.js b/lib.esm/contract/contract.js
deleted file mode 100644
index 610e55fc..00000000
--- a/lib.esm/contract/contract.js
+++ /dev/null
@@ -1,921 +0,0 @@
-import { Interface, Typed } from "../abi/index.js";
-import { isAddressable, resolveAddress } from "../address/index.js";
-// import from provider.ts instead of index.ts to prevent circular dep
-// from quaiscanProvider
-import { copyRequest, Log } from "../providers/provider.js";
-import { defineProperties, getBigInt, isCallException, isHexString, resolveProperties, isError, assert, assertArgument } from "../utils/index.js";
-import { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionResponse, EventLog, UndecodedEventLog } from "./wrappers.js";
-const BN_0 = BigInt(0);
-function canCall(value) {
- return (value && typeof (value.call) === "function");
-}
-function canEstimate(value) {
- return (value && typeof (value.estimateGas) === "function");
-}
-function canSend(value) {
- return (value && typeof (value.sendTransaction) === "function");
-}
-class PreparedTopicFilter {
- #filter;
- fragment;
- constructor(contract, fragment, args) {
- defineProperties(this, { fragment });
- if (fragment.inputs.length < args.length) {
- throw new Error("too many arguments");
- }
- this.#filter = (async function () {
- const resolvedArgs = await Promise.all(fragment.inputs.map((param, index) => {
- const arg = args[index];
- if (arg == null) {
- return null;
- }
- return param.walkAsync(args[index], (type, value) => {
- if (type === "address") {
- if (Array.isArray(value)) {
- return Promise.all(value.map((v) => resolveAddress(v)));
- }
- return resolveAddress(value);
- }
- return value;
- });
- }));
- return contract.interface.encodeFilterTopics(fragment, resolvedArgs);
- })();
- }
- getTopicFilter() {
- return this.#filter;
- }
-}
-// A = Arguments passed in as a tuple
-// R = The result type of the call (i.e. if only one return type,
-// the qualified type, otherwise Result)
-// D = The type the default call will return (i.e. R for view/pure,
-// TransactionResponse otherwise)
-//export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = ContractTransactionResponse> {
-function getRunner(value, feature) {
- if (value == null) {
- return null;
- }
- if (typeof (value[feature]) === "function") {
- return value;
- }
- if (value.provider && typeof (value.provider[feature]) === "function") {
- return value.provider;
- }
- return null;
-}
-function getProvider(value) {
- if (value == null) {
- return null;
- }
- return value.provider || null;
-}
-/**
- * @_ignore:
- */
-export async function copyOverrides(arg, allowed) {
- // Make sure the overrides passed in are a valid overrides object
- const _overrides = Typed.dereference(arg, "overrides");
- assertArgument(typeof (_overrides) === "object", "invalid overrides parameter", "overrides", arg);
- // Create a shallow copy (we'll deep-ify anything needed during normalizing)
- const overrides = copyRequest(_overrides);
- assertArgument(overrides.to == null || (allowed || []).indexOf("to") >= 0, "cannot override to", "overrides.to", overrides.to);
- assertArgument(overrides.data == null || (allowed || []).indexOf("data") >= 0, "cannot override data", "overrides.data", overrides.data);
- // Resolve any from
- if (overrides.from) {
- overrides.from = overrides.from;
- }
- return overrides;
-}
-/**
- * @_ignore:
- */
-export async function resolveArgs(_runner, inputs, args) {
- // Recursively descend into args and resolve any addresses
- return await Promise.all(inputs.map((param, index) => {
- return param.walkAsync(args[index], (type, value) => {
- value = Typed.dereference(value, type);
- if (type === "address") {
- return resolveAddress(value);
- }
- return value;
- });
- }));
-}
-function buildWrappedFallback(contract) {
- const populateTransaction = async function (overrides) {
- // If an overrides was passed in, copy it and normalize the values
- const tx = (await copyOverrides(overrides, ["data"]));
- tx.to = await contract.getAddress();
- if (tx.from) {
- tx.from = await resolveAddress(tx.from);
- }
- const iface = contract.interface;
- const noValue = (getBigInt((tx.value || BN_0), "overrides.value") === BN_0);
- const noData = ((tx.data || "0x") === "0x");
- if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {
- assertArgument(false, "cannot send data to receive or send value to non-payable fallback", "overrides", overrides);
- }
- assertArgument(iface.fallback || noData, "cannot send data to receive-only contract", "overrides.data", tx.data);
- // Only allow payable contracts to set non-zero value
- const payable = iface.receive || (iface.fallback && iface.fallback.payable);
- assertArgument(payable || noValue, "cannot send value to non-payable fallback", "overrides.value", tx.value);
- // Only allow fallback contracts to set non-empty data
- assertArgument(iface.fallback || noData, "cannot send data to receive-only contract", "overrides.data", tx.data);
- return tx;
- };
- const staticCall = async function (overrides) {
- const runner = getRunner(contract.runner, "call");
- assert(canCall(runner), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
- const tx = await populateTransaction(overrides);
- try {
- return await runner.call(tx);
- }
- catch (error) {
- if (isCallException(error) && error.data) {
- throw contract.interface.makeError(error.data, tx);
- }
- throw error;
- }
- };
- const send = async function (overrides) {
- const runner = contract.runner;
- assert(canSend(runner), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
- const tx = await runner.sendTransaction(await populateTransaction(overrides));
- const provider = getProvider(contract.runner);
- // @TODO: the provider can be null; make a custom dummy provider that will throw a
- // meaningful error
- return new ContractTransactionResponse(contract.interface, provider, tx);
- };
- const estimateGas = async function (overrides) {
- const runner = getRunner(contract.runner, "estimateGas");
- assert(canEstimate(runner), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" });
- return await runner.estimateGas(await populateTransaction(overrides));
- };
- const method = async (overrides) => {
- return await send(overrides);
- };
- defineProperties(method, {
- _contract: contract,
- estimateGas,
- populateTransaction,
- send, staticCall
- });
- return method;
-}
-function buildWrappedMethod(contract, key) {
- const getFragment = function (...args) {
- const fragment = contract.interface.getFunction(key, args);
- assert(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
- operation: "fragment",
- info: { key, args }
- });
- return fragment;
- };
- const populateTransaction = async function (...args) {
- const fragment = getFragment(...args);
- // If an overrides was passed in, copy it and normalize the values
- let overrides;
- if (fragment.inputs.length + 1 === args.length) {
- overrides = await copyOverrides(args.pop());
- const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);
- return Object.assign({}, overrides, await resolveProperties({
- to: contract.getAddress(),
- data: contract.interface.encodeFunctionData(fragment, resolvedArgs)
- }));
- // if (overrides.from) {
- // overrides.from = await resolveAddress(overrides.from, getResolver(contract.runner));
- // }
- }
- if (fragment.inputs.length !== args.length) {
- throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");
- }
- const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);
- return await resolveProperties({
- to: contract.getAddress(),
- from: args.pop().from,
- data: contract.interface.encodeFunctionData(fragment, resolvedArgs)
- });
- };
- const staticCall = async function (...args) {
- const result = await staticCallResult(...args);
- if (result.length === 1) {
- return result[0];
- }
- return result;
- };
- const send = async function (...args) {
- const runner = contract.runner;
- assert(canSend(runner), "contract runner does not support sending transactions", "UNSUPPORTED_OPERATION", { operation: "sendTransaction" });
- const tx = await runner.sendTransaction(await populateTransaction(...args));
- const provider = getProvider(contract.runner);
- // @TODO: the provider can be null; make a custom dummy provider that will throw a
- // meaningful error
- return new ContractTransactionResponse(contract.interface, provider, tx);
- };
- const estimateGas = async function (...args) {
- const runner = getRunner(contract.runner, "estimateGas");
- assert(canEstimate(runner), "contract runner does not support gas estimation", "UNSUPPORTED_OPERATION", { operation: "estimateGas" });
- return await runner.estimateGas(await populateTransaction(...args));
- };
- const staticCallResult = async function (...args) {
- const runner = getRunner(contract.runner, "call");
- assert(canCall(runner), "contract runner does not support calling", "UNSUPPORTED_OPERATION", { operation: "call" });
- const tx = await populateTransaction(...args);
- let result = "0x";
- try {
- result = await runner.call(tx);
- }
- catch (error) {
- if (isCallException(error) && error.data) {
- throw contract.interface.makeError(error.data, tx);
- }
- throw error;
- }
- const fragment = getFragment(...args);
- return contract.interface.decodeFunctionResult(fragment, result);
- };
- const method = async (...args) => {
- const fragment = getFragment(...args);
- if (fragment.constant) {
- return await staticCall(...args);
- }
- return await send(...args);
- };
- defineProperties(method, {
- name: contract.interface.getFunctionName(key),
- _contract: contract, _key: key,
- getFragment,
- estimateGas,
- populateTransaction,
- send, staticCall, staticCallResult,
- });
- // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
- Object.defineProperty(method, "fragment", {
- configurable: false,
- enumerable: true,
- get: () => {
- const fragment = contract.interface.getFunction(key);
- assert(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
- operation: "fragment",
- info: { key }
- });
- return fragment;
- }
- });
- return method;
-}
-function buildWrappedEvent(contract, key) {
- const getFragment = function (...args) {
- const fragment = contract.interface.getEvent(key, args);
- assert(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
- operation: "fragment",
- info: { key, args }
- });
- return fragment;
- };
- const method = function (...args) {
- return new PreparedTopicFilter(contract, getFragment(...args), args);
- };
- defineProperties(method, {
- name: contract.interface.getEventName(key),
- _contract: contract, _key: key,
- getFragment
- });
- // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
- Object.defineProperty(method, "fragment", {
- configurable: false,
- enumerable: true,
- get: () => {
- const fragment = contract.interface.getEvent(key);
- assert(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
- operation: "fragment",
- info: { key }
- });
- return fragment;
- }
- });
- return method;
-}
-// The combination of TypeScrype, Private Fields and Proxies makes
-// the world go boom; so we hide variables with some trickery keeping
-// a symbol attached to each BaseContract which its sub-class (even
-// via a Proxy) can reach and use to look up its internal values.
-const internal = Symbol.for("_quaisInternal_contract");
-const internalValues = new WeakMap();
-function setInternal(contract, values) {
- internalValues.set(contract[internal], values);
-}
-function getInternal(contract) {
- return internalValues.get(contract[internal]);
-}
-function isDeferred(value) {
- return (value && typeof (value) === "object" && ("getTopicFilter" in value) &&
- (typeof (value.getTopicFilter) === "function") && value.fragment);
-}
-async function getSubInfo(contract, event) {
- let topics;
- let fragment = null;
- // Convert named events to topicHash and get the fragment for
- // events which need deconstructing.
- if (Array.isArray(event)) {
- const topicHashify = function (name) {
- if (isHexString(name, 32)) {
- return name;
- }
- const fragment = contract.interface.getEvent(name);
- assertArgument(fragment, "unknown fragment", "name", name);
- return fragment.topicHash;
- };
- // Array of Topics and Names; e.g. `[ "0x1234...89ab", "Transfer(address)" ]`
- topics = event.map((e) => {
- if (e == null) {
- return null;
- }
- if (Array.isArray(e)) {
- return e.map(topicHashify);
- }
- return topicHashify(e);
- });
- }
- else if (event === "*") {
- topics = [null];
- }
- else if (typeof (event) === "string") {
- if (isHexString(event, 32)) {
- // Topic Hash
- topics = [event];
- }
- else {
- // Name or Signature; e.g. `"Transfer", `"Transfer(address)"`
- fragment = contract.interface.getEvent(event);
- assertArgument(fragment, "unknown fragment", "event", event);
- topics = [fragment.topicHash];
- }
- }
- else if (isDeferred(event)) {
- // Deferred Topic Filter; e.g. `contract.filter.Transfer(from)`
- topics = await event.getTopicFilter();
- }
- else if ("fragment" in event) {
- // ContractEvent; e.g. `contract.filter.Transfer`
- fragment = event.fragment;
- topics = [fragment.topicHash];
- }
- else {
- assertArgument(false, "unknown event name", "event", event);
- }
- // Normalize topics and sort TopicSets
- topics = topics.map((t) => {
- if (t == null) {
- return null;
- }
- if (Array.isArray(t)) {
- const items = Array.from(new Set(t.map((t) => t.toLowerCase())).values());
- if (items.length === 1) {
- return items[0];
- }
- items.sort();
- return items;
- }
- return t.toLowerCase();
- });
- const tag = topics.map((t) => {
- if (t == null) {
- return "null";
- }
- if (Array.isArray(t)) {
- return t.join("|");
- }
- return t;
- }).join("&");
- return { fragment, tag, topics };
-}
-async function hasSub(contract, event) {
- const { subs } = getInternal(contract);
- return subs.get((await getSubInfo(contract, event)).tag) || null;
-}
-async function getSub(contract, operation, event) {
- // Make sure our runner can actually subscribe to events
- const provider = getProvider(contract.runner);
- assert(provider, "contract runner does not support subscribing", "UNSUPPORTED_OPERATION", { operation });
- const { fragment, tag, topics } = await getSubInfo(contract, event);
- const { addr, subs } = getInternal(contract);
- let sub = subs.get(tag);
- if (!sub) {
- const address = (addr ? addr : contract);
- const filter = { address, topics };
- const listener = (log) => {
- let foundFragment = fragment;
- if (foundFragment == null) {
- try {
- foundFragment = contract.interface.getEvent(log.topics[0]);
- }
- catch (error) { }
- }
- // If fragment is null, we do not deconstruct the args to emit
- if (foundFragment) {
- const _foundFragment = foundFragment;
- const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];
- emit(contract, event, args, (listener) => {
- return new ContractEventPayload(contract, listener, event, _foundFragment, log);
- });
- }
- else {
- emit(contract, event, [], (listener) => {
- return new ContractUnknownEventPayload(contract, listener, event, log);
- });
- }
- };
- let starting = [];
- const start = () => {
- if (starting.length) {
- return;
- }
- starting.push(provider.on(filter, listener));
- };
- const stop = async () => {
- if (starting.length == 0) {
- return;
- }
- let started = starting;
- starting = [];
- await Promise.all(started);
- provider.off(filter, listener);
- };
- sub = { tag, listeners: [], start, stop };
- subs.set(tag, sub);
- }
- return sub;
-}
-// We use this to ensure one emit resolves before firing the next to
-// ensure correct ordering (note this cannot throw and just adds the
-// notice to the event queu using setTimeout).
-let lastEmit = Promise.resolve();
-async function _emit(contract, event, args, payloadFunc) {
- await lastEmit;
- const sub = await hasSub(contract, event);
- if (!sub) {
- return false;
- }
- const count = sub.listeners.length;
- sub.listeners = sub.listeners.filter(({ listener, once }) => {
- const passArgs = Array.from(args);
- if (payloadFunc) {
- passArgs.push(payloadFunc(once ? null : listener));
- }
- try {
- listener.call(contract, ...passArgs);
- }
- catch (error) { }
- return !once;
- });
- if (sub.listeners.length === 0) {
- sub.stop();
- getInternal(contract).subs.delete(sub.tag);
- }
- return (count > 0);
-}
-async function emit(contract, event, args, payloadFunc) {
- try {
- await lastEmit;
- }
- catch (error) { }
- const resultPromise = _emit(contract, event, args, payloadFunc);
- lastEmit = resultPromise;
- return await resultPromise;
-}
-const passProperties = ["then"];
-export class BaseContract {
- /**
- * The target to connect to.
- *
- * This can be an address, ENS name or any [[Addressable]], such as
- * another contract. To get the resovled address, use the ``getAddress``
- * method.
- */
- target;
- /**
- * The contract Interface.
- */
- interface;
- /**
- * The connected runner. This is generally a [[Provider]] or a
- * [[Signer]], which dictates what operations are supported.
- *
- * For example, a **Contract** connected to a [[Provider]] may
- * only execute read-only operations.
- */
- runner;
- /**
- * All the Events available on this contract.
- */
- filters;
- /**
- * @_ignore:
- */
- [internal];
- /**
- * The fallback or receive function if any.
- */
- fallback;
- /**
- * Creates a new contract connected to %%target%% with the %%abi%% and
- * optionally connected to a %%runner%% to perform operations on behalf
- * of.
- */
- constructor(target, abi, runner, _deployTx) {
- assertArgument(typeof (target) === "string" || isAddressable(target), "invalid value for Contract target", "target", target);
- if (runner == null) {
- runner = null;
- }
- const iface = Interface.from(abi);
- defineProperties(this, { target, runner, interface: iface });
- Object.defineProperty(this, internal, { value: {} });
- let addrPromise;
- let addr = null;
- let deployTx = null;
- if (_deployTx) {
- const provider = getProvider(runner);
- // @TODO: the provider can be null; make a custom dummy provider that will throw a
- // meaningful error
- deployTx = new ContractTransactionResponse(this.interface, provider, _deployTx);
- }
- let subs = new Map();
- // Resolve the target as the address
- if (typeof (target) === "string") {
- addr = target;
- addrPromise = Promise.resolve(target);
- }
- else {
- addrPromise = target.getAddress().then((addr) => {
- if (addr == null) {
- throw new Error("TODO");
- }
- getInternal(this).addr = addr;
- return addr;
- });
- }
- // Set our private values
- setInternal(this, { addrPromise, addr, deployTx, subs });
- // Add the event filters
- const filters = new Proxy({}, {
- get: (target, prop, receiver) => {
- // Pass important checks (like `then` for Promise) through
- if (typeof (prop) === "symbol" || passProperties.indexOf(prop) >= 0) {
- return Reflect.get(target, prop, receiver);
- }
- try {
- return this.getEvent(prop);
- }
- catch (error) {
- if (!isError(error, "INVALID_ARGUMENT") || error.argument !== "key") {
- throw error;
- }
- }
- return undefined;
- },
- has: (target, prop) => {
- // Pass important checks (like `then` for Promise) through
- if (passProperties.indexOf(prop) >= 0) {
- return Reflect.has(target, prop);
- }
- return Reflect.has(target, prop) || this.interface.hasEvent(String(prop));
- }
- });
- defineProperties(this, { filters });
- defineProperties(this, {
- fallback: ((iface.receive || iface.fallback) ? (buildWrappedFallback(this)) : null)
- });
- // Return a Proxy that will respond to functions
- return new Proxy(this, {
- get: (target, prop, receiver) => {
- if (typeof (prop) === "symbol" || prop in target || passProperties.indexOf(prop) >= 0) {
- return Reflect.get(target, prop, receiver);
- }
- // Undefined properties should return undefined
- try {
- return target.getFunction(prop);
- }
- catch (error) {
- if (!isError(error, "INVALID_ARGUMENT") || error.argument !== "key") {
- throw error;
- }
- }
- return undefined;
- },
- has: (target, prop) => {
- if (typeof (prop) === "symbol" || prop in target || passProperties.indexOf(prop) >= 0) {
- return Reflect.has(target, prop);
- }
- return target.interface.hasFunction(prop);
- }
- });
- }
- /**
- * Return a new Contract instance with the same target and ABI, but
- * a different %%runner%%.
- */
- connect(runner) {
- return new BaseContract(this.target, this.interface, runner);
- }
- /**
- * Return a new Contract instance with the same ABI and runner, but
- * a different %%target%%.
- */
- attach(target) {
- return new BaseContract(target, this.interface, this.runner);
- }
- /**
- * Return the resolved address of this Contract.
- */
- async getAddress() { return await getInternal(this).addrPromise; }
- /**
- * Return the deployed bytecode or null if no bytecode is found.
- */
- async getDeployedCode() {
- const provider = getProvider(this.runner);
- assert(provider, "runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "getDeployedCode" });
- const code = await provider.getCode(await this.getAddress());
- if (code === "0x") {
- return null;
- }
- return code;
- }
- /**
- * Resolve to this Contract once the bytecode has been deployed, or
- * resolve immediately if already deployed.
- */
- async waitForDeployment() {
- // We have the deployement transaction; just use that (throws if deployement fails)
- const deployTx = this.deploymentTransaction();
- if (deployTx) {
- await deployTx.wait();
- return this;
- }
- // Check for code
- const code = await this.getDeployedCode();
- if (code != null) {
- return this;
- }
- // Make sure we can subscribe to a provider event
- const provider = getProvider(this.runner);
- assert(provider != null, "contract runner does not support .provider", "UNSUPPORTED_OPERATION", { operation: "waitForDeployment" });
- return new Promise((resolve, reject) => {
- const checkCode = async () => {
- try {
- const code = await this.getDeployedCode();
- if (code != null) {
- return resolve(this);
- }
- provider.once("block", checkCode);
- }
- catch (error) {
- reject(error);
- }
- };
- checkCode();
- });
- }
- /**
- * Return the transaction used to deploy this contract.
- *
- * This is only available if this instance was returned from a
- * [[ContractFactory]].
- */
- deploymentTransaction() {
- return getInternal(this).deployTx;
- }
- /**
- * Return the function for a given name. This is useful when a contract
- * method name conflicts with a JavaScript name such as ``prototype`` or
- * when using a Contract programatically.
- */
- getFunction(key) {
- if (typeof (key) !== "string") {
- key = key.format();
- }
- const func = buildWrappedMethod(this, key);
- return func;
- }
- /**
- * Return the event for a given name. This is useful when a contract
- * event name conflicts with a JavaScript name such as ``prototype`` or
- * when using a Contract programatically.
- */
- getEvent(key) {
- if (typeof (key) !== "string") {
- key = key.format();
- }
- return buildWrappedEvent(this, key);
- }
- /**
- * @_ignore:
- */
- async queryTransaction(hash) {
- throw new Error("@TODO");
- }
- /*
- // @TODO: this is a non-backwards compatible change, but will be added
- // in v7 and in a potential SmartContract class in an upcoming
- // v6 release
- async getTransactionReceipt(hash: string): Promise {
- const provider = getProvider(this.runner);
- assert(provider, "contract runner does not have a provider",
- "UNSUPPORTED_OPERATION", { operation: "queryTransaction" });
-
- const receipt = await provider.getTransactionReceipt(hash);
- if (receipt == null) { return null; }
-
- return new ContractTransactionReceipt(this.interface, provider, receipt);
- }
- */
- /**
- * Provide historic access to event data for %%event%% in the range
- * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``"latest"``)
- * inclusive.
- */
- async queryFilter(shard, event, fromBlock, toBlock) {
- if (fromBlock == null) {
- fromBlock = 0;
- }
- if (toBlock == null) {
- toBlock = "latest";
- }
- const { addr, addrPromise } = getInternal(this);
- const address = (addr ? addr : (await addrPromise));
- const { fragment, topics } = await getSubInfo(this, event);
- const filter = { address, topics, fromBlock, toBlock, shard: shard };
- const provider = getProvider(this.runner);
- assert(provider, "contract runner does not have a provider", "UNSUPPORTED_OPERATION", { operation: "queryFilter" });
- return (await provider.getLogs(filter)).map((log) => {
- let foundFragment = fragment;
- if (foundFragment == null) {
- try {
- foundFragment = this.interface.getEvent(log.topics[0]);
- }
- catch (error) { }
- }
- if (foundFragment) {
- try {
- return new EventLog(log, this.interface, foundFragment);
- }
- catch (error) {
- return new UndecodedEventLog(log, error);
- }
- }
- return new Log(log, provider);
- });
- }
- /**
- * Add an event %%listener%% for the %%event%%.
- */
- async on(event, listener) {
- const sub = await getSub(this, "on", event);
- sub.listeners.push({ listener, once: false });
- sub.start();
- return this;
- }
- /**
- * Add an event %%listener%% for the %%event%%, but remove the listener
- * after it is fired once.
- */
- async once(event, listener) {
- const sub = await getSub(this, "once", event);
- sub.listeners.push({ listener, once: true });
- sub.start();
- return this;
- }
- /**
- * Emit an %%event%% calling all listeners with %%args%%.
- *
- * Resolves to ``true`` if any listeners were called.
- */
- async emit(event, ...args) {
- return await emit(this, event, args, null);
- }
- /**
- * Resolves to the number of listeners of %%event%% or the total number
- * of listeners if unspecified.
- */
- async listenerCount(event) {
- if (event) {
- const sub = await hasSub(this, event);
- if (!sub) {
- return 0;
- }
- return sub.listeners.length;
- }
- const { subs } = getInternal(this);
- let total = 0;
- for (const { listeners } of subs.values()) {
- total += listeners.length;
- }
- return total;
- }
- /**
- * Resolves to the listeners subscribed to %%event%% or all listeners
- * if unspecified.
- */
- async listeners(event) {
- if (event) {
- const sub = await hasSub(this, event);
- if (!sub) {
- return [];
- }
- return sub.listeners.map(({ listener }) => listener);
- }
- const { subs } = getInternal(this);
- let result = [];
- for (const { listeners } of subs.values()) {
- result = result.concat(listeners.map(({ listener }) => listener));
- }
- return result;
- }
- /**
- * Remove the %%listener%% from the listeners for %%event%% or remove
- * all listeners if unspecified.
- */
- async off(event, listener) {
- const sub = await hasSub(this, event);
- if (!sub) {
- return this;
- }
- if (listener) {
- const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);
- if (index >= 0) {
- sub.listeners.splice(index, 1);
- }
- }
- if (listener == null || sub.listeners.length === 0) {
- sub.stop();
- getInternal(this).subs.delete(sub.tag);
- }
- return this;
- }
- /**
- * Remove all the listeners for %%event%% or remove all listeners if
- * unspecified.
- */
- async removeAllListeners(event) {
- if (event) {
- const sub = await hasSub(this, event);
- if (!sub) {
- return this;
- }
- sub.stop();
- getInternal(this).subs.delete(sub.tag);
- }
- else {
- const { subs } = getInternal(this);
- for (const { tag, stop } of subs.values()) {
- stop();
- subs.delete(tag);
- }
- }
- return this;
- }
- /**
- * Alias for [on].
- */
- async addListener(event, listener) {
- return await this.on(event, listener);
- }
- /**
- * Alias for [off].
- */
- async removeListener(event, listener) {
- return await this.off(event, listener);
- }
- /**
- * Create a new Class for the %%abi%%.
- */
- static buildClass(abi) {
- class CustomContract extends BaseContract {
- constructor(address, runner = null) {
- super(address, abi, runner);
- }
- }
- return CustomContract;
- }
- ;
- /**
- * Create a new BaseContract with a specified Interface.
- */
- static from(target, abi, runner) {
- if (runner == null) {
- runner = null;
- }
- const contract = new this(target, abi, runner);
- return contract;
- }
-}
-function _ContractBase() {
- return BaseContract;
-}
-/**
- * A [[BaseContract]] with no type guards on its methods or events.
- */
-export class Contract extends _ContractBase() {
-}
-//# sourceMappingURL=contract.js.map
\ No newline at end of file
diff --git a/lib.esm/contract/contract.js.map b/lib.esm/contract/contract.js.map
deleted file mode 100644
index b43a131b..00000000
--- a/lib.esm/contract/contract.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"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/contract/factory.d.ts b/lib.esm/contract/factory.d.ts
deleted file mode 100644
index 6b57a135..00000000
--- a/lib.esm/contract/factory.d.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { Interface } from "../abi/index.js";
-import { BaseContract } from "./contract.js";
-import type { InterfaceAbi } from "../abi/index.js";
-import type { Addressable } from "../address/index.js";
-import type { ContractRunner, TransactionRequest } from "../providers/index.js";
-import type { BytesLike } from "../utils/index.js";
-import type { ContractInterface, ContractMethodArgs, ContractDeployTransaction } from "./types.js";
-import type { ContractTransactionResponse } from "./wrappers.js";
-/**
- * A **ContractFactory** is used to deploy a Contract to the blockchain.
- */
-export declare class ContractFactory = Array, I = BaseContract> {
- /**
- * The Contract Interface.
- */
- readonly interface: Interface;
- /**
- * The Contract deployment bytecode. Often called the initcode.
- */
- readonly bytecode: string;
- /**
- * The ContractRunner to deploy the Contract as.
- */
- readonly runner: null | ContractRunner;
- /**
- * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,
- * optionally connected to %%runner%%.
- *
- * The %%bytecode%% may be the ``bytecode`` property within the
- * standard Solidity JSON output.
- */
- constructor(abi: Interface | InterfaceAbi, bytecode: BytesLike | {
- object: string;
- }, runner?: null | ContractRunner);
- attach(target: string | Addressable): BaseContract & Omit;
- /**
- * Resolves to the transaction to deploy the contract, passing %%args%%
- * into the constructor.
- */
- getDeployTransaction(...args: ContractMethodArgs): Promise;
- /**
- * Resolves to the Contract deployed by passing %%args%% into the
- * constructor.
- *
- * This will resovle to the Contract before it has been deployed to the
- * network, so the [[BaseContract-waitForDeployment]] should be used before
- * sending any transactions to it.
- */
- deploy(...args: ContractMethodArgs): Promise>;
- static getContractAddress(transaction: {
- from: string;
- nonce: bigint;
- data: BytesLike;
- }): string;
- grindContractAddress(tx: TransactionRequest): Promise;
- /**
- * Return a new **ContractFactory** with the same ABI and bytecode,
- * but connected to %%runner%%.
- */
- connect(runner: null | ContractRunner): ContractFactory;
- /**
- * Create a new **ContractFactory** from the standard Solidity JSON output.
- */
- static fromSolidity = Array, I = ContractInterface>(output: any, runner?: ContractRunner): ContractFactory;
-}
-//# sourceMappingURL=factory.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/contract/factory.d.ts.map b/lib.esm/contract/factory.d.ts.map
deleted file mode 100644
index 6cba74a2..00000000
--- a/lib.esm/contract/factory.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,OAAO,EAAE,YAAY,EAA8B,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EACR,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EACnE,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AASjE;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY;IAE5E;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAG,IAAI,GAAG,cAAc,CAAC;IAExC;;;;;;OAMG;gBACS,GAAG,EAAE,SAAS,GAAG,YAAY,EAAE,QAAQ,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,cAAc;IAkBnH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC;IAIhF;;;OAGG;IACG,oBAAoB,CAAC,GAAG,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IA2E9F;;;;;;;OAOG;IACG,MAAM,CAAC,GAAG,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,GAAG;QAAE,qBAAqB,IAAI,2BAA2B,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC;IAsBhK,MAAM,CAAC,kBAAkB,CAAC,WAAW,EAAE;QACnC,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,SAAS,CAAC;KACnB,GAAG,MAAM;IAQA,oBAAoB,CACtB,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,kBAAkB,CAAC;IAwBhC;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAI7D;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;CAgB7I"}
\ No newline at end of file
diff --git a/lib.esm/contract/factory.js b/lib.esm/contract/factory.js
deleted file mode 100644
index bf1b9233..00000000
--- a/lib.esm/contract/factory.js
+++ /dev/null
@@ -1,194 +0,0 @@
-import { Interface } from "../abi/index.js";
-import { concat, defineProperties, getBytes, hexlify, assert, assertArgument } from "../utils/index.js";
-import { BaseContract, copyOverrides, resolveArgs } from "./contract.js";
-import { getShardForAddress, isUTXOAddress } from "../utils/index.js";
-import { Wallet, randomBytes } from "../quais.js";
-import { getContractAddress } from "../address/address.js";
-import { getStatic } from "../utils/properties.js";
-// A = Arguments to the constructor
-// I = Interface of deployed contracts
-/**
- * A **ContractFactory** is used to deploy a Contract to the blockchain.
- */
-export class ContractFactory {
- /**
- * The Contract Interface.
- */
- interface;
- /**
- * The Contract deployment bytecode. Often called the initcode.
- */
- bytecode;
- /**
- * The ContractRunner to deploy the Contract as.
- */
- runner;
- /**
- * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,
- * optionally connected to %%runner%%.
- *
- * The %%bytecode%% may be the ``bytecode`` property within the
- * standard Solidity JSON output.
- */
- constructor(abi, bytecode, runner) {
- const iface = Interface.from(abi);
- // Dereference Solidity bytecode objects and allow a missing `0x`-prefix
- if (bytecode instanceof Uint8Array) {
- bytecode = hexlify(getBytes(bytecode));
- }
- else {
- if (typeof (bytecode) === "object") {
- bytecode = bytecode.object;
- }
- if (!bytecode.startsWith("0x")) {
- bytecode = "0x" + bytecode;
- }
- bytecode = hexlify(getBytes(bytecode));
- }
- defineProperties(this, {
- bytecode, interface: iface, runner: (runner || null)
- });
- }
- attach(target) {
- return new BaseContract(target, this.interface, this.runner);
- }
- /**
- * Resolves to the transaction to deploy the contract, passing %%args%%
- * into the constructor.
- */
- async getDeployTransaction(...args) {
- let overrides;
- const fragment = this.interface.deploy;
- if (fragment.inputs.length + 1 === args.length) {
- overrides = await copyOverrides(args.pop());
- const resolvedArgs = await resolveArgs(this.runner, fragment.inputs, args);
- const data = concat([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);
- return Object.assign({}, overrides, { data });
- }
- if (fragment.inputs.length !== args.length) {
- throw new Error("incorrect number of arguments to constructor");
- }
- const resolvedArgs = await resolveArgs(this.runner, fragment.inputs, args);
- const data = concat([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);
- return Object.assign({}, args.pop().from, { data });
- }
- // getDeployTransaction3(...args: Array): TransactionRequest {
- // let tx: TransactionRequest = {};
- // // If we have 1 additional argument, we allow transaction overrides
- // if (
- // args.length === this.interface.deploy.inputs.length + 1 &&
- // typeof args[args.length - 1] === "object"
- // ) {
- // //tx = shallowCopy(args.pop());
- // tx = copyOverrides(args.pop());
- // for (const key in tx) {
- // if (!allowedTransactionKeys[key]) {
- // throw new Error("unknown transaction override " + key);
- // }
- // }
- // }
- // // Do not allow these to be overridden in a deployment transaction
- // ["data", "from", "to"].forEach((key) => {
- // if ((tx)[key] == null) {
- // return;
- // }
- // assertArgument(false, "cannot override " + key, key, (tx)[key]);
- // });
- // if (tx.value) {
- // const value = Number(tx.value)
- // if ( value != 0 && !this.interface.deploy.payable) {
- // assertArgument(
- // false,
- // "non-zero value provided to non-payable (or constructor) function",
- // "value", value
- // );
- // }
- // }
- // // // Make sure the call matches the constructor signature
- // // logger.checkArgumentCount(
- // // args.length,
- // // this.interface.deploy.inputs.length,
- // // " in Contract constructor"
- // // );
- // // Set the data to the bytecode + the encoded constructor arguments
- // tx.data = hexlify(
- // concat([this.bytecode, this.interface.encodeDeploy(args)])
- // );
- // return tx;
- // }
- /**
- * Resolves to the Contract deployed by passing %%args%% into the
- * constructor.
- *
- * This will resovle to the Contract before it has been deployed to the
- * network, so the [[BaseContract-waitForDeployment]] should be used before
- * sending any transactions to it.
- */
- async deploy(...args) {
- const tx = await this.getDeployTransaction(...args);
- assert(this.runner && typeof (this.runner.sendTransaction) === "function", "factory runner does not support sending transactions", "UNSUPPORTED_OPERATION", {
- operation: "sendTransaction"
- });
- if (this.runner instanceof Wallet) {
- tx.from = this.runner.address;
- }
- const grindedTx = await this.grindContractAddress(tx);
- console.log("grindedTx", grindedTx);
- const sentTx = await this.runner.sendTransaction(grindedTx);
- const address = getStatic(this.constructor, "getContractAddress")?.(tx);
- //const address = getCreateAddress(sentTx);
- return new BaseContract(address, this.interface, this.runner, sentTx);
- }
- static getContractAddress(transaction) {
- return getContractAddress(transaction.from, BigInt(transaction.nonce), // Fix: Convert BigInt to bigint
- transaction.data);
- }
- async grindContractAddress(tx) {
- if (tx.nonce == null && tx.from) {
- tx.nonce = await this.runner?.provider?.getTransactionCount(tx.from);
- }
- const sender = String(tx.from);
- const toShard = getShardForAddress(sender);
- var i = 0;
- var startingData = tx.data;
- while (i < 10000) {
- var contractAddress = getContractAddress(sender, BigInt(tx.nonce || 0), tx.data || '');
- var contractShard = getShardForAddress(contractAddress);
- console.log("contractAddress ", contractAddress);
- var utxo = isUTXOAddress(contractAddress);
- if (contractShard === toShard && !utxo) {
- return tx;
- }
- var salt = randomBytes(32);
- tx.data = hexlify(concat([String(startingData), salt]));
- i++;
- }
- return tx;
- }
- /**
- * Return a new **ContractFactory** with the same ABI and bytecode,
- * but connected to %%runner%%.
- */
- connect(runner) {
- return new ContractFactory(this.interface, this.bytecode, runner);
- }
- /**
- * Create a new **ContractFactory** from the standard Solidity JSON output.
- */
- static fromSolidity(output, runner) {
- assertArgument(output != null, "bad compiler output", "output", output);
- if (typeof (output) === "string") {
- output = JSON.parse(output);
- }
- const abi = output.abi;
- let bytecode = "";
- if (output.bytecode) {
- bytecode = output.bytecode;
- }
- else if (output.evm && output.evm.bytecode) {
- bytecode = output.evm.bytecode;
- }
- return new this(abi, bytecode, runner);
- }
-}
-//# sourceMappingURL=factory.js.map
\ No newline at end of file
diff --git a/lib.esm/contract/factory.js.map b/lib.esm/contract/factory.js.map
deleted file mode 100644
index 3d37fa88..00000000
--- a/lib.esm/contract/factory.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src.ts/contract/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACH,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAC3C,MAAM,EAAE,cAAc,EACzB,MAAM,mBAAmB,CAAC;AA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.esm/contract/index.d.ts
deleted file mode 100644
index b7f2c818..00000000
--- a/lib.esm/contract/index.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * A **Contract** object is a meta-class (a class whose definition is
- * defined at runtime), which communicates with a deployed smart contract
- * on the blockchain and provides a simple JavaScript interface to call
- * methods, send transaction, query historic logs and listen for its events.
- *
- * @_section: api/contract:Contracts [about-contracts]
- */
-export { BaseContract, Contract } from "./contract.js";
-export { ContractFactory } from "./factory.js";
-export { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog, UndecodedEventLog } from "./wrappers.js";
-export type { BaseContractMethod, ConstantContractMethod, PostfixOverrides, ContractEvent, ContractEventArgs, ContractEventName, ContractDeployTransaction, ContractInterface, ContractMethod, ContractMethodArgs, ContractTransaction, DeferredTopicFilter, Overrides, WrappedFallback } from "./types.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/contract/index.d.ts.map b/lib.esm/contract/index.d.ts.map
deleted file mode 100644
index aad3d029..00000000
--- a/lib.esm/contract/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,2BAA2B,EACjD,0BAA0B,EAAE,2BAA2B,EACvD,QAAQ,EAAE,iBAAiB,EAC9B,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,kBAAkB,EAAE,sBAAsB,EAC1C,gBAAgB,EAChB,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EACnD,yBAAyB,EACzB,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAC1E,mBAAmB,EAAE,SAAS,EAC9B,eAAe,EAClB,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/contract/index.js b/lib.esm/contract/index.js
deleted file mode 100644
index e7699343..00000000
--- a/lib.esm/contract/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * A **Contract** object is a meta-class (a class whose definition is
- * defined at runtime), which communicates with a deployed smart contract
- * on the blockchain and provides a simple JavaScript interface to call
- * methods, send transaction, query historic logs and listen for its events.
- *
- * @_section: api/contract:Contracts [about-contracts]
- */
-export { BaseContract, Contract } from "./contract.js";
-export { ContractFactory } from "./factory.js";
-export { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionReceipt, ContractTransactionResponse, EventLog, UndecodedEventLog } from "./wrappers.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/contract/index.js.map b/lib.esm/contract/index.js.map
deleted file mode 100644
index 93010046..00000000
--- a/lib.esm/contract/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/contract/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACH,YAAY,EAAE,QAAQ,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,oBAAoB,EAAE,2BAA2B,EACjD,0BAA0B,EAAE,2BAA2B,EACvD,QAAQ,EAAE,iBAAiB,EAC9B,MAAM,eAAe,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/contract/types.d.ts b/lib.esm/contract/types.d.ts
deleted file mode 100644
index be2d954d..00000000
--- a/lib.esm/contract/types.d.ts
+++ /dev/null
@@ -1,193 +0,0 @@
-import type { EventFragment, FunctionFragment, Result, Typed } from "../abi/index.js";
-import type { TransactionRequest, PreparedTransactionRequest, TopicFilter } from "../providers/index.js";
-import type { ContractTransactionResponse } from "./wrappers.js";
-/**
- * The name for an event used for subscribing to Contract events.
- *
- * **``string``** - An event by name. The event must be non-ambiguous.
- * The parameters will be dereferenced when passed into the listener.
- *
- * [[ContractEvent]] - A filter from the ``contract.filters``, which will
- * pass only the EventPayload as a single parameter, which includes a
- * ``.signature`` property that can be used to further filter the event.
- *
- * [[TopicFilter]] - A filter defined using the standard Ethereum API
- * which provides the specific topic hash or topic hashes to watch for along
- * with any additional values to filter by. This will only pass a single
- * parameter to the listener, the EventPayload which will include additional
- * details to refine by, such as the event name and signature.
- *
- * [[DeferredTopicFilter]] - A filter created by calling a [[ContractEvent]]
- * with parameters, which will create a filter for a specific event
- * signautre and dereference each parameter when calling the listener.
- */
-export type ContractEventName = string | ContractEvent | TopicFilter | DeferredTopicFilter;
-/**
- * A Contract with no method constraints.
- */
-export interface ContractInterface {
- [name: string]: BaseContractMethod;
-}
-/**
- * When creating a filter using the ``contract.filters``, this is returned.
- */
-export interface DeferredTopicFilter {
- getTopicFilter(): Promise;
- fragment: EventFragment;
-}
-/**
- * When populating a transaction this type is returned.
- */
-export interface ContractTransaction extends PreparedTransactionRequest {
- /**
- * The target address.
- */
- to: string;
- /**
- * The transaction data.
- */
- data: string;
- /**
- * The from address, if any.
- */
- from: string;
-}
-/**
- * A deployment transaction for a contract.
- */
-export interface ContractDeployTransaction extends Omit {
-}
-/**
- * The overrides for a contract transaction.
- */
-export interface Overrides extends Omit {
-}
-/**
- * Arguments to a Contract method can always include an additional and
- * optional overrides parameter.
- *
- * @_ignore:
- */
-export type PostfixOverrides> = A | [...A, Overrides];
-/**
- * Arguments to a Contract method can always include an additional and
- * optional overrides parameter, and each parameter can optionally be
- * [[Typed]].
- *
- * @_ignore:
- */
-export type ContractMethodArgs> = PostfixOverrides<{
- [I in keyof A]-?: A[I] | Typed;
-}>;
-/**
- * A Contract method can be called directly, or used in various ways.
- */
-export interface BaseContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> {
- (...args: ContractMethodArgs): Promise;
- /**
- * The name of the Contract method.
- */
- name: string;
- /**
- * The fragment of the Contract method. This will throw on ambiguous
- * method names.
- */
- fragment: FunctionFragment;
- /**
- * Returns the fragment constrained by %%args%%. This can be used to
- * resolve ambiguous method names.
- */
- getFragment(...args: ContractMethodArgs): FunctionFragment;
- /**
- * Returns a populated transaction that can be used to perform the
- * contract method with %%args%%.
- */
- populateTransaction(...args: ContractMethodArgs): Promise;
- /**
- * Call the contract method with %%args%% and return the value.
- *
- * If the return value is a single type, it will be dereferenced and
- * returned directly, otherwise the full Result will be returned.
- */
- staticCall(...args: ContractMethodArgs): Promise;
- /**
- * Send a transaction for the contract method with %%args%%.
- */
- send(...args: ContractMethodArgs): Promise;
- /**
- * Estimate the gas to send the contract method with %%args%%.
- */
- estimateGas(...args: ContractMethodArgs): Promise;
- /**
- * Call the contract method with %%args%% and return the Result
- * without any dereferencing.
- */
- staticCallResult(...args: ContractMethodArgs): Promise;
-}
-/**
- * A contract method on a Contract.
- */
-export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> extends BaseContractMethod {
-}
-/**
- * A pure of view method on a Contract.
- */
-export interface ConstantContractMethod, R = any> extends ContractMethod {
-}
-/**
- * Each argument of an event is nullable (to indicate matching //any//.
- *
- * @_ignore:
- */
-export type ContractEventArgs> = {
- [I in keyof A]?: A[I] | Typed | null;
-};
-export interface ContractEvent = Array> {
- (...args: ContractEventArgs): DeferredTopicFilter;
- /**
- * The name of the Contract event.
- */
- name: string;
- /**
- * The fragment of the Contract event. This will throw on ambiguous
- * method names.
- */
- fragment: EventFragment;
- /**
- * Returns the fragment constrained by %%args%%. This can be used to
- * resolve ambiguous event names.
- */
- getFragment(...args: ContractEventArgs): EventFragment;
-}
-/**
- * A Fallback or Receive function on a Contract.
- */
-export interface WrappedFallback {
- (overrides?: Omit): Promise;
- /**
- * Returns a populated transaction that can be used to perform the
- * fallback method.
- *
- * For non-receive fallback, ``data`` may be overridden.
- */
- populateTransaction(overrides?: Omit): Promise;
- /**
- * Call the contract fallback and return the result.
- *
- * For non-receive fallback, ``data`` may be overridden.
- */
- staticCall(overrides?: Omit): Promise;
- /**
- * Send a transaction to the contract fallback.
- *
- * For non-receive fallback, ``data`` may be overridden.
- */
- send(overrides?: Omit): Promise;
- /**
- * Estimate the gas to send a transaction to the contract fallback.
- *
- * For non-receive fallback, ``data`` may be overridden.
- */
- estimateGas(overrides?: Omit): Promise;
-}
-//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/contract/types.d.ts.map b/lib.esm/contract/types.d.ts.map
deleted file mode 100644
index 8c805861..00000000
--- a/lib.esm/contract/types.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src.ts/contract/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EACjD,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACR,kBAAkB,EAAE,0BAA0B,EAAE,WAAW,EAC9D,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAGjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,GAAG,mBAAmB,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,CAAE,IAAI,EAAE,MAAM,GAAI,kBAAkB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,aAAa,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAEhB;AAED;;GAEG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GG;IACH,QAAQ,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,GAAG,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAEnF;;;;;OAKG;IACH,mBAAmB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE9F;;;;OAIG;IACH,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAExE;;;;OAIG;IACH,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAEvF;;;;OAIG;IACH,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5E"}
\ No newline at end of file
diff --git a/lib.esm/contract/types.js b/lib.esm/contract/types.js
deleted file mode 100644
index 14353c78..00000000
--- a/lib.esm/contract/types.js
+++ /dev/null
@@ -1,5 +0,0 @@
-;
-;
-;
-export {};
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/lib.esm/contract/types.js.map b/lib.esm/contract/types.js.map
deleted file mode 100644
index d88f0d6d..00000000
--- a/lib.esm/contract/types.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/contract/types.ts"],"names":[],"mappings":"AAqCC,CAAC;AAuC4E,CAAC;AA4H9E,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/contract/wrappers.d.ts b/lib.esm/contract/wrappers.d.ts
deleted file mode 100644
index e5af484f..00000000
--- a/lib.esm/contract/wrappers.d.ts
+++ /dev/null
@@ -1,143 +0,0 @@
-import { Block, Log, TransactionReceipt, TransactionResponse } from "../providers/provider.js";
-import { EventPayload } from "../utils/index.js";
-import type { EventFragment, Interface, Result } from "../abi/index.js";
-import type { Listener } from "../utils/index.js";
-import type { Provider } from "../providers/index.js";
-import type { BaseContract } from "./contract.js";
-import type { ContractEventName } from "./types.js";
-/**
- * An **EventLog** contains additional properties parsed from the [[Log]].
- */
-export declare class EventLog extends Log {
- /**
- * The Contract Interface.
- */
- readonly interface: Interface;
- /**
- * The matching event.
- */
- readonly fragment: EventFragment;
- /**
- * The parsed arguments passed to the event by ``emit``.
- */
- readonly args: Result;
- /**
- * @_ignore:
- */
- constructor(log: Log, iface: Interface, fragment: EventFragment);
- /**
- * The name of the event.
- */
- get eventName(): string;
- /**
- * The signature of the event.
- */
- get eventSignature(): string;
-}
-/**
- * An **EventLog** contains additional properties parsed from the [[Log]].
- */
-export declare class UndecodedEventLog extends Log {
- /**
- * The error encounted when trying to decode the log.
- */
- readonly error: Error;
- /**
- * @_ignore:
- */
- constructor(log: Log, error: Error);
-}
-/**
- * A **ContractTransactionReceipt** includes the parsed logs from a
- * [[TransactionReceipt]].
- */
-export declare class ContractTransactionReceipt extends TransactionReceipt {
- #private;
- /**
- * @_ignore:
- */
- constructor(iface: Interface, provider: Provider, tx: TransactionReceipt);
- /**
- * The parsed logs for any [[Log]] which has a matching event in the
- * Contract ABI.
- */
- get logs(): Array;
-}
-/**
- * A **ContractTransactionResponse** will return a
- * [[ContractTransactionReceipt]] when waited on.
- */
-export declare class ContractTransactionResponse extends TransactionResponse {
- #private;
- /**
- * @_ignore:
- */
- constructor(iface: Interface, provider: Provider, tx: TransactionResponse);
- /**
- * Resolves once this transaction has been mined and has
- * %%confirms%% blocks including it (default: ``1``) with an
- * optional %%timeout%%.
- *
- * This can resolve to ``null`` only if %%confirms%% is ``0``
- * and the transaction has not been mined, otherwise this will
- * wait until enough confirmations have completed.
- */
- wait(confirms?: number): Promise;
-}
-/**
- * A **ContractUnknownEventPayload** is included as the last parameter to
- * Contract Events when the event does not match any events in the ABI.
- */
-export declare class ContractUnknownEventPayload extends EventPayload {
- /**
- * The log with no matching events.
- */
- readonly log: Log;
- /**
- * @_event:
- */
- constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, log: Log);
- /**
- * Resolves to the block the event occured in.
- */
- getBlock(shard: string): Promise;
- /**
- * Resolves to the transaction the event occured in.
- */
- getTransaction(): Promise;
- /**
- * Resolves to the transaction receipt the event occured in.
- */
- getTransactionReceipt(): Promise;
-}
-/**
- * A **ContractEventPayload** is included as the last parameter to
- * Contract Events when the event is known.
- */
-export declare class ContractEventPayload extends ContractUnknownEventPayload {
- /**
- * The matching event.
- */
- readonly fragment: EventFragment;
- /**
- * The log, with parsed properties.
- */
- readonly log: EventLog;
- /**
- * The parsed arguments passed to the event by ``emit``.
- */
- readonly args: Result;
- /**
- * @_ignore:
- */
- constructor(contract: BaseContract, listener: null | Listener, filter: ContractEventName, fragment: EventFragment, _log: Log);
- /**
- * The event name.
- */
- get eventName(): string;
- /**
- * The event signature.
- */
- get eventSignature(): string;
-}
-//# sourceMappingURL=wrappers.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/contract/wrappers.d.ts.map b/lib.esm/contract/wrappers.d.ts.map
deleted file mode 100644
index cd3ccc0d..00000000
--- a/lib.esm/contract/wrappers.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"wrappers.d.ts","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,mBAAmB,EACtD,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,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AKzE;;;;;;;;OAQG;IACG,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,0BAA0B,CAAC;CAK5E;AAED;;;GAGG;AACH,qBAAc,2BAA4B,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC7E;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAG,GAAG,CAAC;IAEnB;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG;IAKlG;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAI7C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIpD;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAG7D;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,2BAA2B;IAEjE;;OAEG;IACH,SAAiB,QAAQ,EAAE,aAAa,CAAC;IAEzC;;OAEG;IACH,SAAiB,GAAG,EAAE,QAAQ,CAAC;IAE/B;;OAEG;IACH,SAAiB,IAAI,EAAE,MAAM,CAAC;IAE9B;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG;IAM5H;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/contract/wrappers.js b/lib.esm/contract/wrappers.js
deleted file mode 100644
index e3c705a0..00000000
--- a/lib.esm/contract/wrappers.js
+++ /dev/null
@@ -1,177 +0,0 @@
-// import from provider.ts instead of index.ts to prevent circular dep
-// from quaiscanProvider
-import { Log, TransactionReceipt, TransactionResponse } from "../providers/provider.js";
-import { defineProperties, EventPayload } from "../utils/index.js";
-/**
- * An **EventLog** contains additional properties parsed from the [[Log]].
- */
-export class EventLog extends Log {
- /**
- * The Contract Interface.
- */
- interface;
- /**
- * The matching event.
- */
- fragment;
- /**
- * The parsed arguments passed to the event by ``emit``.
- */
- args;
- /**
- * @_ignore:
- */
- constructor(log, iface, fragment) {
- super(log, log.provider);
- const args = iface.decodeEventLog(fragment, log.data, log.topics);
- defineProperties(this, { args, fragment, interface: iface });
- }
- /**
- * The name of the event.
- */
- get eventName() { return this.fragment.name; }
- /**
- * The signature of the event.
- */
- get eventSignature() { return this.fragment.format(); }
-}
-/**
- * An **EventLog** contains additional properties parsed from the [[Log]].
- */
-export class UndecodedEventLog extends Log {
- /**
- * The error encounted when trying to decode the log.
- */
- error;
- /**
- * @_ignore:
- */
- constructor(log, error) {
- super(log, log.provider);
- defineProperties(this, { error });
- }
-}
-/**
- * A **ContractTransactionReceipt** includes the parsed logs from a
- * [[TransactionReceipt]].
- */
-export class ContractTransactionReceipt extends TransactionReceipt {
- #iface;
- /**
- * @_ignore:
- */
- constructor(iface, provider, tx) {
- super(tx, provider);
- this.#iface = iface;
- }
- /**
- * The parsed logs for any [[Log]] which has a matching event in the
- * Contract ABI.
- */
- get logs() {
- return super.logs.map((log) => {
- const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;
- if (fragment) {
- try {
- return new EventLog(log, this.#iface, fragment);
- }
- catch (error) {
- return new UndecodedEventLog(log, error);
- }
- }
- return log;
- });
- }
-}
-/**
- * A **ContractTransactionResponse** will return a
- * [[ContractTransactionReceipt]] when waited on.
- */
-export class ContractTransactionResponse extends TransactionResponse {
- #iface;
- /**
- * @_ignore:
- */
- constructor(iface, provider, tx) {
- super(tx, provider);
- this.#iface = iface;
- }
- /**
- * Resolves once this transaction has been mined and has
- * %%confirms%% blocks including it (default: ``1``) with an
- * optional %%timeout%%.
- *
- * This can resolve to ``null`` only if %%confirms%% is ``0``
- * and the transaction has not been mined, otherwise this will
- * wait until enough confirmations have completed.
- */
- async wait(confirms) {
- const receipt = await super.wait(confirms);
- if (receipt == null) {
- return null;
- }
- return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
- }
-}
-/**
- * A **ContractUnknownEventPayload** is included as the last parameter to
- * Contract Events when the event does not match any events in the ABI.
- */
-export class ContractUnknownEventPayload extends EventPayload {
- /**
- * The log with no matching events.
- */
- log;
- /**
- * @_event:
- */
- constructor(contract, listener, filter, log) {
- super(contract, listener, filter);
- defineProperties(this, { log });
- }
- /**
- * Resolves to the block the event occured in.
- */
- async getBlock(shard) {
- return await this.log.getBlock(shard);
- }
- /**
- * Resolves to the transaction the event occured in.
- */
- async getTransaction() {
- return await this.log.getTransaction();
- }
- /**
- * Resolves to the transaction receipt the event occured in.
- */
- async getTransactionReceipt() {
- return await this.log.getTransactionReceipt();
- }
-}
-/**
- * A **ContractEventPayload** is included as the last parameter to
- * Contract Events when the event is known.
- */
-export class ContractEventPayload extends ContractUnknownEventPayload {
- /**
- * @_ignore:
- */
- constructor(contract, listener, filter, fragment, _log) {
- super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));
- const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);
- defineProperties(this, { args, fragment });
- }
- /**
- * The event name.
- */
- get eventName() {
- return this.fragment.name;
- }
- /**
- * The event signature.
- */
- get eventSignature() {
- return this.fragment.format();
- }
-}
-//# sourceMappingURL=wrappers.js.map
\ No newline at end of file
diff --git a/lib.esm/contract/wrappers.js.map b/lib.esm/contract/wrappers.js.map
deleted file mode 100644
index 3b210e05..00000000
--- a/lib.esm/contract/wrappers.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"wrappers.js","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,wBAAwB;AACxB,OAAO,EACI,GAAG,EAAE,kBAAkB,EAAE,mBAAmB,EACtD,MAAM,0BA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I,cAAc;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto-browser.d.ts b/lib.esm/crypto/crypto-browser.d.ts
deleted file mode 100644
index ba0bbf19..00000000
--- a/lib.esm/crypto/crypto-browser.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-declare global {
- interface Window {
- }
- const window: Window;
- const self: Window;
-}
-export interface CryptoHasher {
- update(data: Uint8Array): CryptoHasher;
- digest(): Uint8Array;
-}
-export declare function createHash(algo: string): CryptoHasher;
-export declare function createHmac(_algo: string, key: Uint8Array): CryptoHasher;
-export declare function pbkdf2Sync(password: Uint8Array, salt: Uint8Array, iterations: number, keylen: number, _algo: "sha256" | "sha512"): Uint8Array;
-export declare function randomBytes(length: number): Uint8Array;
-//# sourceMappingURL=crypto-browser.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto-browser.d.ts.map b/lib.esm/crypto/crypto-browser.d.ts.map
deleted file mode 100644
index b6950c78..00000000
--- a/lib.esm/crypto/crypto-browser.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"crypto-browser.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/crypto-browser.ts"],"names":[],"mappings":"AAUA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;KAAI;IAEpB,MAAM,MAAM,EAAE,MAAM,CAAC;IACrB,MAAM,IAAI,EAAE,MAAM,CAAC;CACtB;AAcD,MAAM,WAAW,YAAY;IACzB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC,MAAM,IAAI,UAAU,CAAC;CACxB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMrD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,GAAG,YAAY,CAIvE;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAI7I;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAStD"}
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto-browser.js b/lib.esm/crypto/crypto-browser.js
deleted file mode 100644
index 8d95b6fa..00000000
--- a/lib.esm/crypto/crypto-browser.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Browser Crypto Shims */
-import { hmac } from "@noble/hashes/hmac";
-import { pbkdf2 } from "@noble/hashes/pbkdf2";
-import { sha256 } from "@noble/hashes/sha256";
-import { sha512 } from "@noble/hashes/sha512";
-import { assert, assertArgument } from "../utils/index.js";
-function getGlobal() {
- if (typeof self !== 'undefined') {
- return self;
- }
- if (typeof window !== 'undefined') {
- return window;
- }
- if (typeof global !== 'undefined') {
- return global;
- }
- throw new Error('unable to locate global object');
-}
-;
-const anyGlobal = getGlobal();
-const crypto = anyGlobal.crypto || anyGlobal.msCrypto;
-export function createHash(algo) {
- switch (algo) {
- case "sha256": return sha256.create();
- case "sha512": return sha512.create();
- }
- assertArgument(false, "invalid hashing algorithm name", "algorithm", algo);
-}
-export function createHmac(_algo, key) {
- const algo = ({ sha256, sha512 }[_algo]);
- assertArgument(algo != null, "invalid hmac algorithm", "algorithm", _algo);
- return hmac.create(algo, key);
-}
-export function pbkdf2Sync(password, salt, iterations, keylen, _algo) {
- const algo = ({ sha256, sha512 }[_algo]);
- assertArgument(algo != null, "invalid pbkdf2 algorithm", "algorithm", _algo);
- return pbkdf2(algo, password, salt, { c: iterations, dkLen: keylen });
-}
-export function randomBytes(length) {
- assert(crypto != null, "platform does not support secure random numbers", "UNSUPPORTED_OPERATION", {
- operation: "randomBytes"
- });
- assertArgument(Number.isInteger(length) && length > 0 && length <= 1024, "invalid length", "length", length);
- const result = new Uint8Array(length);
- crypto.getRandomValues(result);
- return result;
-}
-//# sourceMappingURL=crypto-browser.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto-browser.js.map b/lib.esm/crypto/crypto-browser.js.map
deleted file mode 100644
index 28134d2b..00000000
--- a/lib.esm/crypto/crypto-browser.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"crypto-browser.js","sourceRoot":"","sources":["../../src.ts/crypto/crypto-browser.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAW3D,SAAS,SAAS;IAChB,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAAE,OAAO,IAAI,CAAC;KAAE;IACjD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IACrD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IACrD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;AACpD,CAAC;AAAA,CAAC;AAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAC9B,MAAM,MAAM,GAAQ,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;AAQ3D,MAAM,UAAU,UAAU,CAAC,IAAY;IACnC,QAAQ,IAAI,EAAE;QACV,KAAK,QAAQ,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;QACtC,KAAK,QAAQ,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;KACzC;IACD,cAAc,CAAC,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}
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto.d.ts b/lib.esm/crypto/crypto.d.ts
deleted file mode 100644
index e9c555de..00000000
--- a/lib.esm/crypto/crypto.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { createHash, createHmac, pbkdf2Sync, randomBytes } from "crypto";
-//# sourceMappingURL=crypto.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto.d.ts.map b/lib.esm/crypto/crypto.d.ts.map
deleted file mode 100644
index c417228d..00000000
--- a/lib.esm/crypto/crypto.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/crypto.ts"],"names":[],"mappings":"AACA,OAAO,EACH,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAClD,MAAM,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto.js b/lib.esm/crypto/crypto.js
deleted file mode 100644
index 05475e30..00000000
--- a/lib.esm/crypto/crypto.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export { createHash, createHmac, pbkdf2Sync, randomBytes } from "crypto";
-//# sourceMappingURL=crypto.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/crypto.js.map b/lib.esm/crypto/crypto.js.map
deleted file mode 100644
index 1ff179cf..00000000
--- a/lib.esm/crypto/crypto.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src.ts/crypto/crypto.ts"],"names":[],"mappings":"AACA,OAAO,EACH,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAClD,MAAM,QAAQ,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/hmac.d.ts b/lib.esm/crypto/hmac.d.ts
deleted file mode 100644
index 4c5e3227..00000000
--- a/lib.esm/crypto/hmac.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { BytesLike } from "../utils/index.js";
-/**
- * Return the HMAC for %%data%% using the %%key%% key with the underlying
- * %%algo%% used for compression.
- *
- * @example:
- * key = id("some-secret")
- *
- * // Compute the HMAC
- * computeHmac("sha256", key, "0x1337")
- * //_result:
- *
- * // To compute the HMAC of UTF-8 data, the data must be
- * // converted to UTF-8 bytes
- * computeHmac("sha256", key, toUtf8Bytes("Hello World"))
- * //_result:
- *
- */
-export declare function computeHmac(algorithm: "sha256" | "sha512", _key: BytesLike, _data: BytesLike): string;
-export declare namespace computeHmac {
- var _: (algorithm: "sha256" | "sha512", key: Uint8Array, data: Uint8Array) => BytesLike;
- var lock: () => void;
- var register: (func: (algorithm: "sha256" | "sha512", key: Uint8Array, data: Uint8Array) => BytesLike) => void;
-}
-//# sourceMappingURL=hmac.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/hmac.d.ts.map b/lib.esm/crypto/hmac.d.ts.map
deleted file mode 100644
index aa56a49f..00000000
--- a/lib.esm/crypto/hmac.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/hmac.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAWnD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,CAIrG;yBAJe,WAAW"}
\ No newline at end of file
diff --git a/lib.esm/crypto/hmac.js b/lib.esm/crypto/hmac.js
deleted file mode 100644
index 944c6651..00000000
--- a/lib.esm/crypto/hmac.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * An **HMAC** enables verification that a given key was used
- * to authenticate a payload.
- *
- * See: [[link-wiki-hmac]]
- *
- * @_subsection: api/crypto:HMAC [about-hmac]
- */
-import { createHmac } from "./crypto.js";
-import { getBytes, hexlify } from "../utils/index.js";
-let locked = false;
-const _computeHmac = function (algorithm, key, data) {
- return createHmac(algorithm, key).update(data).digest();
-};
-let __computeHmac = _computeHmac;
-/**
- * Return the HMAC for %%data%% using the %%key%% key with the underlying
- * %%algo%% used for compression.
- *
- * @example:
- * key = id("some-secret")
- *
- * // Compute the HMAC
- * computeHmac("sha256", key, "0x1337")
- * //_result:
- *
- * // To compute the HMAC of UTF-8 data, the data must be
- * // converted to UTF-8 bytes
- * computeHmac("sha256", key, toUtf8Bytes("Hello World"))
- * //_result:
- *
- */
-export function computeHmac(algorithm, _key, _data) {
- const key = getBytes(_key, "key");
- const data = getBytes(_data, "data");
- return hexlify(__computeHmac(algorithm, key, data));
-}
-computeHmac._ = _computeHmac;
-computeHmac.lock = function () { locked = true; };
-computeHmac.register = function (func) {
- if (locked) {
- throw new Error("computeHmac is locked");
- }
- __computeHmac = func;
-};
-Object.freeze(computeHmac);
-//# sourceMappingURL=hmac.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/hmac.js.map b/lib.esm/crypto/hmac.js.map
deleted file mode 100644
index 6e0c8ea2..00000000
--- a/lib.esm/crypto/hmac.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../../src.ts/crypto/hmac.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKtD,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,YAAY,GAAG,UAAS,SAA8B,EAAE,GAAe,EAAE,IAAgB;IAC3F,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AAC5D,CAAC,CAAA;AAED,IAAI,aAAa,GAAG,YAAY,CAAC;AAEjC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,WAAW,CAAC,SAA8B,EAAE,IAAe,EAAE,KAAgB;IACzF,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC;AACD,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC;AAC7B,WAAW,CAAC,IAAI,GAAI,cAAa,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACjD,WAAW,CAAC,QAAQ,GAAG,UAAS,IAAsF;IAClH,IAAI,MAAM,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;KAAE;IACzD,aAAa,GAAG,IAAI,CAAC;AACzB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/index.d.ts b/lib.esm/crypto/index.d.ts
deleted file mode 100644
index 8d6bc562..00000000
--- a/lib.esm/crypto/index.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * A fundamental building block of Ethereum is the underlying
- * cryptographic primitives.
- *
- * @_section: api/crypto:Cryptographic Functions [about-crypto]
- */
-import { computeHmac } from "./hmac.js";
-import { keccak256 } from "./keccak.js";
-import { ripemd160 } from "./ripemd160.js";
-import { pbkdf2 } from "./pbkdf2.js";
-import { randomBytes } from "./random.js";
-import { scrypt, scryptSync } from "./scrypt.js";
-import { sha256, sha512 } from "./sha2.js";
-export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync };
-export { SigningKey } from "./signing-key.js";
-export { Signature } from "./signature.js";
-/**
- * Once called, prevents any future change to the underlying cryptographic
- * primitives using the ``.register`` feature for hooks.
- */
-declare function lock(): void;
-export { lock };
-export type { ProgressCallback } from "./scrypt.js";
-export type { SignatureLike } from "./signature.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/index.d.ts.map b/lib.esm/crypto/index.d.ts.map
deleted file mode 100644
index 4f8d3c46..00000000
--- a/lib.esm/crypto/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACH,WAAW,EAEX,WAAW,EAEX,SAAS,EACT,SAAS,EACT,MAAM,EAAE,MAAM,EAEd,MAAM,EACN,MAAM,EAAE,UAAU,EACrB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AACH,iBAAS,IAAI,IAAI,IAAI,CAWpB;AAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAKhB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/index.js b/lib.esm/crypto/index.js
deleted file mode 100644
index a8608024..00000000
--- a/lib.esm/crypto/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * A fundamental building block of Ethereum is the underlying
- * cryptographic primitives.
- *
- * @_section: api/crypto:Cryptographic Functions [about-crypto]
- */
-null;
-// We import all these so we can export lock()
-import { computeHmac } from "./hmac.js";
-import { keccak256 } from "./keccak.js";
-import { ripemd160 } from "./ripemd160.js";
-import { pbkdf2 } from "./pbkdf2.js";
-import { randomBytes } from "./random.js";
-import { scrypt, scryptSync } from "./scrypt.js";
-import { sha256, sha512 } from "./sha2.js";
-export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync };
-export { SigningKey } from "./signing-key.js";
-export { Signature } from "./signature.js";
-/**
- * Once called, prevents any future change to the underlying cryptographic
- * primitives using the ``.register`` feature for hooks.
- */
-function lock() {
- computeHmac.lock();
- keccak256.lock();
- pbkdf2.lock();
- randomBytes.lock();
- ripemd160.lock();
- scrypt.lock();
- scryptSync.lock();
- sha256.lock();
- sha512.lock();
- randomBytes.lock();
-}
-export { lock };
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/index.js.map b/lib.esm/crypto/index.js.map
deleted file mode 100644
index 8723de8b..00000000
--- a/lib.esm/crypto/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/crypto/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAI,CAAA;AAEJ,8CAA8C;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACH,WAAW,EAEX,WAAW,EAEX,SAAS,EACT,SAAS,EACT,MAAM,EAAE,MAAM,EAEd,MAAM,EACN,MAAM,EAAE,UAAU,EACrB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AACH,SAAS,IAAI;IACT,WAAW,CAAC,IAAI,EAAE,CAAC;IACnB,SAAS,CAAC,IAAI,EAAE,CAAC;IACjB,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,WAAW,CAAC,IAAI,EAAE,CAAC;IACnB,SAAS,CAAC,IAAI,EAAE,CAAC;IACjB,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,IAAI,EAAE,CAAC;IAClB,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,WAAW,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/keccak.d.ts b/lib.esm/crypto/keccak.d.ts
deleted file mode 100644
index 533f46dc..00000000
--- a/lib.esm/crypto/keccak.d.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Cryptographic hashing functions
- *
- * @_subsection: api/crypto:Hash Functions [about-crypto-hashing]
- */
-import type { BytesLike } from "../utils/index.js";
-/**
- * Compute the cryptographic KECCAK256 hash of %%data%%.
- *
- * The %%data%% **must** be a data representation, to compute the
- * hash of UTF-8 data use the [[id]] function.
- *
- * @returns DataHexstring
- * @example:
- * keccak256("0x")
- * //_result:
- *
- * keccak256("0x1337")
- * //_result:
- *
- * keccak256(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- * // Strings are assumed to be DataHexString, otherwise it will
- * // throw. To hash UTF-8 data, see the note above.
- * keccak256("Hello World")
- * //_error:
- */
-export declare function keccak256(_data: BytesLike): string;
-export declare namespace keccak256 {
- var _: (data: Uint8Array) => Uint8Array;
- var lock: () => void;
- var register: (func: (data: Uint8Array) => BytesLike) => void;
-}
-//# sourceMappingURL=keccak.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/keccak.d.ts.map b/lib.esm/crypto/keccak.d.ts.map
deleted file mode 100644
index a0064495..00000000
--- a/lib.esm/crypto/keccak.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"keccak.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/keccak.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAWnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAGlD;yBAHe,SAAS"}
\ No newline at end of file
diff --git a/lib.esm/crypto/keccak.js b/lib.esm/crypto/keccak.js
deleted file mode 100644
index a5914c9d..00000000
--- a/lib.esm/crypto/keccak.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Cryptographic hashing functions
- *
- * @_subsection: api/crypto:Hash Functions [about-crypto-hashing]
- */
-import { keccak_256 } from "@noble/hashes/sha3";
-import { getBytes, hexlify } from "../utils/index.js";
-let locked = false;
-const _keccak256 = function (data) {
- return keccak_256(data);
-};
-let __keccak256 = _keccak256;
-/**
- * Compute the cryptographic KECCAK256 hash of %%data%%.
- *
- * The %%data%% **must** be a data representation, to compute the
- * hash of UTF-8 data use the [[id]] function.
- *
- * @returns DataHexstring
- * @example:
- * keccak256("0x")
- * //_result:
- *
- * keccak256("0x1337")
- * //_result:
- *
- * keccak256(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- * // Strings are assumed to be DataHexString, otherwise it will
- * // throw. To hash UTF-8 data, see the note above.
- * keccak256("Hello World")
- * //_error:
- */
-export function keccak256(_data) {
- const data = getBytes(_data, "data");
- return hexlify(__keccak256(data));
-}
-keccak256._ = _keccak256;
-keccak256.lock = function () { locked = true; };
-keccak256.register = function (func) {
- if (locked) {
- throw new TypeError("keccak256 is locked");
- }
- __keccak256 = func;
-};
-Object.freeze(keccak256);
-//# sourceMappingURL=keccak.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/keccak.js.map b/lib.esm/crypto/keccak.js.map
deleted file mode 100644
index 02837e9f..00000000
--- a/lib.esm/crypto/keccak.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"keccak.js","sourceRoot":"","sources":["../../src.ts/crypto/keccak.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKtD,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,UAAU,GAAG,UAAS,IAAgB;IACxC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAA;AAED,IAAI,WAAW,GAAoC,UAAU,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAgB;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AACtC,CAAC;AACD,SAAS,CAAC,CAAC,GAAG,UAAU,CAAC;AACzB,SAAS,CAAC,IAAI,GAAG,cAAmB,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACpD,SAAS,CAAC,QAAQ,GAAG,UAAS,IAAqC;IAC/D,IAAI,MAAM,EAAE;QAAE,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;KAAE;IAC3D,WAAW,GAAG,IAAI,CAAC;AACvB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/pbkdf2.d.ts b/lib.esm/crypto/pbkdf2.d.ts
deleted file mode 100644
index 400e9744..00000000
--- a/lib.esm/crypto/pbkdf2.d.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * A **Password-Based Key-Derivation Function** is designed to create
- * a sequence of bytes suitible as a **key** from a human-rememberable
- * password.
- *
- * @_subsection: api/crypto:Passwords [about-pbkdf]
- */
-import type { BytesLike } from "../utils/index.js";
-/**
- * Return the [[link-pbkdf2]] for %%keylen%% bytes for %%password%% using
- * the %%salt%% and using %%iterations%% of %%algo%%.
- *
- * This PBKDF is outdated and should not be used in new projects, but is
- * required to decrypt older files.
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the PBKDF2
- * pbkdf2(passwordBytes, salt, 1024, 16, "sha256")
- * //_result:
- */
-export declare function pbkdf2(_password: BytesLike, _salt: BytesLike, iterations: number, keylen: number, algo: "sha256" | "sha512"): string;
-export declare namespace pbkdf2 {
- var _: (password: Uint8Array, salt: Uint8Array, iterations: number, keylen: number, algo: "sha256" | "sha512") => BytesLike;
- var lock: () => void;
- var register: (func: (password: Uint8Array, salt: Uint8Array, iterations: number, keylen: number, algo: "sha256" | "sha512") => BytesLike) => void;
-}
-//# sourceMappingURL=pbkdf2.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/pbkdf2.d.ts.map b/lib.esm/crypto/pbkdf2.d.ts.map
deleted file mode 100644
index f869e13c..00000000
--- a/lib.esm/crypto/pbkdf2.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"pbkdf2.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/pbkdf2.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAWnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAIpI;yBAJe,MAAM"}
\ No newline at end of file
diff --git a/lib.esm/crypto/pbkdf2.js b/lib.esm/crypto/pbkdf2.js
deleted file mode 100644
index be6178e1..00000000
--- a/lib.esm/crypto/pbkdf2.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * A **Password-Based Key-Derivation Function** is designed to create
- * a sequence of bytes suitible as a **key** from a human-rememberable
- * password.
- *
- * @_subsection: api/crypto:Passwords [about-pbkdf]
- */
-import { pbkdf2Sync } from "./crypto.js";
-import { getBytes, hexlify } from "../utils/index.js";
-let locked = false;
-const _pbkdf2 = function (password, salt, iterations, keylen, algo) {
- return pbkdf2Sync(password, salt, iterations, keylen, algo);
-};
-let __pbkdf2 = _pbkdf2;
-/**
- * Return the [[link-pbkdf2]] for %%keylen%% bytes for %%password%% using
- * the %%salt%% and using %%iterations%% of %%algo%%.
- *
- * This PBKDF is outdated and should not be used in new projects, but is
- * required to decrypt older files.
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the PBKDF2
- * pbkdf2(passwordBytes, salt, 1024, 16, "sha256")
- * //_result:
- */
-export function pbkdf2(_password, _salt, iterations, keylen, algo) {
- const password = getBytes(_password, "password");
- const salt = getBytes(_salt, "salt");
- return hexlify(__pbkdf2(password, salt, iterations, keylen, algo));
-}
-pbkdf2._ = _pbkdf2;
-pbkdf2.lock = function () { locked = true; };
-pbkdf2.register = function (func) {
- if (locked) {
- throw new Error("pbkdf2 is locked");
- }
- __pbkdf2 = func;
-};
-Object.freeze(pbkdf2);
-//# sourceMappingURL=pbkdf2.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/pbkdf2.js.map b/lib.esm/crypto/pbkdf2.js.map
deleted file mode 100644
index 59df8bca..00000000
--- a/lib.esm/crypto/pbkdf2.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"pbkdf2.js","sourceRoot":"","sources":["../../src.ts/crypto/pbkdf2.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKtD,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,OAAO,GAAG,UAAS,QAAoB,EAAE,IAAgB,EAAE,UAAkB,EAAE,MAAc,EAAE,IAAyB;IAC1H,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC,CAAA;AAED,IAAI,QAAQ,GAAG,OAAO,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,MAAM,CAAC,SAAoB,EAAE,KAAgB,EAAE,UAAkB,EAAE,MAAc,EAAE,IAAyB;IACxH,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AACD,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC;AACnB,MAAM,CAAC,IAAI,GAAG,cAAmB,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACjD,MAAM,CAAC,QAAQ,GAAG,UAAS,IAA0H;IACjJ,IAAI,MAAM,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KAAE;IACpD,QAAQ,GAAG,IAAI,CAAC;AACpB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/random.d.ts b/lib.esm/crypto/random.d.ts
deleted file mode 100644
index fd937800..00000000
--- a/lib.esm/crypto/random.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Return %%length%% bytes of cryptographically secure random data.
- *
- * @example:
- * randomBytes(8)
- * //_result:
- */
-export declare function randomBytes(length: number): Uint8Array;
-export declare namespace randomBytes {
- var _: (length: number) => Uint8Array;
- var lock: () => void;
- var register: (func: (length: number) => Uint8Array) => void;
-}
-//# sourceMappingURL=random.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/random.d.ts.map b/lib.esm/crypto/random.d.ts.map
deleted file mode 100644
index a907fd7e..00000000
--- a/lib.esm/crypto/random.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/random.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAEtD;yBAFe,WAAW"}
\ No newline at end of file
diff --git a/lib.esm/crypto/random.js b/lib.esm/crypto/random.js
deleted file mode 100644
index 206a822f..00000000
--- a/lib.esm/crypto/random.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * A **Cryptographically Secure Random Value** is one that has been
- * generated with additional care take to prevent side-channels
- * from allowing others to detect it and prevent others from through
- * coincidence generate the same values.
- *
- * @_subsection: api/crypto:Random Values [about-crypto-random]
- */
-import { randomBytes as crypto_random } from "./crypto.js";
-let locked = false;
-const _randomBytes = function (length) {
- return new Uint8Array(crypto_random(length));
-};
-let __randomBytes = _randomBytes;
-/**
- * Return %%length%% bytes of cryptographically secure random data.
- *
- * @example:
- * randomBytes(8)
- * //_result:
- */
-export function randomBytes(length) {
- return __randomBytes(length);
-}
-randomBytes._ = _randomBytes;
-randomBytes.lock = function () { locked = true; };
-randomBytes.register = function (func) {
- if (locked) {
- throw new Error("randomBytes is locked");
- }
- __randomBytes = func;
-};
-Object.freeze(randomBytes);
-//# sourceMappingURL=random.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/random.js.map b/lib.esm/crypto/random.js.map
deleted file mode 100644
index f857d174..00000000
--- a/lib.esm/crypto/random.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"random.js","sourceRoot":"","sources":["../../src.ts/crypto/random.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,YAAY,GAAG,UAAS,MAAc;IACxC,OAAO,IAAI,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;AACjD,CAAC,CAAA;AAED,IAAI,aAAa,GAAG,YAAY,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACtC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC;AAC7B,WAAW,CAAC,IAAI,GAAG,cAAmB,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACtD,WAAW,CAAC,QAAQ,GAAG,UAAS,IAAoC;IAChE,IAAI,MAAM,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;KAAE;IACzD,aAAa,GAAG,IAAI,CAAC;AACzB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/ripemd160.d.ts b/lib.esm/crypto/ripemd160.d.ts
deleted file mode 100644
index 27b7b4a1..00000000
--- a/lib.esm/crypto/ripemd160.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { BytesLike } from "../utils/index.js";
-/**
- * Compute the cryptographic RIPEMD-160 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * ripemd160("0x")
- * //_result:
- *
- * ripemd160("0x1337")
- * //_result:
- *
- * ripemd160(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- */
-export declare function ripemd160(_data: BytesLike): string;
-export declare namespace ripemd160 {
- var _: (data: Uint8Array) => Uint8Array;
- var lock: () => void;
- var register: (func: (data: Uint8Array) => BytesLike) => void;
-}
-//# sourceMappingURL=ripemd160.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/ripemd160.d.ts.map b/lib.esm/crypto/ripemd160.d.ts.map
deleted file mode 100644
index 03f10806..00000000
--- a/lib.esm/crypto/ripemd160.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"ripemd160.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/ripemd160.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAWnD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAGlD;yBAHe,SAAS"}
\ No newline at end of file
diff --git a/lib.esm/crypto/ripemd160.js b/lib.esm/crypto/ripemd160.js
deleted file mode 100644
index b305569e..00000000
--- a/lib.esm/crypto/ripemd160.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { ripemd160 as noble_ripemd160 } from "@noble/hashes/ripemd160";
-import { getBytes, hexlify } from "../utils/index.js";
-let locked = false;
-const _ripemd160 = function (data) {
- return noble_ripemd160(data);
-};
-let __ripemd160 = _ripemd160;
-/**
- * Compute the cryptographic RIPEMD-160 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * ripemd160("0x")
- * //_result:
- *
- * ripemd160("0x1337")
- * //_result:
- *
- * ripemd160(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- */
-export function ripemd160(_data) {
- const data = getBytes(_data, "data");
- return hexlify(__ripemd160(data));
-}
-ripemd160._ = _ripemd160;
-ripemd160.lock = function () { locked = true; };
-ripemd160.register = function (func) {
- if (locked) {
- throw new TypeError("ripemd160 is locked");
- }
- __ripemd160 = func;
-};
-Object.freeze(ripemd160);
-//# sourceMappingURL=ripemd160.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/ripemd160.js.map b/lib.esm/crypto/ripemd160.js.map
deleted file mode 100644
index f9961fe3..00000000
--- a/lib.esm/crypto/ripemd160.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"ripemd160.js","sourceRoot":"","sources":["../../src.ts/crypto/ripemd160.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAG,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKvD,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,MAAM,UAAU,GAAG,UAAS,IAAgB;IACxC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC,CAAA;AAED,IAAI,WAAW,GAAoC,UAAU,CAAC;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAgB;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AACtC,CAAC;AACD,SAAS,CAAC,CAAC,GAAG,UAAU,CAAC;AACzB,SAAS,CAAC,IAAI,GAAG,cAAmB,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACpD,SAAS,CAAC,QAAQ,GAAG,UAAS,IAAqC;IAC/D,IAAI,MAAM,EAAE;QAAE,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;KAAE;IAC3D,WAAW,GAAG,IAAI,CAAC;AACvB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/scrypt.d.ts b/lib.esm/crypto/scrypt.d.ts
deleted file mode 100644
index b0e678f5..00000000
--- a/lib.esm/crypto/scrypt.d.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import type { BytesLike } from "../utils/index.js";
-/**
- * A callback during long-running operations to update any
- * UI or provide programatic access to the progress.
- *
- * The %%percent%% is a value between ``0`` and ``1``.
- *
- * @_docloc: api/crypto:Passwords
- */
-export type ProgressCallback = (percent: number) => void;
-/**
- * The [[link-wiki-scrypt]] uses a memory and cpu hard method of
- * derivation to increase the resource cost to brute-force a password
- * for a given key.
- *
- * This means this algorithm is intentionally slow, and can be tuned to
- * become slower. As computation and memory speed improve over time,
- * increasing the difficulty maintains the cost of an attacker.
- *
- * For example, if a target time of 5 seconds is used, a legitimate user
- * which knows their password requires only 5 seconds to unlock their
- * account. A 6 character password has 68 billion possibilities, which
- * would require an attacker to invest over 10,000 years of CPU time. This
- * is of course a crude example (as password generally aren't random),
- * but demonstrates to value of imposing large costs to decryption.
- *
- * For this reason, if building a UI which involved decrypting or
- * encrypting datsa using scrypt, it is recommended to use a
- * [[ProgressCallback]] (as event short periods can seem lik an eternity
- * if the UI freezes). Including the phrase //"decrypting"// in the UI
- * can also help, assuring the user their waiting is for a good reason.
- *
- * @_docloc: api/crypto:Passwords
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the scrypt
- * scrypt(passwordBytes, salt, 1024, 8, 1, 16)
- * //_result:
- */
-export declare function scrypt(_passwd: BytesLike, _salt: BytesLike, N: number, r: number, p: number, dkLen: number, progress?: ProgressCallback): Promise;
-export declare namespace scrypt {
- var _: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, onProgress?: ProgressCallback | undefined) => Promise;
- var lock: () => void;
- var register: (func: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, progress?: ProgressCallback | undefined) => Promise) => void;
-}
-/**
- * Provides a synchronous variant of [[scrypt]].
- *
- * This will completely lock up and freeze the UI in a browser and will
- * prevent any event loop from progressing. For this reason, it is
- * preferred to use the [async variant](scrypt).
- *
- * @_docloc: api/crypto:Passwords
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the scrypt
- * scryptSync(passwordBytes, salt, 1024, 8, 1, 16)
- * //_result:
- */
-export declare function scryptSync(_passwd: BytesLike, _salt: BytesLike, N: number, r: number, p: number, dkLen: number): string;
-export declare namespace scryptSync {
- var _: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number) => Uint8Array;
- var lock: () => void;
- var register: (func: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number) => BytesLike) => void;
-}
-//# sourceMappingURL=scrypt.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/scrypt.d.ts.map b/lib.esm/crypto/scrypt.d.ts.map
deleted file mode 100644
index af193f1a..00000000
--- a/lib.esm/crypto/scrypt.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"scrypt.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/scrypt.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAgBzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAI/J;yBAJqB,MAAM;;;;;AAa5B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIvH;yBAJe,UAAU"}
\ No newline at end of file
diff --git a/lib.esm/crypto/scrypt.js b/lib.esm/crypto/scrypt.js
deleted file mode 100644
index 61cad403..00000000
--- a/lib.esm/crypto/scrypt.js
+++ /dev/null
@@ -1,99 +0,0 @@
-import { scrypt as _nobleSync, scryptAsync as _nobleAsync } from "@noble/hashes/scrypt";
-import { getBytes, hexlify as H } from "../utils/index.js";
-let lockedSync = false, lockedAsync = false;
-const _scryptAsync = async function (passwd, salt, N, r, p, dkLen, onProgress) {
- return await _nobleAsync(passwd, salt, { N, r, p, dkLen, onProgress });
-};
-const _scryptSync = function (passwd, salt, N, r, p, dkLen) {
- return _nobleSync(passwd, salt, { N, r, p, dkLen });
-};
-let __scryptAsync = _scryptAsync;
-let __scryptSync = _scryptSync;
-/**
- * The [[link-wiki-scrypt]] uses a memory and cpu hard method of
- * derivation to increase the resource cost to brute-force a password
- * for a given key.
- *
- * This means this algorithm is intentionally slow, and can be tuned to
- * become slower. As computation and memory speed improve over time,
- * increasing the difficulty maintains the cost of an attacker.
- *
- * For example, if a target time of 5 seconds is used, a legitimate user
- * which knows their password requires only 5 seconds to unlock their
- * account. A 6 character password has 68 billion possibilities, which
- * would require an attacker to invest over 10,000 years of CPU time. This
- * is of course a crude example (as password generally aren't random),
- * but demonstrates to value of imposing large costs to decryption.
- *
- * For this reason, if building a UI which involved decrypting or
- * encrypting datsa using scrypt, it is recommended to use a
- * [[ProgressCallback]] (as event short periods can seem lik an eternity
- * if the UI freezes). Including the phrase //"decrypting"// in the UI
- * can also help, assuring the user their waiting is for a good reason.
- *
- * @_docloc: api/crypto:Passwords
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the scrypt
- * scrypt(passwordBytes, salt, 1024, 8, 1, 16)
- * //_result:
- */
-export async function scrypt(_passwd, _salt, N, r, p, dkLen, progress) {
- const passwd = getBytes(_passwd, "passwd");
- const salt = getBytes(_salt, "salt");
- return H(await __scryptAsync(passwd, salt, N, r, p, dkLen, progress));
-}
-scrypt._ = _scryptAsync;
-scrypt.lock = function () { lockedAsync = true; };
-scrypt.register = function (func) {
- if (lockedAsync) {
- throw new Error("scrypt is locked");
- }
- __scryptAsync = func;
-};
-Object.freeze(scrypt);
-/**
- * Provides a synchronous variant of [[scrypt]].
- *
- * This will completely lock up and freeze the UI in a browser and will
- * prevent any event loop from progressing. For this reason, it is
- * preferred to use the [async variant](scrypt).
- *
- * @_docloc: api/crypto:Passwords
- *
- * @example:
- * // The password must be converted to bytes, and it is generally
- * // best practices to ensure the string has been normalized. Many
- * // formats explicitly indicate the normalization form to use.
- * password = "hello"
- * passwordBytes = toUtf8Bytes(password, "NFKC")
- *
- * salt = id("some-salt")
- *
- * // Compute the scrypt
- * scryptSync(passwordBytes, salt, 1024, 8, 1, 16)
- * //_result:
- */
-export function scryptSync(_passwd, _salt, N, r, p, dkLen) {
- const passwd = getBytes(_passwd, "passwd");
- const salt = getBytes(_salt, "salt");
- return H(__scryptSync(passwd, salt, N, r, p, dkLen));
-}
-scryptSync._ = _scryptSync;
-scryptSync.lock = function () { lockedSync = true; };
-scryptSync.register = function (func) {
- if (lockedSync) {
- throw new Error("scryptSync is locked");
- }
- __scryptSync = func;
-};
-Object.freeze(scryptSync);
-//# sourceMappingURL=scrypt.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/scrypt.js.map b/lib.esm/crypto/scrypt.js.map
deleted file mode 100644
index 49df708d..00000000
--- a/lib.esm/crypto/scrypt.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"scrypt.js","sourceRoot":"","sources":["../../src.ts/crypto/scrypt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,WAAW,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAe3D,IAAI,UAAU,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,CAAC;AAE5C,MAAM,YAAY,GAAG,KAAK,WAAU,MAAkB,EAAE,IAAgB,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,UAA6B;IACnJ,OAAO,MAAM,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAA;AACD,MAAM,WAAW,GAAG,UAAS,MAAkB,EAAE,IAAgB,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,KAAa;IAC7G,OAAO,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,C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CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC;AACD,UAAU,CAAC,CAAC,GAAG,WAAW,CAAC;AAC3B,UAAU,CAAC,IAAI,GAAG,cAAmB,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACzD,UAAU,CAAC,QAAQ,GAAG,UAAS,IAAyG;IACpI,IAAI,UAAU,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAAE;IAC5D,YAAY,GAAG,IAAI,CAAC;AACxB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/sha2.d.ts b/lib.esm/crypto/sha2.d.ts
deleted file mode 100644
index 348ccdc7..00000000
--- a/lib.esm/crypto/sha2.d.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import type { BytesLike } from "../utils/index.js";
-/**
- * Compute the cryptographic SHA2-256 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * sha256("0x")
- * //_result:
- *
- * sha256("0x1337")
- * //_result:
- *
- * sha256(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- */
-export declare function sha256(_data: BytesLike): string;
-export declare namespace sha256 {
- var _: (data: Uint8Array) => Uint8Array;
- var lock: () => void;
- var register: (func: (data: Uint8Array) => BytesLike) => void;
-}
-/**
- * Compute the cryptographic SHA2-512 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * sha512("0x")
- * //_result:
- *
- * sha512("0x1337")
- * //_result:
- *
- * sha512(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- */
-export declare function sha512(_data: BytesLike): string;
-export declare namespace sha512 {
- var _: (data: Uint8Array) => Uint8Array;
- var lock: () => void;
- var register: (func: (data: Uint8Array) => BytesLike) => void;
-}
-//# sourceMappingURL=sha2.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/sha2.d.ts.map b/lib.esm/crypto/sha2.d.ts.map
deleted file mode 100644
index 9e42678e..00000000
--- a/lib.esm/crypto/sha2.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"sha2.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/sha2.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAiBnD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAG/C;yBAHe,MAAM;;;;;AAatB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAG/C;yBAHe,MAAM"}
\ No newline at end of file
diff --git a/lib.esm/crypto/sha2.js b/lib.esm/crypto/sha2.js
deleted file mode 100644
index f84145b4..00000000
--- a/lib.esm/crypto/sha2.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import { createHash } from "./crypto.js";
-import { getBytes, hexlify } from "../utils/index.js";
-const _sha256 = function (data) {
- return createHash("sha256").update(data).digest();
-};
-const _sha512 = function (data) {
- return createHash("sha512").update(data).digest();
-};
-let __sha256 = _sha256;
-let __sha512 = _sha512;
-let locked256 = false, locked512 = false;
-/**
- * Compute the cryptographic SHA2-256 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * sha256("0x")
- * //_result:
- *
- * sha256("0x1337")
- * //_result:
- *
- * sha256(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- *
- */
-export function sha256(_data) {
- const data = getBytes(_data, "data");
- return hexlify(__sha256(data));
-}
-sha256._ = _sha256;
-sha256.lock = function () { locked256 = true; };
-sha256.register = function (func) {
- if (locked256) {
- throw new Error("sha256 is locked");
- }
- __sha256 = func;
-};
-Object.freeze(sha256);
-/**
- * Compute the cryptographic SHA2-512 hash of %%data%%.
- *
- * @_docloc: api/crypto:Hash Functions
- * @returns DataHexstring
- *
- * @example:
- * sha512("0x")
- * //_result:
- *
- * sha512("0x1337")
- * //_result:
- *
- * sha512(new Uint8Array([ 0x13, 0x37 ]))
- * //_result:
- */
-export function sha512(_data) {
- const data = getBytes(_data, "data");
- return hexlify(__sha512(data));
-}
-sha512._ = _sha512;
-sha512.lock = function () { locked512 = true; };
-sha512.register = function (func) {
- if (locked512) {
- throw new Error("sha512 is locked");
- }
- __sha512 = func;
-};
-Object.freeze(sha256);
-//# sourceMappingURL=sha2.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/sha2.js.map b/lib.esm/crypto/sha2.js.map
deleted file mode 100644
index 674e5889..00000000
--- a/lib.esm/crypto/sha2.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"sha2.js","sourceRoot":"","sources":["../../src.ts/crypto/sha2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKtD,MAAM,OAAO,GAAG,UAAS,IAAgB;IACrC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AACtD,CAAC,CAAA;AAED,MAAM,OAAO,GAAG,UAAS,IAAgB;IACrC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AACtD,CAAC,CAAA;AAED,IAAI,QAAQ,GAAoC,OAAO,CAAC;AACxD,IAAI,QAAQ,GAAoC,OAAO,CAAC;AAExD,IAAI,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC;AAGzC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,MAAM,CAAC,KAAgB;IACnC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACnC,CAAC;AACD,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC;AACnB,MAAM,CAAC,IAAI,GAAG,cAAmB,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACpD,MAAM,CAAC,QAAQ,GAAG,UAAS,IAAqC;IAC5D,IAAI,SAAS,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KAAE;IACvD,QAAQ,GAAG,IAAI,CAAC;AACpB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAGtB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,MAAM,CAAC,KAAgB;IACnC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACnC,CAAC;AACD,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC;AACnB,MAAM,CAAC,IAAI,GAAG,cAAmB,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AACpD,MAAM,CAAC,QAAQ,GAAG,UAAS,IAAqC;IAC5D,IAAI,SAAS,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KAAE;IACvD,QAAQ,GAAG,IAAI,CAAC;AACpB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/crypto/signature.d.ts b/lib.esm/crypto/signature.d.ts
deleted file mode 100644
index 8cfe9666..00000000
--- a/lib.esm/crypto/signature.d.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import type { BigNumberish, BytesLike } from "../utils/index.js";
-/**
- * A SignatureLike
- *
- * @_docloc: api/crypto:Signing
- */
-export type SignatureLike = Signature | string | {
- r: string;
- s: string;
- v: BigNumberish;
- yParity?: 0 | 1;
- yParityAndS?: string;
-} | {
- r: string;
- yParityAndS: string;
- yParity?: 0 | 1;
- s?: string;
- v?: number;
-} | {
- r: string;
- s: string;
- yParity: 0 | 1;
- v?: BigNumberish;
- yParityAndS?: string;
-};
-/**
- * A Signature @TODO
- *
- *
- * @_docloc: api/crypto:Signing
- */
-export declare class Signature {
- #private;
- /**
- * The ``r`` value for a signautre.
- *
- * This represents the ``x`` coordinate of a "reference" or
- * challenge point, from which the ``y`` can be computed.
- */
- get r(): string;
- set r(value: BytesLike);
- /**
- * The ``s`` value for a signature.
- */
- get s(): string;
- set s(_value: BytesLike);
- /**
- * The ``v`` value for a signature.
- *
- * Since a given ``x`` value for ``r`` has two possible values for
- * its correspondin ``y``, the ``v`` indicates which of the two ``y``
- * values to use.
- *
- * It is normalized to the values ``27`` or ``28`` for legacy
- * purposes.
- */
- get v(): 27 | 28;
- set v(value: BigNumberish);
- /**
- * The EIP-155 ``v`` for legacy transactions. For non-legacy
- * transactions, this value is ``null``.
- */
- get networkV(): null | bigint;
- /**
- * The chain ID for EIP-155 legacy transactions. For non-legacy
- * transactions, this value is ``null``.
- */
- get legacyChainId(): null | bigint;
- /**
- * The ``yParity`` for the signature.
- *
- * See ``v`` for more details on how this value is used.
- */
- get yParity(): 0 | 1;
- /**
- * The [[link-eip-2098]] compact representation of the ``yParity``
- * and ``s`` compacted into a single ``bytes32``.
- */
- get yParityAndS(): string;
- /**
- * The [[link-eip-2098]] compact representation.
- */
- get compactSerialized(): string;
- /**
- * The serialized representation.
- */
- get serialized(): string;
- /**
- * @private
- */
- constructor(guard: any, r: string, s: string, v: 27 | 28);
- /**
- * Returns a new identical [[Signature]].
- */
- clone(): Signature;
- /**
- * Returns a representation that is compatible with ``JSON.stringify``.
- */
- toJSON(): any;
- /**
- * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.
- *
- * @example:
- * Signature.getChainId(45)
- * //_result:
- *
- * Signature.getChainId(46)
- * //_result:
- */
- static getChainId(v: BigNumberish): bigint;
- /**
- * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.
- *
- * Legacy transactions which use [[link-eip-155]] hijack the ``v``
- * property to include the chain ID.
- *
- * @example:
- * Signature.getChainIdV(5, 27)
- * //_result:
- *
- * Signature.getChainIdV(5, 28)
- * //_result:
- *
- */
- static getChainIdV(chainId: BigNumberish, v: 27 | 28): bigint;
- /**
- * Compute the normalized legacy transaction ``v`` from a ``yParirty``,
- * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.
- *
- * @example:
- * // The values 0 and 1 imply v is actually yParity
- * Signature.getNormalizedV(0)
- * //_result:
- *
- * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)
- * Signature.getNormalizedV(27)
- * //_result:
- *
- * // Legacy EIP-155 transaction (i.e. >= 35)
- * Signature.getNormalizedV(46)
- * //_result:
- *
- * // Invalid values throw
- * Signature.getNormalizedV(5)
- * //_error:
- */
- static getNormalizedV(v: BigNumberish): 27 | 28;
- /**
- * Creates a new [[Signature]].
- *
- * If no %%sig%% is provided, a new [[Signature]] is created
- * with default values.
- *
- * If %%sig%% is a string, it is parsed.
- */
- static from(sig?: SignatureLike): Signature;
-}
-//# sourceMappingURL=signature.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/signature.d.ts.map b/lib.esm/crypto/signature.d.ts.map
deleted file mode 100644
index a049cf5e..00000000
--- a/lib.esm/crypto/signature.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/signature.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,YAAY,EAAE,SAAS,EAC1B,MAAM,mBAAmB,CAAC;AAgB3B;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG;IAC7C,CAAC,EAAE,MA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G;gBACS,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE;IAYxD;;OAEG;IACH,KAAK,IAAI,SAAS;IAMlB;;OAEG;IACH,MAAM,IAAI,GAAG;IASb;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM;IAY1C;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,MAAM;IAI7D;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,YAAY,GAAG,EAAE,GAAG,EAAE;IAY/C;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,GAAG,SAAS;CAuF9C"}
\ No newline at end of file
diff --git a/lib.esm/crypto/signature.js b/lib.esm/crypto/signature.js
deleted file mode 100644
index 5e91b7b6..00000000
--- a/lib.esm/crypto/signature.js
+++ /dev/null
@@ -1,301 +0,0 @@
-import { ZeroHash } from "../constants/index.js";
-import { concat, dataLength, getBigInt, getBytes, getNumber, hexlify, toBeArray, isHexString, zeroPadValue, assertArgument, assertPrivate } from "../utils/index.js";
-// Constants
-const BN_0 = BigInt(0);
-const BN_1 = BigInt(1);
-const BN_2 = BigInt(2);
-const BN_27 = BigInt(27);
-const BN_28 = BigInt(28);
-const BN_35 = BigInt(35);
-const _guard = {};
-function toUint256(value) {
- return zeroPadValue(toBeArray(value), 32);
-}
-/**
- * A Signature @TODO
- *
- *
- * @_docloc: api/crypto:Signing
- */
-export class Signature {
- #r;
- #s;
- #v;
- #networkV;
- /**
- * The ``r`` value for a signautre.
- *
- * This represents the ``x`` coordinate of a "reference" or
- * challenge point, from which the ``y`` can be computed.
- */
- get r() { return this.#r; }
- set r(value) {
- assertArgument(dataLength(value) === 32, "invalid r", "value", value);
- this.#r = hexlify(value);
- }
- /**
- * The ``s`` value for a signature.
- */
- get s() { return this.#s; }
- set s(_value) {
- assertArgument(dataLength(_value) === 32, "invalid s", "value", _value);
- const value = hexlify(_value);
- assertArgument(parseInt(value.substring(0, 3)) < 8, "non-canonical s", "value", value);
- this.#s = value;
- }
- /**
- * The ``v`` value for a signature.
- *
- * Since a given ``x`` value for ``r`` has two possible values for
- * its correspondin ``y``, the ``v`` indicates which of the two ``y``
- * values to use.
- *
- * It is normalized to the values ``27`` or ``28`` for legacy
- * purposes.
- */
- get v() { return this.#v; }
- set v(value) {
- const v = getNumber(value, "value");
- assertArgument(v === 27 || v === 28, "invalid v", "v", value);
- this.#v = v;
- }
- /**
- * The EIP-155 ``v`` for legacy transactions. For non-legacy
- * transactions, this value is ``null``.
- */
- get networkV() { return this.#networkV; }
- /**
- * The chain ID for EIP-155 legacy transactions. For non-legacy
- * transactions, this value is ``null``.
- */
- get legacyChainId() {
- const v = this.networkV;
- if (v == null) {
- return null;
- }
- return Signature.getChainId(v);
- }
- /**
- * The ``yParity`` for the signature.
- *
- * See ``v`` for more details on how this value is used.
- */
- get yParity() {
- return (this.v === 27) ? 0 : 1;
- }
- /**
- * The [[link-eip-2098]] compact representation of the ``yParity``
- * and ``s`` compacted into a single ``bytes32``.
- */
- get yParityAndS() {
- // The EIP-2098 compact representation
- const yParityAndS = getBytes(this.s);
- if (this.yParity) {
- yParityAndS[0] |= 0x80;
- }
- return hexlify(yParityAndS);
- }
- /**
- * The [[link-eip-2098]] compact representation.
- */
- get compactSerialized() {
- return concat([this.r, this.yParityAndS]);
- }
- /**
- * The serialized representation.
- */
- get serialized() {
- return concat([this.r, this.s, (this.yParity ? "0x1c" : "0x1b")]);
- }
- /**
- * @private
- */
- constructor(guard, r, s, v) {
- assertPrivate(guard, _guard, "Signature");
- this.#r = r;
- this.#s = s;
- this.#v = v;
- this.#networkV = null;
- }
- [Symbol.for('nodejs.util.inspect.custom')]() {
- return `Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`;
- }
- /**
- * Returns a new identical [[Signature]].
- */
- clone() {
- const clone = new Signature(_guard, this.r, this.s, this.v);
- if (this.networkV) {
- clone.#networkV = this.networkV;
- }
- return clone;
- }
- /**
- * Returns a representation that is compatible with ``JSON.stringify``.
- */
- toJSON() {
- const networkV = this.networkV;
- return {
- _type: "signature",
- networkV: ((networkV != null) ? networkV.toString() : null),
- r: this.r, s: this.s, v: this.v,
- };
- }
- /**
- * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.
- *
- * @example:
- * Signature.getChainId(45)
- * //_result:
- *
- * Signature.getChainId(46)
- * //_result:
- */
- static getChainId(v) {
- const bv = getBigInt(v, "v");
- // The v is not an EIP-155 v, so it is the unspecified chain ID
- if ((bv == BN_27) || (bv == BN_28)) {
- return BN_0;
- }
- // Bad value for an EIP-155 v
- assertArgument(bv >= BN_35, "invalid EIP-155 v", "v", v);
- return (bv - BN_35) / BN_2;
- }
- /**
- * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.
- *
- * Legacy transactions which use [[link-eip-155]] hijack the ``v``
- * property to include the chain ID.
- *
- * @example:
- * Signature.getChainIdV(5, 27)
- * //_result:
- *
- * Signature.getChainIdV(5, 28)
- * //_result:
- *
- */
- static getChainIdV(chainId, v) {
- return (getBigInt(chainId) * BN_2) + BigInt(35 + v - 27);
- }
- /**
- * Compute the normalized legacy transaction ``v`` from a ``yParirty``,
- * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.
- *
- * @example:
- * // The values 0 and 1 imply v is actually yParity
- * Signature.getNormalizedV(0)
- * //_result:
- *
- * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)
- * Signature.getNormalizedV(27)
- * //_result:
- *
- * // Legacy EIP-155 transaction (i.e. >= 35)
- * Signature.getNormalizedV(46)
- * //_result:
- *
- * // Invalid values throw
- * Signature.getNormalizedV(5)
- * //_error:
- */
- static getNormalizedV(v) {
- const bv = getBigInt(v);
- if (bv === BN_0 || bv === BN_27) {
- return 27;
- }
- if (bv === BN_1 || bv === BN_28) {
- return 28;
- }
- assertArgument(bv >= BN_35, "invalid v", "v", v);
- // Otherwise, EIP-155 v means odd is 27 and even is 28
- return (bv & BN_1) ? 27 : 28;
- }
- /**
- * Creates a new [[Signature]].
- *
- * If no %%sig%% is provided, a new [[Signature]] is created
- * with default values.
- *
- * If %%sig%% is a string, it is parsed.
- */
- static from(sig) {
- function assertError(check, message) {
- assertArgument(check, message, "signature", sig);
- }
- ;
- if (sig == null) {
- return new Signature(_guard, ZeroHash, ZeroHash, 27);
- }
- if (typeof (sig) === "string") {
- const bytes = getBytes(sig, "signature");
- if (bytes.length === 64) {
- const r = hexlify(bytes.slice(0, 32));
- const s = bytes.slice(32, 64);
- const v = (s[0] & 0x80) ? 28 : 27;
- s[0] &= 0x7f;
- return new Signature(_guard, r, hexlify(s), v);
- }
- if (bytes.length === 65) {
- const r = hexlify(bytes.slice(0, 32));
- const s = bytes.slice(32, 64);
- assertError((s[0] & 0x80) === 0, "non-canonical s");
- const v = Signature.getNormalizedV(bytes[64]);
- return new Signature(_guard, r, hexlify(s), v);
- }
- assertError(false, "invalid raw signature length");
- }
- if (sig instanceof Signature) {
- return sig.clone();
- }
- // Get r
- const _r = sig.r;
- assertError(_r != null, "missing r");
- const r = toUint256(_r);
- // Get s; by any means necessary (we check consistency below)
- const s = (function (s, yParityAndS) {
- if (s != null) {
- return toUint256(s);
- }
- if (yParityAndS != null) {
- assertError(isHexString(yParityAndS, 32), "invalid yParityAndS");
- const bytes = getBytes(yParityAndS);
- bytes[0] &= 0x7f;
- return hexlify(bytes);
- }
- assertError(false, "missing s");
- })(sig.s, sig.yParityAndS);
- assertError((getBytes(s)[0] & 0x80) == 0, "non-canonical s");
- // Get v; by any means necessary (we check consistency below)
- const { networkV, v } = (function (_v, yParityAndS, yParity) {
- if (_v != null) {
- const v = getBigInt(_v);
- return {
- networkV: ((v >= BN_35) ? v : undefined),
- v: Signature.getNormalizedV(v)
- };
- }
- if (yParityAndS != null) {
- assertError(isHexString(yParityAndS, 32), "invalid yParityAndS");
- return { v: ((getBytes(yParityAndS)[0] & 0x80) ? 28 : 27) };
- }
- if (yParity != null) {
- switch (yParity) {
- case 0: return { v: 27 };
- case 1: return { v: 28 };
- }
- assertError(false, "invalid yParity");
- }
- assertError(false, "missing v");
- })(sig.v, sig.yParityAndS, sig.yParity);
- const result = new Signature(_guard, r, s, v);
- if (networkV) {
- result.#networkV = networkV;
- }
- // If multiple of v, yParity, yParityAndS we given, check they match
- assertError(!("yParity" in sig && sig.yParity !== result.yParity), "yParity mismatch");
- assertError(!("yParityAndS" in sig && sig.yParityAndS !== result.yParityAndS), "yParityAndS mismatch");
- return result;
- }
-}
-//# sourceMappingURL=signature.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/signature.js.map b/lib.esm/crypto/signature.js.map
deleted file mode 100644
index f11a5bd2..00000000
--- a/lib.esm/crypto/signature.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../src.ts/crypto/signature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACH,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAC3D,SAAS,EAAE,WAAW,EAAE,YAAY,EACpC,cAAc,EAAE,aAAa,EAChC,MAAM,mBAAmB,CAAC;AAO3B,YAAY;AACZ,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AACzB,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AACzB,MA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OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC;QACvF,WAAW,CAAC,CAAC,CAAC,aAAa,IAAI,GAAG,IAAI,GAAG,CAAC,WAAW,KAAK,MAAM,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC,CAAC;QAEvG,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/crypto/signing-key.d.ts b/lib.esm/crypto/signing-key.d.ts
deleted file mode 100644
index 0864d3b8..00000000
--- a/lib.esm/crypto/signing-key.d.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Add details about signing here.
- *
- * @_subsection: api/crypto:Signing [about-signing]
- */
-import { Signature } from "./signature.js";
-import type { BytesLike } from "../utils/index.js";
-import type { SignatureLike } from "./index.js";
-/**
- * A **SigningKey** provides high-level access to the elliptic curve
- * cryptography (ECC) operations and key management.
- */
-export declare class SigningKey {
- #private;
- /**
- * Creates a new **SigningKey** for %%privateKey%%.
- */
- constructor(privateKey: BytesLike);
- /**
- * The private key.
- */
- get privateKey(): string;
- /**
- * The uncompressed public key.
- *
- * This will always begin with the prefix ``0x04`` and be 132
- * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).
- */
- get publicKey(): string;
- /**
- * The compressed public key.
- *
- * This will always begin with either the prefix ``0x02`` or ``0x03``
- * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal
- * nibbles)
- */
- get compressedPublicKey(): string;
- /**
- * Return the signature of the signed %%digest%%.
- */
- sign(digest: BytesLike): Signature;
- /**
- * Returns the [[link-wiki-ecdh]] shared secret between this
- * private key and the %%other%% key.
- *
- * The %%other%% key may be any type of key, a raw public key,
- * a compressed/uncompressed pubic key or aprivate key.
- *
- * Best practice is usually to use a cryptographic hash on the
- * returned value before using it as a symetric secret.
- *
- * @example:
- * sign1 = new SigningKey(id("some-secret-1"))
- * sign2 = new SigningKey(id("some-secret-2"))
- *
- * // Notice that privA.computeSharedSecret(pubB)...
- * sign1.computeSharedSecret(sign2.publicKey)
- * //_result:
- *
- * // ...is equal to privB.computeSharedSecret(pubA).
- * sign2.computeSharedSecret(sign1.publicKey)
- * //_result:
- */
- computeSharedSecret(other: BytesLike): string;
- /**
- * Compute the public key for %%key%%, optionally %%compressed%%.
- *
- * The %%key%% may be any type of key, a raw public key, a
- * compressed/uncompressed public key or private key.
- *
- * @example:
- * sign = new SigningKey(id("some-secret"));
- *
- * // Compute the uncompressed public key for a private key
- * SigningKey.computePublicKey(sign.privateKey)
- * //_result:
- *
- * // Compute the compressed public key for a private key
- * SigningKey.computePublicKey(sign.privateKey, true)
- * //_result:
- *
- * // Compute the uncompressed public key
- * SigningKey.computePublicKey(sign.publicKey, false);
- * //_result:
- *
- * // Compute the Compressed a public key
- * SigningKey.computePublicKey(sign.publicKey, true);
- * //_result:
- */
- static computePublicKey(key: BytesLike, compressed?: boolean): string;
- /**
- * Returns the public key for the private key which produced the
- * %%signature%% for the given %%digest%%.
- *
- * @example:
- * key = new SigningKey(id("some-secret"))
- * digest = id("hello world")
- * sig = key.sign(digest)
- *
- * // Notice the signer public key...
- * key.publicKey
- * //_result:
- *
- * // ...is equal to the recovered public key
- * SigningKey.recoverPublicKey(digest, sig)
- * //_result:
- *
- */
- static recoverPublicKey(digest: BytesLike, signature: SignatureLike): string;
- /**
- * Returns the point resulting from adding the ellipic curve points
- * %%p0%% and %%p1%%.
- *
- * This is not a common function most developers should require, but
- * can be useful for certain privacy-specific techniques.
- *
- * For example, it is used by [[HDNodeWallet]] to compute child
- * addresses from parent public keys and chain codes.
- */
- static addPoints(p0: BytesLike, p1: BytesLike, compressed?: boolean): string;
-}
-//# sourceMappingURL=signing-key.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/crypto/signing-key.d.ts.map b/lib.esm/crypto/signing-key.d.ts.map
deleted file mode 100644
index 6ce11800..00000000
--- a/lib.esm/crypto/signing-key.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"signing-key.d.ts","sourceRoot":"","sources":["../../src.ts/crypto/signing-key.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD;;;GAGG;AACH,qBAAa,UAAU;;IAGnB;;OAEG;gBACS,UAAU,EAAE,SAAS;IAKjC;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,CAA6B;IAErD;;;;;OAKG;IACH,IAAI,SAAS,IAAI,MAAM,CAA0D;IAEjF;;;;;;OAMG;IACH,IAAI,mBAAmB,IAAI,MAAM,CAAgE;IAEjG;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS;IAclC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAK7C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IAqBrE;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM;IAc5E;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;CAK/E"}
\ No newline at end of file
diff --git a/lib.esm/crypto/signing-key.js b/lib.esm/crypto/signing-key.js
deleted file mode 100644
index 36ca61e3..00000000
--- a/lib.esm/crypto/signing-key.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * Add details about signing here.
- *
- * @_subsection: api/crypto:Signing [about-signing]
- */
-import { secp256k1 } from "@noble/curves/secp256k1";
-import { concat, dataLength, getBytes, getBytesCopy, hexlify, toBeHex, assertArgument } from "../utils/index.js";
-import { Signature } from "./signature.js";
-/**
- * A **SigningKey** provides high-level access to the elliptic curve
- * cryptography (ECC) operations and key management.
- */
-export class SigningKey {
- #privateKey;
- /**
- * Creates a new **SigningKey** for %%privateKey%%.
- */
- constructor(privateKey) {
- assertArgument(dataLength(privateKey) === 32, "invalid private key", "privateKey", "[REDACTED]");
- this.#privateKey = hexlify(privateKey);
- }
- /**
- * The private key.
- */
- get privateKey() { return this.#privateKey; }
- /**
- * The uncompressed public key.
- *
- * This will always begin with the prefix ``0x04`` and be 132
- * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).
- */
- get publicKey() { return SigningKey.computePublicKey(this.#privateKey); }
- /**
- * The compressed public key.
- *
- * This will always begin with either the prefix ``0x02`` or ``0x03``
- * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal
- * nibbles)
- */
- get compressedPublicKey() { return SigningKey.computePublicKey(this.#privateKey, true); }
- /**
- * Return the signature of the signed %%digest%%.
- */
- sign(digest) {
- assertArgument(dataLength(digest) === 32, "invalid digest length", "digest", digest);
- const sig = secp256k1.sign(getBytesCopy(digest), getBytesCopy(this.#privateKey), {
- lowS: true
- });
- return Signature.from({
- r: toBeHex("0x" + sig.r.toString(16), 32),
- s: toBeHex("0x" + sig.s.toString(16), 32),
- v: (sig.recovery ? 0x1c : 0x1b)
- });
- }
- /**
- * Returns the [[link-wiki-ecdh]] shared secret between this
- * private key and the %%other%% key.
- *
- * The %%other%% key may be any type of key, a raw public key,
- * a compressed/uncompressed pubic key or aprivate key.
- *
- * Best practice is usually to use a cryptographic hash on the
- * returned value before using it as a symetric secret.
- *
- * @example:
- * sign1 = new SigningKey(id("some-secret-1"))
- * sign2 = new SigningKey(id("some-secret-2"))
- *
- * // Notice that privA.computeSharedSecret(pubB)...
- * sign1.computeSharedSecret(sign2.publicKey)
- * //_result:
- *
- * // ...is equal to privB.computeSharedSecret(pubA).
- * sign2.computeSharedSecret(sign1.publicKey)
- * //_result:
- */
- computeSharedSecret(other) {
- const pubKey = SigningKey.computePublicKey(other);
- return hexlify(secp256k1.getSharedSecret(getBytesCopy(this.#privateKey), getBytes(pubKey), false));
- }
- /**
- * Compute the public key for %%key%%, optionally %%compressed%%.
- *
- * The %%key%% may be any type of key, a raw public key, a
- * compressed/uncompressed public key or private key.
- *
- * @example:
- * sign = new SigningKey(id("some-secret"));
- *
- * // Compute the uncompressed public key for a private key
- * SigningKey.computePublicKey(sign.privateKey)
- * //_result:
- *
- * // Compute the compressed public key for a private key
- * SigningKey.computePublicKey(sign.privateKey, true)
- * //_result:
- *
- * // Compute the uncompressed public key
- * SigningKey.computePublicKey(sign.publicKey, false);
- * //_result:
- *
- * // Compute the Compressed a public key
- * SigningKey.computePublicKey(sign.publicKey, true);
- * //_result:
- */
- static computePublicKey(key, compressed) {
- let bytes = getBytes(key, "key");
- // private key
- if (bytes.length === 32) {
- const pubKey = secp256k1.getPublicKey(bytes, !!compressed);
- return hexlify(pubKey);
- }
- // raw public key; use uncompressed key with 0x04 prefix
- if (bytes.length === 64) {
- const pub = new Uint8Array(65);
- pub[0] = 0x04;
- pub.set(bytes, 1);
- bytes = pub;
- }
- const point = secp256k1.ProjectivePoint.fromHex(bytes);
- return hexlify(point.toRawBytes(compressed));
- }
- /**
- * Returns the public key for the private key which produced the
- * %%signature%% for the given %%digest%%.
- *
- * @example:
- * key = new SigningKey(id("some-secret"))
- * digest = id("hello world")
- * sig = key.sign(digest)
- *
- * // Notice the signer public key...
- * key.publicKey
- * //_result:
- *
- * // ...is equal to the recovered public key
- * SigningKey.recoverPublicKey(digest, sig)
- * //_result:
- *
- */
- static recoverPublicKey(digest, signature) {
- assertArgument(dataLength(digest) === 32, "invalid digest length", "digest", digest);
- const sig = Signature.from(signature);
- let secpSig = secp256k1.Signature.fromCompact(getBytesCopy(concat([sig.r, sig.s])));
- secpSig = secpSig.addRecoveryBit(sig.yParity);
- const pubKey = secpSig.recoverPublicKey(getBytesCopy(digest));
- assertArgument(pubKey != null, "invalid signautre for digest", "signature", signature);
- return "0x" + pubKey.toHex(false);
- }
- /**
- * Returns the point resulting from adding the ellipic curve points
- * %%p0%% and %%p1%%.
- *
- * This is not a common function most developers should require, but
- * can be useful for certain privacy-specific techniques.
- *
- * For example, it is used by [[HDNodeWallet]] to compute child
- * addresses from parent public keys and chain codes.
- */
- static addPoints(p0, p1, compressed) {
- const pub0 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p0).substring(2));
- const pub1 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p1).substring(2));
- return "0x" + pub0.add(pub1).toHex(!!compressed);
- }
-}
-//# sourceMappingURL=signing-key.js.map
\ No newline at end of file
diff --git a/lib.esm/crypto/signing-key.js.map b/lib.esm/crypto/signing-key.js.map
deleted file mode 100644
index 0087baa2..00000000
--- a/lib.esm/crypto/signing-key.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"signing-key.js","sourceRoot":"","sources":["../../src.ts/crypto/signing-key.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EACH,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAC5D,cAAc,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C;;;GAGG;AACH,MAAM,OAAO,UAAU;IACnB,WAAW,CAAS;IAEpB;;OAEG;IACH,YAAY,UAAqB;QAC7B,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;QACjG,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,IAAI,UAAU,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AAC,CAAC;QACtF,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9D,cAAc,CAAC,MAAM,IAAI,IAAI,EAAE,8BAA8B,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QAEvF,OAAO,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,CAAC,EAAa,EAAE,EAAa,EAAE,UAAoB;QAC/D,MAAM,IAAI,GAAG,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,MAAM,IAAI,GAAG,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,OAAO,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;IACpD,CAAC;CACJ"}
\ No newline at end of file
diff --git a/lib.esm/hash/id.d.ts b/lib.esm/hash/id.d.ts
deleted file mode 100644
index 8d5e0579..00000000
--- a/lib.esm/hash/id.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * A simple hashing function which operates on UTF-8 strings to
- * compute an 32-byte identifier.
- *
- * This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes
- * the [[keccak256]].
- *
- * @example:
- * id("hello world")
- * //_result:
- */
-export declare function id(value: string): string;
-//# sourceMappingURL=id.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/id.d.ts.map b/lib.esm/hash/id.d.ts.map
deleted file mode 100644
index 713788d8..00000000
--- a/lib.esm/hash/id.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src.ts/hash/id.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExC"}
\ No newline at end of file
diff --git a/lib.esm/hash/id.js b/lib.esm/hash/id.js
deleted file mode 100644
index 1c0289fb..00000000
--- a/lib.esm/hash/id.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { keccak256 } from "../crypto/index.js";
-import { toUtf8Bytes } from "../utils/index.js";
-/**
- * A simple hashing function which operates on UTF-8 strings to
- * compute an 32-byte identifier.
- *
- * This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes
- * the [[keccak256]].
- *
- * @example:
- * id("hello world")
- * //_result:
- */
-export function id(value) {
- return keccak256(toUtf8Bytes(value));
-}
-//# sourceMappingURL=id.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/id.js.map b/lib.esm/hash/id.js.map
deleted file mode 100644
index 36737c51..00000000
--- a/lib.esm/hash/id.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src.ts/hash/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,EAAE,CAAC,KAAa;IAC5B,OAAO,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AACzC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/index.d.ts b/lib.esm/hash/index.d.ts
deleted file mode 100644
index 0b165fdf..00000000
--- a/lib.esm/hash/index.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Utilities for common tasks involving hashing. Also see
- * [cryptographic hashing](about-crypto-hashing).
- *
- * @_section: api/hashing:Hashing Utilities [about-hashing]
- */
-export { id } from "./id.js";
-export { ensNormalize, isValidName, namehash, dnsEncode } from "./namehash.js";
-export { hashMessage, verifyMessage } from "./message.js";
-export { solidityPacked, solidityPackedKeccak256, solidityPackedSha256 } from "./solidity.js";
-export { TypedDataEncoder, verifyTypedData } from "./typed-data.js";
-export type { TypedDataDomain, TypedDataField } from "./typed-data.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/index.d.ts.map b/lib.esm/hash/index.d.ts.map
deleted file mode 100644
index 1c3368d4..00000000
--- a/lib.esm/hash/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/hash/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACH,cAAc,EAAE,uBAAuB,EAAE,oBAAoB,EAChE,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/index.js b/lib.esm/hash/index.js
deleted file mode 100644
index 99ab2a01..00000000
--- a/lib.esm/hash/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Utilities for common tasks involving hashing. Also see
- * [cryptographic hashing](about-crypto-hashing).
- *
- * @_section: api/hashing:Hashing Utilities [about-hashing]
- */
-export { id } from "./id.js";
-export { ensNormalize, isValidName, namehash, dnsEncode } from "./namehash.js";
-export { hashMessage, verifyMessage } from "./message.js";
-export { solidityPacked, solidityPackedKeccak256, solidityPackedSha256 } from "./solidity.js";
-export { TypedDataEncoder, verifyTypedData } from "./typed-data.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/index.js.map b/lib.esm/hash/index.js.map
deleted file mode 100644
index a7bbd3f5..00000000
--- a/lib.esm/hash/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/hash/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACH,cAAc,EAAE,uBAAuB,EAAE,oBAAoB,EAChE,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/message.d.ts b/lib.esm/hash/message.d.ts
deleted file mode 100644
index 9e088beb..00000000
--- a/lib.esm/hash/message.d.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import type { SignatureLike } from "../crypto/index.js";
-/**
- * Computes the [[link-eip-191]] personal-sign message digest to sign.
- *
- * This prefixes the message with [[MessagePrefix]] and the decimal length
- * of %%message%% and computes the [[keccak256]] digest.
- *
- * If %%message%% is a string, it is converted to its UTF-8 bytes
- * first. To compute the digest of a [[DataHexString]], it must be converted
- * to [bytes](getBytes).
- *
- * @example:
- * hashMessage("Hello World")
- * //_result:
- *
- * // Hashes the SIX (6) string characters, i.e.
- * // [ "0", "x", "4", "2", "4", "3" ]
- * hashMessage("0x4243")
- * //_result:
- *
- * // Hashes the TWO (2) bytes [ 0x42, 0x43 ]...
- * hashMessage(getBytes("0x4243"))
- * //_result:
- *
- * // ...which is equal to using data
- * hashMessage(new Uint8Array([ 0x42, 0x43 ]))
- * //_result:
- *
- */
-export declare function hashMessage(message: Uint8Array | string): string;
-/**
- * Return the address of the private key that produced
- * the signature %%sig%% during signing for %%message%%.
- */
-export declare function verifyMessage(message: Uint8Array | string, sig: SignatureLike): string;
-//# sourceMappingURL=message.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/message.d.ts.map b/lib.esm/hash/message.d.ts.map
deleted file mode 100644
index d57b1223..00000000
--- a/lib.esm/hash/message.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src.ts/hash/message.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAOhE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,MAAM,CAGtF"}
\ No newline at end of file
diff --git a/lib.esm/hash/message.js b/lib.esm/hash/message.js
deleted file mode 100644
index 00c99949..00000000
--- a/lib.esm/hash/message.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import { keccak256 } from "../crypto/index.js";
-import { MessagePrefix } from "../constants/index.js";
-import { recoverAddress } from "../transaction/index.js";
-import { concat, toUtf8Bytes } from "../utils/index.js";
-/**
- * Computes the [[link-eip-191]] personal-sign message digest to sign.
- *
- * This prefixes the message with [[MessagePrefix]] and the decimal length
- * of %%message%% and computes the [[keccak256]] digest.
- *
- * If %%message%% is a string, it is converted to its UTF-8 bytes
- * first. To compute the digest of a [[DataHexString]], it must be converted
- * to [bytes](getBytes).
- *
- * @example:
- * hashMessage("Hello World")
- * //_result:
- *
- * // Hashes the SIX (6) string characters, i.e.
- * // [ "0", "x", "4", "2", "4", "3" ]
- * hashMessage("0x4243")
- * //_result:
- *
- * // Hashes the TWO (2) bytes [ 0x42, 0x43 ]...
- * hashMessage(getBytes("0x4243"))
- * //_result:
- *
- * // ...which is equal to using data
- * hashMessage(new Uint8Array([ 0x42, 0x43 ]))
- * //_result:
- *
- */
-export function hashMessage(message) {
- if (typeof (message) === "string") {
- message = toUtf8Bytes(message);
- }
- return keccak256(concat([
- toUtf8Bytes(MessagePrefix),
- toUtf8Bytes(String(message.length)),
- message
- ]));
-}
-/**
- * Return the address of the private key that produced
- * the signature %%sig%% during signing for %%message%%.
- */
-export function verifyMessage(message, sig) {
- const digest = hashMessage(message);
- return recoverAddress(digest, sig);
-}
-//# sourceMappingURL=message.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/message.js.map b/lib.esm/hash/message.js.map
deleted file mode 100644
index ff2ca461..00000000
--- a/lib.esm/hash/message.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src.ts/hash/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,WAAW,CAAC,OAA4B;IACpD,IAAI,OAAM,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE;QAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;KAAE;IACrE,OAAO,SAAS,CAAC,MAAM,CAAC;QACpB,WAAW,CAAC,aAAa,CAAC;QAC1B,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAA4B,EAAE,GAAkB;IAC1E,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACpC,OAAO,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACvC,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/namehash.d.ts b/lib.esm/hash/namehash.d.ts
deleted file mode 100644
index 1f3937b2..00000000
--- a/lib.esm/hash/namehash.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Returns the ENS %%name%% normalized.
- */
-export declare function ensNormalize(name: string): string;
-/**
- * Returns ``true`` if %%name%% is a valid ENS name.
- */
-export declare function isValidName(name: string): name is string;
-/**
- * Returns the [[link-namehash]] for %%name%%.
- */
-export declare function namehash(name: string): string;
-/**
- * Returns the DNS encoded %%name%%.
- *
- * This is used for various parts of ENS name resolution, such
- * as the wildcard resolution.
- */
-export declare function dnsEncode(name: string): string;
-//# sourceMappingURL=namehash.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/namehash.d.ts.map b/lib.esm/hash/namehash.d.ts.map
deleted file mode 100644
index 5a1a9b43..00000000
--- a/lib.esm/hash/namehash.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}
\ No newline at end of file
diff --git a/lib.esm/hash/namehash.js b/lib.esm/hash/namehash.js
deleted file mode 100644
index b73e2d91..00000000
--- a/lib.esm/hash/namehash.js
+++ /dev/null
@@ -1,85 +0,0 @@
-import { keccak256 } from "../crypto/index.js";
-import { concat, hexlify, assertArgument, toUtf8Bytes } from "../utils/index.js";
-import { ens_normalize } from "@adraffy/ens-normalize";
-const Zeros = new Uint8Array(32);
-Zeros.fill(0);
-function checkComponent(comp) {
- assertArgument(comp.length !== 0, "invalid ENS name; empty component", "comp", comp);
- return comp;
-}
-function ensNameSplit(name) {
- const bytes = toUtf8Bytes(ensNormalize(name));
- const comps = [];
- if (name.length === 0) {
- return comps;
- }
- let last = 0;
- for (let i = 0; i < bytes.length; i++) {
- const d = bytes[i];
- // A separator (i.e. "."); copy this component
- if (d === 0x2e) {
- comps.push(checkComponent(bytes.slice(last, i)));
- last = i + 1;
- }
- }
- // There was a stray separator at the end of the name
- assertArgument(last < bytes.length, "invalid ENS name; empty component", "name", name);
- comps.push(checkComponent(bytes.slice(last)));
- return comps;
-}
-/**
- * Returns the ENS %%name%% normalized.
- */
-export function ensNormalize(name) {
- try {
- if (name.length === 0) {
- throw new Error("empty label");
- }
- return ens_normalize(name);
- }
- catch (error) {
- assertArgument(false, `invalid ENS name (${error.message})`, "name", name);
- }
-}
-/**
- * Returns ``true`` if %%name%% is a valid ENS name.
- */
-export function isValidName(name) {
- try {
- return (ensNameSplit(name).length !== 0);
- }
- catch (error) { }
- return false;
-}
-/**
- * Returns the [[link-namehash]] for %%name%%.
- */
-export function namehash(name) {
- assertArgument(typeof (name) === "string", "invalid ENS name; not a string", "name", name);
- assertArgument(name.length, `invalid ENS name (empty label)`, "name", name);
- let result = Zeros;
- const comps = ensNameSplit(name);
- while (comps.length) {
- result = keccak256(concat([result, keccak256((comps.pop()))]));
- }
- return hexlify(result);
-}
-/**
- * Returns the DNS encoded %%name%%.
- *
- * This is used for various parts of ENS name resolution, such
- * as the wildcard resolution.
- */
-export function dnsEncode(name) {
- return hexlify(concat(ensNameSplit(name).map((comp) => {
- // DNS does not allow components over 63 bytes in length
- if (comp.length > 63) {
- throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");
- }
- const bytes = new Uint8Array(comp.length + 1);
- bytes.set(comp, 1);
- bytes[0] = bytes.length - 1;
- return bytes;
- }))) + "00";
-}
-//# sourceMappingURL=namehash.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/namehash.js.map b/lib.esm/hash/namehash.js.map
deleted file mode 100644
index 350a9f14..00000000
--- a/lib.esm/hash/namehash.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAC/C,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,cAAc,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAG,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IAExC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,E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AC;IAE1F,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,gCAAgC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE5E,IAAI,MAAM,GAAwB,KAAK,CAAC;IAExC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAE,MAAM,EAAE,SAAS,CAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;KAChF;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,OAAO,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,wDAAwD;QACxD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/solidity.d.ts b/lib.esm/hash/solidity.d.ts
deleted file mode 100644
index 9b8035eb..00000000
--- a/lib.esm/hash/solidity.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Computes the [[link-solc-packed]] representation of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPacked([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export declare function solidityPacked(types: ReadonlyArray, values: ReadonlyArray): string;
-/**
- * Computes the [[link-solc-packed]] [[keccak256]] hash of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPackedKeccak256([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export declare function solidityPackedKeccak256(types: ReadonlyArray, values: ReadonlyArray): string;
-/**
- * Computes the [[link-solc-packed]] [[sha256]] hash of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPackedSha256([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export declare function solidityPackedSha256(types: ReadonlyArray, values: ReadonlyArray): string;
-//# sourceMappingURL=solidity.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/solidity.d.ts.map b/lib.esm/hash/solidity.d.ts.map
deleted file mode 100644
index 742707df..00000000
--- a/lib.esm/hash/solidity.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"solidity.d.ts","sourceRoot":"","sources":["../../src.ts/hash/solidity.ts"],"names":[],"mappings":"AAyEA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAQ/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAExG;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAErG"}
\ No newline at end of file
diff --git a/lib.esm/hash/solidity.js b/lib.esm/hash/solidity.js
deleted file mode 100644
index 8d20e54b..00000000
--- a/lib.esm/hash/solidity.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import { getAddress } from "../address/index.js";
-import { keccak256 as _keccak256, sha256 as _sha256 } from "../crypto/index.js";
-import { concat, dataLength, getBytes, hexlify, toBeArray, toTwos, toUtf8Bytes, zeroPadBytes, zeroPadValue, assertArgument } from "../utils/index.js";
-const regexBytes = new RegExp("^bytes([0-9]+)$");
-const regexNumber = new RegExp("^(u?int)([0-9]*)$");
-const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$");
-function _pack(type, value, isArray) {
- switch (type) {
- case "address":
- if (isArray) {
- return getBytes(zeroPadValue(value, 32));
- }
- return getBytes(getAddress(value));
- case "string":
- return toUtf8Bytes(value);
- case "bytes":
- return getBytes(value);
- case "bool":
- value = (!!value ? "0x01" : "0x00");
- if (isArray) {
- return getBytes(zeroPadValue(value, 32));
- }
- return getBytes(value);
- }
- let match = type.match(regexNumber);
- if (match) {
- let signed = (match[1] === "int");
- let size = parseInt(match[2] || "256");
- assertArgument((!match[2] || match[2] === String(size)) && (size % 8 === 0) && size !== 0 && size <= 256, "invalid number type", "type", type);
- if (isArray) {
- size = 256;
- }
- if (signed) {
- value = toTwos(value, size);
- }
- return getBytes(zeroPadValue(toBeArray(value), size / 8));
- }
- match = type.match(regexBytes);
- if (match) {
- const size = parseInt(match[1]);
- assertArgument(String(size) === match[1] && size !== 0 && size <= 32, "invalid bytes type", "type", type);
- assertArgument(dataLength(value) === size, `invalid value for ${type}`, "value", value);
- if (isArray) {
- return getBytes(zeroPadBytes(value, 32));
- }
- return value;
- }
- match = type.match(regexArray);
- if (match && Array.isArray(value)) {
- const baseType = match[1];
- const count = parseInt(match[2] || String(value.length));
- assertArgument(count === value.length, `invalid array length for ${type}`, "value", value);
- const result = [];
- value.forEach(function (value) {
- result.push(_pack(baseType, value, true));
- });
- return getBytes(concat(result));
- }
- assertArgument(false, "invalid type", "type", type);
-}
-// @TODO: Array Enum
-/**
- * Computes the [[link-solc-packed]] representation of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPacked([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export function solidityPacked(types, values) {
- assertArgument(types.length === values.length, "wrong number of values; expected ${ types.length }", "values", values);
- const tight = [];
- types.forEach(function (type, index) {
- tight.push(_pack(type, values[index]));
- });
- return hexlify(concat(tight));
-}
-/**
- * Computes the [[link-solc-packed]] [[keccak256]] hash of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPackedKeccak256([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export function solidityPackedKeccak256(types, values) {
- return _keccak256(solidityPacked(types, values));
-}
-/**
- * Computes the [[link-solc-packed]] [[sha256]] hash of %%values%%
- * respectively to their %%types%%.
- *
- * @example:
- * addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
- * solidityPackedSha256([ "address", "uint" ], [ addr, 45 ]);
- * //_result:
- */
-export function solidityPackedSha256(types, values) {
- return _sha256(solidityPacked(types, values));
-}
-//# sourceMappingURL=solidity.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/solidity.js.map b/lib.esm/hash/solidity.js.map
deleted file mode 100644
index 8b315fde..00000000
--- a/lib.esm/hash/solidity.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"solidity.js","sourceRoot":"","sources":["../../src.ts/hash/solidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACH,SAAS,IAAI,UAAU,EAAE,MAAM,IAAI,OAAO,EAC7C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,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;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B,EAAE,MAA0B;IACzF,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAClD,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/hash/typed-data.d.ts b/lib.esm/hash/typed-data.d.ts
deleted file mode 100644
index def99894..00000000
--- a/lib.esm/hash/typed-data.d.ts
+++ /dev/null
@@ -1,142 +0,0 @@
-import type { SignatureLike } from "../crypto/index.js";
-import type { BigNumberish, BytesLike } from "../utils/index.js";
-/**
- * The domain for an [[link-eip-712]] payload.
- */
-export interface TypedDataDomain {
- /**
- * The human-readable name of the signing domain.
- */
- name?: null | string;
- /**
- * The major version of the signing domain.
- */
- version?: null | string;
- /**
- * The chain ID of the signing domain.
- */
- chainId?: null | BigNumberish;
- /**
- * The the address of the contract that will verify the signature.
- */
- verifyingContract?: null | string;
- /**
- * A salt used for purposes decided by the specific domain.
- */
- salt?: null | BytesLike;
-}
-/**
- * A specific field of a structured [[link-eip-712]] type.
- */
-export interface TypedDataField {
- /**
- * The field name.
- */
- name: string;
- /**
- * The type of the field.
- */
- type: string;
-}
-/**
- * A **TypedDataEncode** prepares and encodes [[link-eip-712]] payloads
- * for signed typed data.
- *
- * This is useful for those that wish to compute various components of a
- * typed data hash, primary types, or sub-components, but generally the
- * higher level [[Signer-signTypedData]] is more useful.
- */
-export declare class TypedDataEncoder {
- #private;
- /**
- * The primary type for the structured [[types]].
- *
- * This is derived automatically from the [[types]], since no
- * recursion is possible, once the DAG for the types is consturcted
- * internally, the primary type must be the only remaining type with
- * no parent nodes.
- */
- readonly primaryType: string;
- /**
- * The types.
- */
- get types(): Record>;
- /**
- * Create a new **TypedDataEncoder** for %%types%%.
- *
- * This performs all necessary checking that types are valid and
- * do not violate the [[link-eip-712]] structural constraints as
- * well as computes the [[primaryType]].
- */
- constructor(types: Record>);
- /**
- * Returnthe encoder for the specific %%type%%.
- */
- getEncoder(type: string): (value: any) => string;
- /**
- * Return the full type for %%name%%.
- */
- encodeType(name: string): string;
- /**
- * Return the encoded %%value%% for the %%type%%.
- */
- encodeData(type: string, value: any): string;
- /**
- * Returns the hash of %%value%% for the type of %%name%%.
- */
- hashStruct(name: string, value: Record): string;
- /**
- * Return the fulled encoded %%value%% for the [[types]].
- */
- encode(value: Record): string;
- /**
- * Return the hash of the fully encoded %%value%% for the [[types]].
- */
- hash(value: Record): string;
- /**
- * @_ignore:
- */
- _visit(type: string, value: any, callback: (type: string, data: any) => any): any;
- /**
- * Call %%calback%% for each value in %%value%%, passing the type and
- * component within %%value%%.
- *
- * This is useful for replacing addresses or other transformation that
- * may be desired on each component, based on its type.
- */
- visit(value: Record, callback: (type: string, data: any) => any): any;
- /**
- * Create a new **TypedDataEncoder** for %%types%%.
- */
- static from(types: Record>): TypedDataEncoder;
- /**
- * Return the primary type for %%types%%.
- */
- static getPrimaryType(types: Record>): string;
- /**
- * Return the hashed struct for %%value%% using %%types%% and %%name%%.
- */
- static hashStruct(name: string, types: Record>, value: Record): string;
- /**
- * Return the domain hash for %%domain%%.
- */
- static hashDomain(domain: TypedDataDomain): string;
- /**
- * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.
- */
- static encode(domain: TypedDataDomain, types: Record>, value: Record): string;
- /**
- * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.
- */
- static hash(domain: TypedDataDomain, types: Record>, value: Record): string;
- /**
- * Returns the JSON-encoded payload expected by nodes which implement
- * the JSON-RPC [[link-eip-712]] method.
- */
- static getPayload(domain: TypedDataDomain, types: Record>, value: Record): any;
-}
-/**
- * Compute the address used to sign the typed data for the %%signature%%.
- */
-export declare function verifyTypedData(domain: TypedDataDomain, types: Record>, value: Record, signature: SignatureLike): string;
-//# sourceMappingURL=typed-data.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/hash/typed-data.d.ts.map b/lib.esm/hash/typed-data.d.ts.map
deleted file mode 100644
index 0388850c..00000000
--- a/lib.esm/hash/typed-data.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typed-data.d.ts","sourceRoot":"","sources":["../../src.ts/hash/typed-data.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAajE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC;IAE9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB;AAmHD;;;;;;;GAOG;AACH,qBAAa,gBAAgB;;IACzB;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAG,MAAM,CAAC;IAI9B;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAEjD;IAMD;;;;;;OAMG;gBACS,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAkFxD;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM;IAoDhD;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAMhC;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE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C,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAQxH;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAItH;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG;CAuD5H;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAEnK"}
\ No newline at end of file
diff --git a/lib.esm/hash/typed-data.js b/lib.esm/hash/typed-data.js
deleted file mode 100644
index acf77fba..00000000
--- a/lib.esm/hash/typed-data.js
+++ /dev/null
@@ -1,442 +0,0 @@
-//import { TypedDataDomain, TypedDataField } from "@quaisproject/providerabstract-signer";
-import { getAddress } from "../address/index.js";
-import { keccak256 } from "../crypto/index.js";
-import { recoverAddress } from "../transaction/index.js";
-import { concat, defineProperties, getBigInt, getBytes, hexlify, mask, toBeHex, toQuantity, toTwos, zeroPadValue, assertArgument } from "../utils/index.js";
-import { id } from "./id.js";
-const padding = new Uint8Array(32);
-padding.fill(0);
-const BN__1 = BigInt(-1);
-const BN_0 = BigInt(0);
-const BN_1 = BigInt(1);
-const BN_MAX_UINT256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
-;
-;
-function hexPadRight(value) {
- const bytes = getBytes(value);
- const padOffset = bytes.length % 32;
- if (padOffset) {
- return concat([bytes, padding.slice(padOffset)]);
- }
- return hexlify(bytes);
-}
-const hexTrue = toBeHex(BN_1, 32);
-const hexFalse = toBeHex(BN_0, 32);
-const domainFieldTypes = {
- name: "string",
- version: "string",
- chainId: "uint256",
- verifyingContract: "address",
- salt: "bytes32"
-};
-const domainFieldNames = [
- "name", "version", "chainId", "verifyingContract", "salt"
-];
-function checkString(key) {
- return function (value) {
- assertArgument(typeof (value) === "string", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);
- return value;
- };
-}
-const domainChecks = {
- name: checkString("name"),
- version: checkString("version"),
- chainId: function (_value) {
- const value = getBigInt(_value, "domain.chainId");
- assertArgument(value >= 0, "invalid chain ID", "domain.chainId", _value);
- if (Number.isSafeInteger(value)) {
- return Number(value);
- }
- return toQuantity(value);
- },
- verifyingContract: function (value) {
- try {
- return getAddress(value).toLowerCase();
- }
- catch (error) { }
- assertArgument(false, `invalid domain value "verifyingContract"`, "domain.verifyingContract", value);
- },
- salt: function (value) {
- const bytes = getBytes(value, "domain.salt");
- assertArgument(bytes.length === 32, `invalid domain value "salt"`, "domain.salt", value);
- return hexlify(bytes);
- }
-};
-function getBaseEncoder(type) {
- // intXX and uintXX
- {
- const match = type.match(/^(u?)int(\d*)$/);
- if (match) {
- const signed = (match[1] === "");
- const width = parseInt(match[2] || "256");
- assertArgument(width % 8 === 0 && width !== 0 && width <= 256 && (match[2] == null || match[2] === String(width)), "invalid numeric width", "type", type);
- const boundsUpper = mask(BN_MAX_UINT256, signed ? (width - 1) : width);
- const boundsLower = signed ? ((boundsUpper + BN_1) * BN__1) : BN_0;
- return function (_value) {
- const value = getBigInt(_value, "value");
- assertArgument(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, "value", value);
- return toBeHex(signed ? toTwos(value, 256) : value, 32);
- };
- }
- }
- // bytesXX
- {
- const match = type.match(/^bytes(\d+)$/);
- if (match) {
- const width = parseInt(match[1]);
- assertArgument(width !== 0 && width <= 32 && match[1] === String(width), "invalid bytes width", "type", type);
- return function (value) {
- const bytes = getBytes(value);
- assertArgument(bytes.length === width, `invalid length for ${type}`, "value", value);
- return hexPadRight(value);
- };
- }
- }
- switch (type) {
- case "address": return function (value) {
- return zeroPadValue(getAddress(value), 32);
- };
- case "bool": return function (value) {
- return ((!value) ? hexFalse : hexTrue);
- };
- case "bytes": return function (value) {
- return keccak256(value);
- };
- case "string": return function (value) {
- return id(value);
- };
- }
- return null;
-}
-function encodeType(name, fields) {
- return `${name}(${fields.map(({ name, type }) => (type + " " + name)).join(",")})`;
-}
-/**
- * A **TypedDataEncode** prepares and encodes [[link-eip-712]] payloads
- * for signed typed data.
- *
- * This is useful for those that wish to compute various components of a
- * typed data hash, primary types, or sub-components, but generally the
- * higher level [[Signer-signTypedData]] is more useful.
- */
-export class TypedDataEncoder {
- /**
- * The primary type for the structured [[types]].
- *
- * This is derived automatically from the [[types]], since no
- * recursion is possible, once the DAG for the types is consturcted
- * internally, the primary type must be the only remaining type with
- * no parent nodes.
- */
- primaryType;
- #types;
- /**
- * The types.
- */
- get types() {
- return JSON.parse(this.#types);
- }
- #fullTypes;
- #encoderCache;
- /**
- * Create a new **TypedDataEncoder** for %%types%%.
- *
- * This performs all necessary checking that types are valid and
- * do not violate the [[link-eip-712]] structural constraints as
- * well as computes the [[primaryType]].
- */
- constructor(types) {
- this.#types = JSON.stringify(types);
- this.#fullTypes = new Map();
- this.#encoderCache = new Map();
- // Link struct types to their direct child structs
- const links = new Map();
- // Link structs to structs which contain them as a child
- const parents = new Map();
- // Link all subtypes within a given struct
- const subtypes = new Map();
- Object.keys(types).forEach((type) => {
- links.set(type, new Set());
- parents.set(type, []);
- subtypes.set(type, new Set());
- });
- for (const name in types) {
- const uniqueNames = new Set();
- for (const field of types[name]) {
- // Check each field has a unique name
- assertArgument(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, "types", types);
- uniqueNames.add(field.name);
- // Get the base type (drop any array specifiers)
- const baseType = (field.type.match(/^([^\x5b]*)(\x5b|$)/))[1] || null;
- assertArgument(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, "types", types);
- // Is this a base encoding type?
- const encoder = getBaseEncoder(baseType);
- if (encoder) {
- continue;
- }
- assertArgument(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, "types", types);
- // Add linkage
- parents.get(baseType).push(name);
- links.get(name).add(baseType);
- }
- }
- // Deduce the primary type
- const primaryTypes = Array.from(parents.keys()).filter((n) => (parents.get(n).length === 0));
- assertArgument(primaryTypes.length !== 0, "missing primary type", "types", types);
- assertArgument(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(", ")}`, "types", types);
- defineProperties(this, { primaryType: primaryTypes[0] });
- // Check for circular type references
- function checkCircular(type, found) {
- assertArgument(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, "types", types);
- found.add(type);
- for (const child of links.get(type)) {
- if (!parents.has(child)) {
- continue;
- }
- // Recursively check children
- checkCircular(child, found);
- // Mark all ancestors as having this decendant
- for (const subtype of found) {
- subtypes.get(subtype).add(child);
- }
- }
- found.delete(type);
- }
- checkCircular(this.primaryType, new Set());
- // Compute each fully describe type
- for (const [name, set] of subtypes) {
- const st = Array.from(set);
- st.sort();
- this.#fullTypes.set(name, encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(""));
- }
- }
- /**
- * Returnthe encoder for the specific %%type%%.
- */
- getEncoder(type) {
- let encoder = this.#encoderCache.get(type);
- if (!encoder) {
- encoder = this.#getEncoder(type);
- this.#encoderCache.set(type, encoder);
- }
- return encoder;
- }
- #getEncoder(type) {
- // Basic encoder type (address, bool, uint256, etc)
- {
- const encoder = getBaseEncoder(type);
- if (encoder) {
- return encoder;
- }
- }
- // Array
- const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/);
- if (match) {
- const subtype = match[1];
- const subEncoder = this.getEncoder(subtype);
- return (value) => {
- assertArgument(!match[3] || parseInt(match[3]) === value.length, `array length mismatch; expected length ${parseInt(match[3])}`, "value", value);
- let result = value.map(subEncoder);
- if (this.#fullTypes.has(subtype)) {
- result = result.map(keccak256);
- }
- return keccak256(concat(result));
- };
- }
- // Struct
- const fields = this.types[type];
- if (fields) {
- const encodedType = id(this.#fullTypes.get(type));
- return (value) => {
- const values = fields.map(({ name, type }) => {
- const result = this.getEncoder(type)(value[name]);
- if (this.#fullTypes.has(type)) {
- return keccak256(result);
- }
- return result;
- });
- values.unshift(encodedType);
- return concat(values);
- };
- }
- assertArgument(false, `unknown type: ${type}`, "type", type);
- }
- /**
- * Return the full type for %%name%%.
- */
- encodeType(name) {
- const result = this.#fullTypes.get(name);
- assertArgument(result, `unknown type: ${JSON.stringify(name)}`, "name", name);
- return result;
- }
- /**
- * Return the encoded %%value%% for the %%type%%.
- */
- encodeData(type, value) {
- return this.getEncoder(type)(value);
- }
- /**
- * Returns the hash of %%value%% for the type of %%name%%.
- */
- hashStruct(name, value) {
- return keccak256(this.encodeData(name, value));
- }
- /**
- * Return the fulled encoded %%value%% for the [[types]].
- */
- encode(value) {
- return this.encodeData(this.primaryType, value);
- }
- /**
- * Return the hash of the fully encoded %%value%% for the [[types]].
- */
- hash(value) {
- return this.hashStruct(this.primaryType, value);
- }
- /**
- * @_ignore:
- */
- _visit(type, value, callback) {
- // Basic encoder type (address, bool, uint256, etc)
- {
- const encoder = getBaseEncoder(type);
- if (encoder) {
- return callback(type, value);
- }
- }
- // Array
- const match = type.match(/^(.*)(\x5b(\d*)\x5d)$/);
- if (match) {
- assertArgument(!match[3] || parseInt(match[3]) === value.length, `array length mismatch; expected length ${parseInt(match[3])}`, "value", value);
- return value.map((v) => this._visit(match[1], v, callback));
- }
- // Struct
- const fields = this.types[type];
- if (fields) {
- return fields.reduce((accum, { name, type }) => {
- accum[name] = this._visit(type, value[name], callback);
- return accum;
- }, {});
- }
- assertArgument(false, `unknown type: ${type}`, "type", type);
- }
- /**
- * Call %%calback%% for each value in %%value%%, passing the type and
- * component within %%value%%.
- *
- * This is useful for replacing addresses or other transformation that
- * may be desired on each component, based on its type.
- */
- visit(value, callback) {
- return this._visit(this.primaryType, value, callback);
- }
- /**
- * Create a new **TypedDataEncoder** for %%types%%.
- */
- static from(types) {
- return new TypedDataEncoder(types);
- }
- /**
- * Return the primary type for %%types%%.
- */
- static getPrimaryType(types) {
- return TypedDataEncoder.from(types).primaryType;
- }
- /**
- * Return the hashed struct for %%value%% using %%types%% and %%name%%.
- */
- static hashStruct(name, types, value) {
- return TypedDataEncoder.from(types).hashStruct(name, value);
- }
- /**
- * Return the domain hash for %%domain%%.
- */
- static hashDomain(domain) {
- const domainFields = [];
- for (const name in domain) {
- if (domain[name] == null) {
- continue;
- }
- const type = domainFieldTypes[name];
- assertArgument(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, "domain", domain);
- domainFields.push({ name, type });
- }
- domainFields.sort((a, b) => {
- return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);
- });
- return TypedDataEncoder.hashStruct("EIP712Domain", { EIP712Domain: domainFields }, domain);
- }
- /**
- * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.
- */
- static encode(domain, types, value) {
- return concat([
- "0x1901",
- TypedDataEncoder.hashDomain(domain),
- TypedDataEncoder.from(types).hash(value)
- ]);
- }
- /**
- * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.
- */
- static hash(domain, types, value) {
- return keccak256(TypedDataEncoder.encode(domain, types, value));
- }
- /**
- * Returns the JSON-encoded payload expected by nodes which implement
- * the JSON-RPC [[link-eip-712]] method.
- */
- static getPayload(domain, types, value) {
- // Validate the domain fields
- TypedDataEncoder.hashDomain(domain);
- // Derive the EIP712Domain Struct reference type
- const domainValues = {};
- const domainTypes = [];
- domainFieldNames.forEach((name) => {
- const value = domain[name];
- if (value == null) {
- return;
- }
- domainValues[name] = domainChecks[name](value);
- domainTypes.push({ name, type: domainFieldTypes[name] });
- });
- const encoder = TypedDataEncoder.from(types);
- const typesWithDomain = Object.assign({}, types);
- assertArgument(typesWithDomain.EIP712Domain == null, "types must not contain EIP712Domain type", "types.EIP712Domain", types);
- typesWithDomain.EIP712Domain = domainTypes;
- // Validate the data structures and types
- encoder.encode(value);
- return {
- types: typesWithDomain,
- domain: domainValues,
- primaryType: encoder.primaryType,
- message: encoder.visit(value, (type, value) => {
- // bytes
- if (type.match(/^bytes(\d*)/)) {
- return hexlify(getBytes(value));
- }
- // uint or int
- if (type.match(/^u?int/)) {
- return getBigInt(value).toString();
- }
- switch (type) {
- case "address":
- return value.toLowerCase();
- case "bool":
- return !!value;
- case "string":
- assertArgument(typeof (value) === "string", "invalid string", "value", value);
- return value;
- }
- assertArgument(false, "unsupported type", "type", type);
- })
- };
- }
-}
-/**
- * Compute the address used to sign the typed data for the %%signature%%.
- */
-export function verifyTypedData(domain, types, value, signature) {
- return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature);
-}
-//# sourceMappingURL=typed-data.js.map
\ No newline at end of file
diff --git a/lib.esm/hash/typed-data.js.map b/lib.esm/hash/typed-data.js.map
deleted file mode 100644
index 6738680d..00000000
--- a/lib.esm/hash/typed-data.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typed-data.js","sourceRoot":"","sources":["../../src.ts/hash/typed-data.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACH,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,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
index e580562e..00000000
--- a/lib.esm/index.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * The Application Programming Interface (API) is the collection of
- * functions, classes and types offered by the quais library.
- *
- * @_section: api:Application Programming Interface [about-api]
- * @_navTitle: API
- */
-import * as quais from "./quais.js";
-export { quais };
-export * from "./quais.js";
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/lib.esm/index.d.ts.map b/lib.esm/index.d.ts.map
deleted file mode 100644
index 3e481408..00000000
--- a/lib.esm/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,cAAc,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/index.js b/lib.esm/index.js
deleted file mode 100644
index b5b16b24..00000000
--- a/lib.esm/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * The Application Programming Interface (API) is the collection of
- * functions, classes and types offered by the quais library.
- *
- * @_section: api:Application Programming Interface [about-api]
- * @_navTitle: API
- */
-import * as quais from "./quais.js";
-export { quais };
-export * from "./quais.js";
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/lib.esm/index.js.map b/lib.esm/index.js.map
deleted file mode 100644
index 08b048b5..00000000
--- a/lib.esm/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,cAAc,YAAY,CAAC"}
\ No newline at end of file
diff --git a/lib.esm/package.json b/lib.esm/package.json
deleted file mode 100644
index 04a5cfd6..00000000
--- a/lib.esm/package.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "browser": {
- "./crypto/crypto.js": "./crypto/crypto-browser.js",
- "./providers/provider-ipcsocket.js": "./providers/provider-ipcsocket-browser.js",
- "./providers/ws.js": "./providers/ws-browser.js",
- "./utils/base64.js": "./utils/base64-browser.js",
- "./utils/geturl.js": "./utils/geturl-browser.js",
- "./wordlists/wordlists.js": "./wordlists/wordlists-browser.js"
- },
- "sideEffects": false,
- "type": "module"
-}
diff --git a/lib.esm/providers/abstract-provider.d.ts b/lib.esm/providers/abstract-provider.d.ts
deleted file mode 100644
index 73b57952..00000000
--- a/lib.esm/providers/abstract-provider.d.ts
+++ /dev/null
@@ -1,493 +0,0 @@
-/**
- * The available providers should suffice for most developers purposes,
- * but the [[AbstractProvider]] class has many features which enable
- * sub-classing it for specific purposes.
- *
- * @_section: api/providers/abstract-provider: Subclassing Provider [abstract-provider]
- */
-import { FetchRequest } from "../utils/index.js";
-import { Network } from "./network.js";
-import { Block, FeeData, Log, TransactionReceipt, TransactionResponse } from "./provider.js";
-import type { AddressLike } from "../address/index.js";
-import type { BigNumberish } from "../utils/index.js";
-import type { Listener } from "../utils/index.js";
-import type { Networkish } from "./network.js";
-import type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams } from "./formatting.js";
-import type { BlockTag, EventFilter, Filter, FilterByBlockHash, OrphanFilter, PreparedTransactionRequest, Provider, ProviderEvent, TransactionRequest } from "./provider.js";
-/**
- * The types of additional event values that can be emitted for the
- * ``"debug"`` event.
- */
-export type DebugEventAbstractProvider = {
- action: "sendCcipReadFetchRequest";
- request: FetchRequest;
- index: number;
- urls: Array