*Add dist

This commit is contained in:
Derrick Hammer 2023-03-27 08:55:41 -04:00
parent 8462fb5c4b
commit 8c2dac5b59
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
9 changed files with 49 additions and 0 deletions

7
dist/client.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
import { Client } from "@lumeweb/libkernel-universal";
export declare class EthClient extends Client {
ready(): Promise<any>;
method(method: string, params: any): Promise<any>;
}
export declare const createClient: (...args: any) => EthClient;
//# sourceMappingURL=client.d.ts.map

1
dist/client.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAI/D,qBAAa,SAAU,SAAQ,MAAM;IACtB,KAAK;IAGL,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG;CAGhD;AAED,eAAO,MAAM,YAAY,6BAA4C,CAAC"}

11
dist/client.js vendored Normal file
View File

@ -0,0 +1,11 @@
import { Client, factory } from "@lumeweb/libkernel-universal";
const RPC_MODULE = "AAAkzekB6FeX9sW2oBKOZ32G_2oU2oQWJIE9Iv4p6xBVGw";
export class EthClient extends Client {
async ready() {
return this.callModuleReturn("ready");
}
async method(method, params) {
return this.callModuleReturn("method", params);
}
}
export const createClient = factory(EthClient, RPC_MODULE);

3
dist/index.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export { createClient } from "./client.js";
export { createProvider } from "./provider.js";
//# sourceMappingURL=index.d.ts.map

1
dist/index.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}

2
dist/index.js vendored Normal file
View File

@ -0,0 +1,2 @@
export { createClient } from "./client.js";
export { createProvider } from "./provider.js";

12
dist/provider.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import { Eip1193Provider, ethers } from "ethers";
export declare class Provider implements Eip1193Provider {
private client;
request(args: RequestArguments): Promise<unknown>;
}
interface RequestArguments {
readonly method: string;
readonly params?: readonly unknown[] | object;
}
export declare function createProvider(): ethers.BrowserProvider;
export {};
//# sourceMappingURL=provider.d.ts.map

1
dist/provider.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGjD,qBAAa,QAAS,YAAW,eAAe;IAC9C,OAAO,CAAC,MAAM,CAA6B;IAE9B,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;CAG/D;AAED,UAAU,gBAAgB;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAAC;CAC/C;AAED,wBAAgB,cAAc,IAAI,MAAM,CAAC,eAAe,CAEvD"}

11
dist/provider.js vendored Normal file
View File

@ -0,0 +1,11 @@
import { ethers } from "ethers";
import { createClient } from "./client.js";
export class Provider {
client = createClient();
async request(args) {
return this.client.method(args.method, args.params);
}
}
export function createProvider() {
return new ethers.BrowserProvider(new Provider());
}