genlayer-js 0.9.0 → 0.9.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/CHANGELOG.md +4 -0
- package/dist/chains/index.cjs +2 -2
- package/dist/chains/index.d.cts +2 -2
- package/dist/chains/index.d.ts +2 -2
- package/dist/chains/index.js +3 -3
- package/dist/chains-BYSCF33g.d.cts +18 -0
- package/dist/chains-BYSCF33g.d.ts +18 -0
- package/dist/chunk-4FVQ3G7J.js +8039 -0
- package/dist/chunk-GACCNOPJ.js +138 -0
- package/dist/chunk-H4ZYXVV2.cjs +138 -0
- package/dist/chunk-SMCXL465.cjs +8039 -0
- package/dist/index-B52a6DSr.d.cts +13 -0
- package/dist/index-B_gpaVzJ.d.cts +374 -0
- package/dist/index-DNvW8slT.d.ts +13 -0
- package/dist/index-to6d0Hzj.d.ts +374 -0
- package/dist/index.cjs +4508 -290
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4507 -289
- package/dist/types/index.cjs +20 -2
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +21 -3
- package/package.json +2 -2
- package/src/accounts/IAccountActions.ts +2 -2
- package/src/accounts/actions.ts +10 -4
- package/src/chains/actions.ts +5 -5
- package/src/chains/index.ts +1 -1
- package/src/chains/localnet.ts +3989 -5
- package/src/chains/studionet.ts +4015 -0
- package/src/chains/testnetAsimov.ts +4015 -0
- package/src/client/client.ts +64 -21
- package/src/contracts/actions.ts +198 -127
- package/src/transactions/actions.ts +158 -23
- package/src/types/accounts.ts +1 -2
- package/src/types/chains.ts +8 -2
- package/src/types/clients.ts +14 -13
- package/src/types/network.ts +1 -1
- package/src/types/transactions.ts +254 -8
- package/src/wallet/actions.ts +4 -4
- package/src/wallet/connect.ts +18 -16
- package/tests/client.test.ts +105 -45
- package/dist/chains-C5PI_Nr_.d.cts +0 -13
- package/dist/chains-C5PI_Nr_.d.ts +0 -13
- package/dist/chunk-I6HC44KD.cjs +0 -72
- package/dist/chunk-K72OSU5N.js +0 -28
- package/dist/chunk-WEXFFND6.js +0 -72
- package/dist/chunk-YDFRDDP5.cjs +0 -28
- package/dist/index-B8E0qiOq.d.cts +0 -13
- package/dist/index-BCbofn6t.d.cts +0 -188
- package/dist/index-Ctmshvtv.d.ts +0 -188
- package/dist/index-ZoW0HQ_m.d.ts +0 -13
- package/src/chains/simulator.ts +0 -30
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { S as SimulatorChain } from './chains-C5PI_Nr_.cjs';
|
|
2
|
-
import { Client, Transport, WalletActions, PublicActions, Account } from 'viem';
|
|
3
|
-
|
|
4
|
-
type Address = `0x${string}` & {
|
|
5
|
-
length: 42;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
declare class CalldataAddress {
|
|
9
|
-
bytes: Uint8Array;
|
|
10
|
-
constructor(addr: Uint8Array);
|
|
11
|
-
}
|
|
12
|
-
type CalldataEncodable = null | boolean | CalldataAddress | number | bigint | string | Uint8Array | Array<CalldataEncodable> | Map<string, CalldataEncodable> | {
|
|
13
|
-
[key: string]: CalldataEncodable;
|
|
14
|
-
};
|
|
15
|
-
type MethodDescription = {
|
|
16
|
-
method: string;
|
|
17
|
-
args: Array<CalldataEncodable>;
|
|
18
|
-
};
|
|
19
|
-
type TransactionDataElement$1 = string | number | bigint | boolean | Uint8Array;
|
|
20
|
-
|
|
21
|
-
type TransactionHash = `0x${string}` & {
|
|
22
|
-
length: 66;
|
|
23
|
-
};
|
|
24
|
-
declare enum TransactionStatus {
|
|
25
|
-
PENDING = "PENDING",
|
|
26
|
-
CANCELED = "CANCELED",
|
|
27
|
-
PROPOSING = "PROPOSING",
|
|
28
|
-
COMMITTING = "COMMITTING",
|
|
29
|
-
REVEALING = "REVEALING",
|
|
30
|
-
ACCEPTED = "ACCEPTED",
|
|
31
|
-
FINALIZED = "FINALIZED",
|
|
32
|
-
UNDETERMINED = "UNDETERMINED"
|
|
33
|
-
}
|
|
34
|
-
type GenLayerTransaction = {
|
|
35
|
-
hash: TransactionHash;
|
|
36
|
-
status: TransactionStatus;
|
|
37
|
-
from_address?: string;
|
|
38
|
-
to_address?: string;
|
|
39
|
-
data?: Record<string, unknown>;
|
|
40
|
-
consensus_data?: {
|
|
41
|
-
final: boolean;
|
|
42
|
-
leader_receipt?: {
|
|
43
|
-
calldata: string;
|
|
44
|
-
class_name: string;
|
|
45
|
-
contract_state: string;
|
|
46
|
-
eq_outputs: Record<string, unknown>;
|
|
47
|
-
error: string | null;
|
|
48
|
-
execution_result: string;
|
|
49
|
-
gas_used: number;
|
|
50
|
-
mode: string;
|
|
51
|
-
node_config: Record<string, unknown>;
|
|
52
|
-
pending_transactions: unknown[];
|
|
53
|
-
vote: string;
|
|
54
|
-
result: string;
|
|
55
|
-
};
|
|
56
|
-
validators?: Record<string, unknown>[];
|
|
57
|
-
votes?: Record<string, string>;
|
|
58
|
-
};
|
|
59
|
-
nonce?: number;
|
|
60
|
-
value?: number;
|
|
61
|
-
type?: number;
|
|
62
|
-
gaslimit?: bigint;
|
|
63
|
-
created_at?: Date;
|
|
64
|
-
r?: number;
|
|
65
|
-
s?: number;
|
|
66
|
-
v?: number;
|
|
67
|
-
};
|
|
68
|
-
type TransactionDataElement = string | number | bigint | boolean | Uint8Array;
|
|
69
|
-
|
|
70
|
-
type ContractParamsArraySchemaElement = ContractParamsSchema | {
|
|
71
|
-
$rep: ContractParamsSchema;
|
|
72
|
-
};
|
|
73
|
-
type ContractParamsSchema = "null" | "bool" | "int" | "address" | "string" | "bytes" | "any" | "array" | "dict" | {
|
|
74
|
-
$or: ContractParamsSchema[];
|
|
75
|
-
} | {
|
|
76
|
-
$dict: ContractParamsSchema;
|
|
77
|
-
} | {
|
|
78
|
-
[key: string]: ContractParamsSchema;
|
|
79
|
-
} | ContractParamsArraySchemaElement[];
|
|
80
|
-
interface ContractMethodBase {
|
|
81
|
-
params: [string, ContractParamsSchema][];
|
|
82
|
-
kwparams: {
|
|
83
|
-
[key: string]: ContractParamsSchema;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
interface ContractMethod extends ContractMethodBase {
|
|
87
|
-
ret: ContractParamsSchema;
|
|
88
|
-
readonly: boolean;
|
|
89
|
-
}
|
|
90
|
-
type ContractSchema = {
|
|
91
|
-
ctor: ContractMethodBase;
|
|
92
|
-
methods: ContractMethod[];
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
type Network = 'localnet' | 'testnet' | 'mainnet';
|
|
96
|
-
|
|
97
|
-
type SnapSource = 'npm' | 'local';
|
|
98
|
-
|
|
99
|
-
type MetaMaskClientResult = {
|
|
100
|
-
isFlask: boolean;
|
|
101
|
-
installedSnaps: Record<string, any>;
|
|
102
|
-
isGenLayerSnapInstalled: boolean;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
type GenLayerMethod = {
|
|
106
|
-
method: "sim_fundAccount";
|
|
107
|
-
params: [address: string, amount: number];
|
|
108
|
-
} | {
|
|
109
|
-
method: "eth_getTransactionByHash";
|
|
110
|
-
params: [hash: TransactionHash];
|
|
111
|
-
} | {
|
|
112
|
-
method: "eth_call";
|
|
113
|
-
params: [requestParams: any, blockNumberOrHash: string];
|
|
114
|
-
} | {
|
|
115
|
-
method: "eth_sendRawTransaction";
|
|
116
|
-
params: [signedTransaction: string];
|
|
117
|
-
} | {
|
|
118
|
-
method: "gen_getContractSchema";
|
|
119
|
-
params: [address: string];
|
|
120
|
-
} | {
|
|
121
|
-
method: "gen_getContractSchemaForCode";
|
|
122
|
-
params: [contractCode: string];
|
|
123
|
-
} | {
|
|
124
|
-
method: "sim_getTransactionsForAddress";
|
|
125
|
-
params: [address: string, filter?: "all" | "from" | "to"];
|
|
126
|
-
} | {
|
|
127
|
-
method: "eth_getTransactionCount";
|
|
128
|
-
params: [address: string, block: string];
|
|
129
|
-
};
|
|
130
|
-
type GenLayerClient<TSimulatorChain extends SimulatorChain> = Omit<Client<Transport, TSimulatorChain>, "transport" | "getTransaction" | "readContract"> & Omit<WalletActions<TSimulatorChain>, "deployContract" | "writeContract"> & Omit<PublicActions<Transport, TSimulatorChain>, "readContract" | "getTransaction" | "waitForTransactionReceipt"> & {
|
|
131
|
-
request: Client<Transport, TSimulatorChain>["request"] & {
|
|
132
|
-
<TMethod extends GenLayerMethod>(args: Extract<GenLayerMethod, {
|
|
133
|
-
method: TMethod["method"];
|
|
134
|
-
}>): Promise<unknown>;
|
|
135
|
-
};
|
|
136
|
-
readContract: <RawReturn extends boolean | undefined>(args: {
|
|
137
|
-
account?: Account;
|
|
138
|
-
address: Address;
|
|
139
|
-
functionName: string;
|
|
140
|
-
stateStatus?: TransactionStatus;
|
|
141
|
-
args?: CalldataEncodable[];
|
|
142
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
143
|
-
[key: string]: CalldataEncodable;
|
|
144
|
-
};
|
|
145
|
-
rawReturn?: RawReturn;
|
|
146
|
-
}) => Promise<RawReturn extends true ? `0x${string}` : CalldataEncodable>;
|
|
147
|
-
writeContract: (args: {
|
|
148
|
-
account?: Account;
|
|
149
|
-
address: Address;
|
|
150
|
-
functionName: string;
|
|
151
|
-
args?: CalldataEncodable[];
|
|
152
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
153
|
-
[key: string]: CalldataEncodable;
|
|
154
|
-
};
|
|
155
|
-
value: bigint;
|
|
156
|
-
leaderOnly?: boolean;
|
|
157
|
-
consensusMaxRotations?: number;
|
|
158
|
-
}) => Promise<any>;
|
|
159
|
-
deployContract: (args: {
|
|
160
|
-
account?: Account;
|
|
161
|
-
code: string | Uint8Array;
|
|
162
|
-
args?: CalldataEncodable[];
|
|
163
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
164
|
-
[key: string]: CalldataEncodable;
|
|
165
|
-
};
|
|
166
|
-
leaderOnly?: boolean;
|
|
167
|
-
consensusMaxRotations?: number;
|
|
168
|
-
}) => Promise<`0x${string}`>;
|
|
169
|
-
getTransaction: (args: {
|
|
170
|
-
hash: TransactionHash;
|
|
171
|
-
}) => Promise<GenLayerTransaction>;
|
|
172
|
-
getCurrentNonce: (args: {
|
|
173
|
-
address: string;
|
|
174
|
-
}) => Promise<number>;
|
|
175
|
-
waitForTransactionReceipt: (args: {
|
|
176
|
-
hash: TransactionHash;
|
|
177
|
-
status?: TransactionStatus;
|
|
178
|
-
interval?: number;
|
|
179
|
-
retries?: number;
|
|
180
|
-
}) => Promise<GenLayerTransaction>;
|
|
181
|
-
getContractSchema: (address: string) => Promise<ContractSchema>;
|
|
182
|
-
getContractSchemaForCode: (contractCode: string | Uint8Array) => Promise<ContractSchema>;
|
|
183
|
-
initializeConsensusSmartContract: (forceReset?: boolean) => Promise<void>;
|
|
184
|
-
connect: (network?: Network, snapSource?: SnapSource) => Promise<void>;
|
|
185
|
-
metamaskClient: (snapSource?: SnapSource) => Promise<MetaMaskClientResult>;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export { type Address as A, type CalldataEncodable as C, type GenLayerClient as G, type MethodDescription as M, type Network as N, type SnapSource as S, type TransactionDataElement$1 as T, CalldataAddress as a, type GenLayerMethod as b, type ContractParamsArraySchemaElement as c, type ContractParamsSchema as d, type ContractMethodBase as e, type ContractMethod as f, type ContractSchema as g, type TransactionHash as h, TransactionStatus as i, type GenLayerTransaction as j, type TransactionDataElement as k };
|
package/dist/index-Ctmshvtv.d.ts
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { S as SimulatorChain } from './chains-C5PI_Nr_.js';
|
|
2
|
-
import { Client, Transport, WalletActions, PublicActions, Account } from 'viem';
|
|
3
|
-
|
|
4
|
-
type Address = `0x${string}` & {
|
|
5
|
-
length: 42;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
declare class CalldataAddress {
|
|
9
|
-
bytes: Uint8Array;
|
|
10
|
-
constructor(addr: Uint8Array);
|
|
11
|
-
}
|
|
12
|
-
type CalldataEncodable = null | boolean | CalldataAddress | number | bigint | string | Uint8Array | Array<CalldataEncodable> | Map<string, CalldataEncodable> | {
|
|
13
|
-
[key: string]: CalldataEncodable;
|
|
14
|
-
};
|
|
15
|
-
type MethodDescription = {
|
|
16
|
-
method: string;
|
|
17
|
-
args: Array<CalldataEncodable>;
|
|
18
|
-
};
|
|
19
|
-
type TransactionDataElement$1 = string | number | bigint | boolean | Uint8Array;
|
|
20
|
-
|
|
21
|
-
type TransactionHash = `0x${string}` & {
|
|
22
|
-
length: 66;
|
|
23
|
-
};
|
|
24
|
-
declare enum TransactionStatus {
|
|
25
|
-
PENDING = "PENDING",
|
|
26
|
-
CANCELED = "CANCELED",
|
|
27
|
-
PROPOSING = "PROPOSING",
|
|
28
|
-
COMMITTING = "COMMITTING",
|
|
29
|
-
REVEALING = "REVEALING",
|
|
30
|
-
ACCEPTED = "ACCEPTED",
|
|
31
|
-
FINALIZED = "FINALIZED",
|
|
32
|
-
UNDETERMINED = "UNDETERMINED"
|
|
33
|
-
}
|
|
34
|
-
type GenLayerTransaction = {
|
|
35
|
-
hash: TransactionHash;
|
|
36
|
-
status: TransactionStatus;
|
|
37
|
-
from_address?: string;
|
|
38
|
-
to_address?: string;
|
|
39
|
-
data?: Record<string, unknown>;
|
|
40
|
-
consensus_data?: {
|
|
41
|
-
final: boolean;
|
|
42
|
-
leader_receipt?: {
|
|
43
|
-
calldata: string;
|
|
44
|
-
class_name: string;
|
|
45
|
-
contract_state: string;
|
|
46
|
-
eq_outputs: Record<string, unknown>;
|
|
47
|
-
error: string | null;
|
|
48
|
-
execution_result: string;
|
|
49
|
-
gas_used: number;
|
|
50
|
-
mode: string;
|
|
51
|
-
node_config: Record<string, unknown>;
|
|
52
|
-
pending_transactions: unknown[];
|
|
53
|
-
vote: string;
|
|
54
|
-
result: string;
|
|
55
|
-
};
|
|
56
|
-
validators?: Record<string, unknown>[];
|
|
57
|
-
votes?: Record<string, string>;
|
|
58
|
-
};
|
|
59
|
-
nonce?: number;
|
|
60
|
-
value?: number;
|
|
61
|
-
type?: number;
|
|
62
|
-
gaslimit?: bigint;
|
|
63
|
-
created_at?: Date;
|
|
64
|
-
r?: number;
|
|
65
|
-
s?: number;
|
|
66
|
-
v?: number;
|
|
67
|
-
};
|
|
68
|
-
type TransactionDataElement = string | number | bigint | boolean | Uint8Array;
|
|
69
|
-
|
|
70
|
-
type ContractParamsArraySchemaElement = ContractParamsSchema | {
|
|
71
|
-
$rep: ContractParamsSchema;
|
|
72
|
-
};
|
|
73
|
-
type ContractParamsSchema = "null" | "bool" | "int" | "address" | "string" | "bytes" | "any" | "array" | "dict" | {
|
|
74
|
-
$or: ContractParamsSchema[];
|
|
75
|
-
} | {
|
|
76
|
-
$dict: ContractParamsSchema;
|
|
77
|
-
} | {
|
|
78
|
-
[key: string]: ContractParamsSchema;
|
|
79
|
-
} | ContractParamsArraySchemaElement[];
|
|
80
|
-
interface ContractMethodBase {
|
|
81
|
-
params: [string, ContractParamsSchema][];
|
|
82
|
-
kwparams: {
|
|
83
|
-
[key: string]: ContractParamsSchema;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
interface ContractMethod extends ContractMethodBase {
|
|
87
|
-
ret: ContractParamsSchema;
|
|
88
|
-
readonly: boolean;
|
|
89
|
-
}
|
|
90
|
-
type ContractSchema = {
|
|
91
|
-
ctor: ContractMethodBase;
|
|
92
|
-
methods: ContractMethod[];
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
type Network = 'localnet' | 'testnet' | 'mainnet';
|
|
96
|
-
|
|
97
|
-
type SnapSource = 'npm' | 'local';
|
|
98
|
-
|
|
99
|
-
type MetaMaskClientResult = {
|
|
100
|
-
isFlask: boolean;
|
|
101
|
-
installedSnaps: Record<string, any>;
|
|
102
|
-
isGenLayerSnapInstalled: boolean;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
type GenLayerMethod = {
|
|
106
|
-
method: "sim_fundAccount";
|
|
107
|
-
params: [address: string, amount: number];
|
|
108
|
-
} | {
|
|
109
|
-
method: "eth_getTransactionByHash";
|
|
110
|
-
params: [hash: TransactionHash];
|
|
111
|
-
} | {
|
|
112
|
-
method: "eth_call";
|
|
113
|
-
params: [requestParams: any, blockNumberOrHash: string];
|
|
114
|
-
} | {
|
|
115
|
-
method: "eth_sendRawTransaction";
|
|
116
|
-
params: [signedTransaction: string];
|
|
117
|
-
} | {
|
|
118
|
-
method: "gen_getContractSchema";
|
|
119
|
-
params: [address: string];
|
|
120
|
-
} | {
|
|
121
|
-
method: "gen_getContractSchemaForCode";
|
|
122
|
-
params: [contractCode: string];
|
|
123
|
-
} | {
|
|
124
|
-
method: "sim_getTransactionsForAddress";
|
|
125
|
-
params: [address: string, filter?: "all" | "from" | "to"];
|
|
126
|
-
} | {
|
|
127
|
-
method: "eth_getTransactionCount";
|
|
128
|
-
params: [address: string, block: string];
|
|
129
|
-
};
|
|
130
|
-
type GenLayerClient<TSimulatorChain extends SimulatorChain> = Omit<Client<Transport, TSimulatorChain>, "transport" | "getTransaction" | "readContract"> & Omit<WalletActions<TSimulatorChain>, "deployContract" | "writeContract"> & Omit<PublicActions<Transport, TSimulatorChain>, "readContract" | "getTransaction" | "waitForTransactionReceipt"> & {
|
|
131
|
-
request: Client<Transport, TSimulatorChain>["request"] & {
|
|
132
|
-
<TMethod extends GenLayerMethod>(args: Extract<GenLayerMethod, {
|
|
133
|
-
method: TMethod["method"];
|
|
134
|
-
}>): Promise<unknown>;
|
|
135
|
-
};
|
|
136
|
-
readContract: <RawReturn extends boolean | undefined>(args: {
|
|
137
|
-
account?: Account;
|
|
138
|
-
address: Address;
|
|
139
|
-
functionName: string;
|
|
140
|
-
stateStatus?: TransactionStatus;
|
|
141
|
-
args?: CalldataEncodable[];
|
|
142
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
143
|
-
[key: string]: CalldataEncodable;
|
|
144
|
-
};
|
|
145
|
-
rawReturn?: RawReturn;
|
|
146
|
-
}) => Promise<RawReturn extends true ? `0x${string}` : CalldataEncodable>;
|
|
147
|
-
writeContract: (args: {
|
|
148
|
-
account?: Account;
|
|
149
|
-
address: Address;
|
|
150
|
-
functionName: string;
|
|
151
|
-
args?: CalldataEncodable[];
|
|
152
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
153
|
-
[key: string]: CalldataEncodable;
|
|
154
|
-
};
|
|
155
|
-
value: bigint;
|
|
156
|
-
leaderOnly?: boolean;
|
|
157
|
-
consensusMaxRotations?: number;
|
|
158
|
-
}) => Promise<any>;
|
|
159
|
-
deployContract: (args: {
|
|
160
|
-
account?: Account;
|
|
161
|
-
code: string | Uint8Array;
|
|
162
|
-
args?: CalldataEncodable[];
|
|
163
|
-
kwargs?: Map<string, CalldataEncodable> | {
|
|
164
|
-
[key: string]: CalldataEncodable;
|
|
165
|
-
};
|
|
166
|
-
leaderOnly?: boolean;
|
|
167
|
-
consensusMaxRotations?: number;
|
|
168
|
-
}) => Promise<`0x${string}`>;
|
|
169
|
-
getTransaction: (args: {
|
|
170
|
-
hash: TransactionHash;
|
|
171
|
-
}) => Promise<GenLayerTransaction>;
|
|
172
|
-
getCurrentNonce: (args: {
|
|
173
|
-
address: string;
|
|
174
|
-
}) => Promise<number>;
|
|
175
|
-
waitForTransactionReceipt: (args: {
|
|
176
|
-
hash: TransactionHash;
|
|
177
|
-
status?: TransactionStatus;
|
|
178
|
-
interval?: number;
|
|
179
|
-
retries?: number;
|
|
180
|
-
}) => Promise<GenLayerTransaction>;
|
|
181
|
-
getContractSchema: (address: string) => Promise<ContractSchema>;
|
|
182
|
-
getContractSchemaForCode: (contractCode: string | Uint8Array) => Promise<ContractSchema>;
|
|
183
|
-
initializeConsensusSmartContract: (forceReset?: boolean) => Promise<void>;
|
|
184
|
-
connect: (network?: Network, snapSource?: SnapSource) => Promise<void>;
|
|
185
|
-
metamaskClient: (snapSource?: SnapSource) => Promise<MetaMaskClientResult>;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export { type Address as A, type CalldataEncodable as C, type GenLayerClient as G, type MethodDescription as M, type Network as N, type SnapSource as S, type TransactionDataElement$1 as T, CalldataAddress as a, type GenLayerMethod as b, type ContractParamsArraySchemaElement as c, type ContractParamsSchema as d, type ContractMethodBase as e, type ContractMethod as f, type ContractSchema as g, type TransactionHash as h, TransactionStatus as i, type GenLayerTransaction as j, type TransactionDataElement as k };
|
package/dist/index-ZoW0HQ_m.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { S as SimulatorChain } from './chains-C5PI_Nr_.js';
|
|
2
|
-
|
|
3
|
-
declare const localnet: SimulatorChain;
|
|
4
|
-
|
|
5
|
-
declare const simulator: SimulatorChain;
|
|
6
|
-
|
|
7
|
-
declare const index_localnet: typeof localnet;
|
|
8
|
-
declare const index_simulator: typeof simulator;
|
|
9
|
-
declare namespace index {
|
|
10
|
-
export { index_localnet as localnet, index_simulator as simulator };
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { index as i, localnet as l, simulator as s };
|
package/src/chains/simulator.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {defineChain} from "viem";
|
|
2
|
-
import {SimulatorChain} from "@/types";
|
|
3
|
-
|
|
4
|
-
// chains/simulator.ts
|
|
5
|
-
const SIMULATOR_JSON_RPC_URL = "http://127.0.0.1:4000/api";
|
|
6
|
-
|
|
7
|
-
export const simulator: SimulatorChain = defineChain({
|
|
8
|
-
id: 61_999,
|
|
9
|
-
name: "GenLayer Simulator",
|
|
10
|
-
rpcUrls: {
|
|
11
|
-
default: {
|
|
12
|
-
http: [SIMULATOR_JSON_RPC_URL],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
nativeCurrency: {
|
|
16
|
-
name: "GEN Token",
|
|
17
|
-
symbol: "GEN",
|
|
18
|
-
decimals: 18,
|
|
19
|
-
},
|
|
20
|
-
blockExplorers: {
|
|
21
|
-
default: {
|
|
22
|
-
name: "GenLayer Explorer",
|
|
23
|
-
url: SIMULATOR_JSON_RPC_URL,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
testnet: true,
|
|
27
|
-
consensusMainContract: null,
|
|
28
|
-
defaultNumberOfInitialValidators: 5,
|
|
29
|
-
defaultConsensusMaxRotations: 3,
|
|
30
|
-
});
|