@sparkdotfi/abi-cli 0.2.0-20260317.e49bd3f1 → 0.2.0-20260331.c0d582b0
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.
- package/README.md +2 -2
- package/dist/src/abi-registry/abi-fetcher/AbiFetcherClient.js +1 -1
- package/dist/src/codegen/codegenModule.js +2 -2
- package/dist/src/codegen/formatGeneratedModule.js +18 -0
- package/dist/src/common/file-system/MemoryFileSystem.js +1 -1
- package/dist/src/common/file-system/NodeFileSystem.js +1 -1
- package/dist/src/main.js +1 -1
- package/dist/types/src/AbiCli.d.ts +6 -6
- package/dist/types/src/AbiCli.d.ts.map +1 -1
- package/dist/types/src/abi-registry/AbiRegistry.d.ts +3 -3
- package/dist/types/src/abi-registry/AbiRegistry.d.ts.map +1 -1
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcher.d.ts +3 -3
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcher.d.ts.map +1 -1
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcherClient.d.ts +3 -3
- package/dist/types/src/abi-registry/abi-fetcher/AbiFetcherClient.d.ts.map +1 -1
- package/dist/types/src/abi-registry/abi-fetcher/BlockchainClient.d.ts +2 -2
- package/dist/types/src/abi-registry/abi-fetcher/BlockchainClient.d.ts.map +1 -1
- package/dist/types/src/abi-registry/buildAbiRegistry.d.ts +4 -4
- package/dist/types/src/abi-registry/buildAbiRegistry.d.ts.map +1 -1
- package/dist/types/src/abi-registry/getAbiForContract.d.ts +3 -3
- package/dist/types/src/abi-registry/getAbiForContract.d.ts.map +1 -1
- package/dist/types/src/abi-registry/getAbiForInterface.d.ts +3 -3
- package/dist/types/src/abi-registry/getAbiForInterface.d.ts.map +1 -1
- package/dist/types/src/abi-registry/types.d.ts +1 -1
- package/dist/types/src/abi-registry/types.d.ts.map +1 -1
- package/dist/types/src/build.d.ts +1 -1
- package/dist/types/src/build.d.ts.map +1 -1
- package/dist/types/src/codegen/codegenCheckedAddressMap.d.ts +1 -1
- package/dist/types/src/codegen/codegenCheckedAddressMap.d.ts.map +1 -1
- package/dist/types/src/codegen/codegenModule.d.ts +2 -2
- package/dist/types/src/codegen/codegenModule.d.ts.map +1 -1
- package/dist/types/src/codegen/formatGeneratedModule.d.ts +2 -0
- package/dist/types/src/codegen/formatGeneratedModule.d.ts.map +1 -0
- package/dist/types/src/codegen/sections.d.ts +3 -3
- package/dist/types/src/codegen/sections.d.ts.map +1 -1
- package/dist/types/src/common/file-system/MemoryFileSystem.d.ts +1 -1
- package/dist/types/src/common/file-system/MemoryFileSystem.d.ts.map +1 -1
- package/dist/types/src/common/file-system/NodeFileSystem.d.ts +1 -1
- package/dist/types/src/common/file-system/NodeFileSystem.d.ts.map +1 -1
- package/dist/types/src/common/file-system/index.d.ts +1 -1
- package/dist/types/src/common/file-system/index.d.ts.map +1 -1
- package/dist/types/src/common/logger/CliFormatter.d.ts +1 -1
- package/dist/types/src/common/logger/CliFormatter.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/manifest/ManifestLoader.d.ts +3 -3
- package/dist/types/src/manifest/ManifestLoader.d.ts.map +1 -1
- package/dist/types/src/manifest/manifest.d.ts +1 -1
- package/dist/types/src/manifest/manifest.d.ts.map +1 -1
- package/dist/types/src/metadata-store/MetadataStore.d.ts +2 -2
- package/dist/types/src/metadata-store/MetadataStore.d.ts.map +1 -1
- package/dist/types/src/metadata-store/buildMetadataStore.d.ts +2 -2
- package/dist/types/src/metadata-store/buildMetadataStore.d.ts.map +1 -1
- package/dist/types/src/test/abis.d.ts +1 -1
- package/dist/types/src/test/abis.d.ts.map +1 -1
- package/package.json +14 -14
- package/dist/src/codegen/formatWithPrettier.js +0 -19
- package/dist/types/src/codegen/formatWithPrettier.d.ts +0 -2
- package/dist/types/src/codegen/formatWithPrettier.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ export default config
|
|
|
41
41
|
## Usage
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
# Set environment variables
|
|
44
|
+
# Set environment variables
|
|
45
45
|
export DRPC_API_KEY="your_key"
|
|
46
46
|
export ETHERSCAN_API_KEY="your_key"
|
|
47
47
|
|
|
@@ -61,4 +61,4 @@ npx @sparkdotfi/abi-cli
|
|
|
61
61
|
- Fetches ABIs from multiple networks
|
|
62
62
|
- Supports proxy contract resolution
|
|
63
63
|
- Verifies ABI compatability between many networks
|
|
64
|
-
- Generates TypeScript files
|
|
64
|
+
- Generates TypeScript files
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { whatsabi } from '@shazow/whatsabi';
|
|
2
|
-
import { domainToChainId, lazyPipe, retry, timeout } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { domainToChainId, lazyPipe, retry, timeout, } from '@sparkdotfi/common-universal';
|
|
3
3
|
export class AbiFetcherClient {
|
|
4
4
|
constructor(blockchainClient, options) {
|
|
5
5
|
Object.defineProperty(this, "blockchainClient", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { formatGeneratedModule } from './formatGeneratedModule.js';
|
|
2
2
|
import { contractSection, eoaSection, importsSection } from './sections.js';
|
|
3
3
|
export function codegenModule(manifest, metadataStore) {
|
|
4
4
|
const options = {
|
|
@@ -11,5 +11,5 @@ export function codegenModule(manifest, metadataStore) {
|
|
|
11
11
|
...Object.keys(manifest.interfaces).map((name) => contractSection(name, metadataStore.getInterface(name), options)),
|
|
12
12
|
];
|
|
13
13
|
const source = sections.join('\n');
|
|
14
|
-
return
|
|
14
|
+
return formatGeneratedModule(source);
|
|
15
15
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { format } from 'oxfmt';
|
|
2
|
+
const OXFMT_OPTIONS = {
|
|
3
|
+
arrowParens: 'always',
|
|
4
|
+
endOfLine: 'lf',
|
|
5
|
+
printWidth: 120,
|
|
6
|
+
semi: false,
|
|
7
|
+
singleQuote: true,
|
|
8
|
+
tabWidth: 2,
|
|
9
|
+
trailingComma: 'all',
|
|
10
|
+
};
|
|
11
|
+
export async function formatGeneratedModule(content) {
|
|
12
|
+
const { code, errors } = await format('contracts-generated.ts', content, OXFMT_OPTIONS);
|
|
13
|
+
if (errors.length > 0) {
|
|
14
|
+
const details = errors.map((error) => error.message).join('\n');
|
|
15
|
+
throw new Error(`Failed to format generated module with oxfmt:\n${details}`);
|
|
16
|
+
}
|
|
17
|
+
return code;
|
|
18
|
+
}
|
|
@@ -29,7 +29,7 @@ export class NodeFileSystem {
|
|
|
29
29
|
await fs.rm(tmpDirPath, { recursive: true, force: true });
|
|
30
30
|
}
|
|
31
31
|
catch (err) {
|
|
32
|
-
//
|
|
32
|
+
// oxlint-disable-next-line no-console -- debugging
|
|
33
33
|
console.error(`Error while deleting tmp dir ${prefix}`, err);
|
|
34
34
|
}
|
|
35
35
|
},
|
package/dist/src/main.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
-
import { AbiFetcher } from './abi-registry/index.js';
|
|
3
|
-
import { CliProgressBarFactory } from './common/CliProgressBarFactory.js';
|
|
4
|
-
import { IFileSystem } from './common/file-system/index.js';
|
|
5
|
-
import { Path } from './common/Path.js';
|
|
6
|
-
import { Manifest } from './manifest/manifest.js';
|
|
1
|
+
import { type Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
+
import { type AbiFetcher } from './abi-registry/index.js';
|
|
3
|
+
import { type CliProgressBarFactory } from './common/CliProgressBarFactory.js';
|
|
4
|
+
import { type IFileSystem } from './common/file-system/index.js';
|
|
5
|
+
import { type Path } from './common/Path.js';
|
|
6
|
+
import { type Manifest } from './manifest/manifest.js';
|
|
7
7
|
interface AbiCliOptions {
|
|
8
8
|
outPath: Path;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbiCli.d.ts","sourceRoot":"","sources":["../../../src/AbiCli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"AbiCli.d.ts","sourceRoot":"","sources":["../../../src/AbiCli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAGjE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGtD,UAAU,aAAa;IACrB,OAAO,EAAE,IAAI,CAAA;CACd;AAED,qBAAa,MAAM;IAGf,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAE3B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;gBAEZ,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,UAAU,EACvC,MAAM,EAAE,MAAM,EACG,kBAAkB,EAAE,qBAAqB,EACzC,OAAO,EAAE,aAAa;IAKnC,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import { InterfaceDefinition, MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
3
|
-
import { Abi, FetchedContract } from './types.js';
|
|
1
|
+
import { type CheckedAddress, type SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { type InterfaceDefinition, type MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
3
|
+
import { type Abi, type FetchedContract } from './types.js';
|
|
4
4
|
export declare class AbiRegistry {
|
|
5
5
|
private readonly map;
|
|
6
6
|
constructor(contracts: FetchedContract[]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/AbiRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"AbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/AbiRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE5F,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AAGtG,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA;AAI3D,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;gBAE1C,SAAS,EAAE,eAAe,EAAE;IAMjC,cAAc,CAAC,MAAM,EAAE,6BAA6B,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG;IAIxE,eAAe,CAAC,eAAe,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG;IAIxE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,GAAG;CAOjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import { FetchedContract } from '../types.js';
|
|
3
|
-
import { AbiFetcherClient } from './AbiFetcherClient.js';
|
|
1
|
+
import { type CheckedAddress, type SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { type FetchedContract } from '../types.js';
|
|
3
|
+
import { type AbiFetcherClient } from './AbiFetcherClient.js';
|
|
4
4
|
export declare class AbiFetcher {
|
|
5
5
|
private readonly abiFetcher;
|
|
6
6
|
constructor(abiFetcher: AbiFetcherClient);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbiFetcher.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiC,WAAW,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"AbiFetcher.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAiC,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAEnH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,gBAAgB;IAEnD,cAAc,CAClB,SAAS,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAC1C,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC9B,OAAO,CAAC,eAAe,EAAE,CAAC;CAyB9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import { Abi } from '../types.js';
|
|
3
|
-
import { BlockchainClient } from './BlockchainClient.js';
|
|
1
|
+
import { type CheckedAddress, type SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { type Abi } from '../types.js';
|
|
3
|
+
import { type BlockchainClient } from './BlockchainClient.js';
|
|
4
4
|
interface AbiFetcherClientOptions {
|
|
5
5
|
etherscanApiKey: string;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbiFetcherClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcherClient.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"AbiFetcherClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/AbiFetcherClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAInB,KAAK,WAAW,EAEjB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,UAAU,uBAAuB;IAC/B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,uBAAuB;IAG7C,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;CAYxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
-
import { PublicClient } from 'viem';
|
|
1
|
+
import { type SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
|
+
import { type PublicClient } from 'viem';
|
|
3
3
|
interface BlockchainClientOptions {
|
|
4
4
|
drpcApiKey: string;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockchainClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/BlockchainClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,WAAW,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockchainClient.d.ts","sourceRoot":"","sources":["../../../../../src/abi-registry/abi-fetcher/BlockchainClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC7F,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAE9E,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAE5D,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY;CAUjD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
-
import { CliProgressBarFactory } from '../common/CliProgressBarFactory.js';
|
|
3
|
-
import { Manifest } from '../manifest/manifest.js';
|
|
1
|
+
import { type Logger } from '@sparkdotfi/common-universal/logger';
|
|
2
|
+
import { type CliProgressBarFactory } from '../common/CliProgressBarFactory.js';
|
|
3
|
+
import { type Manifest } from '../manifest/manifest.js';
|
|
4
4
|
import { AbiRegistry } from './AbiRegistry.js';
|
|
5
|
-
import { AbiFetcher } from './abi-fetcher/index.js';
|
|
5
|
+
import { type AbiFetcher } from './abi-fetcher/index.js';
|
|
6
6
|
export declare function buildAbiRegistry(manifest: Manifest, abiFetcher: AbiFetcher, logger: Logger, progressBarFactory: CliProgressBarFactory): Promise<AbiRegistry>;
|
|
7
7
|
//# sourceMappingURL=buildAbiRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/buildAbiRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"buildAbiRegistry.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/buildAbiRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAGjE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,KAAK,QAAQ,EAAgC,MAAM,yBAAyB,CAAA;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,qBAAqB,GACxC,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
2
|
-
import { AbiRegistry } from './AbiRegistry.js';
|
|
3
|
-
import { Abi } from './types.js';
|
|
1
|
+
import { type MultiDomainContractDefinition } from '../manifest/manifest.js';
|
|
2
|
+
import { type AbiRegistry } from './AbiRegistry.js';
|
|
3
|
+
import { type Abi } from './types.js';
|
|
4
4
|
export declare function getAbiForContract(abiRegistry: AbiRegistry, config: MultiDomainContractDefinition, name: string): Abi;
|
|
5
5
|
//# sourceMappingURL=getAbiForContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAbiForContract.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForContract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"getAbiForContract.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForContract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAA;AAErC,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,6BAA6B,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAuBpH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InterfaceDefinition } from '../manifest/manifest.js';
|
|
2
|
-
import { AbiRegistry } from './AbiRegistry.js';
|
|
3
|
-
import { Abi } from './types.js';
|
|
1
|
+
import { type InterfaceDefinition } from '../manifest/manifest.js';
|
|
2
|
+
import { type AbiRegistry } from './AbiRegistry.js';
|
|
3
|
+
import { type Abi } from './types.js';
|
|
4
4
|
export declare function getAbiForInterface(abiRegistry: AbiRegistry, ifaceDefinition: InterfaceDefinition, name: string): Abi;
|
|
5
5
|
export declare function trimAbi(abi: Abi, ifaceDefinition: InterfaceDefinition): Abi;
|
|
6
6
|
//# sourceMappingURL=getAbiForInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAbiForInterface.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForInterface.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"getAbiForInterface.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/getAbiForInterface.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAA;AAErC,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAmCpH;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,mBAAmB,GAAG,GAAG,CAa3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/abi-registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAEpF,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,EAAE,CAAA;AAEH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,GAAG,EAAE,GAAG,CAAA;CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAMpC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAMpC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD,wBAAsB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe3D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CheckedAddress } from '@sparkdotfi/common-universal';
|
|
1
|
+
import { type CheckedAddress } from '@sparkdotfi/common-universal';
|
|
2
2
|
export declare function codegenCheckedAddressMap(addresses: Record<string, CheckedAddress>): string;
|
|
3
3
|
//# sourceMappingURL=codegenCheckedAddressMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegenCheckedAddressMap.d.ts","sourceRoot":"","sources":["../../../../src/codegen/codegenCheckedAddressMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"codegenCheckedAddressMap.d.ts","sourceRoot":"","sources":["../../../../src/codegen/codegenCheckedAddressMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAElE,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,MAAM,CAM1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Manifest } from '../manifest/manifest.js';
|
|
2
|
-
import { MetadataStore } from '../metadata-store/MetadataStore.js';
|
|
1
|
+
import { type Manifest } from '../manifest/manifest.js';
|
|
2
|
+
import { type MetadataStore } from '../metadata-store/MetadataStore.js';
|
|
3
3
|
export declare function codegenModule(manifest: Manifest, metadataStore: MetadataStore): Promise<string>;
|
|
4
4
|
//# sourceMappingURL=codegenModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegenModule.d.ts","sourceRoot":"","sources":["../../../../src/codegen/codegenModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"codegenModule.d.ts","sourceRoot":"","sources":["../../../../src/codegen/codegenModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAKvE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAe/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatGeneratedModule.d.ts","sourceRoot":"","sources":["../../../../src/codegen/formatGeneratedModule.ts"],"names":[],"mappings":"AAYA,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAU5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MultiDomainAddress } from '../manifest/manifest.js';
|
|
2
|
-
import { ContractMetadata, EoaMetadata, InstancesMetadata, InterfaceMetadata } from '../metadata-store/MetadataStore.js';
|
|
3
|
-
import { CodegenOptions, EntityType } from './types.js';
|
|
1
|
+
import { type MultiDomainAddress } from '../manifest/manifest.js';
|
|
2
|
+
import { type ContractMetadata, type EoaMetadata, type InstancesMetadata, type InterfaceMetadata } from '../metadata-store/MetadataStore.js';
|
|
3
|
+
import { type CodegenOptions, type EntityType } from './types.js';
|
|
4
4
|
export declare function eoaSection(name: string, metadata: EoaMetadata, options: CodegenOptions): string;
|
|
5
5
|
export declare function contractSection(name: string, metadata: ContractMetadata | InterfaceMetadata, options: CodegenOptions): string;
|
|
6
6
|
export declare function headerSection(name: string, type: EntityType): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../../src/codegen/sections.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../../src/codegen/sections.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AAEjE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAM/F;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,gBAAgB,GAAG,iBAAiB,EAC9C,OAAO,EAAE,cAAc,GACtB,MAAM,CAMR;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAepE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE,CAKhE;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,cAAc,GACtB,MAAM,CAQR;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CASlE;AAOD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,cAAc,GACtB,MAAM,CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/MemoryFileSystem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"MemoryFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/MemoryFileSystem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,qBAAa,gBAAiB,YAAW,WAAW;IAClD,OAAO,CAAC,QAAQ,CAAC,EAAE,CAA6B;IAE1C,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAOjC,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;CASxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Path } from '../Path.js';
|
|
2
|
-
import { IFileSystem } from './index.js';
|
|
2
|
+
import { type IFileSystem } from './index.js';
|
|
3
3
|
export declare class NodeFileSystem implements IFileSystem {
|
|
4
4
|
write(path: Path, contents: string): Promise<void>;
|
|
5
5
|
read(path: Path): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/NodeFileSystem.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"NodeFileSystem.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/NodeFileSystem.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,qBAAa,cAAe,YAAW,WAAW;IAChD,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAI3B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IASpC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;CAiBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/file-system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACjC,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEpC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAA;CAClE;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogEntry, LogFormatterPretty } from '@sparkdotfi/common-universal/logger';
|
|
1
|
+
import { type LogEntry, LogFormatterPretty } from '@sparkdotfi/common-universal/logger';
|
|
2
2
|
export declare class CliFormatter extends LogFormatterPretty {
|
|
3
3
|
constructor();
|
|
4
4
|
format(entry: LogEntry): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CliFormatter.d.ts","sourceRoot":"","sources":["../../../../../src/common/logger/CliFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"CliFormatter.d.ts","sourceRoot":"","sources":["../../../../../src/common/logger/CliFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAEvF,qBAAa,YAAa,SAAQ,kBAAkB;;IAKlC,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM;CAShD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD,iBAAS,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAEtD;AAED,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IFileSystem } from '../common/file-system/index.js';
|
|
2
|
-
import { Path } from '../common/Path.js';
|
|
3
|
-
import { Manifest } from './manifest.js';
|
|
1
|
+
import { type IFileSystem } from '../common/file-system/index.js';
|
|
2
|
+
import { type Path } from '../common/Path.js';
|
|
3
|
+
import { type Manifest } from './manifest.js';
|
|
4
4
|
export declare class ManifestLoader {
|
|
5
5
|
private readonly fs;
|
|
6
6
|
constructor(fs: IFileSystem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestLoader.d.ts","sourceRoot":"","sources":["../../../../src/manifest/ManifestLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"ManifestLoader.d.ts","sourceRoot":"","sources":["../../../../src/manifest/ManifestLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,eAAe,CAAA;AAE7D,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,WAAW;IAEtC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;CAQ1C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckedAddress, SparkDomain } from '@sparkdotfi/common-universal';
|
|
1
|
+
import { type CheckedAddress, type SparkDomain } from '@sparkdotfi/common-universal';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const FullAddressSchema: z.ZodObject<{
|
|
4
4
|
address: z.ZodEffects<z.ZodString, `0x${string}` & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/manifest/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/manifest/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAG5B,CAAA;AACF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;EAQjC,CAAA;AAEJ,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAO9C,CAAA;AAEJ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5C,CAAA;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKxC,CAAA;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAuD,CAAA;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA2D,CAAA;AAEvF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIpC,CAAA;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkD,CAAA;AAE/E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYzB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;AACvC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC5E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAC/F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qCAAqC,CAAC,CAAA;AAE5F,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Abi } from '../abi-registry/index.js';
|
|
2
|
-
import { MultiDomainAddress } from '../manifest/manifest.js';
|
|
1
|
+
import { type Abi } from '../abi-registry/index.js';
|
|
2
|
+
import { type MultiDomainAddress } from '../manifest/manifest.js';
|
|
3
3
|
export type Metadata = EoaMetadata | ContractMetadata | InterfaceMetadata;
|
|
4
4
|
export type EoaMetadata = {
|
|
5
5
|
type: 'eoa';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/MetadataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"MetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/MetadataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CAAA;AAEzE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,kBAAkB,CAAA;CAC9B,EAAE,CAAA;AAEH,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAE3C,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,WAAW;IAE9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAQjC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;IAQ3C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;CAO9C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbiRegistry } from '../abi-registry/AbiRegistry.js';
|
|
2
|
-
import { Manifest } from '../manifest/manifest.js';
|
|
1
|
+
import { type AbiRegistry } from '../abi-registry/AbiRegistry.js';
|
|
2
|
+
import { type Manifest } from '../manifest/manifest.js';
|
|
3
3
|
import { MetadataStore } from './MetadataStore.js';
|
|
4
4
|
export declare function buildMetadataStore(manifest: Manifest, abiRegistry: AbiRegistry): MetadataStore;
|
|
5
5
|
//# sourceMappingURL=buildMetadataStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildMetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/buildMetadataStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"buildMetadataStore.d.ts","sourceRoot":"","sources":["../../../../src/metadata-store/buildMetadataStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,KAAK,QAAQ,EAAsC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,EAML,aAAa,EACd,MAAM,oBAAoB,CAAA;AAE3B,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,aAAa,CA8B9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../../src/test/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../../src/test/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAEnD,eAAO,MAAM,WAAW,EA6QZ,GAAG,CAAA;AAEf,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparkdotfi/abi-cli",
|
|
3
|
-
"version": "0.2.0-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0-20260331.c0d582b0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/sparkdotfi/spark-app.git",
|
|
7
|
+
"directory": "packages/abi-cli"
|
|
6
8
|
},
|
|
7
|
-
"type": "module",
|
|
8
9
|
"bin": {
|
|
9
10
|
"abi-cli": "./dist/src/main.js"
|
|
10
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
11
16
|
"module": "./src/index.ts",
|
|
12
17
|
"types": "./dist/types/src/index.d.ts",
|
|
13
18
|
"exports": {
|
|
@@ -16,16 +21,8 @@
|
|
|
16
21
|
"default": "./dist/src/index.js"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist"
|
|
21
|
-
],
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "https://github.com/sparkdotfi/spark-app.git",
|
|
25
|
-
"directory": "packages/abi-cli"
|
|
26
|
-
},
|
|
27
24
|
"scripts": {
|
|
28
|
-
"lint": "
|
|
25
|
+
"lint": "pnpm --dir ../.. exec oxlint --config .oxlintrc.json packages/abi-cli/src",
|
|
29
26
|
"verify": "concurrently --names \"LINT,TEST,TYPECHECK\" -c \"bgMagenta.bold,bgBlue.bold\" \"pnpm run lint\" \"pnpm run test --silent\" \"pnpm run typecheck\"",
|
|
30
27
|
"fix": "cd ../../ && pnpm run check:fix && cd - && pnpm run verify",
|
|
31
28
|
"typecheck": "tsc --noEmit",
|
|
@@ -42,9 +39,12 @@
|
|
|
42
39
|
"@types/cli-progress": "^3.11.6",
|
|
43
40
|
"bundle-require": "^5.1.0",
|
|
44
41
|
"cli-progress": "^3.12.0",
|
|
45
|
-
"
|
|
42
|
+
"oxfmt": "^0.42.0",
|
|
46
43
|
"remeda": "^2.30.0",
|
|
47
44
|
"viem": "^2.0.0",
|
|
48
45
|
"zod": "^3.24.0"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=22.0.0"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import prettier from 'prettier';
|
|
2
|
-
// This code is basically copied from wagmi-cli. Any idea how to improve it?
|
|
3
|
-
// Theoretically, we could not do it at all and rely on repo configured linting.
|
|
4
|
-
// In practice e.g. when I hit ctrl+s in not formatted file - I had a huge lag.
|
|
5
|
-
export async function formatWithPrettier(content) {
|
|
6
|
-
const config = await prettier.resolveConfig(process.cwd());
|
|
7
|
-
return prettier.format(content, {
|
|
8
|
-
arrowParens: 'always',
|
|
9
|
-
endOfLine: 'lf',
|
|
10
|
-
parser: 'typescript',
|
|
11
|
-
printWidth: 120,
|
|
12
|
-
semi: false,
|
|
13
|
-
singleQuote: true,
|
|
14
|
-
tabWidth: 2,
|
|
15
|
-
trailingComma: 'all',
|
|
16
|
-
...config,
|
|
17
|
-
plugins: [],
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatWithPrettier.d.ts","sourceRoot":"","sources":["../../../../src/codegen/formatWithPrettier.ts"],"names":[],"mappings":"AAKA,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAezE"}
|