Skip to content

Commit 155f652

Browse files
committed
chose(SOLNENG-27): update BuilderVault public nodeJS SDK repo
1 parent c6a448a commit 155f652

File tree

9 files changed

+374
-209
lines changed

9 files changed

+374
-209
lines changed

ethereum-staking/buildervault/nodejs/README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ sequenceDiagram
3030
- Place Builder Vault authentication certificate key-pair `client.crt` & `client.key` in this nodejs folder
3131
- Register for free Blockdaemon [RPC API key](https://docs.blockdaemon.com/reference/get-started-rpc#step-1-sign-up-for-an-api-key) and set in .env as BLOCKDAEMON_API_KEY
3232
- Register for free Blockdaemon [Staking API key](https://docs.blockdaemon.com/reference/get-started-staking-api#step-1-sign-up-for-an-api-key) and set in .env as BLOCKDAEMON_STAKE_API_KEY
33-
- Speak to your CSM about getting credentials to the Blockdaemon nexus.sepior.net repo for the nodejs SDK.
3433

3534
### Step 1. Set environment variables in .env
3635
```shell
@@ -40,11 +39,9 @@ cp .env.example .env
4039
- update .env with API keys
4140

4241
### Step 2. Install package dependancies
43-
- replace NEXUS_USERNAME & NEXUS_PASSWORD with credential provided by your CSM
42+
- set the public NPM repository for the BuilderVault Node.js SDK
4443
```shell
45-
npm config set @sepior:registry=https://nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/
46-
npm config set //nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/:username=NEXUS_USERNAME
47-
npm config set //nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/:\_password=`echo -n 'NEXUS_PASSWORD' | base64`
44+
npm config set @sepior:registry=https://gitlab.com/api/v4/projects/56306653/packages/npm/
4845
npm install
4946
```
5047

ethereum-staking/buildervault/nodejs/ethereum-stake-bv.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async function signTx(
254254
for (const [_, client] of clients.entries()) {
255255
const func = async (): Promise<void> => {
256256
const ecdsaApi = client.ECDSA();
257-
257+
console.log(`Creating partialSignature with MPC player ${_}...`);
258258
const partialSignResult = await ecdsaApi.sign(
259259
sessionConfig,
260260
masterKeyId,
@@ -340,7 +340,7 @@ async function getKeyId(
340340
for (const [i, client] of clients.entries()) {
341341
const func = async (): Promise<void> => {
342342
const ecdsaApi = client.ECDSA();
343-
343+
console.log(`Generating key using MPC player ${i}`);
344344
masterKeyIds[i] = await ecdsaApi.generateKey(
345345
sessionConfig,
346346
threshold,

ethereum-staking/buildervault/nodejs/package-lock.json

+176-78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ethereum-staking/buildervault/nodejs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"@sepior/tsmsdkv2": "^63.0.0",
3+
"@sepior/tsmsdkv2": "^65.0.0",
44
"asn1.js": "^5.4.1",
55
"crypto": "^1.0.1",
66
"dotenv": "^16.4.5",

ethereum-staking/fireblocks/nodejs/ethereum-stake-fb.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function createStakeIntent(
3232
request: CreateStakeIntentRequest,
3333
): Promise<CreateStakeIntentResponse> {
3434

35-
// * Create a stake intent with the Staking Integration API: https://docs.blockdaemon.com/reference/postethereumstakeintent
35+
// * Create a stake intent with the Staking Integration API: https://docs.blockdaemon.com/reference/postethereumstakeintent
3636
const requestOptions = {
3737
method: 'POST',
3838
headers: {
@@ -84,14 +84,14 @@ async function main() {
8484
}
8585

8686
// Determine FIreblocks Asset ID based on network
87-
const fireblocks_asset_id = process.env.ETHEREUM_NETWORK === "holesky" ? ChainId.HOLESKY : ChainId.MAINNET;
87+
const chainID = process.env.ETHEREUM_NETWORK === "holesky" ? ChainId.HOLESKY : ChainId.MAINNET;
8888

8989
const eip1193Provider = new FireblocksWeb3Provider({
9090
apiBaseUrl: ApiBaseUrl.Production,
9191
privateKey: readFileSync(process.env.FIREBLOCKS_SECRET_KEY, "utf8"),
9292
apiKey: process.env.FIREBLOCKS_API_KEY,
9393
vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS,
94-
chainId: fireblocks_asset_id,
94+
chainId: chainID,
9595
});
9696

9797
const web3 = new Web3(eip1193Provider);

solana-staking/buildervault/nodejs/README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ sequenceDiagram
3131
- Place Builder Vault authentication certificate key-pair `client.crt` & `client.key` in this nodejs folder
3232
- Register free Blockdaemon [RPC API key](https://docs.blockdaemon.com/reference/get-started-rpc#step-1-sign-up-for-an-api-key) and set in .env as BLOCKDAEMON_API_KEY
3333
- Register free Blockdaemon [Staking API key](https://docs.blockdaemon.com/reference/get-started-staking-api#step-1-sign-up-for-an-api-key) and set in .env as BLOCKDAEMON_STAKE_API_KEY
34-
- Speak to your CSM about getting credentials to the Blockdaemon nexus.sepior.net repo for the nodejs SDK.
3534

3635
### Step 1. Set environment variables in .env
3736
```shell
@@ -41,11 +40,9 @@ cp .env.example .env
4140
- update .env with API keys
4241

4342
### Step 2. Install package dependancies
44-
- replace NEXUS_USERNAME & NEXUS_PASSWORD with credential provided by your CSM
43+
- set the public NPM repository for the BuilderVault Node.js SDK
4544
```shell
46-
npm config set @sepior:registry=https://nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/
47-
npm config set //nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/:username=NEXUS_USERNAME
48-
npm config set //nexus.sepior.net/repository/sepior-nodejs-tsm-sdk-group/:\_password=`echo -n 'NEXUS_PASSWORD' | base64`
45+
npm config set @sepior:registry=https://gitlab.com/api/v4/projects/56306653/packages/npm/
4946
npm install
5047
```
5148

0 commit comments

Comments
 (0)