@fangorn-network/sdk 0.2.0 → 0.2.2
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 +1 -1
- package/lib/cli/cli.js +3 -1
- package/lib/cli/index.js +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +4 -3
- package/lib/fangorn.js +1 -5
- package/lib/providers/storage/signed-url.d.ts +1 -1
- package/lib/providers/storage/signed-url.js +2 -1
- package/lib/providers/storage/types.js +43 -0
- package/lib/test/testbed.d.ts +60 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ The [Guide](docs/GUIDE.md) covers the full flow: commit vs push, epochs, history
|
|
|
62
62
|
|
|
63
63
|
## Network
|
|
64
64
|
|
|
65
|
-
Fangorn runs on **Base Sepolia** (the default) and **Arbitrum Sepolia**. Each has its own DataRegistry, SettlementRegistry, hosted upload worker and key server. Addresses are in [`src/config.ts`](src/config.ts) (`BaseSepoliaConfig`, `ArbitrumSepoliaConfig`). The CLI asks for the network in `fangorn init`, and `CHAIN_NAME
|
|
65
|
+
Fangorn runs on **Base Sepolia** (the default) and **Arbitrum Sepolia**. Each has its own DataRegistry, SettlementRegistry, hosted upload worker and key server. **Base** mainnet has a DataRegistry only: repos read and publish there, but there are no paid records, and no hosted upload worker yet, so publishing needs your own Pinata JWT. Addresses are in [`src/config.ts`](src/config.ts) (`BaseSepoliaConfig`, `ArbitrumSepoliaConfig`, `BaseConfig`). The CLI asks for the network in `fangorn init`, and `CHAIN_NAME` (`baseSepolia`, `arbitrumSepolia` or `base`) overrides it. To use a local anvil or a private deployment, pass your own `NetworkConfig` to `Fangorn.create`, or set the `FANGORN_*` overrides for the CLI (see the [Guide](docs/GUIDE.md#configure)). Contract sources are in [fangorn-network/contracts](https://github.com/fangorn-network/contracts).
|
|
66
66
|
|
|
67
67
|
## Development
|
|
68
68
|
|
package/lib/cli/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import { createRequire } from "node:module";
|
|
|
9
9
|
import { createPublicClient, formatEther, http, isAddress, parseUnits } from "viem";
|
|
10
10
|
import { privateKeyToAccount } from "viem/accounts";
|
|
11
11
|
import { Command } from "commander";
|
|
12
|
-
import { confirm, intro, outro, password, spinner, text } from "@clack/prompts";
|
|
12
|
+
import { confirm, intro, log, outro, password, spinner, text } from "@clack/prompts";
|
|
13
13
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "fs";
|
|
14
14
|
import { dirname, join, resolve } from "path";
|
|
15
15
|
import { homedir } from "os";
|
|
@@ -209,6 +209,8 @@ program.command("init").description("Configure your Fangorn credentials").action
|
|
|
209
209
|
placeholder: "https://pinata-url-provider.your-subdomain.workers.dev"
|
|
210
210
|
});
|
|
211
211
|
handleCancel(signedUrlWorkerUrl);
|
|
212
|
+
const net = getNetwork(chainName);
|
|
213
|
+
if (!net.signedUrlWorker && !nonBlank(pinataJwt) && !nonBlank(signedUrlWorkerUrl)) log.warn(`No hosted upload worker exists for ${net.chain.name}. If publishing data, include your own Pinata JWT (rerun \`fangorn init\`, or set PINATA_JWT).`);
|
|
212
214
|
writeStoredConfig({
|
|
213
215
|
privateKey,
|
|
214
216
|
chainName,
|
package/lib/cli/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const selectChain = async () => {
|
|
|
12
12
|
message: "Pick your chain.",
|
|
13
13
|
options: Object.entries(SupportedNetworks).map(([value, c]) => ({
|
|
14
14
|
value,
|
|
15
|
-
label: c.chain.name
|
|
15
|
+
label: c.chain.testnet ? c.chain.name : `${c.chain.name} (mainnet)`
|
|
16
16
|
}))
|
|
17
17
|
});
|
|
18
18
|
handleCancel(choice);
|
package/lib/config.d.ts
CHANGED
|
@@ -409,7 +409,7 @@ declare const ArbitrumSepoliaConfig: {
|
|
|
409
409
|
keyServer: string;
|
|
410
410
|
};
|
|
411
411
|
declare const BaseConfig: {
|
|
412
|
-
dataRegistryContractAddress: "
|
|
412
|
+
dataRegistryContractAddress: "0x543D559Cf7583FE7003d4A19E26BF3A4DB75fbC8";
|
|
413
413
|
fromBlock: bigint;
|
|
414
414
|
chain: {
|
|
415
415
|
blockExplorers: {
|
|
@@ -1073,7 +1073,7 @@ declare const FangornConfig: {
|
|
|
1073
1073
|
*/
|
|
1074
1074
|
declare const SupportedNetworks: Record<string, NetworkConfig>;
|
|
1075
1075
|
/**
|
|
1076
|
-
* Get a network's deployment by name ("baseSepolia" or "
|
|
1076
|
+
* Get a network's deployment by name ("baseSepolia", "arbitrumSepolia" or "base").
|
|
1077
1077
|
* @returns The corresponding config if it is supported, otherwise an error
|
|
1078
1078
|
*/
|
|
1079
1079
|
declare function getNetwork(name: string): NetworkConfig;
|
package/lib/config.js
CHANGED
|
@@ -35,7 +35,7 @@ const ArbitrumSepoliaConfig = {
|
|
|
35
35
|
keyServer: "https://arbitrum-sepolia.keys-test.fangorn.network"
|
|
36
36
|
};
|
|
37
37
|
const BaseConfig = {
|
|
38
|
-
dataRegistryContractAddress: "
|
|
38
|
+
dataRegistryContractAddress: "0x543D559Cf7583FE7003d4A19E26BF3A4DB75fbC8",
|
|
39
39
|
fromBlock: 59598762n,
|
|
40
40
|
chain: base,
|
|
41
41
|
rpcUrl: "https://base-rpc.publicnode.com",
|
|
@@ -53,10 +53,11 @@ const FangornConfig = BaseSepoliaConfig;
|
|
|
53
53
|
*/
|
|
54
54
|
const SupportedNetworks = {
|
|
55
55
|
baseSepolia: BaseSepoliaConfig,
|
|
56
|
-
arbitrumSepolia: ArbitrumSepoliaConfig
|
|
56
|
+
arbitrumSepolia: ArbitrumSepoliaConfig,
|
|
57
|
+
base: BaseConfig
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
|
-
* Get a network's deployment by name ("baseSepolia" or "
|
|
60
|
+
* Get a network's deployment by name ("baseSepolia", "arbitrumSepolia" or "base").
|
|
60
61
|
* @returns The corresponding config if it is supported, otherwise an error
|
|
61
62
|
*/
|
|
62
63
|
function getNetwork(name) {
|
package/lib/fangorn.js
CHANGED
|
@@ -29,11 +29,7 @@ function resolveStorage(storage, walletClient, config) {
|
|
|
29
29
|
if (!storage) return void 0;
|
|
30
30
|
if ("backend" in storage) return storage.backend;
|
|
31
31
|
if ("pinata" in storage) return new PinataBackend(storage.pinata.jwt, nonBlank(storage.pinata.gateway) ?? config.ipfsGateway);
|
|
32
|
-
if ("signedUrl" in storage)
|
|
33
|
-
const workerUrl = nonBlank(storage.signedUrl.workerUrl) ?? nonBlank(config.signedUrlWorker);
|
|
34
|
-
if (!workerUrl) throw new Error(`no hosted upload worker on chain ${config.caip2.toString()}: pass storage.signedUrl.workerUrl, or bring your own storage ({ pinata } or { backend })`);
|
|
35
|
-
return new SignedUrlBackend(workerUrl, walletSigner(walletClient), nonBlank(storage.signedUrl.gateway) ?? config.ipfsGateway);
|
|
36
|
-
}
|
|
32
|
+
if ("signedUrl" in storage) return new SignedUrlBackend(nonBlank(storage.signedUrl.workerUrl) ?? nonBlank(config.signedUrlWorker) ?? null, walletSigner(walletClient), nonBlank(storage.signedUrl.gateway) ?? config.ipfsGateway);
|
|
37
33
|
throw new Error(`Invalid storage config: must be { pinata: … }, { signedUrl: … } or { backend: … }, got ${JSON.stringify(storage)}`);
|
|
38
34
|
}
|
|
39
35
|
/**
|
|
@@ -35,7 +35,7 @@ declare class SignedUrlBackend implements MetadataStorage {
|
|
|
35
35
|
private readonly signer;
|
|
36
36
|
private readonly gateway;
|
|
37
37
|
private readonly workerUrl;
|
|
38
|
-
constructor(workerUrl: string | undefined, signer: SignedUrlSigner, gateway: string);
|
|
38
|
+
constructor(workerUrl: string | null | undefined, signer: SignedUrlSigner, gateway: string);
|
|
39
39
|
/** Run the worker challenge handshake → one-time presigned upload URL + network. */
|
|
40
40
|
private requestUploadUrl;
|
|
41
41
|
private workerJson;
|
|
@@ -38,7 +38,7 @@ var SignedUrlBackend = class {
|
|
|
38
38
|
constructor(workerUrl, signer, gateway) {
|
|
39
39
|
this.signer = signer;
|
|
40
40
|
this.gateway = gateway;
|
|
41
|
-
this.workerUrl = workerUrl?.trim() ? workerUrl : DEFAULT_SIGNED_URL_WORKER;
|
|
41
|
+
this.workerUrl = workerUrl === null ? null : workerUrl?.trim() ? workerUrl : DEFAULT_SIGNED_URL_WORKER;
|
|
42
42
|
}
|
|
43
43
|
/** Run the worker challenge handshake → one-time presigned upload URL + network. */
|
|
44
44
|
async requestUploadUrl(size, uploadId) {
|
|
@@ -64,6 +64,7 @@ var SignedUrlBackend = class {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
async workerJson(body) {
|
|
67
|
+
if (!this.workerUrl) throw new Error("no hosted upload worker on this chain: pass storage.signedUrl.workerUrl, or bring your own storage ({ pinata } or { backend })");
|
|
67
68
|
const res = await fetch(this.workerUrl, {
|
|
68
69
|
method: "POST",
|
|
69
70
|
headers: { "content-type": "application/json" },
|
|
@@ -20,6 +20,46 @@ function assertStoredBlock(returned, block) {
|
|
|
20
20
|
const want = CID.createV1(RAW_CODE, block.cid.multihash);
|
|
21
21
|
if (!cid?.equals(want)) throw new Error(`storage stored block ${block.cid.toString()} as ${JSON.stringify(returned)}, expected ${want.toString()}: readers could not fetch it`);
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The root CID of `content` imported as a UnixFS file in kubo's layout (CIDv1, raw leaves of 256 KiB, balanced,
|
|
25
|
+
* `fanout` links a node), which is how Pinata stores an upload. Built from the bytes alone, so a match proves the
|
|
26
|
+
* CID commits to them without fetching anything.
|
|
27
|
+
*/
|
|
28
|
+
async function kuboFileRoot(content, fanout) {
|
|
29
|
+
const CHUNK = 262144;
|
|
30
|
+
let level = [];
|
|
31
|
+
for (let o = 0; o < content.length; o += CHUNK) {
|
|
32
|
+
const leaf = content.subarray(o, o + CHUNK);
|
|
33
|
+
level.push({
|
|
34
|
+
cid: CID.createV1(RAW_CODE, await sha256.digest(leaf)),
|
|
35
|
+
size: leaf.length,
|
|
36
|
+
tsize: leaf.length
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
while (level.length > 1) {
|
|
40
|
+
const next = [];
|
|
41
|
+
for (let i = 0; i < level.length; i += fanout) {
|
|
42
|
+
const kids = level.slice(i, i + fanout);
|
|
43
|
+
const file = new UnixFS({ type: "file" });
|
|
44
|
+
for (const k of kids) file.addBlockSize(BigInt(k.size));
|
|
45
|
+
const node = dagPb.encode(dagPb.prepare({
|
|
46
|
+
Data: file.marshal(),
|
|
47
|
+
Links: kids.map((k) => ({
|
|
48
|
+
Hash: k.cid,
|
|
49
|
+
Name: "",
|
|
50
|
+
Tsize: k.tsize
|
|
51
|
+
}))
|
|
52
|
+
}));
|
|
53
|
+
next.push({
|
|
54
|
+
cid: CID.createV1(dagPb.code, await sha256.digest(node)),
|
|
55
|
+
size: kids.reduce((s, k) => s + k.size, 0),
|
|
56
|
+
tsize: node.length + kids.reduce((s, k) => s + k.tsize, 0)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
level = next;
|
|
60
|
+
}
|
|
61
|
+
return level[0]?.cid;
|
|
62
|
+
}
|
|
23
63
|
/** Verify the file reference before including it in a commit or paid handle. */
|
|
24
64
|
async function assertStoredFile(returned, bytes, storage) {
|
|
25
65
|
const root = CID.parse(returned.replace(/^ipfs:\/\//, ""));
|
|
@@ -47,6 +87,9 @@ async function assertStoredFile(returned, bytes, storage) {
|
|
|
47
87
|
offset = end;
|
|
48
88
|
}
|
|
49
89
|
}
|
|
90
|
+
if (root.code === dagPb.code) {
|
|
91
|
+
for (const fanout of [174, 1024]) if ((await kuboFileRoot(bytes, fanout))?.equals(root)) return;
|
|
92
|
+
}
|
|
50
93
|
await verify(root, bytes, 0);
|
|
51
94
|
}
|
|
52
95
|
|
package/lib/test/testbed.d.ts
CHANGED
|
@@ -3778,7 +3778,7 @@ declare function chainNetwork(): Promise<{
|
|
|
3778
3778
|
authorizationList: viem238.TransactionSerializableEIP7702["authorizationList"];
|
|
3779
3779
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? viem238.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
3780
3780
|
chainId?: number | undefined;
|
|
3781
|
-
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "
|
|
3781
|
+
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (viem238.UnionRequiredBy<Extract<viem238.UnionOmit<viem238.ExtractChainFormatterParameters<viem238.DeriveChain<{
|
|
3782
3782
|
id: 84532;
|
|
3783
3783
|
blockExplorers?: {
|
|
3784
3784
|
[key: string]: {
|
|
@@ -7189,7 +7189,7 @@ declare function chainNetwork(): Promise<{
|
|
|
7189
7189
|
authorizationList: viem238.TransactionSerializableEIP7702["authorizationList"];
|
|
7190
7190
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? viem238.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
7191
7191
|
chainId?: number | undefined;
|
|
7192
|
-
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "
|
|
7192
|
+
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] } : never>;
|
|
7193
7193
|
requestAddresses: () => Promise<viem238.RequestAddressesReturnType>;
|
|
7194
7194
|
requestPermissions: (args: viem238.RequestPermissionsParameters) => Promise<viem238.RequestPermissionsReturnType>;
|
|
7195
7195
|
sendCalls: <const calls extends readonly unknown[], chainOverride extends viem238.Chain | undefined = undefined>(parameters: viem238.SendCallsParameters<{
|
|
@@ -8593,36 +8593,34 @@ declare function chainNetwork(): Promise<{
|
|
|
8593
8593
|
[x: `string[${string}]`]: undefined;
|
|
8594
8594
|
[x: `function[${string}]`]: undefined;
|
|
8595
8595
|
[x: `address[${string}]`]: undefined;
|
|
8596
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
8597
|
-
[x: `uint256[${string}]`]: undefined;
|
|
8598
|
-
[x: `uint16[${string}]`]: undefined;
|
|
8599
8596
|
[x: `uint64[${string}]`]: undefined;
|
|
8600
|
-
[x: `
|
|
8597
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
8601
8598
|
[x: `bytes[${string}]`]: undefined;
|
|
8599
|
+
[x: `bool[${string}]`]: undefined;
|
|
8602
8600
|
[x: `bytes1[${string}]`]: undefined;
|
|
8603
|
-
[x: `
|
|
8604
|
-
[x: `
|
|
8601
|
+
[x: `bytes12[${string}]`]: undefined;
|
|
8602
|
+
[x: `bytes16[${string}]`]: undefined;
|
|
8603
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
8604
|
+
[x: `bytes24[${string}]`]: undefined;
|
|
8605
8605
|
[x: `bytes7[${string}]`]: undefined;
|
|
8606
|
+
[x: `bytes2[${string}]`]: undefined;
|
|
8606
8607
|
[x: `bytes3[${string}]`]: undefined;
|
|
8607
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
8608
8608
|
[x: `bytes5[${string}]`]: undefined;
|
|
8609
8609
|
[x: `bytes6[${string}]`]: undefined;
|
|
8610
8610
|
[x: `bytes8[${string}]`]: undefined;
|
|
8611
8611
|
[x: `bytes9[${string}]`]: undefined;
|
|
8612
8612
|
[x: `bytes10[${string}]`]: undefined;
|
|
8613
8613
|
[x: `bytes11[${string}]`]: undefined;
|
|
8614
|
-
[x: `bytes12[${string}]`]: undefined;
|
|
8615
8614
|
[x: `bytes13[${string}]`]: undefined;
|
|
8616
8615
|
[x: `bytes14[${string}]`]: undefined;
|
|
8617
8616
|
[x: `bytes15[${string}]`]: undefined;
|
|
8618
|
-
[x: `bytes16[${string}]`]: undefined;
|
|
8619
8617
|
[x: `bytes17[${string}]`]: undefined;
|
|
8618
|
+
[x: `bytes18[${string}]`]: undefined;
|
|
8620
8619
|
[x: `bytes19[${string}]`]: undefined;
|
|
8621
8620
|
[x: `bytes20[${string}]`]: undefined;
|
|
8622
8621
|
[x: `bytes21[${string}]`]: undefined;
|
|
8623
8622
|
[x: `bytes22[${string}]`]: undefined;
|
|
8624
8623
|
[x: `bytes23[${string}]`]: undefined;
|
|
8625
|
-
[x: `bytes24[${string}]`]: undefined;
|
|
8626
8624
|
[x: `bytes25[${string}]`]: undefined;
|
|
8627
8625
|
[x: `bytes26[${string}]`]: undefined;
|
|
8628
8626
|
[x: `bytes27[${string}]`]: undefined;
|
|
@@ -8631,11 +8629,11 @@ declare function chainNetwork(): Promise<{
|
|
|
8631
8629
|
[x: `bytes30[${string}]`]: undefined;
|
|
8632
8630
|
[x: `bytes31[${string}]`]: undefined;
|
|
8633
8631
|
[x: `int[${string}]`]: undefined;
|
|
8634
|
-
[x: `
|
|
8635
|
-
[x: `int8[${string}]`]: undefined;
|
|
8632
|
+
[x: `int32[${string}]`]: undefined;
|
|
8636
8633
|
[x: `int16[${string}]`]: undefined;
|
|
8634
|
+
[x: `int256[${string}]`]: undefined;
|
|
8637
8635
|
[x: `int24[${string}]`]: undefined;
|
|
8638
|
-
[x: `
|
|
8636
|
+
[x: `int8[${string}]`]: undefined;
|
|
8639
8637
|
[x: `int40[${string}]`]: undefined;
|
|
8640
8638
|
[x: `int48[${string}]`]: undefined;
|
|
8641
8639
|
[x: `int56[${string}]`]: undefined;
|
|
@@ -8645,6 +8643,7 @@ declare function chainNetwork(): Promise<{
|
|
|
8645
8643
|
[x: `int88[${string}]`]: undefined;
|
|
8646
8644
|
[x: `int96[${string}]`]: undefined;
|
|
8647
8645
|
[x: `int104[${string}]`]: undefined;
|
|
8646
|
+
[x: `int112[${string}]`]: undefined;
|
|
8648
8647
|
[x: `int120[${string}]`]: undefined;
|
|
8649
8648
|
[x: `int128[${string}]`]: undefined;
|
|
8650
8649
|
[x: `int136[${string}]`]: undefined;
|
|
@@ -8662,12 +8661,12 @@ declare function chainNetwork(): Promise<{
|
|
|
8662
8661
|
[x: `int232[${string}]`]: undefined;
|
|
8663
8662
|
[x: `int240[${string}]`]: undefined;
|
|
8664
8663
|
[x: `int248[${string}]`]: undefined;
|
|
8665
|
-
[x: `int256[${string}]`]: undefined;
|
|
8666
8664
|
[x: `uint[${string}]`]: undefined;
|
|
8667
|
-
[x: `uint112[${string}]`]: undefined;
|
|
8668
|
-
[x: `uint8[${string}]`]: undefined;
|
|
8669
|
-
[x: `uint24[${string}]`]: undefined;
|
|
8670
8665
|
[x: `uint32[${string}]`]: undefined;
|
|
8666
|
+
[x: `uint16[${string}]`]: undefined;
|
|
8667
|
+
[x: `uint256[${string}]`]: undefined;
|
|
8668
|
+
[x: `uint24[${string}]`]: undefined;
|
|
8669
|
+
[x: `uint8[${string}]`]: undefined;
|
|
8671
8670
|
[x: `uint40[${string}]`]: undefined;
|
|
8672
8671
|
[x: `uint48[${string}]`]: undefined;
|
|
8673
8672
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -8676,6 +8675,7 @@ declare function chainNetwork(): Promise<{
|
|
|
8676
8675
|
[x: `uint88[${string}]`]: undefined;
|
|
8677
8676
|
[x: `uint96[${string}]`]: undefined;
|
|
8678
8677
|
[x: `uint104[${string}]`]: undefined;
|
|
8678
|
+
[x: `uint112[${string}]`]: undefined;
|
|
8679
8679
|
[x: `uint120[${string}]`]: undefined;
|
|
8680
8680
|
[x: `uint128[${string}]`]: undefined;
|
|
8681
8681
|
[x: `uint136[${string}]`]: undefined;
|
|
@@ -8695,36 +8695,34 @@ declare function chainNetwork(): Promise<{
|
|
|
8695
8695
|
[x: `uint248[${string}]`]: undefined;
|
|
8696
8696
|
string?: undefined;
|
|
8697
8697
|
address?: undefined;
|
|
8698
|
-
bytes32?: undefined;
|
|
8699
|
-
uint256?: undefined;
|
|
8700
|
-
uint16?: undefined;
|
|
8701
8698
|
uint64?: undefined;
|
|
8702
|
-
|
|
8699
|
+
bytes32?: undefined;
|
|
8703
8700
|
bytes?: undefined;
|
|
8701
|
+
bool?: undefined;
|
|
8704
8702
|
bytes1?: undefined;
|
|
8705
|
-
|
|
8706
|
-
|
|
8703
|
+
bytes12?: undefined;
|
|
8704
|
+
bytes16?: undefined;
|
|
8705
|
+
bytes4?: undefined;
|
|
8706
|
+
bytes24?: undefined;
|
|
8707
8707
|
bytes7?: undefined;
|
|
8708
|
+
bytes2?: undefined;
|
|
8708
8709
|
bytes3?: undefined;
|
|
8709
|
-
bytes4?: undefined;
|
|
8710
8710
|
bytes5?: undefined;
|
|
8711
8711
|
bytes6?: undefined;
|
|
8712
8712
|
bytes8?: undefined;
|
|
8713
8713
|
bytes9?: undefined;
|
|
8714
8714
|
bytes10?: undefined;
|
|
8715
8715
|
bytes11?: undefined;
|
|
8716
|
-
bytes12?: undefined;
|
|
8717
8716
|
bytes13?: undefined;
|
|
8718
8717
|
bytes14?: undefined;
|
|
8719
8718
|
bytes15?: undefined;
|
|
8720
|
-
bytes16?: undefined;
|
|
8721
8719
|
bytes17?: undefined;
|
|
8720
|
+
bytes18?: undefined;
|
|
8722
8721
|
bytes19?: undefined;
|
|
8723
8722
|
bytes20?: undefined;
|
|
8724
8723
|
bytes21?: undefined;
|
|
8725
8724
|
bytes22?: undefined;
|
|
8726
8725
|
bytes23?: undefined;
|
|
8727
|
-
bytes24?: undefined;
|
|
8728
8726
|
bytes25?: undefined;
|
|
8729
8727
|
bytes26?: undefined;
|
|
8730
8728
|
bytes27?: undefined;
|
|
@@ -8732,11 +8730,11 @@ declare function chainNetwork(): Promise<{
|
|
|
8732
8730
|
bytes29?: undefined;
|
|
8733
8731
|
bytes30?: undefined;
|
|
8734
8732
|
bytes31?: undefined;
|
|
8735
|
-
|
|
8736
|
-
int8?: undefined;
|
|
8733
|
+
int32?: undefined;
|
|
8737
8734
|
int16?: undefined;
|
|
8735
|
+
int256?: undefined;
|
|
8738
8736
|
int24?: undefined;
|
|
8739
|
-
|
|
8737
|
+
int8?: undefined;
|
|
8740
8738
|
int40?: undefined;
|
|
8741
8739
|
int48?: undefined;
|
|
8742
8740
|
int56?: undefined;
|
|
@@ -8746,6 +8744,7 @@ declare function chainNetwork(): Promise<{
|
|
|
8746
8744
|
int88?: undefined;
|
|
8747
8745
|
int96?: undefined;
|
|
8748
8746
|
int104?: undefined;
|
|
8747
|
+
int112?: undefined;
|
|
8749
8748
|
int120?: undefined;
|
|
8750
8749
|
int128?: undefined;
|
|
8751
8750
|
int136?: undefined;
|
|
@@ -8763,11 +8762,11 @@ declare function chainNetwork(): Promise<{
|
|
|
8763
8762
|
int232?: undefined;
|
|
8764
8763
|
int240?: undefined;
|
|
8765
8764
|
int248?: undefined;
|
|
8766
|
-
int256?: undefined;
|
|
8767
|
-
uint112?: undefined;
|
|
8768
|
-
uint8?: undefined;
|
|
8769
|
-
uint24?: undefined;
|
|
8770
8765
|
uint32?: undefined;
|
|
8766
|
+
uint16?: undefined;
|
|
8767
|
+
uint256?: undefined;
|
|
8768
|
+
uint24?: undefined;
|
|
8769
|
+
uint8?: undefined;
|
|
8771
8770
|
uint40?: undefined;
|
|
8772
8771
|
uint48?: undefined;
|
|
8773
8772
|
uint56?: undefined;
|
|
@@ -8776,6 +8775,7 @@ declare function chainNetwork(): Promise<{
|
|
|
8776
8775
|
uint88?: undefined;
|
|
8777
8776
|
uint96?: undefined;
|
|
8778
8777
|
uint104?: undefined;
|
|
8778
|
+
uint112?: undefined;
|
|
8779
8779
|
uint120?: undefined;
|
|
8780
8780
|
uint128?: undefined;
|
|
8781
8781
|
uint136?: undefined;
|
|
@@ -9189,8 +9189,9 @@ declare function chainNetwork(): Promise<{
|
|
|
9189
9189
|
getBlobBaseFee: () => Promise<viem238.GetBlobBaseFeeReturnType>;
|
|
9190
9190
|
getBlock: <includeTransactions extends boolean = false, blockTag extends viem238.BlockTag = "latest">(args?: viem238.GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
|
|
9191
9191
|
number: blockTag extends "pending" ? null : bigint;
|
|
9192
|
-
|
|
9192
|
+
timestamp: bigint;
|
|
9193
9193
|
nonce: blockTag extends "pending" ? null : `0x${string}`;
|
|
9194
|
+
hash: blockTag extends "pending" ? null : `0x${string}`;
|
|
9194
9195
|
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
|
|
9195
9196
|
baseFeePerGas: bigint | null;
|
|
9196
9197
|
blobGasUsed: bigint;
|
|
@@ -9208,25 +9209,24 @@ declare function chainNetwork(): Promise<{
|
|
|
9208
9209
|
sha3Uncles: viem238.Hash;
|
|
9209
9210
|
size: bigint;
|
|
9210
9211
|
stateRoot: viem238.Hash;
|
|
9211
|
-
timestamp: bigint;
|
|
9212
9212
|
totalDifficulty: bigint | null;
|
|
9213
9213
|
transactionsRoot: viem238.Hash;
|
|
9214
9214
|
uncles: viem238.Hash[];
|
|
9215
9215
|
withdrawals?: viem238.Withdrawal[] | undefined | undefined;
|
|
9216
9216
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
9217
9217
|
transactions: includeTransactions extends true ? ({
|
|
9218
|
-
value: bigint;
|
|
9219
9218
|
type: "legacy";
|
|
9220
9219
|
chainId?: number | undefined;
|
|
9221
9220
|
r: Hex;
|
|
9222
9221
|
s: Hex;
|
|
9223
9222
|
v: bigint;
|
|
9224
9223
|
yParity?: undefined | undefined;
|
|
9224
|
+
value: bigint;
|
|
9225
9225
|
from: Address;
|
|
9226
|
+
nonce: number;
|
|
9226
9227
|
gas: bigint;
|
|
9227
9228
|
hash: viem238.Hash;
|
|
9228
9229
|
input: Hex;
|
|
9229
|
-
nonce: number;
|
|
9230
9230
|
to: Address | null;
|
|
9231
9231
|
typeHex: Hex | null;
|
|
9232
9232
|
accessList?: undefined | undefined;
|
|
@@ -9240,18 +9240,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9240
9240
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
9241
9241
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
9242
9242
|
} | {
|
|
9243
|
-
value: bigint;
|
|
9244
9243
|
type: "eip2930";
|
|
9245
9244
|
chainId: number;
|
|
9246
9245
|
r: Hex;
|
|
9247
9246
|
s: Hex;
|
|
9248
9247
|
v: bigint;
|
|
9249
9248
|
yParity: number;
|
|
9249
|
+
value: bigint;
|
|
9250
9250
|
from: Address;
|
|
9251
|
+
nonce: number;
|
|
9251
9252
|
gas: bigint;
|
|
9252
9253
|
hash: viem238.Hash;
|
|
9253
9254
|
input: Hex;
|
|
9254
|
-
nonce: number;
|
|
9255
9255
|
to: Address | null;
|
|
9256
9256
|
typeHex: Hex | null;
|
|
9257
9257
|
accessList: viem238.AccessList;
|
|
@@ -9265,18 +9265,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9265
9265
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
9266
9266
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
9267
9267
|
} | {
|
|
9268
|
-
value: bigint;
|
|
9269
9268
|
type: "eip1559";
|
|
9270
9269
|
chainId: number;
|
|
9271
9270
|
r: Hex;
|
|
9272
9271
|
s: Hex;
|
|
9273
9272
|
v: bigint;
|
|
9274
9273
|
yParity: number;
|
|
9274
|
+
value: bigint;
|
|
9275
9275
|
from: Address;
|
|
9276
|
+
nonce: number;
|
|
9276
9277
|
gas: bigint;
|
|
9277
9278
|
hash: viem238.Hash;
|
|
9278
9279
|
input: Hex;
|
|
9279
|
-
nonce: number;
|
|
9280
9280
|
to: Address | null;
|
|
9281
9281
|
typeHex: Hex | null;
|
|
9282
9282
|
accessList: viem238.AccessList;
|
|
@@ -9290,18 +9290,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9290
9290
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
9291
9291
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
9292
9292
|
} | {
|
|
9293
|
-
value: bigint;
|
|
9294
9293
|
type: "eip4844";
|
|
9295
9294
|
chainId: number;
|
|
9296
9295
|
r: Hex;
|
|
9297
9296
|
s: Hex;
|
|
9298
9297
|
v: bigint;
|
|
9299
9298
|
yParity: number;
|
|
9299
|
+
value: bigint;
|
|
9300
9300
|
from: Address;
|
|
9301
|
+
nonce: number;
|
|
9301
9302
|
gas: bigint;
|
|
9302
9303
|
hash: viem238.Hash;
|
|
9303
9304
|
input: Hex;
|
|
9304
|
-
nonce: number;
|
|
9305
9305
|
to: Address | null;
|
|
9306
9306
|
typeHex: Hex | null;
|
|
9307
9307
|
accessList: viem238.AccessList;
|
|
@@ -9315,18 +9315,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9315
9315
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
9316
9316
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
9317
9317
|
} | {
|
|
9318
|
-
value: bigint;
|
|
9319
9318
|
type: "eip7702";
|
|
9320
9319
|
chainId: number;
|
|
9321
9320
|
r: Hex;
|
|
9322
9321
|
s: Hex;
|
|
9323
9322
|
v: bigint;
|
|
9324
9323
|
yParity: number;
|
|
9324
|
+
value: bigint;
|
|
9325
9325
|
from: Address;
|
|
9326
|
+
nonce: number;
|
|
9326
9327
|
gas: bigint;
|
|
9327
9328
|
hash: viem238.Hash;
|
|
9328
9329
|
input: Hex;
|
|
9329
|
-
nonce: number;
|
|
9330
9330
|
to: Address | null;
|
|
9331
9331
|
typeHex: Hex | null;
|
|
9332
9332
|
accessList: viem238.AccessList;
|
|
@@ -9419,18 +9419,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9419
9419
|
} | undefined) => Promise<viem238.EstimateMaxPriorityFeePerGasReturnType>;
|
|
9420
9420
|
getStorageAt: (args: viem238.GetStorageAtParameters) => Promise<viem238.GetStorageAtReturnType>;
|
|
9421
9421
|
getTransaction: <blockTag extends viem238.BlockTag = "latest">(args: viem238.GetTransactionParameters<blockTag>) => Promise<{
|
|
9422
|
-
value: bigint;
|
|
9423
9422
|
type: "legacy";
|
|
9424
9423
|
chainId?: number | undefined;
|
|
9425
9424
|
r: Hex;
|
|
9426
9425
|
s: Hex;
|
|
9427
9426
|
v: bigint;
|
|
9428
9427
|
yParity?: undefined | undefined;
|
|
9428
|
+
value: bigint;
|
|
9429
9429
|
from: Address;
|
|
9430
|
+
nonce: number;
|
|
9430
9431
|
gas: bigint;
|
|
9431
9432
|
hash: viem238.Hash;
|
|
9432
9433
|
input: Hex;
|
|
9433
|
-
nonce: number;
|
|
9434
9434
|
to: Address | null;
|
|
9435
9435
|
typeHex: Hex | null;
|
|
9436
9436
|
accessList?: undefined | undefined;
|
|
@@ -9444,18 +9444,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9444
9444
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
9445
9445
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
9446
9446
|
} | {
|
|
9447
|
-
value: bigint;
|
|
9448
9447
|
type: "eip2930";
|
|
9449
9448
|
chainId: number;
|
|
9450
9449
|
r: Hex;
|
|
9451
9450
|
s: Hex;
|
|
9452
9451
|
v: bigint;
|
|
9453
9452
|
yParity: number;
|
|
9453
|
+
value: bigint;
|
|
9454
9454
|
from: Address;
|
|
9455
|
+
nonce: number;
|
|
9455
9456
|
gas: bigint;
|
|
9456
9457
|
hash: viem238.Hash;
|
|
9457
9458
|
input: Hex;
|
|
9458
|
-
nonce: number;
|
|
9459
9459
|
to: Address | null;
|
|
9460
9460
|
typeHex: Hex | null;
|
|
9461
9461
|
accessList: viem238.AccessList;
|
|
@@ -9469,18 +9469,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9469
9469
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
9470
9470
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
9471
9471
|
} | {
|
|
9472
|
-
value: bigint;
|
|
9473
9472
|
type: "eip1559";
|
|
9474
9473
|
chainId: number;
|
|
9475
9474
|
r: Hex;
|
|
9476
9475
|
s: Hex;
|
|
9477
9476
|
v: bigint;
|
|
9478
9477
|
yParity: number;
|
|
9478
|
+
value: bigint;
|
|
9479
9479
|
from: Address;
|
|
9480
|
+
nonce: number;
|
|
9480
9481
|
gas: bigint;
|
|
9481
9482
|
hash: viem238.Hash;
|
|
9482
9483
|
input: Hex;
|
|
9483
|
-
nonce: number;
|
|
9484
9484
|
to: Address | null;
|
|
9485
9485
|
typeHex: Hex | null;
|
|
9486
9486
|
accessList: viem238.AccessList;
|
|
@@ -9494,18 +9494,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9494
9494
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
9495
9495
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
9496
9496
|
} | {
|
|
9497
|
-
value: bigint;
|
|
9498
9497
|
type: "eip4844";
|
|
9499
9498
|
chainId: number;
|
|
9500
9499
|
r: Hex;
|
|
9501
9500
|
s: Hex;
|
|
9502
9501
|
v: bigint;
|
|
9503
9502
|
yParity: number;
|
|
9503
|
+
value: bigint;
|
|
9504
9504
|
from: Address;
|
|
9505
|
+
nonce: number;
|
|
9505
9506
|
gas: bigint;
|
|
9506
9507
|
hash: viem238.Hash;
|
|
9507
9508
|
input: Hex;
|
|
9508
|
-
nonce: number;
|
|
9509
9509
|
to: Address | null;
|
|
9510
9510
|
typeHex: Hex | null;
|
|
9511
9511
|
accessList: viem238.AccessList;
|
|
@@ -9519,18 +9519,18 @@ declare function chainNetwork(): Promise<{
|
|
|
9519
9519
|
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
9520
9520
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
9521
9521
|
} | {
|
|
9522
|
-
value: bigint;
|
|
9523
9522
|
type: "eip7702";
|
|
9524
9523
|
chainId: number;
|
|
9525
9524
|
r: Hex;
|
|
9526
9525
|
s: Hex;
|
|
9527
9526
|
v: bigint;
|
|
9528
9527
|
yParity: number;
|
|
9528
|
+
value: bigint;
|
|
9529
9529
|
from: Address;
|
|
9530
|
+
nonce: number;
|
|
9530
9531
|
gas: bigint;
|
|
9531
9532
|
hash: viem238.Hash;
|
|
9532
9533
|
input: Hex;
|
|
9533
|
-
nonce: number;
|
|
9534
9534
|
to: Address | null;
|
|
9535
9535
|
typeHex: Hex | null;
|
|
9536
9536
|
accessList: viem238.AccessList;
|
|
@@ -13118,7 +13118,7 @@ declare function chainNetwork(): Promise<{
|
|
|
13118
13118
|
authorizationList: viem238.TransactionSerializableEIP7702["authorizationList"];
|
|
13119
13119
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? viem238.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
13120
13120
|
chainId?: number | undefined;
|
|
13121
|
-
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "
|
|
13121
|
+
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (viem238.UnionRequiredBy<Extract<viem238.UnionOmit<viem238.ExtractChainFormatterParameters<viem238.DeriveChain<{
|
|
13122
13122
|
id: 84532;
|
|
13123
13123
|
blockExplorers?: {
|
|
13124
13124
|
[key: string]: {
|
|
@@ -16529,7 +16529,7 @@ declare function chainNetwork(): Promise<{
|
|
|
16529
16529
|
authorizationList: viem238.TransactionSerializableEIP7702["authorizationList"];
|
|
16530
16530
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? viem238.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
16531
16531
|
chainId?: number | undefined;
|
|
16532
|
-
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "
|
|
16532
|
+
}, (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem238.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "chainId" | "nonce" | "fees" | "gas" | "blobVersionedHashes") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] } : never>;
|
|
16533
16533
|
readContract: <const abi extends Abi | readonly unknown[], functionName extends viem238.ContractFunctionName<abi, "pure" | "view">, const args extends viem238.ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: viem238.ReadContractParameters<abi, functionName, args>) => Promise<viem238.ReadContractReturnType<abi, functionName, args>>;
|
|
16534
16534
|
sendRawTransaction: (args: viem238.SendRawTransactionParameters) => Promise<viem238.SendRawTransactionReturnType>;
|
|
16535
16535
|
sendRawTransactionSync: (args: viem238.SendRawTransactionSyncParameters) => Promise<viem238.TransactionReceipt>;
|