@wireio/stake 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -0
- package/lib/stake.browser.js +11836 -4103
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +374 -556
- package/lib/stake.js +12089 -4303
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +11836 -4103
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +1153 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.json +172 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.json +24 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.json +35 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.json +213 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.json +138 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +70 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +64 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.json +749 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.json +812 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +225 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +813 -0
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +651 -0
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.json +1110 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.json +391 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.json +402 -0
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +1225 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +927 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +447 -0
- package/src/assets/solana/idl/liqsol_core.json +4239 -0
- package/src/assets/solana/idl/liqsol_token.json +183 -0
- package/src/assets/solana/idl/validator_leaderboard.json +270 -265
- package/src/assets/solana/types/liqsol_core.ts +4245 -0
- package/src/assets/solana/types/liqsol_token.ts +189 -0
- package/src/assets/solana/types/validator_leaderboard.ts +270 -265
- package/src/index.ts +1 -3
- package/src/networks/ethereum/contract.ts +101 -36
- package/src/networks/ethereum/ethereum.ts +141 -45
- package/src/networks/ethereum/types.ts +30 -2
- package/src/networks/solana/clients/deposit.client.ts +71 -109
- package/src/networks/solana/clients/distribution.client.ts +256 -383
- package/src/networks/solana/clients/leaderboard.client.ts +38 -133
- package/src/networks/solana/constants.ts +214 -130
- package/src/networks/solana/program.ts +25 -38
- package/src/networks/solana/solana.ts +120 -105
- package/src/networks/solana/types.ts +37 -47
- package/src/networks/solana/utils.ts +551 -0
- package/src/scripts/tsconfig.json +17 -0
- package/src/staker/staker.ts +10 -6
- package/src/staker/types.ts +14 -9
- package/src/assets/solana/idl/deposit.json +0 -296
- package/src/assets/solana/idl/distribution.json +0 -768
- package/src/assets/solana/idl/liq_sol_token.json +0 -298
- package/src/assets/solana/idl/mint_helper.json +0 -110
- package/src/assets/solana/idl/read_tracked_balance.json +0 -140
- package/src/assets/solana/idl/stake_controller.json +0 -2149
- package/src/assets/solana/idl/treasury.json +0 -110
- package/src/assets/solana/idl/validator_registry.json +0 -487
- package/src/assets/solana/idl/yield_oracle.json +0 -32
- package/src/assets/solana/types/deposit.ts +0 -302
- package/src/assets/solana/types/distribution.ts +0 -774
- package/src/assets/solana/types/liq_sol_token.ts +0 -304
- package/src/assets/solana/types/mint_helper.ts +0 -116
- package/src/assets/solana/types/read_tracked_balance.ts +0 -146
- package/src/assets/solana/types/stake_controller.ts +0 -2155
- package/src/assets/solana/types/stake_registry.ts +0 -441
- package/src/assets/solana/types/treasury.ts +0 -116
- package/src/assets/solana/types/validator_registry.ts +0 -493
- package/src/assets/solana/types/yield_oracle.ts +0 -38
- package/src/common/utils.ts +0 -9
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IStakingModule",
|
|
4
|
+
"sourceName": "contracts/liqEth/LiqEthCommon.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "uint256",
|
|
10
|
+
"name": "nKeys",
|
|
11
|
+
"type": "uint256"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"name": "batchDeposit",
|
|
15
|
+
"outputs": [],
|
|
16
|
+
"stateMutability": "payable",
|
|
17
|
+
"type": "function"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"inputs": [
|
|
21
|
+
{
|
|
22
|
+
"internalType": "uint64",
|
|
23
|
+
"name": "valIndex",
|
|
24
|
+
"type": "uint64"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"name": "getKeyMetaByindex",
|
|
28
|
+
"outputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "bool",
|
|
31
|
+
"name": "exists",
|
|
32
|
+
"type": "bool"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"internalType": "uint256",
|
|
36
|
+
"name": "id",
|
|
37
|
+
"type": "uint256"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "operator",
|
|
42
|
+
"type": "address"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"internalType": "uint8",
|
|
46
|
+
"name": "status",
|
|
47
|
+
"type": "uint8"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"stateMutability": "view",
|
|
51
|
+
"type": "function"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"inputs": [
|
|
55
|
+
{
|
|
56
|
+
"internalType": "address",
|
|
57
|
+
"name": "operator",
|
|
58
|
+
"type": "address"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"internalType": "uint256",
|
|
62
|
+
"name": "tokenAmt",
|
|
63
|
+
"type": "uint256"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"internalType": "uint256",
|
|
67
|
+
"name": "deadline",
|
|
68
|
+
"type": "uint256"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"internalType": "uint8",
|
|
72
|
+
"name": "v",
|
|
73
|
+
"type": "uint8"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"internalType": "bytes32",
|
|
77
|
+
"name": "r",
|
|
78
|
+
"type": "bytes32"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"internalType": "bytes32",
|
|
82
|
+
"name": "s",
|
|
83
|
+
"type": "bytes32"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"name": "lockBond",
|
|
87
|
+
"outputs": [],
|
|
88
|
+
"stateMutability": "nonpayable",
|
|
89
|
+
"type": "function"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"inputs": [
|
|
93
|
+
{
|
|
94
|
+
"internalType": "address",
|
|
95
|
+
"name": "op",
|
|
96
|
+
"type": "address"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"name": "operators",
|
|
100
|
+
"outputs": [
|
|
101
|
+
{
|
|
102
|
+
"internalType": "uint32",
|
|
103
|
+
"name": "pendingKeys",
|
|
104
|
+
"type": "uint32"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"internalType": "uint32",
|
|
108
|
+
"name": "activeKeys",
|
|
109
|
+
"type": "uint32"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"internalType": "uint64",
|
|
113
|
+
"name": "lastDepositTs",
|
|
114
|
+
"type": "uint64"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"stateMutability": "view",
|
|
118
|
+
"type": "function"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"inputs": [
|
|
122
|
+
{
|
|
123
|
+
"internalType": "uint256",
|
|
124
|
+
"name": "id",
|
|
125
|
+
"type": "uint256"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"name": "topUpValidator",
|
|
129
|
+
"outputs": [],
|
|
130
|
+
"stateMutability": "payable",
|
|
131
|
+
"type": "function"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"bytecode": "0x",
|
|
135
|
+
"deployedBytecode": "0x",
|
|
136
|
+
"linkReferences": {},
|
|
137
|
+
"deployedLinkReferences": {}
|
|
138
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IValidatorBalanceVerifier",
|
|
4
|
+
"sourceName": "contracts/liqEth/LiqEthCommon.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "uint64",
|
|
10
|
+
"name": "ts",
|
|
11
|
+
"type": "uint64"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "uint256",
|
|
15
|
+
"name": "idx",
|
|
16
|
+
"type": "uint256"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "uint64",
|
|
20
|
+
"name": "expected",
|
|
21
|
+
"type": "uint64"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"internalType": "bytes32",
|
|
25
|
+
"name": "leaf",
|
|
26
|
+
"type": "bytes32"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"internalType": "bytes32[]",
|
|
30
|
+
"name": "branchState",
|
|
31
|
+
"type": "bytes32[]"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"internalType": "uint256",
|
|
35
|
+
"name": "gindexState",
|
|
36
|
+
"type": "uint256"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"internalType": "bytes32[]",
|
|
40
|
+
"name": "branchBlock",
|
|
41
|
+
"type": "bytes32[]"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"internalType": "uint256",
|
|
45
|
+
"name": "gindexStateInBlock",
|
|
46
|
+
"type": "uint256"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"name": "verifyBalanceAtTimestamp",
|
|
50
|
+
"outputs": [
|
|
51
|
+
{
|
|
52
|
+
"internalType": "bool",
|
|
53
|
+
"name": "ok",
|
|
54
|
+
"type": "bool"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"internalType": "uint64",
|
|
58
|
+
"name": "bal",
|
|
59
|
+
"type": "uint64"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"stateMutability": "view",
|
|
63
|
+
"type": "function"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"bytecode": "0x",
|
|
67
|
+
"deployedBytecode": "0x",
|
|
68
|
+
"linkReferences": {},
|
|
69
|
+
"deployedLinkReferences": {}
|
|
70
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IWithdrawalRecord",
|
|
4
|
+
"sourceName": "contracts/liqEth/LiqEthCommon.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "uint256",
|
|
10
|
+
"name": "id",
|
|
11
|
+
"type": "uint256"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "sender",
|
|
16
|
+
"type": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"name": "burnClaimed",
|
|
20
|
+
"outputs": [
|
|
21
|
+
{
|
|
22
|
+
"internalType": "uint256",
|
|
23
|
+
"name": "",
|
|
24
|
+
"type": "uint256"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"stateMutability": "nonpayable",
|
|
28
|
+
"type": "function"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"inputs": [
|
|
32
|
+
{
|
|
33
|
+
"internalType": "address",
|
|
34
|
+
"name": "to",
|
|
35
|
+
"type": "address"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"internalType": "uint256",
|
|
39
|
+
"name": "amount",
|
|
40
|
+
"type": "uint256"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"internalType": "uint256",
|
|
44
|
+
"name": "unlockTs",
|
|
45
|
+
"type": "uint256"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "mintRequest",
|
|
49
|
+
"outputs": [
|
|
50
|
+
{
|
|
51
|
+
"internalType": "uint256",
|
|
52
|
+
"name": "id",
|
|
53
|
+
"type": "uint256"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"stateMutability": "nonpayable",
|
|
57
|
+
"type": "function"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"bytecode": "0x",
|
|
61
|
+
"deployedBytecode": "0x",
|
|
62
|
+
"linkReferences": {},
|
|
63
|
+
"deployedLinkReferences": {}
|
|
64
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "LiqEthCommon",
|
|
4
|
+
"sourceName": "contracts/liqEth/LiqEthCommon.sol",
|
|
5
|
+
"abi": [],
|
|
6
|
+
"bytecode": "0x60808060405234601357603a908160198239f35b600080fdfe600080fdfea2646970667358221220cdadc484c24cab99a66f237499e90331bd8269e6f5d5b08c542ef3a1d783e30964736f6c63430008190033",
|
|
7
|
+
"deployedBytecode": "0x600080fdfea2646970667358221220cdadc484c24cab99a66f237499e90331bd8269e6f5d5b08c542ef3a1d783e30964736f6c63430008190033",
|
|
8
|
+
"linkReferences": {},
|
|
9
|
+
"deployedLinkReferences": {}
|
|
10
|
+
}
|