genlayer-js 0.23.1 → 0.25.0
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 +64 -2
- package/dist/{chunk-ZHBOSLFN.js → chunk-EY35NPSE.js} +13 -0
- package/dist/{chunk-W4V73RPN.cjs → chunk-GJXSECNH.cjs} +14 -1
- package/dist/{index-DOok9G7O.d.cts → index-BVTLJo0j.d.cts} +26 -1
- package/dist/{index-DbrlrnTQ.d.ts → index-Dc8L54mZ.d.ts} +26 -1
- package/dist/index.cjs +74 -30
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +55 -11
- package/dist/types/index.cjs +6 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,13 +99,75 @@ const transactionHash = await client.writeContract({
|
|
|
99
99
|
value: 0, // value is optional, if you want to send some native token to the contract
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
const receipt = await client.waitForTransactionReceipt({
|
|
103
|
-
hash: txHash,
|
|
102
|
+
const receipt = await client.waitForTransactionReceipt({
|
|
103
|
+
hash: txHash,
|
|
104
104
|
status: TransactionStatus.FINALIZED, // or ACCEPTED
|
|
105
105
|
fullTransaction: false // False by default - returns simplified receipt for better readability
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
```
|
|
109
|
+
|
|
110
|
+
### Checking execution results
|
|
111
|
+
|
|
112
|
+
A transaction can be finalized by consensus but still have a failed execution. Always check `txExecutionResult` before reading contract state:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { ExecutionResult, TransactionStatus } from "genlayer-js/types";
|
|
116
|
+
|
|
117
|
+
const receipt = await client.waitForTransactionReceipt({
|
|
118
|
+
hash: txHash,
|
|
119
|
+
status: TransactionStatus.FINALIZED,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
if (receipt.txExecutionResultName === ExecutionResult.FINISHED_WITH_RETURN) {
|
|
123
|
+
// Execution succeeded — safe to read state
|
|
124
|
+
const result = await client.readContract({
|
|
125
|
+
address: contractAddress,
|
|
126
|
+
functionName: "get_storage",
|
|
127
|
+
args: [],
|
|
128
|
+
});
|
|
129
|
+
} else if (receipt.txExecutionResultName === ExecutionResult.FINISHED_WITH_ERROR) {
|
|
130
|
+
// Execution failed — contract state was not modified
|
|
131
|
+
console.error("Contract execution failed");
|
|
132
|
+
} else {
|
|
133
|
+
// NOT_VOTED — execution hasn't completed
|
|
134
|
+
console.warn("Execution result not yet available");
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Fetching emitted messages and triggered transactions
|
|
139
|
+
|
|
140
|
+
Transactions can emit messages to other contracts. These messages create new child transactions when processed:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
const tx = await client.getTransaction({ hash: txHash });
|
|
144
|
+
|
|
145
|
+
// Messages emitted by the contract during execution
|
|
146
|
+
console.log(tx.messages);
|
|
147
|
+
// [{messageType, recipient, value, data, onAcceptance, saltNonce}, ...]
|
|
148
|
+
|
|
149
|
+
// Child transaction IDs created from those messages (separate call)
|
|
150
|
+
const childTxIds = await client.getTriggeredTransactionIds({ hash: txHash });
|
|
151
|
+
console.log(childTxIds);
|
|
152
|
+
// ["0xabc...", "0xdef..."]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Debugging transaction execution
|
|
156
|
+
|
|
157
|
+
Use `debugTraceTransaction` to inspect the full execution trace of a transaction, including return data, errors, and GenVM logs:
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
const trace = await client.debugTraceTransaction({
|
|
161
|
+
hash: txHash,
|
|
162
|
+
round: 0, // optional, defaults to 0
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
console.log(trace.result_code); // 0=success, 1=user error, 2=VM error
|
|
166
|
+
console.log(trace.return_data); // hex-encoded contract return data
|
|
167
|
+
console.log(trace.stderr); // standard error output
|
|
168
|
+
console.log(trace.genvm_log); // detailed GenVM execution logs
|
|
169
|
+
```
|
|
170
|
+
|
|
109
171
|
### Staking Operations
|
|
110
172
|
|
|
111
173
|
The SDK provides staking functionality for validators and delegators on testnet-bradbury (and testnet-asimov).
|
|
@@ -108,6 +108,17 @@ var TransactionResultNameToNumber = {
|
|
|
108
108
|
["MAJORITY_AGREE" /* MAJORITY_AGREE */]: "6",
|
|
109
109
|
["MAJORITY_DISAGREE" /* MAJORITY_DISAGREE */]: "7"
|
|
110
110
|
};
|
|
111
|
+
var ExecutionResult = /* @__PURE__ */ ((ExecutionResult2) => {
|
|
112
|
+
ExecutionResult2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
|
+
ExecutionResult2["FINISHED_WITH_RETURN"] = "FINISHED_WITH_RETURN";
|
|
114
|
+
ExecutionResult2["FINISHED_WITH_ERROR"] = "FINISHED_WITH_ERROR";
|
|
115
|
+
return ExecutionResult2;
|
|
116
|
+
})(ExecutionResult || {});
|
|
117
|
+
var executionResultNumberToName = {
|
|
118
|
+
"0": "NOT_VOTED" /* NOT_VOTED */,
|
|
119
|
+
"1": "FINISHED_WITH_RETURN" /* FINISHED_WITH_RETURN */,
|
|
120
|
+
"2": "FINISHED_WITH_ERROR" /* FINISHED_WITH_ERROR */
|
|
121
|
+
};
|
|
111
122
|
var VoteType = /* @__PURE__ */ ((VoteType2) => {
|
|
112
123
|
VoteType2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
124
|
VoteType2["AGREE"] = "AGREE";
|
|
@@ -146,6 +157,8 @@ export {
|
|
|
146
157
|
isDecidedState,
|
|
147
158
|
transactionResultNumberToName,
|
|
148
159
|
TransactionResultNameToNumber,
|
|
160
|
+
ExecutionResult,
|
|
161
|
+
executionResultNumberToName,
|
|
149
162
|
VoteType,
|
|
150
163
|
voteTypeNumberToName,
|
|
151
164
|
voteTypeNameToNumber,
|
|
@@ -108,6 +108,17 @@ var TransactionResultNameToNumber = {
|
|
|
108
108
|
["MAJORITY_AGREE" /* MAJORITY_AGREE */]: "6",
|
|
109
109
|
["MAJORITY_DISAGREE" /* MAJORITY_DISAGREE */]: "7"
|
|
110
110
|
};
|
|
111
|
+
var ExecutionResult = /* @__PURE__ */ ((ExecutionResult2) => {
|
|
112
|
+
ExecutionResult2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
|
+
ExecutionResult2["FINISHED_WITH_RETURN"] = "FINISHED_WITH_RETURN";
|
|
114
|
+
ExecutionResult2["FINISHED_WITH_ERROR"] = "FINISHED_WITH_ERROR";
|
|
115
|
+
return ExecutionResult2;
|
|
116
|
+
})(ExecutionResult || {});
|
|
117
|
+
var executionResultNumberToName = {
|
|
118
|
+
"0": "NOT_VOTED" /* NOT_VOTED */,
|
|
119
|
+
"1": "FINISHED_WITH_RETURN" /* FINISHED_WITH_RETURN */,
|
|
120
|
+
"2": "FINISHED_WITH_ERROR" /* FINISHED_WITH_ERROR */
|
|
121
|
+
};
|
|
111
122
|
var VoteType = /* @__PURE__ */ ((VoteType2) => {
|
|
112
123
|
VoteType2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
124
|
VoteType2["AGREE"] = "AGREE";
|
|
@@ -150,4 +161,6 @@ var TransactionHashVariant = /* @__PURE__ */ ((TransactionHashVariant2) => {
|
|
|
150
161
|
|
|
151
162
|
|
|
152
163
|
|
|
153
|
-
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
exports.CalldataAddress = CalldataAddress; exports.TransactionStatus = TransactionStatus; exports.TransactionResult = TransactionResult; exports.transactionsStatusNumberToName = transactionsStatusNumberToName; exports.transactionsStatusNameToNumber = transactionsStatusNameToNumber; exports.DECIDED_STATES = DECIDED_STATES; exports.isDecidedState = isDecidedState; exports.transactionResultNumberToName = transactionResultNumberToName; exports.TransactionResultNameToNumber = TransactionResultNameToNumber; exports.ExecutionResult = ExecutionResult; exports.executionResultNumberToName = executionResultNumberToName; exports.VoteType = VoteType; exports.voteTypeNumberToName = voteTypeNumberToName; exports.voteTypeNameToNumber = voteTypeNameToNumber; exports.TransactionHashVariant = TransactionHashVariant;
|
|
@@ -102,6 +102,16 @@ declare const TransactionResultNameToNumber: {
|
|
|
102
102
|
MAJORITY_AGREE: string;
|
|
103
103
|
MAJORITY_DISAGREE: string;
|
|
104
104
|
};
|
|
105
|
+
declare enum ExecutionResult {
|
|
106
|
+
NOT_VOTED = "NOT_VOTED",
|
|
107
|
+
FINISHED_WITH_RETURN = "FINISHED_WITH_RETURN",
|
|
108
|
+
FINISHED_WITH_ERROR = "FINISHED_WITH_ERROR"
|
|
109
|
+
}
|
|
110
|
+
declare const executionResultNumberToName: {
|
|
111
|
+
"0": ExecutionResult;
|
|
112
|
+
"1": ExecutionResult;
|
|
113
|
+
"2": ExecutionResult;
|
|
114
|
+
};
|
|
105
115
|
declare enum VoteType {
|
|
106
116
|
NOT_VOTED = "NOT_VOTED",
|
|
107
117
|
AGREE = "AGREE",
|
|
@@ -140,6 +150,18 @@ type DecodedCallData = {
|
|
|
140
150
|
leaderOnly?: boolean;
|
|
141
151
|
type: TransactionType;
|
|
142
152
|
};
|
|
153
|
+
type DebugTraceResult = {
|
|
154
|
+
transaction_id: string;
|
|
155
|
+
result_code: number;
|
|
156
|
+
return_data: string;
|
|
157
|
+
stdout: string;
|
|
158
|
+
stderr: string;
|
|
159
|
+
genvm_log: Record<string, unknown>[];
|
|
160
|
+
storage_proof: string;
|
|
161
|
+
run_time: string;
|
|
162
|
+
eq_outputs: string[];
|
|
163
|
+
stored_at?: string;
|
|
164
|
+
};
|
|
143
165
|
interface LeaderReceipt {
|
|
144
166
|
calldata: string;
|
|
145
167
|
class_name: string;
|
|
@@ -167,6 +189,8 @@ type GenLayerTransaction = {
|
|
|
167
189
|
randomSeed?: Hash;
|
|
168
190
|
result?: number;
|
|
169
191
|
resultName?: TransactionResult;
|
|
192
|
+
txExecutionResult?: number;
|
|
193
|
+
txExecutionResultName?: ExecutionResult;
|
|
170
194
|
data?: Record<string, unknown>;
|
|
171
195
|
txData?: Hex;
|
|
172
196
|
txDataDecoded?: DecodedDeployData | DecodedCallData;
|
|
@@ -225,6 +249,7 @@ type GenLayerRawTransaction = {
|
|
|
225
249
|
lastVoteTimestamp: bigint;
|
|
226
250
|
randomSeed: Hash;
|
|
227
251
|
result: number;
|
|
252
|
+
txExecutionResult?: number;
|
|
228
253
|
txData: Hex | undefined | null;
|
|
229
254
|
txReceipt: Hash;
|
|
230
255
|
messages: unknown[];
|
|
@@ -2873,4 +2898,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2873
2898
|
}) => Promise<bigint>;
|
|
2874
2899
|
} & StakingActions;
|
|
2875
2900
|
|
|
2876
|
-
export { type
|
|
2901
|
+
export { type ValidatorDepositOptions as $, type SnapSource as A, type StakingContract as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorView as F, type GenLayerClient as G, type Hash as H, type ValidatorIdentity as I, type ValidatorInfo as J, type PendingWithdrawal as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type BannedValidatorInfo as O, type PendingDeposit as P, type StakeInfo as Q, type EpochData as R, STAKING_ABI as S, type TransactionDataElement as T, type EpochInfo as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type StakingTransactionResult as X, type ValidatorJoinResult as Y, type DelegatorJoinResult as Z, type ValidatorJoinOptions as _, type DecodedCallData as a, type ValidatorExitOptions as a0, type ValidatorClaimOptions as a1, type ValidatorPrimeOptions as a2, type SetOperatorOptions as a3, type SetIdentityOptions as a4, type DelegatorJoinOptions as a5, type DelegatorExitOptions as a6, type DelegatorClaimOptions as a7, type StakingActions as a8, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type DebugTraceResult as z };
|
|
@@ -102,6 +102,16 @@ declare const TransactionResultNameToNumber: {
|
|
|
102
102
|
MAJORITY_AGREE: string;
|
|
103
103
|
MAJORITY_DISAGREE: string;
|
|
104
104
|
};
|
|
105
|
+
declare enum ExecutionResult {
|
|
106
|
+
NOT_VOTED = "NOT_VOTED",
|
|
107
|
+
FINISHED_WITH_RETURN = "FINISHED_WITH_RETURN",
|
|
108
|
+
FINISHED_WITH_ERROR = "FINISHED_WITH_ERROR"
|
|
109
|
+
}
|
|
110
|
+
declare const executionResultNumberToName: {
|
|
111
|
+
"0": ExecutionResult;
|
|
112
|
+
"1": ExecutionResult;
|
|
113
|
+
"2": ExecutionResult;
|
|
114
|
+
};
|
|
105
115
|
declare enum VoteType {
|
|
106
116
|
NOT_VOTED = "NOT_VOTED",
|
|
107
117
|
AGREE = "AGREE",
|
|
@@ -140,6 +150,18 @@ type DecodedCallData = {
|
|
|
140
150
|
leaderOnly?: boolean;
|
|
141
151
|
type: TransactionType;
|
|
142
152
|
};
|
|
153
|
+
type DebugTraceResult = {
|
|
154
|
+
transaction_id: string;
|
|
155
|
+
result_code: number;
|
|
156
|
+
return_data: string;
|
|
157
|
+
stdout: string;
|
|
158
|
+
stderr: string;
|
|
159
|
+
genvm_log: Record<string, unknown>[];
|
|
160
|
+
storage_proof: string;
|
|
161
|
+
run_time: string;
|
|
162
|
+
eq_outputs: string[];
|
|
163
|
+
stored_at?: string;
|
|
164
|
+
};
|
|
143
165
|
interface LeaderReceipt {
|
|
144
166
|
calldata: string;
|
|
145
167
|
class_name: string;
|
|
@@ -167,6 +189,8 @@ type GenLayerTransaction = {
|
|
|
167
189
|
randomSeed?: Hash;
|
|
168
190
|
result?: number;
|
|
169
191
|
resultName?: TransactionResult;
|
|
192
|
+
txExecutionResult?: number;
|
|
193
|
+
txExecutionResultName?: ExecutionResult;
|
|
170
194
|
data?: Record<string, unknown>;
|
|
171
195
|
txData?: Hex;
|
|
172
196
|
txDataDecoded?: DecodedDeployData | DecodedCallData;
|
|
@@ -225,6 +249,7 @@ type GenLayerRawTransaction = {
|
|
|
225
249
|
lastVoteTimestamp: bigint;
|
|
226
250
|
randomSeed: Hash;
|
|
227
251
|
result: number;
|
|
252
|
+
txExecutionResult?: number;
|
|
228
253
|
txData: Hex | undefined | null;
|
|
229
254
|
txReceipt: Hash;
|
|
230
255
|
messages: unknown[];
|
|
@@ -2873,4 +2898,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2873
2898
|
}) => Promise<bigint>;
|
|
2874
2899
|
} & StakingActions;
|
|
2875
2900
|
|
|
2876
|
-
export { type
|
|
2901
|
+
export { type ValidatorDepositOptions as $, type SnapSource as A, type StakingContract as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorView as F, type GenLayerClient as G, type Hash as H, type ValidatorIdentity as I, type ValidatorInfo as J, type PendingWithdrawal as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type BannedValidatorInfo as O, type PendingDeposit as P, type StakeInfo as Q, type EpochData as R, STAKING_ABI as S, type TransactionDataElement as T, type EpochInfo as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type StakingTransactionResult as X, type ValidatorJoinResult as Y, type DelegatorJoinResult as Z, type ValidatorJoinOptions as _, type DecodedCallData as a, type ValidatorExitOptions as a0, type ValidatorClaimOptions as a1, type ValidatorPrimeOptions as a2, type SetOperatorOptions as a3, type SetIdentityOptions as a4, type DelegatorJoinOptions as a5, type DelegatorExitOptions as a6, type DelegatorClaimOptions as a7, type StakingActions as a8, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type DebugTraceResult as z };
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,8 @@ var _chunkNOMVZBCRcjs = require('./chunk-NOMVZBCR.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
var _chunkGJXSECNHcjs = require('./chunk-GJXSECNH.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
@@ -187,7 +188,7 @@ function encodeImpl(to, data) {
|
|
|
187
188
|
}
|
|
188
189
|
} else if (data instanceof Map) {
|
|
189
190
|
encodeMap(to, data);
|
|
190
|
-
} else if (data instanceof
|
|
191
|
+
} else if (data instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
191
192
|
to.push(SPECIAL_ADDR);
|
|
192
193
|
for (const c of data.bytes) {
|
|
193
194
|
to.push(c);
|
|
@@ -262,7 +263,7 @@ function decodeImpl(data, index) {
|
|
|
262
263
|
case BigInt(SPECIAL_ADDR): {
|
|
263
264
|
const res = data.slice(index.i, index.i + 20);
|
|
264
265
|
index.i += 20;
|
|
265
|
-
return new (0,
|
|
266
|
+
return new (0, _chunkGJXSECNHcjs.CalldataAddress)(res);
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
const type = Number(cur & 0xffn) & (1 << BITS_IN_TYPE) - 1;
|
|
@@ -374,7 +375,7 @@ function toStringImpl(data, to) {
|
|
|
374
375
|
to.push("]");
|
|
375
376
|
} else if (data instanceof Map) {
|
|
376
377
|
toStringImplMap(data.entries(), to);
|
|
377
|
-
} else if (data instanceof
|
|
378
|
+
} else if (data instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
378
379
|
to.push("addr#");
|
|
379
380
|
for (const c of data.bytes) {
|
|
380
381
|
to.push(c.toString(16));
|
|
@@ -499,7 +500,7 @@ function _toJsonSafeDeep(value, seen) {
|
|
|
499
500
|
}
|
|
500
501
|
return obj;
|
|
501
502
|
}
|
|
502
|
-
if (value instanceof
|
|
503
|
+
if (value instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
503
504
|
return _viem.toHex.call(void 0, value.bytes);
|
|
504
505
|
}
|
|
505
506
|
if (Object.getPrototypeOf(value) === Object.prototype) {
|
|
@@ -1095,8 +1096,10 @@ var decodeTransaction = (tx) => {
|
|
|
1095
1096
|
processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _59 => _59.readStateBlockRange, 'optionalAccess', _60 => _60.processingBlock, 'optionalAccess', _61 => _61.toString, 'call', _62 => _62()]), () => ( "0")),
|
|
1096
1097
|
proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _63 => _63.readStateBlockRange, 'optionalAccess', _64 => _64.proposalBlock, 'optionalAccess', _65 => _65.toString, 'call', _66 => _66()]), () => ( "0"))
|
|
1097
1098
|
},
|
|
1098
|
-
statusName:
|
|
1099
|
-
resultName:
|
|
1099
|
+
statusName: _chunkGJXSECNHcjs.transactionsStatusNumberToName[String(tx.status)],
|
|
1100
|
+
resultName: _chunkGJXSECNHcjs.transactionResultNumberToName[String(tx.result)],
|
|
1101
|
+
txExecutionResult: tx.txExecutionResult !== void 0 ? Number(tx.txExecutionResult) : void 0,
|
|
1102
|
+
txExecutionResultName: tx.txExecutionResult !== void 0 ? _chunkGJXSECNHcjs.executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
|
|
1100
1103
|
lastRound: {
|
|
1101
1104
|
...tx.lastRound,
|
|
1102
1105
|
round: _nullishCoalesce(_optionalChain([tx, 'access', _67 => _67.lastRound, 'optionalAccess', _68 => _68.round, 'optionalAccess', _69 => _69.toString, 'call', _70 => _70()]), () => ( "0")),
|
|
@@ -1106,7 +1109,7 @@ var decodeTransaction = (tx) => {
|
|
|
1106
1109
|
appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _83 => _83.lastRound, 'optionalAccess', _84 => _84.appealBond, 'optionalAccess', _85 => _85.toString, 'call', _86 => _86()]), () => ( "0")),
|
|
1107
1110
|
rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _87 => _87.lastRound, 'optionalAccess', _88 => _88.rotationsLeft, 'optionalAccess', _89 => _89.toString, 'call', _90 => _90()]), () => ( "0")),
|
|
1108
1111
|
validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _91 => _91.lastRound, 'optionalAccess', _92 => _92.validatorVotes]), () => ( []))).map(
|
|
1109
|
-
(vote) =>
|
|
1112
|
+
(vote) => _chunkGJXSECNHcjs.voteTypeNumberToName[String(vote)]
|
|
1110
1113
|
)
|
|
1111
1114
|
}
|
|
1112
1115
|
};
|
|
@@ -1246,8 +1249,8 @@ var receiptActions = (client, publicClient) => ({
|
|
|
1246
1249
|
throw new Error("Transaction not found");
|
|
1247
1250
|
}
|
|
1248
1251
|
const transactionStatusString = String(transaction.status);
|
|
1249
|
-
const requestedStatus =
|
|
1250
|
-
if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ &&
|
|
1252
|
+
const requestedStatus = _chunkGJXSECNHcjs.transactionsStatusNameToNumber[status];
|
|
1253
|
+
if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ && _chunkGJXSECNHcjs.isDecidedState.call(void 0, transactionStatusString)) {
|
|
1251
1254
|
let finalTransaction = transaction;
|
|
1252
1255
|
if (client.chain.id === _chunkNOMVZBCRcjs.localnet.id) {
|
|
1253
1256
|
finalTransaction = decodeLocalnetTransaction(transaction);
|
|
@@ -1275,22 +1278,63 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1275
1278
|
if (client.chain.isStudio) {
|
|
1276
1279
|
const transaction2 = await client.getTransaction({ hash });
|
|
1277
1280
|
const localnetStatus = transaction2.status === "ACTIVATED" ? "PENDING" /* PENDING */ : transaction2.status;
|
|
1278
|
-
transaction2.status = Number(
|
|
1281
|
+
transaction2.status = Number(_chunkGJXSECNHcjs.transactionsStatusNameToNumber[localnetStatus]);
|
|
1279
1282
|
transaction2.statusName = localnetStatus;
|
|
1280
1283
|
return decodeLocalnetTransaction(transaction2);
|
|
1281
1284
|
}
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1285
|
+
const contractAddress = _optionalChain([client, 'access', _97 => _97.chain, 'access', _98 => _98.consensusDataContract, 'optionalAccess', _99 => _99.address]);
|
|
1286
|
+
const contractAbi = _optionalChain([client, 'access', _100 => _100.chain, 'access', _101 => _101.consensusDataContract, 'optionalAccess', _102 => _102.abi]);
|
|
1287
|
+
const [txDataRaw, allDataRaw] = await Promise.all([
|
|
1288
|
+
publicClient.readContract({
|
|
1289
|
+
address: contractAddress,
|
|
1290
|
+
abi: contractAbi,
|
|
1291
|
+
functionName: "getTransactionData",
|
|
1292
|
+
args: [hash, Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)]
|
|
1293
|
+
}),
|
|
1294
|
+
publicClient.readContract({
|
|
1295
|
+
address: contractAddress,
|
|
1296
|
+
abi: contractAbi,
|
|
1297
|
+
functionName: "getTransactionAllData",
|
|
1298
|
+
args: [hash]
|
|
1299
|
+
})
|
|
1300
|
+
]);
|
|
1301
|
+
const txData = txDataRaw;
|
|
1302
|
+
const [txAllData, roundsData] = allDataRaw;
|
|
1303
|
+
const transaction = {
|
|
1304
|
+
...txData,
|
|
1305
|
+
txExecutionResult: Number(txAllData.txExecutionResult)
|
|
1306
|
+
};
|
|
1292
1307
|
return decodeTransaction(transaction);
|
|
1293
1308
|
},
|
|
1309
|
+
getTriggeredTransactionIds: async ({ hash }) => {
|
|
1310
|
+
if (client.chain.isStudio) {
|
|
1311
|
+
const tx2 = await client.getTransaction({ hash });
|
|
1312
|
+
return _nullishCoalesce(tx2.triggered_transactions, () => ( []));
|
|
1313
|
+
}
|
|
1314
|
+
const tx = await transactionActions(client, publicClient).getTransaction({ hash });
|
|
1315
|
+
const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _103 => _103.readStateBlockRange, 'optionalAccess', _104 => _104.proposalBlock]), () => ( "0")));
|
|
1316
|
+
if (proposalBlock === BigInt(0)) return [];
|
|
1317
|
+
const scanRange = BigInt(100);
|
|
1318
|
+
const latestBlock = await publicClient.getBlockNumber();
|
|
1319
|
+
const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
|
|
1320
|
+
const consensusAddress = _optionalChain([client, 'access', _105 => _105.chain, 'access', _106 => _106.consensusMainContract, 'optionalAccess', _107 => _107.address]);
|
|
1321
|
+
const internalMessageProcessedTopic = _viem.keccak256.call(void 0, _viem.stringToBytes.call(void 0, "InternalMessageProcessed(bytes32,address,address)"));
|
|
1322
|
+
const logs = await publicClient.getLogs({
|
|
1323
|
+
address: consensusAddress,
|
|
1324
|
+
event: void 0,
|
|
1325
|
+
fromBlock: proposalBlock,
|
|
1326
|
+
toBlock,
|
|
1327
|
+
topics: [internalMessageProcessedTopic, hash]
|
|
1328
|
+
});
|
|
1329
|
+
return logs.map((log) => log.topics[1]).filter(Boolean);
|
|
1330
|
+
},
|
|
1331
|
+
debugTraceTransaction: async ({ hash, round = 0 }) => {
|
|
1332
|
+
const result = await client.request({
|
|
1333
|
+
method: "gen_dbg_traceTransaction",
|
|
1334
|
+
params: [{ txID: hash, round }]
|
|
1335
|
+
});
|
|
1336
|
+
return result;
|
|
1337
|
+
},
|
|
1294
1338
|
cancelTransaction: async ({ hash }) => {
|
|
1295
1339
|
if (!client.chain.isStudio) {
|
|
1296
1340
|
throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
|
|
@@ -1320,7 +1364,7 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1320
1364
|
},
|
|
1321
1365
|
estimateTransactionGas: async (transactionParams) => {
|
|
1322
1366
|
const formattedParams = {
|
|
1323
|
-
from: transactionParams.from || _optionalChain([client, 'access',
|
|
1367
|
+
from: transactionParams.from || _optionalChain([client, 'access', _108 => _108.account, 'optionalAccess', _109 => _109.address]),
|
|
1324
1368
|
to: transactionParams.to,
|
|
1325
1369
|
data: transactionParams.data || "0x",
|
|
1326
1370
|
value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
|
|
@@ -1363,7 +1407,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
|
|
|
1363
1407
|
chainName: selectedNetwork.name,
|
|
1364
1408
|
rpcUrls: selectedNetwork.rpcUrls.default.http,
|
|
1365
1409
|
nativeCurrency: selectedNetwork.nativeCurrency,
|
|
1366
|
-
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access',
|
|
1410
|
+
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _110 => _110.blockExplorers, 'optionalAccess', _111 => _111.default, 'access', _112 => _112.url])]
|
|
1367
1411
|
};
|
|
1368
1412
|
const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
|
|
1369
1413
|
if (currentChainId !== chainIdHex) {
|
|
@@ -1397,10 +1441,10 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1397
1441
|
}
|
|
1398
1442
|
const isFlask = async () => {
|
|
1399
1443
|
try {
|
|
1400
|
-
const clientVersion = await _optionalChain([window, 'access',
|
|
1444
|
+
const clientVersion = await _optionalChain([window, 'access', _113 => _113.ethereum, 'optionalAccess', _114 => _114.request, 'call', _115 => _115({
|
|
1401
1445
|
method: "web3_clientVersion"
|
|
1402
1446
|
})]);
|
|
1403
|
-
return _optionalChain([clientVersion, 'optionalAccess',
|
|
1447
|
+
return _optionalChain([clientVersion, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117("flask")]);
|
|
1404
1448
|
} catch (error) {
|
|
1405
1449
|
console.error("Error detecting Flask:", error);
|
|
1406
1450
|
return false;
|
|
@@ -1408,7 +1452,7 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1408
1452
|
};
|
|
1409
1453
|
const installedSnaps = async () => {
|
|
1410
1454
|
try {
|
|
1411
|
-
return await _optionalChain([window, 'access',
|
|
1455
|
+
return await _optionalChain([window, 'access', _118 => _118.ethereum, 'optionalAccess', _119 => _119.request, 'call', _120 => _120({
|
|
1412
1456
|
method: "wallet_getSnaps"
|
|
1413
1457
|
})]);
|
|
1414
1458
|
} catch (error) {
|
|
@@ -1495,7 +1539,7 @@ function extractRevertReason(err) {
|
|
|
1495
1539
|
}
|
|
1496
1540
|
const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
|
|
1497
1541
|
if (revertError instanceof _viem.ContractFunctionRevertedError) {
|
|
1498
|
-
if (_optionalChain([revertError, 'access',
|
|
1542
|
+
if (_optionalChain([revertError, 'access', _121 => _121.data, 'optionalAccess', _122 => _122.errorName])) {
|
|
1499
1543
|
return revertError.data.errorName;
|
|
1500
1544
|
}
|
|
1501
1545
|
return revertError.reason || "Unknown reason";
|
|
@@ -1583,7 +1627,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1583
1627
|
};
|
|
1584
1628
|
const getStakingAddress = () => {
|
|
1585
1629
|
const stakingConfig = client.chain.stakingContract;
|
|
1586
|
-
if (!_optionalChain([stakingConfig, 'optionalAccess',
|
|
1630
|
+
if (!_optionalChain([stakingConfig, 'optionalAccess', _123 => _123.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
|
|
1587
1631
|
throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
|
|
1588
1632
|
}
|
|
1589
1633
|
return stakingConfig.address;
|
|
@@ -1664,10 +1708,10 @@ var stakingActions = (client, publicClient) => {
|
|
|
1664
1708
|
return executeWrite({ to: getStakingAddress(), data });
|
|
1665
1709
|
},
|
|
1666
1710
|
validatorClaim: async (options) => {
|
|
1667
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
1711
|
+
if (!_optionalChain([options, 'optionalAccess', _124 => _124.validator]) && !client.account) {
|
|
1668
1712
|
throw new Error("Either provide validator address or initialize client with an account");
|
|
1669
1713
|
}
|
|
1670
|
-
const validatorAddress = _optionalChain([options, 'optionalAccess',
|
|
1714
|
+
const validatorAddress = _optionalChain([options, 'optionalAccess', _125 => _125.validator]) || client.account.address;
|
|
1671
1715
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1672
1716
|
abi: _chunkNOMVZBCRcjs.STAKING_ABI,
|
|
1673
1717
|
functionName: "validatorClaim",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-DqSbucSW.cjs';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-BVTLJo0j.cjs';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-DqSbucSW.js';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-Dc8L54mZ.js';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-C4Z24PT6.js";
|
|
10
10
|
import {
|
|
11
11
|
CalldataAddress,
|
|
12
|
+
executionResultNumberToName,
|
|
12
13
|
isDecidedState,
|
|
13
14
|
transactionResultNumberToName,
|
|
14
15
|
transactionsStatusNameToNumber,
|
|
15
16
|
transactionsStatusNumberToName,
|
|
16
17
|
voteTypeNumberToName
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EY35NPSE.js";
|
|
18
19
|
import {
|
|
19
20
|
__export
|
|
20
21
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -1097,6 +1098,8 @@ var decodeTransaction = (tx) => {
|
|
|
1097
1098
|
},
|
|
1098
1099
|
statusName: transactionsStatusNumberToName[String(tx.status)],
|
|
1099
1100
|
resultName: transactionResultNumberToName[String(tx.result)],
|
|
1101
|
+
txExecutionResult: tx.txExecutionResult !== void 0 ? Number(tx.txExecutionResult) : void 0,
|
|
1102
|
+
txExecutionResultName: tx.txExecutionResult !== void 0 ? executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
|
|
1100
1103
|
lastRound: {
|
|
1101
1104
|
...tx.lastRound,
|
|
1102
1105
|
round: tx.lastRound?.round?.toString() ?? "0",
|
|
@@ -1279,18 +1282,59 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1279
1282
|
transaction2.statusName = localnetStatus;
|
|
1280
1283
|
return decodeLocalnetTransaction(transaction2);
|
|
1281
1284
|
}
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1285
|
+
const contractAddress = client.chain.consensusDataContract?.address;
|
|
1286
|
+
const contractAbi = client.chain.consensusDataContract?.abi;
|
|
1287
|
+
const [txDataRaw, allDataRaw] = await Promise.all([
|
|
1288
|
+
publicClient.readContract({
|
|
1289
|
+
address: contractAddress,
|
|
1290
|
+
abi: contractAbi,
|
|
1291
|
+
functionName: "getTransactionData",
|
|
1292
|
+
args: [hash, Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)]
|
|
1293
|
+
}),
|
|
1294
|
+
publicClient.readContract({
|
|
1295
|
+
address: contractAddress,
|
|
1296
|
+
abi: contractAbi,
|
|
1297
|
+
functionName: "getTransactionAllData",
|
|
1298
|
+
args: [hash]
|
|
1299
|
+
})
|
|
1300
|
+
]);
|
|
1301
|
+
const txData = txDataRaw;
|
|
1302
|
+
const [txAllData, roundsData] = allDataRaw;
|
|
1303
|
+
const transaction = {
|
|
1304
|
+
...txData,
|
|
1305
|
+
txExecutionResult: Number(txAllData.txExecutionResult)
|
|
1306
|
+
};
|
|
1292
1307
|
return decodeTransaction(transaction);
|
|
1293
1308
|
},
|
|
1309
|
+
getTriggeredTransactionIds: async ({ hash }) => {
|
|
1310
|
+
if (client.chain.isStudio) {
|
|
1311
|
+
const tx2 = await client.getTransaction({ hash });
|
|
1312
|
+
return tx2.triggered_transactions ?? [];
|
|
1313
|
+
}
|
|
1314
|
+
const tx = await transactionActions(client, publicClient).getTransaction({ hash });
|
|
1315
|
+
const proposalBlock = BigInt(tx.readStateBlockRange?.proposalBlock ?? "0");
|
|
1316
|
+
if (proposalBlock === BigInt(0)) return [];
|
|
1317
|
+
const scanRange = BigInt(100);
|
|
1318
|
+
const latestBlock = await publicClient.getBlockNumber();
|
|
1319
|
+
const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
|
|
1320
|
+
const consensusAddress = client.chain.consensusMainContract?.address;
|
|
1321
|
+
const internalMessageProcessedTopic = keccak256(stringToBytes("InternalMessageProcessed(bytes32,address,address)"));
|
|
1322
|
+
const logs = await publicClient.getLogs({
|
|
1323
|
+
address: consensusAddress,
|
|
1324
|
+
event: void 0,
|
|
1325
|
+
fromBlock: proposalBlock,
|
|
1326
|
+
toBlock,
|
|
1327
|
+
topics: [internalMessageProcessedTopic, hash]
|
|
1328
|
+
});
|
|
1329
|
+
return logs.map((log) => log.topics[1]).filter(Boolean);
|
|
1330
|
+
},
|
|
1331
|
+
debugTraceTransaction: async ({ hash, round = 0 }) => {
|
|
1332
|
+
const result = await client.request({
|
|
1333
|
+
method: "gen_dbg_traceTransaction",
|
|
1334
|
+
params: [{ txID: hash, round }]
|
|
1335
|
+
});
|
|
1336
|
+
return result;
|
|
1337
|
+
},
|
|
1294
1338
|
cancelTransaction: async ({ hash }) => {
|
|
1295
1339
|
if (!client.chain.isStudio) {
|
|
1296
1340
|
throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
|
package/dist/types/index.cjs
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkGJXSECNHcjs = require('../chunk-GJXSECNH.cjs');
|
|
16
18
|
require('../chunk-75ZPJI57.cjs');
|
|
17
19
|
|
|
18
20
|
|
|
@@ -28,4 +30,6 @@ require('../chunk-75ZPJI57.cjs');
|
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.CalldataAddress = _chunkGJXSECNHcjs.CalldataAddress; exports.DECIDED_STATES = _chunkGJXSECNHcjs.DECIDED_STATES; exports.ExecutionResult = _chunkGJXSECNHcjs.ExecutionResult; exports.TransactionHashVariant = _chunkGJXSECNHcjs.TransactionHashVariant; exports.TransactionResult = _chunkGJXSECNHcjs.TransactionResult; exports.TransactionResultNameToNumber = _chunkGJXSECNHcjs.TransactionResultNameToNumber; exports.TransactionStatus = _chunkGJXSECNHcjs.TransactionStatus; exports.VoteType = _chunkGJXSECNHcjs.VoteType; exports.executionResultNumberToName = _chunkGJXSECNHcjs.executionResultNumberToName; exports.isDecidedState = _chunkGJXSECNHcjs.isDecidedState; exports.transactionResultNumberToName = _chunkGJXSECNHcjs.transactionResultNumberToName; exports.transactionsStatusNameToNumber = _chunkGJXSECNHcjs.transactionsStatusNameToNumber; exports.transactionsStatusNumberToName = _chunkGJXSECNHcjs.transactionsStatusNumberToName; exports.voteTypeNameToNumber = _chunkGJXSECNHcjs.voteTypeNameToNumber; exports.voteTypeNumberToName = _chunkGJXSECNHcjs.voteTypeNumberToName;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export {
|
|
2
|
+
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-BVTLJo0j.cjs';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-DqSbucSW.cjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export {
|
|
2
|
+
export { O as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-Dc8L54mZ.js';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-DqSbucSW.js';
|
package/dist/types/index.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalldataAddress,
|
|
3
3
|
DECIDED_STATES,
|
|
4
|
+
ExecutionResult,
|
|
4
5
|
TransactionHashVariant,
|
|
5
6
|
TransactionResult,
|
|
6
7
|
TransactionResultNameToNumber,
|
|
7
8
|
TransactionStatus,
|
|
8
9
|
VoteType,
|
|
10
|
+
executionResultNumberToName,
|
|
9
11
|
isDecidedState,
|
|
10
12
|
transactionResultNumberToName,
|
|
11
13
|
transactionsStatusNameToNumber,
|
|
12
14
|
transactionsStatusNumberToName,
|
|
13
15
|
voteTypeNameToNumber,
|
|
14
16
|
voteTypeNumberToName
|
|
15
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-EY35NPSE.js";
|
|
16
18
|
import "../chunk-MLKGABMK.js";
|
|
17
19
|
export {
|
|
18
20
|
CalldataAddress,
|
|
19
21
|
DECIDED_STATES,
|
|
22
|
+
ExecutionResult,
|
|
20
23
|
TransactionHashVariant,
|
|
21
24
|
TransactionResult,
|
|
22
25
|
TransactionResultNameToNumber,
|
|
23
26
|
TransactionStatus,
|
|
24
27
|
VoteType,
|
|
28
|
+
executionResultNumberToName,
|
|
25
29
|
isDecidedState,
|
|
26
30
|
transactionResultNumberToName,
|
|
27
31
|
transactionsStatusNameToNumber,
|