@avalabs/avalanche-module 0.0.0-CP-8870-20240709191701

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+
2
+ > @avalabs/avalanche-module@0.0.11 build /home/runner/work/vm-modules/vm-modules/packages/avalanche-module
3
+ > tsup
4
+
5
+ CLI Building entry: ./src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v7.2.0
8
+ CLI Using tsup config: /home/runner/work/vm-modules/vm-modules/packages/avalanche-module/tsup.config.ts
9
+ CLI Target: es2021
10
+ CLI Cleaning output folder
11
+ CJS Build start
12
+ ESM Build start
13
+ CJS dist/index.cjs 1.55 KB
14
+ CJS dist/index.cjs.map 3.82 KB
15
+ CJS ⚡️ Build success in 738ms
16
+ ESM dist/index.js 1.52 KB
17
+ ESM dist/index.js.map 3.82 KB
18
+ ESM ⚡️ Build success in 733ms
19
+ DTS Build start
20
+ DTS ⚡️ Build success in 12192ms
21
+ DTS dist/index.d.cts 778.00 B
22
+ DTS dist/index.d.ts 778.00 B
@@ -0,0 +1,4 @@
1
+
2
+ > @avalabs/avalanche-module@0.0.11 lint /home/runner/work/vm-modules/vm-modules/packages/avalanche-module
3
+ > eslint "src/**/*.ts"
4
+
@@ -0,0 +1,5 @@
1
+
2
+ > @avalabs/avalanche-module@0.0.11 test /home/runner/work/vm-modules/vm-modules/packages/avalanche-module
3
+ > jest
4
+
5
+ No tests found, exiting with code 0
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # @avalabs/avalanche-module
2
+
3
+ ## 0.0.0-CP-8870-20240709191701
4
+
5
+ ### Patch Changes
6
+
7
+ - 02560da: Created Avalanche module
8
+ - Updated dependencies [1ba779a]
9
+ - @avalabs/vm-module-types@0.0.0-CP-8870-20240709191701
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # Avalanche Module
2
+
3
+ ## Overview
4
+
5
+ This package implements the core logic for the Avalanche (Avalanche Virtual Machine) module.
6
+
7
+ ## Installation
8
+
9
+ The module is privately available on NPM as `@avalabs/avalanche-module`
package/dist/index.cjs ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var vmModuleTypes = require('@avalabs/vm-module-types');
4
+ var rpcErrors = require('@metamask/rpc-errors');
5
+
6
+ var r={name:"AVM",description:"",version:"0.0.1",sources:{module:{checksum:"",location:{npm:{filePath:"dist/bundle.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}},provider:{checksum:"",location:{npm:{filePath:"dist/provider.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}}},network:{chainIds:["avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM","avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm","avax:11111111111111111111111111111111LpoYY","avax:fuji-11111111111111111111111111111111LpoYY"],namespaces:["avax"]},cointype:"",permissions:{rpc:{dapps:!0,methods:["avalanche_sendTransaction","avalanche_*"]}},manifestVersion:"0.0"};var s=class{getAddress(){return Promise.resolve("Avalanche address")}getBalances(){return Promise.resolve("Avalanche balances")}getManifest(){let e=vmModuleTypes.parseManifest(r);return e.success?e.data:void 0}getNetworkFee(e){return Promise.resolve({low:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},medium:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},high:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},baseFee:0n})}getTransactionHistory(e){return Promise.resolve({transactions:[]})}getTokens(e){return Promise.resolve([])}async onRpcRequest(e,i){switch(e.method){default:return {error:rpcErrors.rpcErrors.methodNotSupported(`Method ${e.method} not supported`)}}}};
7
+
8
+ exports.AvalancheModule = s;
9
+ //# sourceMappingURL=out.js.map
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/module.ts","../src/manifest.json"],"names":["parseManifest","rpcErrors","manifest_default","AvalancheModule","result","_","request","_chain"],"mappings":"AASA,OAAS,iBAAAA,MAAqB,2BAC9B,OAAS,aAAAC,MAAiB,uBCV1B,IAAAC,EAAA,CACE,KAAQ,MACR,YAAe,GACf,QAAW,QACX,QAAW,CACT,OAAU,CACR,SAAY,GACZ,SAAY,CACV,IAAO,CACL,SAAY,iBACZ,YAAe,4BACf,SAAY,4BACd,CACF,CACF,EACA,SAAY,CACV,SAAY,GACZ,SAAY,CACV,IAAO,CACL,SAAY,mBACZ,YAAe,4BACf,SAAY,4BACd,CACF,CACF,CACF,EACA,QAAW,CACT,SAAY,CACV,0DACA,0DACA,6CACA,iDACF,EACA,WAAc,CAAC,MAAM,CACvB,EACA,SAAY,GACZ,YAAe,CACb,IAAO,CACL,MAAS,GACT,QAAW,CAAC,4BAA6B,aAAa,CACxD,CACF,EACA,gBAAmB,KACrB,ED9BO,IAAMC,EAAN,KAAwC,CAC7C,YAA8B,CAC5B,OAAO,QAAQ,QAAQ,mBAAmB,CAC5C,CAEA,aAA+B,CAC7B,OAAO,QAAQ,QAAQ,oBAAoB,CAC7C,CAEA,aAAoC,CAClC,IAAMC,EAASJ,EAAcE,CAAY,EACzC,OAAOE,EAAO,QAAUA,EAAO,KAAO,MACxC,CAEA,cAAcC,EAA8C,CAC1D,OAAO,QAAQ,QAAQ,CACrB,IAAK,CAAE,qBAAsB,GAAI,aAAc,EAAG,EAClD,OAAQ,CAAE,qBAAsB,GAAI,aAAc,EAAG,EACrD,KAAM,CAAE,qBAAsB,GAAI,aAAc,EAAG,EACnD,QAAS,EACX,CAAC,CACH,CAEA,sBAAsBA,EAA0B,CAC9C,OAAO,QAAQ,QAAQ,CAAE,aAAc,CAAC,CAAE,CAAC,CAC7C,CAEA,UAAUA,EAAW,CACnB,OAAO,QAAQ,QAAQ,CAAC,CAAC,CAC3B,CAEA,MAAM,aAAaC,EAAqBC,EAAe,CACrD,OAAQD,EAAQ,OAAQ,CACtB,QACE,MAAO,CAAE,MAAOL,EAAU,mBAAmB,UAAUK,EAAQ,MAAM,gBAAgB,CAAE,CAC3F,CACF,CACF","sourcesContent":["import type {\n Module,\n Manifest,\n NetworkFees,\n GetTransactionHistory,\n RpcRequest,\n GetNetworkFeeParams,\n Chain,\n} from '@avalabs/vm-module-types';\nimport { parseManifest } from '@avalabs/vm-module-types';\nimport { rpcErrors } from '@metamask/rpc-errors';\nimport ManifestJson from './manifest.json';\n\nexport class AvalancheModule implements Module {\n getAddress(): Promise<string> {\n return Promise.resolve('Avalanche address');\n }\n\n getBalances(): Promise<string> {\n return Promise.resolve('Avalanche balances');\n }\n\n getManifest(): Manifest | undefined {\n const result = parseManifest(ManifestJson);\n return result.success ? result.data : undefined;\n }\n\n getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees> {\n return Promise.resolve({\n low: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n medium: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n high: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n baseFee: 0n,\n });\n }\n\n getTransactionHistory(_: GetTransactionHistory) {\n return Promise.resolve({ transactions: [] });\n }\n\n getTokens(_: number) {\n return Promise.resolve([]);\n }\n\n async onRpcRequest(request: RpcRequest, _chain: Chain) {\n switch (request.method) {\n default:\n return { error: rpcErrors.methodNotSupported(`Method ${request.method} not supported`) };\n }\n }\n}\n","{\n \"name\": \"AVM\",\n \"description\": \"\",\n \"version\": \"0.0.1\",\n \"sources\": {\n \"module\": {\n \"checksum\": \"\",\n \"location\": {\n \"npm\": {\n \"filePath\": \"dist/bundle.js\",\n \"packageName\": \"@avalabs/avalanche-module\",\n \"registry\": \"https://registry.npmjs.org\"\n }\n }\n },\n \"provider\": {\n \"checksum\": \"\",\n \"location\": {\n \"npm\": {\n \"filePath\": \"dist/provider.js\",\n \"packageName\": \"@avalabs/avalanche-module\",\n \"registry\": \"https://registry.npmjs.org\"\n }\n }\n }\n },\n \"network\": {\n \"chainIds\": [\n \"avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM\",\n \"avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm\",\n \"avax:11111111111111111111111111111111LpoYY\",\n \"avax:fuji-11111111111111111111111111111111LpoYY\"\n ],\n \"namespaces\": [\"avax\"]\n },\n \"cointype\": \"\",\n \"permissions\": {\n \"rpc\": {\n \"dapps\": true,\n \"methods\": [\"avalanche_sendTransaction\", \"avalanche_*\"]\n }\n },\n \"manifestVersion\": \"0.0\"\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import * as _metamask_rpc_errors from '@metamask/rpc-errors';
2
+ import { Module, Manifest, GetNetworkFeeParams, NetworkFees, GetTransactionHistory, RpcRequest, Chain } from '@avalabs/vm-module-types';
3
+
4
+ declare class AvalancheModule implements Module {
5
+ getAddress(): Promise<string>;
6
+ getBalances(): Promise<string>;
7
+ getManifest(): Manifest | undefined;
8
+ getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees>;
9
+ getTransactionHistory(_: GetTransactionHistory): Promise<{
10
+ transactions: never[];
11
+ }>;
12
+ getTokens(_: number): Promise<never[]>;
13
+ onRpcRequest(request: RpcRequest, _chain: Chain): Promise<{
14
+ error: _metamask_rpc_errors.JsonRpcError<_metamask_rpc_errors.OptionalDataWithOptionalCause>;
15
+ }>;
16
+ }
17
+
18
+ export { AvalancheModule };
@@ -0,0 +1,18 @@
1
+ import * as _metamask_rpc_errors from '@metamask/rpc-errors';
2
+ import { Module, Manifest, GetNetworkFeeParams, NetworkFees, GetTransactionHistory, RpcRequest, Chain } from '@avalabs/vm-module-types';
3
+
4
+ declare class AvalancheModule implements Module {
5
+ getAddress(): Promise<string>;
6
+ getBalances(): Promise<string>;
7
+ getManifest(): Manifest | undefined;
8
+ getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees>;
9
+ getTransactionHistory(_: GetTransactionHistory): Promise<{
10
+ transactions: never[];
11
+ }>;
12
+ getTokens(_: number): Promise<never[]>;
13
+ onRpcRequest(request: RpcRequest, _chain: Chain): Promise<{
14
+ error: _metamask_rpc_errors.JsonRpcError<_metamask_rpc_errors.OptionalDataWithOptionalCause>;
15
+ }>;
16
+ }
17
+
18
+ export { AvalancheModule };
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { parseManifest } from '@avalabs/vm-module-types';
2
+ import { rpcErrors } from '@metamask/rpc-errors';
3
+
4
+ var r={name:"AVM",description:"",version:"0.0.1",sources:{module:{checksum:"",location:{npm:{filePath:"dist/bundle.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}},provider:{checksum:"",location:{npm:{filePath:"dist/provider.js",packageName:"@avalabs/avalanche-module",registry:"https://registry.npmjs.org"}}}},network:{chainIds:["avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM","avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm","avax:11111111111111111111111111111111LpoYY","avax:fuji-11111111111111111111111111111111LpoYY"],namespaces:["avax"]},cointype:"",permissions:{rpc:{dapps:!0,methods:["avalanche_sendTransaction","avalanche_*"]}},manifestVersion:"0.0"};var s=class{getAddress(){return Promise.resolve("Avalanche address")}getBalances(){return Promise.resolve("Avalanche balances")}getManifest(){let e=parseManifest(r);return e.success?e.data:void 0}getNetworkFee(e){return Promise.resolve({low:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},medium:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},high:{maxPriorityFeePerGas:0n,maxFeePerGas:0n},baseFee:0n})}getTransactionHistory(e){return Promise.resolve({transactions:[]})}getTokens(e){return Promise.resolve([])}async onRpcRequest(e,i){switch(e.method){default:return {error:rpcErrors.methodNotSupported(`Method ${e.method} not supported`)}}}};
5
+
6
+ export { s as AvalancheModule };
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/module.ts","../src/manifest.json"],"names":["parseManifest","rpcErrors","manifest_default","AvalancheModule","result","_","request","_chain"],"mappings":"AASA,OAAS,iBAAAA,MAAqB,2BAC9B,OAAS,aAAAC,MAAiB,uBCV1B,IAAAC,EAAA,CACE,KAAQ,MACR,YAAe,GACf,QAAW,QACX,QAAW,CACT,OAAU,CACR,SAAY,GACZ,SAAY,CACV,IAAO,CACL,SAAY,iBACZ,YAAe,4BACf,SAAY,4BACd,CACF,CACF,EACA,SAAY,CACV,SAAY,GACZ,SAAY,CACV,IAAO,CACL,SAAY,mBACZ,YAAe,4BACf,SAAY,4BACd,CACF,CACF,CACF,EACA,QAAW,CACT,SAAY,CACV,0DACA,0DACA,6CACA,iDACF,EACA,WAAc,CAAC,MAAM,CACvB,EACA,SAAY,GACZ,YAAe,CACb,IAAO,CACL,MAAS,GACT,QAAW,CAAC,4BAA6B,aAAa,CACxD,CACF,EACA,gBAAmB,KACrB,ED9BO,IAAMC,EAAN,KAAwC,CAC7C,YAA8B,CAC5B,OAAO,QAAQ,QAAQ,mBAAmB,CAC5C,CAEA,aAA+B,CAC7B,OAAO,QAAQ,QAAQ,oBAAoB,CAC7C,CAEA,aAAoC,CAClC,IAAMC,EAASJ,EAAcE,CAAY,EACzC,OAAOE,EAAO,QAAUA,EAAO,KAAO,MACxC,CAEA,cAAcC,EAA8C,CAC1D,OAAO,QAAQ,QAAQ,CACrB,IAAK,CAAE,qBAAsB,GAAI,aAAc,EAAG,EAClD,OAAQ,CAAE,qBAAsB,GAAI,aAAc,EAAG,EACrD,KAAM,CAAE,qBAAsB,GAAI,aAAc,EAAG,EACnD,QAAS,EACX,CAAC,CACH,CAEA,sBAAsBA,EAA0B,CAC9C,OAAO,QAAQ,QAAQ,CAAE,aAAc,CAAC,CAAE,CAAC,CAC7C,CAEA,UAAUA,EAAW,CACnB,OAAO,QAAQ,QAAQ,CAAC,CAAC,CAC3B,CAEA,MAAM,aAAaC,EAAqBC,EAAe,CACrD,OAAQD,EAAQ,OAAQ,CACtB,QACE,MAAO,CAAE,MAAOL,EAAU,mBAAmB,UAAUK,EAAQ,MAAM,gBAAgB,CAAE,CAC3F,CACF,CACF","sourcesContent":["import type {\n Module,\n Manifest,\n NetworkFees,\n GetTransactionHistory,\n RpcRequest,\n GetNetworkFeeParams,\n Chain,\n} from '@avalabs/vm-module-types';\nimport { parseManifest } from '@avalabs/vm-module-types';\nimport { rpcErrors } from '@metamask/rpc-errors';\nimport ManifestJson from './manifest.json';\n\nexport class AvalancheModule implements Module {\n getAddress(): Promise<string> {\n return Promise.resolve('Avalanche address');\n }\n\n getBalances(): Promise<string> {\n return Promise.resolve('Avalanche balances');\n }\n\n getManifest(): Manifest | undefined {\n const result = parseManifest(ManifestJson);\n return result.success ? result.data : undefined;\n }\n\n getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees> {\n return Promise.resolve({\n low: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n medium: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n high: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },\n baseFee: 0n,\n });\n }\n\n getTransactionHistory(_: GetTransactionHistory) {\n return Promise.resolve({ transactions: [] });\n }\n\n getTokens(_: number) {\n return Promise.resolve([]);\n }\n\n async onRpcRequest(request: RpcRequest, _chain: Chain) {\n switch (request.method) {\n default:\n return { error: rpcErrors.methodNotSupported(`Method ${request.method} not supported`) };\n }\n }\n}\n","{\n \"name\": \"AVM\",\n \"description\": \"\",\n \"version\": \"0.0.1\",\n \"sources\": {\n \"module\": {\n \"checksum\": \"\",\n \"location\": {\n \"npm\": {\n \"filePath\": \"dist/bundle.js\",\n \"packageName\": \"@avalabs/avalanche-module\",\n \"registry\": \"https://registry.npmjs.org\"\n }\n }\n },\n \"provider\": {\n \"checksum\": \"\",\n \"location\": {\n \"npm\": {\n \"filePath\": \"dist/provider.js\",\n \"packageName\": \"@avalabs/avalanche-module\",\n \"registry\": \"https://registry.npmjs.org\"\n }\n }\n }\n },\n \"network\": {\n \"chainIds\": [\n \"avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM\",\n \"avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm\",\n \"avax:11111111111111111111111111111111LpoYY\",\n \"avax:fuji-11111111111111111111111111111111LpoYY\"\n ],\n \"namespaces\": [\"avax\"]\n },\n \"cointype\": \"\",\n \"permissions\": {\n \"rpc\": {\n \"dapps\": true,\n \"methods\": [\"avalanche_sendTransaction\", \"avalanche_*\"]\n }\n },\n \"manifestVersion\": \"0.0\"\n}\n"]}
package/jest.config.js ADDED
@@ -0,0 +1,10 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ export default {
3
+ clearMocks: true,
4
+ preset: 'ts-jest',
5
+ testEnvironment: 'node',
6
+ passWithNoTests: true,
7
+ transform: {
8
+ '.ts': ['ts-jest', { tsconfig: './tsconfig.jest.json' }],
9
+ },
10
+ };
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@avalabs/avalanche-module",
3
+ "version": "0.0.0-CP-8870-20240709191701",
4
+ "main": "dist/index.cjs",
5
+ "module": "dist/index.js",
6
+ "typings": "dist/index.d.ts",
7
+ "type": "module",
8
+ "dependencies": {
9
+ "@avalabs/vm-module-types": "0.0.0-CP-8870-20240709191701",
10
+ "@metamask/rpc-errors": "6.3.0"
11
+ },
12
+ "devDependencies": {
13
+ "@types/jest": "29.5.7",
14
+ "jest": "29.7.0",
15
+ "ts-jest": "29.1.1",
16
+ "tsup": "7.2.0",
17
+ "@internal/tsup-config": "0.0.1",
18
+ "eslint-config-custom": "0.0.0-CP-8870-20240709191701"
19
+ },
20
+ "scripts": {
21
+ "build": "tsup",
22
+ "lint": "eslint \"src/**/*.ts\"",
23
+ "test": "jest",
24
+ "test:watch": "jest --watch"
25
+ }
26
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './module';
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "AVM",
3
+ "description": "",
4
+ "version": "0.0.1",
5
+ "sources": {
6
+ "module": {
7
+ "checksum": "",
8
+ "location": {
9
+ "npm": {
10
+ "filePath": "dist/bundle.js",
11
+ "packageName": "@avalabs/avalanche-module",
12
+ "registry": "https://registry.npmjs.org"
13
+ }
14
+ }
15
+ },
16
+ "provider": {
17
+ "checksum": "",
18
+ "location": {
19
+ "npm": {
20
+ "filePath": "dist/provider.js",
21
+ "packageName": "@avalabs/avalanche-module",
22
+ "registry": "https://registry.npmjs.org"
23
+ }
24
+ }
25
+ }
26
+ },
27
+ "network": {
28
+ "chainIds": [
29
+ "avax:2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
30
+ "avax:2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
31
+ "avax:11111111111111111111111111111111LpoYY",
32
+ "avax:fuji-11111111111111111111111111111111LpoYY"
33
+ ],
34
+ "namespaces": ["avax"]
35
+ },
36
+ "cointype": "",
37
+ "permissions": {
38
+ "rpc": {
39
+ "dapps": true,
40
+ "methods": ["avalanche_sendTransaction", "avalanche_*"]
41
+ }
42
+ },
43
+ "manifestVersion": "0.0"
44
+ }
package/src/module.ts ADDED
@@ -0,0 +1,51 @@
1
+ import type {
2
+ Module,
3
+ Manifest,
4
+ NetworkFees,
5
+ GetTransactionHistory,
6
+ RpcRequest,
7
+ GetNetworkFeeParams,
8
+ Chain,
9
+ } from '@avalabs/vm-module-types';
10
+ import { parseManifest } from '@avalabs/vm-module-types';
11
+ import { rpcErrors } from '@metamask/rpc-errors';
12
+ import ManifestJson from './manifest.json';
13
+
14
+ export class AvalancheModule implements Module {
15
+ getAddress(): Promise<string> {
16
+ return Promise.resolve('Avalanche address');
17
+ }
18
+
19
+ getBalances(): Promise<string> {
20
+ return Promise.resolve('Avalanche balances');
21
+ }
22
+
23
+ getManifest(): Manifest | undefined {
24
+ const result = parseManifest(ManifestJson);
25
+ return result.success ? result.data : undefined;
26
+ }
27
+
28
+ getNetworkFee(_: GetNetworkFeeParams): Promise<NetworkFees> {
29
+ return Promise.resolve({
30
+ low: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
31
+ medium: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
32
+ high: { maxPriorityFeePerGas: 0n, maxFeePerGas: 0n },
33
+ baseFee: 0n,
34
+ });
35
+ }
36
+
37
+ getTransactionHistory(_: GetTransactionHistory) {
38
+ return Promise.resolve({ transactions: [] });
39
+ }
40
+
41
+ getTokens(_: number) {
42
+ return Promise.resolve([]);
43
+ }
44
+
45
+ async onRpcRequest(request: RpcRequest, _chain: Chain) {
46
+ switch (request.method) {
47
+ default:
48
+ return { error: rpcErrors.methodNotSupported(`Method ${request.method} not supported`) };
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "verbatimModuleSyntax": false,
5
+ "esModuleInterop": true
6
+ }
7
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@internal/tsconfig/tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "incremental": false // Need to turn off because of tsup dts
6
+ },
7
+ "include": ["src"],
8
+ "references": [{ "path": "../../packages/types/tsconfig.json" }]
9
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { defineConfig } from 'tsup';
2
+ import { baseConfig } from '@internal/tsup-config';
3
+
4
+ export default defineConfig(baseConfig);