genlayer-js 0.21.2 → 0.21.4
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/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 +1 -1
- package/dist/{chains-B7B7UXdn.d.cts → chains-DqSbucSW.d.cts} +8 -0
- package/dist/{chains-B7B7UXdn.d.ts → chains-DqSbucSW.d.ts} +8 -0
- package/dist/{chunk-CX76PQR5.cjs → chunk-MXWQMAOO.cjs} +36 -0
- package/dist/{chunk-T3O6IXYQ.js → chunk-SHD4AYCN.js} +36 -0
- package/dist/{index-CsIdmK96.d.ts → index-BJ_hU-bk.d.ts} +5 -1
- package/dist/{index-HRqj9M3K.d.ts → index-BZj9d30J.d.ts} +1 -1
- package/dist/{index-DjR-MFPr.d.cts → index-BvRcfXce.d.cts} +1 -1
- package/dist/{index-Dja_Xmq_.d.cts → index-DIh568LH.d.cts} +5 -1
- package/dist/index.cjs +127 -71
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +60 -4
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/chains/index.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMXWQMAOOcjs = require('../chunk-MXWQMAOO.cjs');
|
|
7
7
|
require('../chunk-75ZPJI57.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.localnet =
|
|
13
|
+
exports.localnet = _chunkMXWQMAOOcjs.localnet; exports.studionet = _chunkMXWQMAOOcjs.studionet; exports.testnetAsimov = _chunkMXWQMAOOcjs.testnetAsimov; exports.testnetBradbury = _chunkMXWQMAOOcjs.testnetBradbury;
|
package/dist/chains/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { l as localnet, s as studionet, t as testnetAsimov, a as testnetBradbury } from '../index-
|
|
2
|
-
import '../chains-
|
|
1
|
+
export { l as localnet, s as studionet, t as testnetAsimov, a as testnetBradbury } from '../index-BvRcfXce.cjs';
|
|
2
|
+
import '../chains-DqSbucSW.cjs';
|
|
3
3
|
import 'viem';
|
package/dist/chains/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { l as localnet, s as studionet, t as testnetAsimov, a as testnetBradbury } from '../index-
|
|
2
|
-
import '../chains-
|
|
1
|
+
export { l as localnet, s as studionet, t as testnetAsimov, a as testnetBradbury } from '../index-BZj9d30J.js';
|
|
2
|
+
import '../chains-DqSbucSW.js';
|
|
3
3
|
import 'viem';
|
package/dist/chains/index.js
CHANGED
|
@@ -16,6 +16,14 @@ type GenLayerChain = Chain & {
|
|
|
16
16
|
address: Address;
|
|
17
17
|
abi: readonly unknown[];
|
|
18
18
|
} | null;
|
|
19
|
+
feeManagerContract: {
|
|
20
|
+
address: Address;
|
|
21
|
+
abi: readonly unknown[];
|
|
22
|
+
} | null;
|
|
23
|
+
roundsStorageContract: {
|
|
24
|
+
address: Address;
|
|
25
|
+
abi: readonly unknown[];
|
|
26
|
+
} | null;
|
|
19
27
|
defaultNumberOfInitialValidators: number;
|
|
20
28
|
defaultConsensusMaxRotations: number;
|
|
21
29
|
};
|
|
@@ -16,6 +16,14 @@ type GenLayerChain = Chain & {
|
|
|
16
16
|
address: Address;
|
|
17
17
|
abi: readonly unknown[];
|
|
18
18
|
} | null;
|
|
19
|
+
feeManagerContract: {
|
|
20
|
+
address: Address;
|
|
21
|
+
abi: readonly unknown[];
|
|
22
|
+
} | null;
|
|
23
|
+
roundsStorageContract: {
|
|
24
|
+
address: Address;
|
|
25
|
+
abi: readonly unknown[];
|
|
26
|
+
} | null;
|
|
19
27
|
defaultNumberOfInitialValidators: number;
|
|
20
28
|
defaultConsensusMaxRotations: number;
|
|
21
29
|
};
|
|
@@ -4020,6 +4020,8 @@ var localnet = _viem.defineChain.call(void 0, {
|
|
|
4020
4020
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT,
|
|
4021
4021
|
consensusDataContract: CONSENSUS_DATA_CONTRACT,
|
|
4022
4022
|
stakingContract: null,
|
|
4023
|
+
feeManagerContract: null,
|
|
4024
|
+
roundsStorageContract: null,
|
|
4023
4025
|
defaultNumberOfInitialValidators: 5,
|
|
4024
4026
|
defaultConsensusMaxRotations: 3
|
|
4025
4027
|
});
|
|
@@ -8034,6 +8036,8 @@ var studionet = _viem.defineChain.call(void 0, {
|
|
|
8034
8036
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT2,
|
|
8035
8037
|
consensusDataContract: CONSENSUS_DATA_CONTRACT2,
|
|
8036
8038
|
stakingContract: null,
|
|
8039
|
+
feeManagerContract: null,
|
|
8040
|
+
roundsStorageContract: null,
|
|
8037
8041
|
defaultNumberOfInitialValidators: 5,
|
|
8038
8042
|
defaultConsensusMaxRotations: 3
|
|
8039
8043
|
});
|
|
@@ -13518,6 +13522,8 @@ var testnetAsimov = _viem.defineChain.call(void 0, {
|
|
|
13518
13522
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT3,
|
|
13519
13523
|
consensusDataContract: CONSENSUS_DATA_CONTRACT3,
|
|
13520
13524
|
stakingContract: STAKING_CONTRACT,
|
|
13525
|
+
feeManagerContract: null,
|
|
13526
|
+
roundsStorageContract: null,
|
|
13521
13527
|
defaultNumberOfInitialValidators: 5,
|
|
13522
13528
|
defaultConsensusMaxRotations: 3
|
|
13523
13529
|
});
|
|
@@ -13529,6 +13535,34 @@ var STAKING_CONTRACT2 = {
|
|
|
13529
13535
|
address: "0x4A4449E617F8D10FDeD0b461CadEf83939E821A5",
|
|
13530
13536
|
abi: STAKING_ABI
|
|
13531
13537
|
};
|
|
13538
|
+
var FEE_MANAGER_CONTRACT = {
|
|
13539
|
+
address: "0xF205868bf5db79d2162843742D18D0900A9E462a",
|
|
13540
|
+
abi: [
|
|
13541
|
+
{
|
|
13542
|
+
type: "function",
|
|
13543
|
+
name: "calculateMinAppealBond",
|
|
13544
|
+
stateMutability: "view",
|
|
13545
|
+
inputs: [
|
|
13546
|
+
{ name: "_txId", type: "bytes32" },
|
|
13547
|
+
{ name: "_round", type: "uint256" },
|
|
13548
|
+
{ name: "_status", type: "uint8" }
|
|
13549
|
+
],
|
|
13550
|
+
outputs: [{ name: "totalFeesToPay", type: "uint256" }]
|
|
13551
|
+
}
|
|
13552
|
+
]
|
|
13553
|
+
};
|
|
13554
|
+
var ROUNDS_STORAGE_CONTRACT = {
|
|
13555
|
+
address: "0x7134D05af13A14c0b66Fe129fb930b1d0C420e33",
|
|
13556
|
+
abi: [
|
|
13557
|
+
{
|
|
13558
|
+
type: "function",
|
|
13559
|
+
name: "getRoundNumber",
|
|
13560
|
+
stateMutability: "view",
|
|
13561
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13562
|
+
outputs: [{ name: "", type: "uint256" }]
|
|
13563
|
+
}
|
|
13564
|
+
]
|
|
13565
|
+
};
|
|
13532
13566
|
var EXPLORER_URL3 = "https://explorer-bradbury.genlayer.com/";
|
|
13533
13567
|
var CONSENSUS_MAIN_CONTRACT4 = {
|
|
13534
13568
|
address: "0x0112Bf6e83497965A5fdD6Dad1E447a6E004271D",
|
|
@@ -16870,6 +16904,8 @@ var testnetBradbury = _viem.defineChain.call(void 0, {
|
|
|
16870
16904
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT4,
|
|
16871
16905
|
consensusDataContract: CONSENSUS_DATA_CONTRACT4,
|
|
16872
16906
|
stakingContract: STAKING_CONTRACT2,
|
|
16907
|
+
feeManagerContract: FEE_MANAGER_CONTRACT,
|
|
16908
|
+
roundsStorageContract: ROUNDS_STORAGE_CONTRACT,
|
|
16873
16909
|
defaultNumberOfInitialValidators: 5,
|
|
16874
16910
|
defaultConsensusMaxRotations: 3
|
|
16875
16911
|
});
|
|
@@ -4020,6 +4020,8 @@ var localnet = defineChain({
|
|
|
4020
4020
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT,
|
|
4021
4021
|
consensusDataContract: CONSENSUS_DATA_CONTRACT,
|
|
4022
4022
|
stakingContract: null,
|
|
4023
|
+
feeManagerContract: null,
|
|
4024
|
+
roundsStorageContract: null,
|
|
4023
4025
|
defaultNumberOfInitialValidators: 5,
|
|
4024
4026
|
defaultConsensusMaxRotations: 3
|
|
4025
4027
|
});
|
|
@@ -8034,6 +8036,8 @@ var studionet = defineChain2({
|
|
|
8034
8036
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT2,
|
|
8035
8037
|
consensusDataContract: CONSENSUS_DATA_CONTRACT2,
|
|
8036
8038
|
stakingContract: null,
|
|
8039
|
+
feeManagerContract: null,
|
|
8040
|
+
roundsStorageContract: null,
|
|
8037
8041
|
defaultNumberOfInitialValidators: 5,
|
|
8038
8042
|
defaultConsensusMaxRotations: 3
|
|
8039
8043
|
});
|
|
@@ -13518,6 +13522,8 @@ var testnetAsimov = defineChain3({
|
|
|
13518
13522
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT3,
|
|
13519
13523
|
consensusDataContract: CONSENSUS_DATA_CONTRACT3,
|
|
13520
13524
|
stakingContract: STAKING_CONTRACT,
|
|
13525
|
+
feeManagerContract: null,
|
|
13526
|
+
roundsStorageContract: null,
|
|
13521
13527
|
defaultNumberOfInitialValidators: 5,
|
|
13522
13528
|
defaultConsensusMaxRotations: 3
|
|
13523
13529
|
});
|
|
@@ -13529,6 +13535,34 @@ var STAKING_CONTRACT2 = {
|
|
|
13529
13535
|
address: "0x4A4449E617F8D10FDeD0b461CadEf83939E821A5",
|
|
13530
13536
|
abi: STAKING_ABI
|
|
13531
13537
|
};
|
|
13538
|
+
var FEE_MANAGER_CONTRACT = {
|
|
13539
|
+
address: "0xF205868bf5db79d2162843742D18D0900A9E462a",
|
|
13540
|
+
abi: [
|
|
13541
|
+
{
|
|
13542
|
+
type: "function",
|
|
13543
|
+
name: "calculateMinAppealBond",
|
|
13544
|
+
stateMutability: "view",
|
|
13545
|
+
inputs: [
|
|
13546
|
+
{ name: "_txId", type: "bytes32" },
|
|
13547
|
+
{ name: "_round", type: "uint256" },
|
|
13548
|
+
{ name: "_status", type: "uint8" }
|
|
13549
|
+
],
|
|
13550
|
+
outputs: [{ name: "totalFeesToPay", type: "uint256" }]
|
|
13551
|
+
}
|
|
13552
|
+
]
|
|
13553
|
+
};
|
|
13554
|
+
var ROUNDS_STORAGE_CONTRACT = {
|
|
13555
|
+
address: "0x7134D05af13A14c0b66Fe129fb930b1d0C420e33",
|
|
13556
|
+
abi: [
|
|
13557
|
+
{
|
|
13558
|
+
type: "function",
|
|
13559
|
+
name: "getRoundNumber",
|
|
13560
|
+
stateMutability: "view",
|
|
13561
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13562
|
+
outputs: [{ name: "", type: "uint256" }]
|
|
13563
|
+
}
|
|
13564
|
+
]
|
|
13565
|
+
};
|
|
13532
13566
|
var EXPLORER_URL3 = "https://explorer-bradbury.genlayer.com/";
|
|
13533
13567
|
var CONSENSUS_MAIN_CONTRACT4 = {
|
|
13534
13568
|
address: "0x0112Bf6e83497965A5fdD6Dad1E447a6E004271D",
|
|
@@ -16870,6 +16904,8 @@ var testnetBradbury = defineChain4({
|
|
|
16870
16904
|
consensusMainContract: CONSENSUS_MAIN_CONTRACT4,
|
|
16871
16905
|
consensusDataContract: CONSENSUS_DATA_CONTRACT4,
|
|
16872
16906
|
stakingContract: STAKING_CONTRACT2,
|
|
16907
|
+
feeManagerContract: FEE_MANAGER_CONTRACT,
|
|
16908
|
+
roundsStorageContract: ROUNDS_STORAGE_CONTRACT,
|
|
16873
16909
|
defaultNumberOfInitialValidators: 5,
|
|
16874
16910
|
defaultConsensusMaxRotations: 3
|
|
16875
16911
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex, Address, GetContractReturnType, PublicClient, Client, Transport, Chain, Account, WalletActions, PublicActions } from 'viem';
|
|
2
|
-
import { G as GenLayerChain } from './chains-
|
|
2
|
+
import { G as GenLayerChain } from './chains-DqSbucSW.js';
|
|
3
3
|
|
|
4
4
|
declare class CalldataAddress {
|
|
5
5
|
bytes: Uint8Array;
|
|
@@ -2844,7 +2844,11 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2844
2844
|
appealTransaction: (args: {
|
|
2845
2845
|
account?: Account;
|
|
2846
2846
|
txId: `0x${string}`;
|
|
2847
|
+
value?: bigint;
|
|
2847
2848
|
}) => Promise<any>;
|
|
2849
|
+
getMinAppealBond: (args: {
|
|
2850
|
+
txId: `0x${string}`;
|
|
2851
|
+
}) => Promise<bigint>;
|
|
2848
2852
|
} & StakingActions;
|
|
2849
2853
|
|
|
2850
2854
|
export { type ValidatorPrimeOptions as $, type ValidatorView as A, type ValidatorIdentity as B, type CalldataEncodable as C, type DecodedDeployData as D, type ValidatorInfo as E, type PendingWithdrawal as F, type GenLayerClient as G, type Hash as H, type BannedValidatorInfo as I, type StakeInfo as J, type EpochData as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type EpochInfo as O, type PendingDeposit as P, type StakingTransactionResult as Q, type ValidatorJoinResult as R, STAKING_ABI as S, type TransactionDataElement as T, type DelegatorJoinResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinOptions as X, type ValidatorDepositOptions as Y, type ValidatorExitOptions as Z, type ValidatorClaimOptions as _, type DecodedCallData as a, type SetOperatorOptions as a0, type SetIdentityOptions as a1, type DelegatorJoinOptions as a2, type DelegatorExitOptions as a3, type DelegatorClaimOptions as a4, type StakingActions as a5, 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, VoteType as s, transactionsStatusNumberToName as t, voteTypeNameToNumber as u, voteTypeNumberToName as v, type TransactionType as w, TransactionHashVariant as x, type SnapSource as y, type StakingContract as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex, Address, GetContractReturnType, PublicClient, Client, Transport, Chain, Account, WalletActions, PublicActions } from 'viem';
|
|
2
|
-
import { G as GenLayerChain } from './chains-
|
|
2
|
+
import { G as GenLayerChain } from './chains-DqSbucSW.cjs';
|
|
3
3
|
|
|
4
4
|
declare class CalldataAddress {
|
|
5
5
|
bytes: Uint8Array;
|
|
@@ -2844,7 +2844,11 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2844
2844
|
appealTransaction: (args: {
|
|
2845
2845
|
account?: Account;
|
|
2846
2846
|
txId: `0x${string}`;
|
|
2847
|
+
value?: bigint;
|
|
2847
2848
|
}) => Promise<any>;
|
|
2849
|
+
getMinAppealBond: (args: {
|
|
2850
|
+
txId: `0x${string}`;
|
|
2851
|
+
}) => Promise<bigint>;
|
|
2848
2852
|
} & StakingActions;
|
|
2849
2853
|
|
|
2850
2854
|
export { type ValidatorPrimeOptions as $, type ValidatorView as A, type ValidatorIdentity as B, type CalldataEncodable as C, type DecodedDeployData as D, type ValidatorInfo as E, type PendingWithdrawal as F, type GenLayerClient as G, type Hash as H, type BannedValidatorInfo as I, type StakeInfo as J, type EpochData as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type EpochInfo as O, type PendingDeposit as P, type StakingTransactionResult as Q, type ValidatorJoinResult as R, STAKING_ABI as S, type TransactionDataElement as T, type DelegatorJoinResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinOptions as X, type ValidatorDepositOptions as Y, type ValidatorExitOptions as Z, type ValidatorClaimOptions as _, type DecodedCallData as a, type SetOperatorOptions as a0, type SetIdentityOptions as a1, type DelegatorJoinOptions as a2, type DelegatorExitOptions as a3, type DelegatorClaimOptions as a4, type StakingActions as a5, 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, VoteType as s, transactionsStatusNumberToName as t, voteTypeNameToNumber as u, voteTypeNumberToName as v, type TransactionType as w, TransactionHashVariant as x, type SnapSource as y, type StakingContract as z };
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkMXWQMAOOcjs = require('./chunk-MXWQMAOO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ var _viem = require('viem');
|
|
|
32
32
|
function accountActions(client) {
|
|
33
33
|
return {
|
|
34
34
|
fundAccount: async ({ address, amount }) => {
|
|
35
|
-
if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !==
|
|
35
|
+
if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !== _chunkMXWQMAOOcjs.localnet.id) {
|
|
36
36
|
throw new Error("Client is not connected to the localnet");
|
|
37
37
|
}
|
|
38
38
|
return client.request({
|
|
@@ -416,8 +416,8 @@ function serialize(data) {
|
|
|
416
416
|
// src/abi/index.ts
|
|
417
417
|
var abi_exports = {};
|
|
418
418
|
_chunk75ZPJI57cjs.__export.call(void 0, abi_exports, {
|
|
419
|
-
STAKING_ABI: () =>
|
|
420
|
-
VALIDATOR_WALLET_ABI: () =>
|
|
419
|
+
STAKING_ABI: () => _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
420
|
+
VALIDATOR_WALLET_ABI: () => _chunkMXWQMAOOcjs.VALIDATOR_WALLET_ABI,
|
|
421
421
|
calldata: () => calldata,
|
|
422
422
|
transactions: () => transactions
|
|
423
423
|
});
|
|
@@ -514,10 +514,23 @@ function _toJsonSafeDeep(value, seen) {
|
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
// src/contracts/actions.ts
|
|
517
|
+
function extractGenCallResult(result) {
|
|
518
|
+
if (typeof result === "string") {
|
|
519
|
+
return `0x${result}`;
|
|
520
|
+
}
|
|
521
|
+
if (result && typeof result === "object" && "data" in result) {
|
|
522
|
+
const obj = result;
|
|
523
|
+
if (obj.status && obj.status.code !== 0) {
|
|
524
|
+
throw new Error(`gen_call failed: ${obj.status.message}`);
|
|
525
|
+
}
|
|
526
|
+
return `0x${obj.data}`;
|
|
527
|
+
}
|
|
528
|
+
throw new Error(`Unexpected gen_call response: ${JSON.stringify(result)}`);
|
|
529
|
+
}
|
|
517
530
|
var contractActions = (client, publicClient) => {
|
|
518
531
|
return {
|
|
519
532
|
getContractCode: async (address) => {
|
|
520
|
-
if (client.chain.id !==
|
|
533
|
+
if (client.chain.id !== _chunkMXWQMAOOcjs.localnet.id) {
|
|
521
534
|
throw new Error("Getting contract code is not supported on this network");
|
|
522
535
|
}
|
|
523
536
|
const result = await client.request({
|
|
@@ -528,7 +541,7 @@ var contractActions = (client, publicClient) => {
|
|
|
528
541
|
return new TextDecoder().decode(codeBytes);
|
|
529
542
|
},
|
|
530
543
|
getContractSchema: async (address) => {
|
|
531
|
-
if (client.chain.id !==
|
|
544
|
+
if (client.chain.id !== _chunkMXWQMAOOcjs.localnet.id) {
|
|
532
545
|
throw new Error("Contract schema is not supported on this network");
|
|
533
546
|
}
|
|
534
547
|
const schema = await client.request({
|
|
@@ -538,7 +551,7 @@ var contractActions = (client, publicClient) => {
|
|
|
538
551
|
return schema;
|
|
539
552
|
},
|
|
540
553
|
getContractSchemaForCode: async (contractCode) => {
|
|
541
|
-
if (client.chain.id !==
|
|
554
|
+
if (client.chain.id !== _chunkMXWQMAOOcjs.localnet.id) {
|
|
542
555
|
throw new Error("Contract schema is not supported on this network");
|
|
543
556
|
}
|
|
544
557
|
const schema = await client.request({
|
|
@@ -572,7 +585,7 @@ var contractActions = (client, publicClient) => {
|
|
|
572
585
|
method: "gen_call",
|
|
573
586
|
params: [requestParams]
|
|
574
587
|
});
|
|
575
|
-
const prefixedResult =
|
|
588
|
+
const prefixedResult = extractGenCallResult(result);
|
|
576
589
|
if (args.rawReturn) {
|
|
577
590
|
return prefixedResult;
|
|
578
591
|
}
|
|
@@ -607,7 +620,7 @@ var contractActions = (client, publicClient) => {
|
|
|
607
620
|
method: "gen_call",
|
|
608
621
|
params: [requestParams]
|
|
609
622
|
});
|
|
610
|
-
const prefixedResult =
|
|
623
|
+
const prefixedResult = extractGenCallResult(result);
|
|
611
624
|
if (args.rawReturn) {
|
|
612
625
|
return prefixedResult;
|
|
613
626
|
}
|
|
@@ -675,15 +688,58 @@ var contractActions = (client, publicClient) => {
|
|
|
675
688
|
senderAccount
|
|
676
689
|
});
|
|
677
690
|
},
|
|
691
|
+
getMinAppealBond: async (args) => {
|
|
692
|
+
const { txId } = args;
|
|
693
|
+
if (!_optionalChain([client, 'access', _11 => _11.chain, 'access', _12 => _12.feeManagerContract, 'optionalAccess', _13 => _13.address]) || !_optionalChain([client, 'access', _14 => _14.chain, 'access', _15 => _15.roundsStorageContract, 'optionalAccess', _16 => _16.address])) {
|
|
694
|
+
throw new Error("Appeal bond calculation not supported on this chain (missing feeManagerContract/roundsStorageContract)");
|
|
695
|
+
}
|
|
696
|
+
const roundNumber = await publicClient.readContract({
|
|
697
|
+
address: client.chain.roundsStorageContract.address,
|
|
698
|
+
abi: client.chain.roundsStorageContract.abi,
|
|
699
|
+
functionName: "getRoundNumber",
|
|
700
|
+
args: [txId]
|
|
701
|
+
});
|
|
702
|
+
const transaction = await client.getTransaction({ hash: txId });
|
|
703
|
+
const txStatus = Number(transaction.status);
|
|
704
|
+
const minBond = await publicClient.readContract({
|
|
705
|
+
address: client.chain.feeManagerContract.address,
|
|
706
|
+
abi: client.chain.feeManagerContract.abi,
|
|
707
|
+
functionName: "calculateMinAppealBond",
|
|
708
|
+
args: [txId, roundNumber, txStatus]
|
|
709
|
+
});
|
|
710
|
+
return minBond;
|
|
711
|
+
},
|
|
678
712
|
appealTransaction: async (args) => {
|
|
679
713
|
const { account, txId } = args;
|
|
714
|
+
let { value } = args;
|
|
715
|
+
if (value === void 0) {
|
|
716
|
+
if (_optionalChain([client, 'access', _17 => _17.chain, 'access', _18 => _18.feeManagerContract, 'optionalAccess', _19 => _19.address]) && _optionalChain([client, 'access', _20 => _20.chain, 'access', _21 => _21.roundsStorageContract, 'optionalAccess', _22 => _22.address])) {
|
|
717
|
+
const roundNumber = await publicClient.readContract({
|
|
718
|
+
address: client.chain.roundsStorageContract.address,
|
|
719
|
+
abi: client.chain.roundsStorageContract.abi,
|
|
720
|
+
functionName: "getRoundNumber",
|
|
721
|
+
args: [txId]
|
|
722
|
+
});
|
|
723
|
+
const transaction = await client.getTransaction({ hash: txId });
|
|
724
|
+
const txStatus = Number(transaction.status);
|
|
725
|
+
value = await publicClient.readContract({
|
|
726
|
+
address: client.chain.feeManagerContract.address,
|
|
727
|
+
abi: client.chain.feeManagerContract.abi,
|
|
728
|
+
functionName: "calculateMinAppealBond",
|
|
729
|
+
args: [txId, roundNumber, txStatus]
|
|
730
|
+
});
|
|
731
|
+
} else {
|
|
732
|
+
value = 0n;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
680
735
|
const senderAccount = account || client.account;
|
|
681
736
|
const encodedData = _encodeSubmitAppealData({ client, txId });
|
|
682
737
|
return _sendTransaction({
|
|
683
738
|
client,
|
|
684
739
|
publicClient,
|
|
685
740
|
encodedData,
|
|
686
|
-
senderAccount
|
|
741
|
+
senderAccount,
|
|
742
|
+
value
|
|
687
743
|
});
|
|
688
744
|
}
|
|
689
745
|
};
|
|
@@ -738,7 +794,7 @@ var getAddTransactionInputCount = (abi) => {
|
|
|
738
794
|
const candidate = item;
|
|
739
795
|
return candidate.type === "function" && candidate.name === "addTransaction";
|
|
740
796
|
});
|
|
741
|
-
return Array.isArray(_optionalChain([addTransactionFunction, 'optionalAccess',
|
|
797
|
+
return Array.isArray(_optionalChain([addTransactionFunction, 'optionalAccess', _23 => _23.inputs])) ? addTransactionFunction.inputs.length : 0;
|
|
742
798
|
};
|
|
743
799
|
var _encodeAddTransactionData = ({
|
|
744
800
|
client,
|
|
@@ -765,7 +821,7 @@ var _encodeAddTransactionData = ({
|
|
|
765
821
|
functionName: "addTransaction",
|
|
766
822
|
args: [...addTransactionArgs, 0n]
|
|
767
823
|
});
|
|
768
|
-
if (getAddTransactionInputCount(_optionalChain([client, 'access',
|
|
824
|
+
if (getAddTransactionInputCount(_optionalChain([client, 'access', _24 => _24.chain, 'access', _25 => _25.consensusMainContract, 'optionalAccess', _26 => _26.abi])) >= 6) {
|
|
769
825
|
return {
|
|
770
826
|
primaryEncodedData: encodedDataV6,
|
|
771
827
|
fallbackEncodedData: encodedDataV5
|
|
@@ -781,7 +837,7 @@ var _encodeSubmitAppealData = ({
|
|
|
781
837
|
txId
|
|
782
838
|
}) => {
|
|
783
839
|
return _viem.encodeFunctionData.call(void 0, {
|
|
784
|
-
abi: _optionalChain([client, 'access',
|
|
840
|
+
abi: _optionalChain([client, 'access', _27 => _27.chain, 'access', _28 => _28.consensusMainContract, 'optionalAccess', _29 => _29.abi]),
|
|
785
841
|
functionName: "submitAppeal",
|
|
786
842
|
args: [txId]
|
|
787
843
|
});
|
|
@@ -802,9 +858,9 @@ var isAddTransactionAbiMismatchError = (error) => {
|
|
|
802
858
|
}) : "";
|
|
803
859
|
const errorObject = error;
|
|
804
860
|
const errorMessage = [
|
|
805
|
-
_optionalChain([errorObject, 'optionalAccess',
|
|
806
|
-
_optionalChain([errorObject, 'optionalAccess',
|
|
807
|
-
_optionalChain([errorObject, 'optionalAccess',
|
|
861
|
+
_optionalChain([errorObject, 'optionalAccess', _30 => _30.shortMessage]),
|
|
862
|
+
_optionalChain([errorObject, 'optionalAccess', _31 => _31.details]),
|
|
863
|
+
_optionalChain([errorObject, 'optionalAccess', _32 => _32.message]),
|
|
808
864
|
serializedError,
|
|
809
865
|
String(_nullishCoalesce(error, () => ( "")))
|
|
810
866
|
].filter(Boolean).join(" ").toLowerCase();
|
|
@@ -818,7 +874,7 @@ var _sendTransaction = async ({
|
|
|
818
874
|
senderAccount,
|
|
819
875
|
value = 0n
|
|
820
876
|
}) => {
|
|
821
|
-
if (!_optionalChain([client, 'access',
|
|
877
|
+
if (!_optionalChain([client, 'access', _33 => _33.chain, 'access', _34 => _34.consensusMainContract, 'optionalAccess', _35 => _35.address])) {
|
|
822
878
|
throw new Error("Consensus main contract not initialized. Please ensure client is properly initialized.");
|
|
823
879
|
}
|
|
824
880
|
const validatedSenderAccount = validateAccount(senderAccount);
|
|
@@ -828,7 +884,7 @@ var _sendTransaction = async ({
|
|
|
828
884
|
try {
|
|
829
885
|
estimatedGas = await client.estimateTransactionGas({
|
|
830
886
|
from: validatedSenderAccount.address,
|
|
831
|
-
to: _optionalChain([client, 'access',
|
|
887
|
+
to: _optionalChain([client, 'access', _36 => _36.chain, 'access', _37 => _37.consensusMainContract, 'optionalAccess', _38 => _38.address]),
|
|
832
888
|
data: encodedDataForSend,
|
|
833
889
|
value
|
|
834
890
|
});
|
|
@@ -836,8 +892,8 @@ var _sendTransaction = async ({
|
|
|
836
892
|
console.error("Gas estimation failed, using default 200_000:", err);
|
|
837
893
|
estimatedGas = 200000n;
|
|
838
894
|
}
|
|
839
|
-
if (_optionalChain([validatedSenderAccount, 'optionalAccess',
|
|
840
|
-
if (!_optionalChain([validatedSenderAccount, 'optionalAccess',
|
|
895
|
+
if (_optionalChain([validatedSenderAccount, 'optionalAccess', _39 => _39.type]) === "local") {
|
|
896
|
+
if (!_optionalChain([validatedSenderAccount, 'optionalAccess', _40 => _40.signTransaction])) {
|
|
841
897
|
throw new Error("Account does not support signTransaction");
|
|
842
898
|
}
|
|
843
899
|
const gasPriceHex2 = await client.request({
|
|
@@ -845,7 +901,7 @@ var _sendTransaction = async ({
|
|
|
845
901
|
});
|
|
846
902
|
const transactionRequest = {
|
|
847
903
|
account: validatedSenderAccount,
|
|
848
|
-
to: _optionalChain([client, 'access',
|
|
904
|
+
to: _optionalChain([client, 'access', _41 => _41.chain, 'access', _42 => _42.consensusMainContract, 'optionalAccess', _43 => _43.address]),
|
|
849
905
|
data: encodedDataForSend,
|
|
850
906
|
type: "legacy",
|
|
851
907
|
nonce: Number(nonce),
|
|
@@ -861,7 +917,7 @@ var _sendTransaction = async ({
|
|
|
861
917
|
throw new Error("Transaction reverted");
|
|
862
918
|
}
|
|
863
919
|
const newTxEvents = _viem.parseEventLogs.call(void 0, {
|
|
864
|
-
abi: _optionalChain([client, 'access',
|
|
920
|
+
abi: _optionalChain([client, 'access', _44 => _44.chain, 'access', _45 => _45.consensusMainContract, 'optionalAccess', _46 => _46.abi]),
|
|
865
921
|
eventName: "NewTransaction",
|
|
866
922
|
logs: receipt.logs
|
|
867
923
|
});
|
|
@@ -884,7 +940,7 @@ var _sendTransaction = async ({
|
|
|
884
940
|
const nonceBigInt = typeof nonce === "bigint" ? nonce : typeof nonce === "string" ? BigInt(nonce) : BigInt(Number(nonce));
|
|
885
941
|
const formattedRequest = {
|
|
886
942
|
from: validatedSenderAccount.address,
|
|
887
|
-
to: _optionalChain([client, 'access',
|
|
943
|
+
to: _optionalChain([client, 'access', _47 => _47.chain, 'access', _48 => _48.consensusMainContract, 'optionalAccess', _49 => _49.address]),
|
|
888
944
|
data: encodedDataForSend,
|
|
889
945
|
value: `0x${value.toString(16)}`,
|
|
890
946
|
gas: `0x${estimatedGas.toString(16)}`,
|
|
@@ -1014,7 +1070,7 @@ var decodeTransaction = (tx) => {
|
|
|
1014
1070
|
txData,
|
|
1015
1071
|
txDataDecoded,
|
|
1016
1072
|
currentTimestamp: tx.currentTimestamp.toString(),
|
|
1017
|
-
numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess',
|
|
1073
|
+
numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _50 => _50.toString, 'call', _51 => _51()]), () => ( "0")),
|
|
1018
1074
|
txSlot: tx.txSlot.toString(),
|
|
1019
1075
|
createdTimestamp: tx.createdTimestamp.toString(),
|
|
1020
1076
|
lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
|
|
@@ -1022,21 +1078,21 @@ var decodeTransaction = (tx) => {
|
|
|
1022
1078
|
numOfRounds: tx.numOfRounds.toString(),
|
|
1023
1079
|
readStateBlockRange: {
|
|
1024
1080
|
...tx.readStateBlockRange,
|
|
1025
|
-
activationBlock: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1026
|
-
processingBlock: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1027
|
-
proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1081
|
+
activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _52 => _52.readStateBlockRange, 'optionalAccess', _53 => _53.activationBlock, 'optionalAccess', _54 => _54.toString, 'call', _55 => _55()]), () => ( "0")),
|
|
1082
|
+
processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _56 => _56.readStateBlockRange, 'optionalAccess', _57 => _57.processingBlock, 'optionalAccess', _58 => _58.toString, 'call', _59 => _59()]), () => ( "0")),
|
|
1083
|
+
proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _60 => _60.readStateBlockRange, 'optionalAccess', _61 => _61.proposalBlock, 'optionalAccess', _62 => _62.toString, 'call', _63 => _63()]), () => ( "0"))
|
|
1028
1084
|
},
|
|
1029
1085
|
statusName: _chunkW4V73RPNcjs.transactionsStatusNumberToName[String(tx.status)],
|
|
1030
1086
|
resultName: _chunkW4V73RPNcjs.transactionResultNumberToName[String(tx.result)],
|
|
1031
1087
|
lastRound: {
|
|
1032
1088
|
...tx.lastRound,
|
|
1033
|
-
round: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1034
|
-
leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1035
|
-
votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1036
|
-
votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1037
|
-
appealBond: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1038
|
-
rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access',
|
|
1039
|
-
validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access',
|
|
1089
|
+
round: _nullishCoalesce(_optionalChain([tx, 'access', _64 => _64.lastRound, 'optionalAccess', _65 => _65.round, 'optionalAccess', _66 => _66.toString, 'call', _67 => _67()]), () => ( "0")),
|
|
1090
|
+
leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _68 => _68.lastRound, 'optionalAccess', _69 => _69.leaderIndex, 'optionalAccess', _70 => _70.toString, 'call', _71 => _71()]), () => ( "0")),
|
|
1091
|
+
votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _72 => _72.lastRound, 'optionalAccess', _73 => _73.votesCommitted, 'optionalAccess', _74 => _74.toString, 'call', _75 => _75()]), () => ( "0")),
|
|
1092
|
+
votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _76 => _76.lastRound, 'optionalAccess', _77 => _77.votesRevealed, 'optionalAccess', _78 => _78.toString, 'call', _79 => _79()]), () => ( "0")),
|
|
1093
|
+
appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _80 => _80.lastRound, 'optionalAccess', _81 => _81.appealBond, 'optionalAccess', _82 => _82.toString, 'call', _83 => _83()]), () => ( "0")),
|
|
1094
|
+
rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _84 => _84.lastRound, 'optionalAccess', _85 => _85.rotationsLeft, 'optionalAccess', _86 => _86.toString, 'call', _87 => _87()]), () => ( "0")),
|
|
1095
|
+
validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _88 => _88.lastRound, 'optionalAccess', _89 => _89.validatorVotes]), () => ( []))).map(
|
|
1040
1096
|
(vote) => _chunkW4V73RPNcjs.voteTypeNumberToName[String(vote)]
|
|
1041
1097
|
)
|
|
1042
1098
|
}
|
|
@@ -1118,7 +1174,7 @@ var simplifyTransactionReceipt = (tx) => {
|
|
|
1118
1174
|
var decodeLocalnetTransaction = (tx) => {
|
|
1119
1175
|
if (!tx.data) return tx;
|
|
1120
1176
|
try {
|
|
1121
|
-
const leaderReceipt = _optionalChain([tx, 'access',
|
|
1177
|
+
const leaderReceipt = _optionalChain([tx, 'access', _90 => _90.consensus_data, 'optionalAccess', _91 => _91.leader_receipt]);
|
|
1122
1178
|
if (leaderReceipt) {
|
|
1123
1179
|
const receipts = Array.isArray(leaderReceipt) ? leaderReceipt : [leaderReceipt];
|
|
1124
1180
|
receipts.forEach((receipt) => {
|
|
@@ -1149,7 +1205,7 @@ var decodeLocalnetTransaction = (tx) => {
|
|
|
1149
1205
|
}
|
|
1150
1206
|
});
|
|
1151
1207
|
}
|
|
1152
|
-
if (_optionalChain([tx, 'access',
|
|
1208
|
+
if (_optionalChain([tx, 'access', _92 => _92.data, 'optionalAccess', _93 => _93.calldata]) && typeof tx.data.calldata === "string") {
|
|
1153
1209
|
tx.data.calldata = {
|
|
1154
1210
|
base64: tx.data.calldata,
|
|
1155
1211
|
...calldataToUserFriendlyJson(b64ToArray(tx.data.calldata))
|
|
@@ -1180,7 +1236,7 @@ var receiptActions = (client, publicClient) => ({
|
|
|
1180
1236
|
const requestedStatus = _chunkW4V73RPNcjs.transactionsStatusNameToNumber[status];
|
|
1181
1237
|
if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ && _chunkW4V73RPNcjs.isDecidedState.call(void 0, transactionStatusString)) {
|
|
1182
1238
|
let finalTransaction = transaction;
|
|
1183
|
-
if (client.chain.id ===
|
|
1239
|
+
if (client.chain.id === _chunkMXWQMAOOcjs.localnet.id) {
|
|
1184
1240
|
finalTransaction = decodeLocalnetTransaction(transaction);
|
|
1185
1241
|
}
|
|
1186
1242
|
if (!fullTransaction) {
|
|
@@ -1211,8 +1267,8 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1211
1267
|
return decodeLocalnetTransaction(transaction2);
|
|
1212
1268
|
}
|
|
1213
1269
|
const transaction = await publicClient.readContract({
|
|
1214
|
-
address: _optionalChain([client, 'access',
|
|
1215
|
-
abi: _optionalChain([client, 'access',
|
|
1270
|
+
address: _optionalChain([client, 'access', _94 => _94.chain, 'access', _95 => _95.consensusDataContract, 'optionalAccess', _96 => _96.address]),
|
|
1271
|
+
abi: _optionalChain([client, 'access', _97 => _97.chain, 'access', _98 => _98.consensusDataContract, 'optionalAccess', _99 => _99.abi]),
|
|
1216
1272
|
functionName: "getTransactionData",
|
|
1217
1273
|
args: [
|
|
1218
1274
|
hash,
|
|
@@ -1251,7 +1307,7 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1251
1307
|
},
|
|
1252
1308
|
estimateTransactionGas: async (transactionParams) => {
|
|
1253
1309
|
const formattedParams = {
|
|
1254
|
-
from: transactionParams.from || _optionalChain([client, 'access',
|
|
1310
|
+
from: transactionParams.from || _optionalChain([client, 'access', _100 => _100.account, 'optionalAccess', _101 => _101.address]),
|
|
1255
1311
|
to: transactionParams.to,
|
|
1256
1312
|
data: transactionParams.data || "0x",
|
|
1257
1313
|
value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
|
|
@@ -1272,10 +1328,10 @@ var snapID = {
|
|
|
1272
1328
|
|
|
1273
1329
|
// src/wallet/connect.ts
|
|
1274
1330
|
var networks = {
|
|
1275
|
-
localnet:
|
|
1276
|
-
studionet:
|
|
1277
|
-
testnetAsimov:
|
|
1278
|
-
testnetBradbury:
|
|
1331
|
+
localnet: _chunkMXWQMAOOcjs.localnet,
|
|
1332
|
+
studionet: _chunkMXWQMAOOcjs.studionet,
|
|
1333
|
+
testnetAsimov: _chunkMXWQMAOOcjs.testnetAsimov,
|
|
1334
|
+
testnetBradbury: _chunkMXWQMAOOcjs.testnetBradbury
|
|
1279
1335
|
};
|
|
1280
1336
|
var connect = async (client, network = "studionet", snapSource = "npm") => {
|
|
1281
1337
|
if (!window.ethereum) {
|
|
@@ -1294,7 +1350,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
|
|
|
1294
1350
|
chainName: selectedNetwork.name,
|
|
1295
1351
|
rpcUrls: selectedNetwork.rpcUrls.default.http,
|
|
1296
1352
|
nativeCurrency: selectedNetwork.nativeCurrency,
|
|
1297
|
-
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access',
|
|
1353
|
+
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _102 => _102.blockExplorers, 'optionalAccess', _103 => _103.default, 'access', _104 => _104.url])]
|
|
1298
1354
|
};
|
|
1299
1355
|
const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
|
|
1300
1356
|
if (currentChainId !== chainIdHex) {
|
|
@@ -1328,10 +1384,10 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1328
1384
|
}
|
|
1329
1385
|
const isFlask = async () => {
|
|
1330
1386
|
try {
|
|
1331
|
-
const clientVersion = await _optionalChain([window, 'access',
|
|
1387
|
+
const clientVersion = await _optionalChain([window, 'access', _105 => _105.ethereum, 'optionalAccess', _106 => _106.request, 'call', _107 => _107({
|
|
1332
1388
|
method: "web3_clientVersion"
|
|
1333
1389
|
})]);
|
|
1334
|
-
return _optionalChain([clientVersion, 'optionalAccess',
|
|
1390
|
+
return _optionalChain([clientVersion, 'optionalAccess', _108 => _108.includes, 'call', _109 => _109("flask")]);
|
|
1335
1391
|
} catch (error) {
|
|
1336
1392
|
console.error("Error detecting Flask:", error);
|
|
1337
1393
|
return false;
|
|
@@ -1339,7 +1395,7 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1339
1395
|
};
|
|
1340
1396
|
const installedSnaps = async () => {
|
|
1341
1397
|
try {
|
|
1342
|
-
return await _optionalChain([window, 'access',
|
|
1398
|
+
return await _optionalChain([window, 'access', _110 => _110.ethereum, 'optionalAccess', _111 => _111.request, 'call', _112 => _112({
|
|
1343
1399
|
method: "wallet_getSnaps"
|
|
1344
1400
|
})]);
|
|
1345
1401
|
} catch (error) {
|
|
@@ -1391,7 +1447,7 @@ function formatStakingAmount(amount) {
|
|
|
1391
1447
|
// src/staking/actions.ts
|
|
1392
1448
|
var FALLBACK_GAS = 1000000n;
|
|
1393
1449
|
var GAS_BUFFER_MULTIPLIER = 2n;
|
|
1394
|
-
var COMBINED_ERROR_ABI = [...
|
|
1450
|
+
var COMBINED_ERROR_ABI = [..._chunkMXWQMAOOcjs.STAKING_ABI, ..._chunkMXWQMAOOcjs.VALIDATOR_WALLET_ABI];
|
|
1395
1451
|
function extractRevertReason(err) {
|
|
1396
1452
|
if (err instanceof _viem.BaseError) {
|
|
1397
1453
|
const rawError = err.walk((e) => e instanceof _viem.RawContractError);
|
|
@@ -1426,7 +1482,7 @@ function extractRevertReason(err) {
|
|
|
1426
1482
|
}
|
|
1427
1483
|
const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
|
|
1428
1484
|
if (revertError instanceof _viem.ContractFunctionRevertedError) {
|
|
1429
|
-
if (_optionalChain([revertError, 'access',
|
|
1485
|
+
if (_optionalChain([revertError, 'access', _113 => _113.data, 'optionalAccess', _114 => _114.errorName])) {
|
|
1430
1486
|
return revertError.data.errorName;
|
|
1431
1487
|
}
|
|
1432
1488
|
return revertError.reason || "Unknown reason";
|
|
@@ -1514,7 +1570,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1514
1570
|
};
|
|
1515
1571
|
const getStakingAddress = () => {
|
|
1516
1572
|
const stakingConfig = client.chain.stakingContract;
|
|
1517
|
-
if (!_optionalChain([stakingConfig, 'optionalAccess',
|
|
1573
|
+
if (!_optionalChain([stakingConfig, 'optionalAccess', _115 => _115.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
|
|
1518
1574
|
throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
|
|
1519
1575
|
}
|
|
1520
1576
|
return stakingConfig.address;
|
|
@@ -1523,7 +1579,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1523
1579
|
const address = getStakingAddress();
|
|
1524
1580
|
return _viem.getContract.call(void 0, {
|
|
1525
1581
|
address,
|
|
1526
|
-
abi:
|
|
1582
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1527
1583
|
client: { public: publicClient, wallet: client }
|
|
1528
1584
|
});
|
|
1529
1585
|
};
|
|
@@ -1531,7 +1587,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1531
1587
|
const address = getStakingAddress();
|
|
1532
1588
|
return _viem.getContract.call(void 0, {
|
|
1533
1589
|
address,
|
|
1534
|
-
abi:
|
|
1590
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1535
1591
|
client: publicClient
|
|
1536
1592
|
});
|
|
1537
1593
|
};
|
|
@@ -1540,11 +1596,11 @@ var stakingActions = (client, publicClient) => {
|
|
|
1540
1596
|
const amount = parseStakingAmount(options.amount);
|
|
1541
1597
|
const stakingAddress = getStakingAddress();
|
|
1542
1598
|
const data = options.operator ? _viem.encodeFunctionData.call(void 0, {
|
|
1543
|
-
abi:
|
|
1599
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1544
1600
|
functionName: "validatorJoin",
|
|
1545
1601
|
args: [options.operator]
|
|
1546
1602
|
}) : _viem.encodeFunctionData.call(void 0, {
|
|
1547
|
-
abi:
|
|
1603
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1548
1604
|
functionName: "validatorJoin"
|
|
1549
1605
|
});
|
|
1550
1606
|
const result = await executeWrite({ to: stakingAddress, data, value: amount });
|
|
@@ -1553,7 +1609,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1553
1609
|
let eventFound = false;
|
|
1554
1610
|
for (const log of receipt.logs) {
|
|
1555
1611
|
try {
|
|
1556
|
-
const decoded = _viem.decodeEventLog.call(void 0, { abi:
|
|
1612
|
+
const decoded = _viem.decodeEventLog.call(void 0, { abi: _chunkMXWQMAOOcjs.STAKING_ABI, data: log.data, topics: log.topics });
|
|
1557
1613
|
if (decoded.eventName === "ValidatorJoin") {
|
|
1558
1614
|
validatorWallet = decoded.args.validator;
|
|
1559
1615
|
eventFound = true;
|
|
@@ -1580,7 +1636,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1580
1636
|
validatorDeposit: async (options) => {
|
|
1581
1637
|
const amount = parseStakingAmount(options.amount);
|
|
1582
1638
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1583
|
-
abi:
|
|
1639
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1584
1640
|
functionName: "validatorDeposit"
|
|
1585
1641
|
});
|
|
1586
1642
|
return executeWrite({ to: getStakingAddress(), data, value: amount });
|
|
@@ -1588,19 +1644,19 @@ var stakingActions = (client, publicClient) => {
|
|
|
1588
1644
|
validatorExit: async (options) => {
|
|
1589
1645
|
const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
|
|
1590
1646
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1591
|
-
abi:
|
|
1647
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1592
1648
|
functionName: "validatorExit",
|
|
1593
1649
|
args: [shares]
|
|
1594
1650
|
});
|
|
1595
1651
|
return executeWrite({ to: getStakingAddress(), data });
|
|
1596
1652
|
},
|
|
1597
1653
|
validatorClaim: async (options) => {
|
|
1598
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
1654
|
+
if (!_optionalChain([options, 'optionalAccess', _116 => _116.validator]) && !client.account) {
|
|
1599
1655
|
throw new Error("Either provide validator address or initialize client with an account");
|
|
1600
1656
|
}
|
|
1601
|
-
const validatorAddress = _optionalChain([options, 'optionalAccess',
|
|
1657
|
+
const validatorAddress = _optionalChain([options, 'optionalAccess', _117 => _117.validator]) || client.account.address;
|
|
1602
1658
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1603
|
-
abi:
|
|
1659
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1604
1660
|
functionName: "validatorClaim",
|
|
1605
1661
|
args: [validatorAddress]
|
|
1606
1662
|
});
|
|
@@ -1609,7 +1665,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1609
1665
|
},
|
|
1610
1666
|
validatorPrime: async (options) => {
|
|
1611
1667
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1612
|
-
abi:
|
|
1668
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1613
1669
|
functionName: "validatorPrime",
|
|
1614
1670
|
args: [options.validator]
|
|
1615
1671
|
});
|
|
@@ -1617,7 +1673,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1617
1673
|
},
|
|
1618
1674
|
setOperator: async (options) => {
|
|
1619
1675
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1620
|
-
abi:
|
|
1676
|
+
abi: _chunkMXWQMAOOcjs.VALIDATOR_WALLET_ABI,
|
|
1621
1677
|
functionName: "setOperator",
|
|
1622
1678
|
args: [options.operator]
|
|
1623
1679
|
});
|
|
@@ -1633,7 +1689,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1633
1689
|
}
|
|
1634
1690
|
}
|
|
1635
1691
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1636
|
-
abi:
|
|
1692
|
+
abi: _chunkMXWQMAOOcjs.VALIDATOR_WALLET_ABI,
|
|
1637
1693
|
functionName: "setIdentity",
|
|
1638
1694
|
args: [
|
|
1639
1695
|
options.moniker,
|
|
@@ -1652,7 +1708,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1652
1708
|
delegatorJoin: async (options) => {
|
|
1653
1709
|
const amount = parseStakingAmount(options.amount);
|
|
1654
1710
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1655
|
-
abi:
|
|
1711
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1656
1712
|
functionName: "delegatorJoin",
|
|
1657
1713
|
args: [options.validator]
|
|
1658
1714
|
});
|
|
@@ -1668,7 +1724,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1668
1724
|
delegatorExit: async (options) => {
|
|
1669
1725
|
const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
|
|
1670
1726
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1671
|
-
abi:
|
|
1727
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1672
1728
|
functionName: "delegatorExit",
|
|
1673
1729
|
args: [options.validator, shares]
|
|
1674
1730
|
});
|
|
@@ -1680,7 +1736,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1680
1736
|
}
|
|
1681
1737
|
const delegatorAddress = options.delegator || client.account.address;
|
|
1682
1738
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1683
|
-
abi:
|
|
1739
|
+
abi: _chunkMXWQMAOOcjs.STAKING_ABI,
|
|
1684
1740
|
functionName: "delegatorClaim",
|
|
1685
1741
|
args: [delegatorAddress, options.validator]
|
|
1686
1742
|
});
|
|
@@ -1698,7 +1754,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1698
1754
|
}
|
|
1699
1755
|
const walletContract = _viem.getContract.call(void 0, {
|
|
1700
1756
|
address: validator,
|
|
1701
|
-
abi:
|
|
1757
|
+
abi: _chunkMXWQMAOOcjs.VALIDATOR_WALLET_ABI,
|
|
1702
1758
|
client: publicClient
|
|
1703
1759
|
});
|
|
1704
1760
|
const [view, owner, operator, identityRaw, currentEpoch] = await Promise.all([
|
|
@@ -1993,8 +2049,8 @@ var getCustomTransportConfig = (config, chainConfig) => {
|
|
|
1993
2049
|
}
|
|
1994
2050
|
};
|
|
1995
2051
|
};
|
|
1996
|
-
var createClient = (config = { chain:
|
|
1997
|
-
const chainConfig = config.chain ||
|
|
2052
|
+
var createClient = (config = { chain: _chunkMXWQMAOOcjs.localnet }) => {
|
|
2053
|
+
const chainConfig = config.chain || _chunkMXWQMAOOcjs.localnet;
|
|
1998
2054
|
if (config.endpoint) {
|
|
1999
2055
|
chainConfig.rpcUrls.default.http = [config.endpoint];
|
|
2000
2056
|
}
|
|
@@ -2131,4 +2187,4 @@ function validateValueAgainstType(value, type) {
|
|
|
2131
2187
|
|
|
2132
2188
|
|
|
2133
2189
|
|
|
2134
|
-
exports.abi = abi_exports; exports.buildGenVmPositionalArgs = buildGenVmPositionalArgs; exports.chains =
|
|
2190
|
+
exports.abi = abi_exports; exports.buildGenVmPositionalArgs = buildGenVmPositionalArgs; exports.chains = _chunkMXWQMAOOcjs.chains_exports; exports.createAccount = createAccount; exports.createClient = createClient; exports.decodeInputData = decodeInputData; exports.decodeLocalnetTransaction = decodeLocalnetTransaction; exports.decodeTransaction = decodeTransaction; exports.formatStakingAmount = formatStakingAmount; exports.generatePrivateKey = generatePrivateKey; exports.parseStakingAmount = parseStakingAmount; exports.simplifyTransactionReceipt = simplifyTransactionReceipt;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
|
-
import { G as GenLayerChain } from './chains-
|
|
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-
|
|
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-DIh568LH.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';
|
|
8
|
-
export { i as chains } from './index-
|
|
8
|
+
export { i as chains } from './index-BvRcfXce.cjs';
|
|
9
9
|
|
|
10
10
|
interface ClientConfig {
|
|
11
11
|
chain?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
|
-
import { G as GenLayerChain } from './chains-
|
|
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-
|
|
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-BJ_hU-bk.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';
|
|
8
|
-
export { i as chains } from './index-
|
|
8
|
+
export { i as chains } from './index-BZj9d30J.js';
|
|
9
9
|
|
|
10
10
|
interface ClientConfig {
|
|
11
11
|
chain?: {
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
studionet,
|
|
7
7
|
testnetAsimov,
|
|
8
8
|
testnetBradbury
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SHD4AYCN.js";
|
|
10
10
|
import {
|
|
11
11
|
CalldataAddress,
|
|
12
12
|
isDecidedState,
|
|
@@ -514,6 +514,19 @@ function _toJsonSafeDeep(value, seen) {
|
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
// src/contracts/actions.ts
|
|
517
|
+
function extractGenCallResult(result) {
|
|
518
|
+
if (typeof result === "string") {
|
|
519
|
+
return `0x${result}`;
|
|
520
|
+
}
|
|
521
|
+
if (result && typeof result === "object" && "data" in result) {
|
|
522
|
+
const obj = result;
|
|
523
|
+
if (obj.status && obj.status.code !== 0) {
|
|
524
|
+
throw new Error(`gen_call failed: ${obj.status.message}`);
|
|
525
|
+
}
|
|
526
|
+
return `0x${obj.data}`;
|
|
527
|
+
}
|
|
528
|
+
throw new Error(`Unexpected gen_call response: ${JSON.stringify(result)}`);
|
|
529
|
+
}
|
|
517
530
|
var contractActions = (client, publicClient) => {
|
|
518
531
|
return {
|
|
519
532
|
getContractCode: async (address) => {
|
|
@@ -572,7 +585,7 @@ var contractActions = (client, publicClient) => {
|
|
|
572
585
|
method: "gen_call",
|
|
573
586
|
params: [requestParams]
|
|
574
587
|
});
|
|
575
|
-
const prefixedResult =
|
|
588
|
+
const prefixedResult = extractGenCallResult(result);
|
|
576
589
|
if (args.rawReturn) {
|
|
577
590
|
return prefixedResult;
|
|
578
591
|
}
|
|
@@ -607,7 +620,7 @@ var contractActions = (client, publicClient) => {
|
|
|
607
620
|
method: "gen_call",
|
|
608
621
|
params: [requestParams]
|
|
609
622
|
});
|
|
610
|
-
const prefixedResult =
|
|
623
|
+
const prefixedResult = extractGenCallResult(result);
|
|
611
624
|
if (args.rawReturn) {
|
|
612
625
|
return prefixedResult;
|
|
613
626
|
}
|
|
@@ -675,15 +688,58 @@ var contractActions = (client, publicClient) => {
|
|
|
675
688
|
senderAccount
|
|
676
689
|
});
|
|
677
690
|
},
|
|
691
|
+
getMinAppealBond: async (args) => {
|
|
692
|
+
const { txId } = args;
|
|
693
|
+
if (!client.chain.feeManagerContract?.address || !client.chain.roundsStorageContract?.address) {
|
|
694
|
+
throw new Error("Appeal bond calculation not supported on this chain (missing feeManagerContract/roundsStorageContract)");
|
|
695
|
+
}
|
|
696
|
+
const roundNumber = await publicClient.readContract({
|
|
697
|
+
address: client.chain.roundsStorageContract.address,
|
|
698
|
+
abi: client.chain.roundsStorageContract.abi,
|
|
699
|
+
functionName: "getRoundNumber",
|
|
700
|
+
args: [txId]
|
|
701
|
+
});
|
|
702
|
+
const transaction = await client.getTransaction({ hash: txId });
|
|
703
|
+
const txStatus = Number(transaction.status);
|
|
704
|
+
const minBond = await publicClient.readContract({
|
|
705
|
+
address: client.chain.feeManagerContract.address,
|
|
706
|
+
abi: client.chain.feeManagerContract.abi,
|
|
707
|
+
functionName: "calculateMinAppealBond",
|
|
708
|
+
args: [txId, roundNumber, txStatus]
|
|
709
|
+
});
|
|
710
|
+
return minBond;
|
|
711
|
+
},
|
|
678
712
|
appealTransaction: async (args) => {
|
|
679
713
|
const { account, txId } = args;
|
|
714
|
+
let { value } = args;
|
|
715
|
+
if (value === void 0) {
|
|
716
|
+
if (client.chain.feeManagerContract?.address && client.chain.roundsStorageContract?.address) {
|
|
717
|
+
const roundNumber = await publicClient.readContract({
|
|
718
|
+
address: client.chain.roundsStorageContract.address,
|
|
719
|
+
abi: client.chain.roundsStorageContract.abi,
|
|
720
|
+
functionName: "getRoundNumber",
|
|
721
|
+
args: [txId]
|
|
722
|
+
});
|
|
723
|
+
const transaction = await client.getTransaction({ hash: txId });
|
|
724
|
+
const txStatus = Number(transaction.status);
|
|
725
|
+
value = await publicClient.readContract({
|
|
726
|
+
address: client.chain.feeManagerContract.address,
|
|
727
|
+
abi: client.chain.feeManagerContract.abi,
|
|
728
|
+
functionName: "calculateMinAppealBond",
|
|
729
|
+
args: [txId, roundNumber, txStatus]
|
|
730
|
+
});
|
|
731
|
+
} else {
|
|
732
|
+
value = 0n;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
680
735
|
const senderAccount = account || client.account;
|
|
681
736
|
const encodedData = _encodeSubmitAppealData({ client, txId });
|
|
682
737
|
return _sendTransaction({
|
|
683
738
|
client,
|
|
684
739
|
publicClient,
|
|
685
740
|
encodedData,
|
|
686
|
-
senderAccount
|
|
741
|
+
senderAccount,
|
|
742
|
+
value
|
|
687
743
|
});
|
|
688
744
|
}
|
|
689
745
|
};
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export { I 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, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, 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, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-
|
|
3
|
-
export { G as GenLayerChain } from '../chains-
|
|
2
|
+
export { I 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, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, 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, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-DIh568LH.cjs';
|
|
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 { I 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, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, 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, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-
|
|
3
|
-
export { G as GenLayerChain } from '../chains-
|
|
2
|
+
export { I 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, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, 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, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-BJ_hU-bk.js';
|
|
3
|
+
export { G as GenLayerChain } from '../chains-DqSbucSW.js';
|