genlayer-js 0.27.8 → 0.28.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/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-DqSbucSW.d.cts → chains-D6DgvIVA.d.cts} +4 -0
- package/dist/{chains-DqSbucSW.d.ts → chains-D6DgvIVA.d.ts} +4 -0
- package/dist/{chunk-NOMVZBCR.cjs → chunk-PZEHAYIU.cjs} +68 -0
- package/dist/{chunk-C4Z24PT6.js → chunk-SGAVFNGA.js} +68 -0
- package/dist/{index-BZj9d30J.d.ts → index-BCPb0x30.d.ts} +1 -1
- package/dist/{index-9P6HoP_s.d.cts → index-DDgbU3hK.d.ts} +17 -1
- package/dist/{index-Bf1V-aai.d.ts → index-DQCfqVjw.d.cts} +17 -1
- package/dist/{index-BvRcfXce.d.cts → index-_c6eHw3s.d.cts} +1 -1
- package/dist/index.cjs +250 -102
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +181 -33
- 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 _chunkPZEHAYIUcjs = require('../chunk-PZEHAYIU.cjs');
|
|
7
7
|
require('../chunk-75ZPJI57.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.localnet =
|
|
13
|
+
exports.localnet = _chunkPZEHAYIUcjs.localnet; exports.studionet = _chunkPZEHAYIUcjs.studionet; exports.testnetAsimov = _chunkPZEHAYIUcjs.testnetAsimov; exports.testnetBradbury = _chunkPZEHAYIUcjs.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-_c6eHw3s.cjs';
|
|
2
|
+
import '../chains-D6DgvIVA.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-BCPb0x30.js';
|
|
2
|
+
import '../chains-D6DgvIVA.js';
|
|
3
3
|
import 'viem';
|
package/dist/chains/index.js
CHANGED
|
@@ -24,6 +24,10 @@ type GenLayerChain = Chain & {
|
|
|
24
24
|
address: Address;
|
|
25
25
|
abi: readonly unknown[];
|
|
26
26
|
} | null;
|
|
27
|
+
appealsContract: {
|
|
28
|
+
address: Address;
|
|
29
|
+
abi: readonly unknown[];
|
|
30
|
+
} | null;
|
|
27
31
|
defaultNumberOfInitialValidators: number;
|
|
28
32
|
defaultConsensusMaxRotations: number;
|
|
29
33
|
};
|
|
@@ -24,6 +24,10 @@ type GenLayerChain = Chain & {
|
|
|
24
24
|
address: Address;
|
|
25
25
|
abi: readonly unknown[];
|
|
26
26
|
} | null;
|
|
27
|
+
appealsContract: {
|
|
28
|
+
address: Address;
|
|
29
|
+
abi: readonly unknown[];
|
|
30
|
+
} | null;
|
|
27
31
|
defaultNumberOfInitialValidators: number;
|
|
28
32
|
defaultConsensusMaxRotations: number;
|
|
29
33
|
};
|
|
@@ -4022,6 +4022,7 @@ var localnet = _viem.defineChain.call(void 0, {
|
|
|
4022
4022
|
stakingContract: null,
|
|
4023
4023
|
feeManagerContract: null,
|
|
4024
4024
|
roundsStorageContract: null,
|
|
4025
|
+
appealsContract: null,
|
|
4025
4026
|
defaultNumberOfInitialValidators: 5,
|
|
4026
4027
|
defaultConsensusMaxRotations: 3
|
|
4027
4028
|
});
|
|
@@ -8038,6 +8039,7 @@ var studionet = _viem.defineChain.call(void 0, {
|
|
|
8038
8039
|
stakingContract: null,
|
|
8039
8040
|
feeManagerContract: null,
|
|
8040
8041
|
roundsStorageContract: null,
|
|
8042
|
+
appealsContract: null,
|
|
8041
8043
|
defaultNumberOfInitialValidators: 5,
|
|
8042
8044
|
defaultConsensusMaxRotations: 3
|
|
8043
8045
|
});
|
|
@@ -13538,6 +13540,7 @@ var testnetAsimov = _viem.defineChain.call(void 0, {
|
|
|
13538
13540
|
stakingContract: STAKING_CONTRACT,
|
|
13539
13541
|
feeManagerContract: null,
|
|
13540
13542
|
roundsStorageContract: null,
|
|
13543
|
+
appealsContract: null,
|
|
13541
13544
|
defaultNumberOfInitialValidators: 5,
|
|
13542
13545
|
defaultConsensusMaxRotations: 3
|
|
13543
13546
|
});
|
|
@@ -13574,6 +13577,70 @@ var ROUNDS_STORAGE_CONTRACT = {
|
|
|
13574
13577
|
stateMutability: "view",
|
|
13575
13578
|
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13576
13579
|
outputs: [{ name: "", type: "uint256" }]
|
|
13580
|
+
},
|
|
13581
|
+
{
|
|
13582
|
+
type: "function",
|
|
13583
|
+
name: "getRoundData",
|
|
13584
|
+
stateMutability: "view",
|
|
13585
|
+
inputs: [
|
|
13586
|
+
{ name: "_txId", type: "bytes32" },
|
|
13587
|
+
{ name: "_round", type: "uint256" }
|
|
13588
|
+
],
|
|
13589
|
+
outputs: [{
|
|
13590
|
+
name: "",
|
|
13591
|
+
type: "tuple",
|
|
13592
|
+
components: [
|
|
13593
|
+
{ name: "round", type: "uint256" },
|
|
13594
|
+
{ name: "leaderIndex", type: "uint256" },
|
|
13595
|
+
{ name: "votesCommitted", type: "uint256" },
|
|
13596
|
+
{ name: "votesRevealed", type: "uint256" },
|
|
13597
|
+
{ name: "appealBond", type: "uint256" },
|
|
13598
|
+
{ name: "rotationsLeft", type: "uint256" },
|
|
13599
|
+
{ name: "result", type: "uint8" },
|
|
13600
|
+
{ name: "roundValidators", type: "address[]" },
|
|
13601
|
+
{ name: "validatorVotes", type: "uint8[]" },
|
|
13602
|
+
{ name: "validatorVotesHash", type: "bytes32[]" },
|
|
13603
|
+
{ name: "validatorResultHash", type: "bytes32[]" }
|
|
13604
|
+
]
|
|
13605
|
+
}]
|
|
13606
|
+
},
|
|
13607
|
+
{
|
|
13608
|
+
type: "function",
|
|
13609
|
+
name: "getLastRoundData",
|
|
13610
|
+
stateMutability: "view",
|
|
13611
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13612
|
+
outputs: [
|
|
13613
|
+
{ name: "", type: "uint256" },
|
|
13614
|
+
{
|
|
13615
|
+
name: "",
|
|
13616
|
+
type: "tuple",
|
|
13617
|
+
components: [
|
|
13618
|
+
{ name: "round", type: "uint256" },
|
|
13619
|
+
{ name: "leaderIndex", type: "uint256" },
|
|
13620
|
+
{ name: "votesCommitted", type: "uint256" },
|
|
13621
|
+
{ name: "votesRevealed", type: "uint256" },
|
|
13622
|
+
{ name: "appealBond", type: "uint256" },
|
|
13623
|
+
{ name: "rotationsLeft", type: "uint256" },
|
|
13624
|
+
{ name: "result", type: "uint8" },
|
|
13625
|
+
{ name: "roundValidators", type: "address[]" },
|
|
13626
|
+
{ name: "validatorVotes", type: "uint8[]" },
|
|
13627
|
+
{ name: "validatorVotesHash", type: "bytes32[]" },
|
|
13628
|
+
{ name: "validatorResultHash", type: "bytes32[]" }
|
|
13629
|
+
]
|
|
13630
|
+
}
|
|
13631
|
+
]
|
|
13632
|
+
}
|
|
13633
|
+
]
|
|
13634
|
+
};
|
|
13635
|
+
var APPEALS_CONTRACT = {
|
|
13636
|
+
address: "0xbb8C35AA878D09b9830aFF9e5aAC6492BFbd5471",
|
|
13637
|
+
abi: [
|
|
13638
|
+
{
|
|
13639
|
+
type: "function",
|
|
13640
|
+
name: "canAppeal",
|
|
13641
|
+
stateMutability: "view",
|
|
13642
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13643
|
+
outputs: [{ name: "", type: "bool" }]
|
|
13577
13644
|
}
|
|
13578
13645
|
]
|
|
13579
13646
|
};
|
|
@@ -16920,6 +16987,7 @@ var testnetBradbury = _viem.defineChain.call(void 0, {
|
|
|
16920
16987
|
stakingContract: STAKING_CONTRACT2,
|
|
16921
16988
|
feeManagerContract: FEE_MANAGER_CONTRACT,
|
|
16922
16989
|
roundsStorageContract: ROUNDS_STORAGE_CONTRACT,
|
|
16990
|
+
appealsContract: APPEALS_CONTRACT,
|
|
16923
16991
|
defaultNumberOfInitialValidators: 5,
|
|
16924
16992
|
defaultConsensusMaxRotations: 3
|
|
16925
16993
|
});
|
|
@@ -4022,6 +4022,7 @@ var localnet = defineChain({
|
|
|
4022
4022
|
stakingContract: null,
|
|
4023
4023
|
feeManagerContract: null,
|
|
4024
4024
|
roundsStorageContract: null,
|
|
4025
|
+
appealsContract: null,
|
|
4025
4026
|
defaultNumberOfInitialValidators: 5,
|
|
4026
4027
|
defaultConsensusMaxRotations: 3
|
|
4027
4028
|
});
|
|
@@ -8038,6 +8039,7 @@ var studionet = defineChain2({
|
|
|
8038
8039
|
stakingContract: null,
|
|
8039
8040
|
feeManagerContract: null,
|
|
8040
8041
|
roundsStorageContract: null,
|
|
8042
|
+
appealsContract: null,
|
|
8041
8043
|
defaultNumberOfInitialValidators: 5,
|
|
8042
8044
|
defaultConsensusMaxRotations: 3
|
|
8043
8045
|
});
|
|
@@ -13538,6 +13540,7 @@ var testnetAsimov = defineChain3({
|
|
|
13538
13540
|
stakingContract: STAKING_CONTRACT,
|
|
13539
13541
|
feeManagerContract: null,
|
|
13540
13542
|
roundsStorageContract: null,
|
|
13543
|
+
appealsContract: null,
|
|
13541
13544
|
defaultNumberOfInitialValidators: 5,
|
|
13542
13545
|
defaultConsensusMaxRotations: 3
|
|
13543
13546
|
});
|
|
@@ -13574,6 +13577,70 @@ var ROUNDS_STORAGE_CONTRACT = {
|
|
|
13574
13577
|
stateMutability: "view",
|
|
13575
13578
|
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13576
13579
|
outputs: [{ name: "", type: "uint256" }]
|
|
13580
|
+
},
|
|
13581
|
+
{
|
|
13582
|
+
type: "function",
|
|
13583
|
+
name: "getRoundData",
|
|
13584
|
+
stateMutability: "view",
|
|
13585
|
+
inputs: [
|
|
13586
|
+
{ name: "_txId", type: "bytes32" },
|
|
13587
|
+
{ name: "_round", type: "uint256" }
|
|
13588
|
+
],
|
|
13589
|
+
outputs: [{
|
|
13590
|
+
name: "",
|
|
13591
|
+
type: "tuple",
|
|
13592
|
+
components: [
|
|
13593
|
+
{ name: "round", type: "uint256" },
|
|
13594
|
+
{ name: "leaderIndex", type: "uint256" },
|
|
13595
|
+
{ name: "votesCommitted", type: "uint256" },
|
|
13596
|
+
{ name: "votesRevealed", type: "uint256" },
|
|
13597
|
+
{ name: "appealBond", type: "uint256" },
|
|
13598
|
+
{ name: "rotationsLeft", type: "uint256" },
|
|
13599
|
+
{ name: "result", type: "uint8" },
|
|
13600
|
+
{ name: "roundValidators", type: "address[]" },
|
|
13601
|
+
{ name: "validatorVotes", type: "uint8[]" },
|
|
13602
|
+
{ name: "validatorVotesHash", type: "bytes32[]" },
|
|
13603
|
+
{ name: "validatorResultHash", type: "bytes32[]" }
|
|
13604
|
+
]
|
|
13605
|
+
}]
|
|
13606
|
+
},
|
|
13607
|
+
{
|
|
13608
|
+
type: "function",
|
|
13609
|
+
name: "getLastRoundData",
|
|
13610
|
+
stateMutability: "view",
|
|
13611
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13612
|
+
outputs: [
|
|
13613
|
+
{ name: "", type: "uint256" },
|
|
13614
|
+
{
|
|
13615
|
+
name: "",
|
|
13616
|
+
type: "tuple",
|
|
13617
|
+
components: [
|
|
13618
|
+
{ name: "round", type: "uint256" },
|
|
13619
|
+
{ name: "leaderIndex", type: "uint256" },
|
|
13620
|
+
{ name: "votesCommitted", type: "uint256" },
|
|
13621
|
+
{ name: "votesRevealed", type: "uint256" },
|
|
13622
|
+
{ name: "appealBond", type: "uint256" },
|
|
13623
|
+
{ name: "rotationsLeft", type: "uint256" },
|
|
13624
|
+
{ name: "result", type: "uint8" },
|
|
13625
|
+
{ name: "roundValidators", type: "address[]" },
|
|
13626
|
+
{ name: "validatorVotes", type: "uint8[]" },
|
|
13627
|
+
{ name: "validatorVotesHash", type: "bytes32[]" },
|
|
13628
|
+
{ name: "validatorResultHash", type: "bytes32[]" }
|
|
13629
|
+
]
|
|
13630
|
+
}
|
|
13631
|
+
]
|
|
13632
|
+
}
|
|
13633
|
+
]
|
|
13634
|
+
};
|
|
13635
|
+
var APPEALS_CONTRACT = {
|
|
13636
|
+
address: "0xbb8C35AA878D09b9830aFF9e5aAC6492BFbd5471",
|
|
13637
|
+
abi: [
|
|
13638
|
+
{
|
|
13639
|
+
type: "function",
|
|
13640
|
+
name: "canAppeal",
|
|
13641
|
+
stateMutability: "view",
|
|
13642
|
+
inputs: [{ name: "_txId", type: "bytes32" }],
|
|
13643
|
+
outputs: [{ name: "", type: "bool" }]
|
|
13577
13644
|
}
|
|
13578
13645
|
]
|
|
13579
13646
|
};
|
|
@@ -16920,6 +16987,7 @@ var testnetBradbury = defineChain4({
|
|
|
16920
16987
|
stakingContract: STAKING_CONTRACT2,
|
|
16921
16988
|
feeManagerContract: FEE_MANAGER_CONTRACT,
|
|
16922
16989
|
roundsStorageContract: ROUNDS_STORAGE_CONTRACT,
|
|
16990
|
+
appealsContract: APPEALS_CONTRACT,
|
|
16923
16991
|
defaultNumberOfInitialValidators: 5,
|
|
16924
16992
|
defaultConsensusMaxRotations: 3
|
|
16925
16993
|
});
|
|
@@ -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-D6DgvIVA.js';
|
|
3
3
|
|
|
4
4
|
declare class CalldataAddress {
|
|
5
5
|
bytes: Uint8Array;
|
|
@@ -2889,12 +2889,28 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2889
2889
|
hash: TransactionHash;
|
|
2890
2890
|
round?: number;
|
|
2891
2891
|
}) => Promise<DebugTraceResult>;
|
|
2892
|
+
getTransactionQueuePosition: (args: {
|
|
2893
|
+
hash: TransactionHash;
|
|
2894
|
+
}) => Promise<number>;
|
|
2892
2895
|
cancelTransaction: (args: {
|
|
2893
2896
|
hash: TransactionHash;
|
|
2894
2897
|
}) => Promise<{
|
|
2895
2898
|
transaction_hash: string;
|
|
2896
2899
|
status: string;
|
|
2897
2900
|
}>;
|
|
2901
|
+
getRoundNumber: (args: {
|
|
2902
|
+
txId: `0x${string}`;
|
|
2903
|
+
}) => Promise<bigint>;
|
|
2904
|
+
getRoundData: (args: {
|
|
2905
|
+
txId: `0x${string}`;
|
|
2906
|
+
round: bigint;
|
|
2907
|
+
}) => Promise<any>;
|
|
2908
|
+
getLastRoundData: (args: {
|
|
2909
|
+
txId: `0x${string}`;
|
|
2910
|
+
}) => Promise<any>;
|
|
2911
|
+
canAppeal: (args: {
|
|
2912
|
+
txId: `0x${string}`;
|
|
2913
|
+
}) => Promise<boolean>;
|
|
2898
2914
|
appealTransaction: (args: {
|
|
2899
2915
|
account?: Account;
|
|
2900
2916
|
txId: `0x${string}`;
|
|
@@ -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-D6DgvIVA.cjs';
|
|
3
3
|
|
|
4
4
|
declare class CalldataAddress {
|
|
5
5
|
bytes: Uint8Array;
|
|
@@ -2889,12 +2889,28 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2889
2889
|
hash: TransactionHash;
|
|
2890
2890
|
round?: number;
|
|
2891
2891
|
}) => Promise<DebugTraceResult>;
|
|
2892
|
+
getTransactionQueuePosition: (args: {
|
|
2893
|
+
hash: TransactionHash;
|
|
2894
|
+
}) => Promise<number>;
|
|
2892
2895
|
cancelTransaction: (args: {
|
|
2893
2896
|
hash: TransactionHash;
|
|
2894
2897
|
}) => Promise<{
|
|
2895
2898
|
transaction_hash: string;
|
|
2896
2899
|
status: string;
|
|
2897
2900
|
}>;
|
|
2901
|
+
getRoundNumber: (args: {
|
|
2902
|
+
txId: `0x${string}`;
|
|
2903
|
+
}) => Promise<bigint>;
|
|
2904
|
+
getRoundData: (args: {
|
|
2905
|
+
txId: `0x${string}`;
|
|
2906
|
+
round: bigint;
|
|
2907
|
+
}) => Promise<any>;
|
|
2908
|
+
getLastRoundData: (args: {
|
|
2909
|
+
txId: `0x${string}`;
|
|
2910
|
+
}) => Promise<any>;
|
|
2911
|
+
canAppeal: (args: {
|
|
2912
|
+
txId: `0x${string}`;
|
|
2913
|
+
}) => Promise<boolean>;
|
|
2898
2914
|
appealTransaction: (args: {
|
|
2899
2915
|
account?: Account;
|
|
2900
2916
|
txId: `0x${string}`;
|