@obolnetwork/obol-sdk 2.11.6 → 2.11.8
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/browser/src/index.js +299 -119
- package/dist/browser/src/index.js.map +1 -1
- package/dist/cjs/src/index.js +299 -119
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/src/index.js +299 -119
- package/dist/esm/src/index.js.map +1 -1
- package/dist/types/src/abi/OVM.d.ts +21 -0
- package/dist/types/src/bytecodes.d.ts +2 -3
- package/dist/types/src/splits/splitHelpers.d.ts +3 -3
- package/dist/types/src/splits/splits.d.ts +5 -4
- package/package.json +3 -3
|
@@ -104,6 +104,7 @@ export declare const deployOVMAndSplitV2: ({ ovmArgs, rewardRecipients, isReward
|
|
|
104
104
|
* @param ovmAddress - The address of the OVM contract
|
|
105
105
|
* @param pubKeys - Array of validator public keys in bytes format
|
|
106
106
|
* @param amounts - Array of withdrawal amounts in wei (uint64)
|
|
107
|
+
* @param withdrawalFees - Total withdrawal fees in wei
|
|
107
108
|
* @param signer - The signer to use for the transaction
|
|
108
109
|
* @returns Promise that resolves to the transaction hash
|
|
109
110
|
*/
|
|
@@ -117,13 +118,13 @@ export declare const requestWithdrawalFromOVM: ({ ovmAddress, pubKeys, amounts,
|
|
|
117
118
|
txHash: string;
|
|
118
119
|
}>;
|
|
119
120
|
/**
|
|
120
|
-
* Deposits to OVM contract
|
|
121
|
+
* Deposits to OVM contract by sending individual transactions for each deposit.
|
|
121
122
|
* @param ovmAddress - The address of the OVM contract
|
|
122
123
|
* @param deposits - Array of deposit objects with all required parameters
|
|
123
124
|
* @param signer - The signer to use for the transaction
|
|
124
125
|
* @returns Promise that resolves to an array of transaction hashes
|
|
125
126
|
*/
|
|
126
|
-
export declare const
|
|
127
|
+
export declare const depositOVM: ({ ovmAddress, deposits, signer, }: {
|
|
127
128
|
ovmAddress: string;
|
|
128
129
|
deposits: Array<{
|
|
129
130
|
pubkey: string;
|
|
@@ -133,7 +134,6 @@ export declare const depositWithMulticall3: ({ ovmAddress, deposits, signer, cha
|
|
|
133
134
|
amount: string;
|
|
134
135
|
}>;
|
|
135
136
|
signer: SignerType;
|
|
136
|
-
chainId: number;
|
|
137
137
|
}) => Promise<{
|
|
138
138
|
txHashes: string[];
|
|
139
139
|
}>;
|
|
@@ -67,7 +67,8 @@ export declare class ObolSplits {
|
|
|
67
67
|
* const result = await client.splits.requestWithdrawal({
|
|
68
68
|
* ovmAddress: '0x1234567890123456789012345678901234567890',
|
|
69
69
|
* pubKeys: ['0x123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456'],
|
|
70
|
-
* amounts: ['32000000000'] // 32 ETH in gwei
|
|
70
|
+
* amounts: ['32000000000'], // 32 ETH in gwei
|
|
71
|
+
* withdrawalFees: '1000000000000000' // Total fees in wei
|
|
71
72
|
* });
|
|
72
73
|
* console.log('Withdrawal requested:', result.txHash);
|
|
73
74
|
* ```
|
|
@@ -76,9 +77,9 @@ export declare class ObolSplits {
|
|
|
76
77
|
txHash: string;
|
|
77
78
|
}>;
|
|
78
79
|
/**
|
|
79
|
-
* Deposits to OVM contract
|
|
80
|
+
* Deposits to OVM contract by sending individual transactions for each deposit.
|
|
80
81
|
*
|
|
81
|
-
* This method allows depositing to an OVM contract
|
|
82
|
+
* This method allows depositing to an OVM contract. Each deposit is sent as a separate transaction
|
|
82
83
|
* Each deposit includes validator public key, withdrawal credentials, signature, deposit data root, and amount.
|
|
83
84
|
*
|
|
84
85
|
* @remarks
|
|
@@ -86,7 +87,7 @@ export declare class ObolSplits {
|
|
|
86
87
|
* and not pushed to version control.
|
|
87
88
|
*
|
|
88
89
|
* @param {OVMDepositPayload} payload - Data needed to deposit to OVM
|
|
89
|
-
* @returns {Promise<{txHashes: string[]}>} Array of transaction hashes for
|
|
90
|
+
* @returns {Promise<{txHashes: string[]}>} Array of transaction hashes, one for each deposit
|
|
90
91
|
* @throws Will throw an error if the signer is not provided, OVM address is invalid, or the deposit fails
|
|
91
92
|
*
|
|
92
93
|
* An example of how to use deposit:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obolnetwork/obol-sdk",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.8",
|
|
4
4
|
"description": "A package for creating Distributed Validators using the Obol API.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/obolnetwork/obol-sdk/issues"
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"npm:publish:next": "npm publish --tag next",
|
|
22
22
|
"release": "release-it",
|
|
23
23
|
"release:dry": "release-it --dry-run --no-npm",
|
|
24
|
-
"lint": "eslint
|
|
24
|
+
"lint": "eslint ./src --ext .ts,.js --fix",
|
|
25
25
|
"lint-ci": "eslint ./src --ext .ts,.js",
|
|
26
26
|
"prettier-ci": "prettier --check ./src --ext .ts,.js",
|
|
27
|
-
"prettier": "prettier --write \"
|
|
27
|
+
"prettier": "prettier --write \"src/**/*.{js,ts}\"",
|
|
28
28
|
"docs": "typedoc"
|
|
29
29
|
},
|
|
30
30
|
"main": "./dist/cjs/src/index.js",
|