Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALL-4566 Print result as json for generateManagedPrivateKeyBatch #100

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum-kms",
"version": "7.0.0",
"version": "7.0.1",
"description": "Tatum KMS - Key Management System for Tatum-powered apps.",
"main": "dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

const generatePureWallet = async (chain: Currency, testnet: boolean, mnemonic?: string) => {
let wallet: any

Check warning on line 125 in src/management.ts

View workflow job for this annotation

GitHub Actions / 🏗️ Install and build

Unexpected any. Specify a different type
if (chain === Currency.SOL) {
const sdk = TatumSolanaSDK({ apiKey: '' })
wallet = sdk.wallet.wallet()
Expand Down Expand Up @@ -224,7 +224,7 @@
const cnt = Number(count)
for (let i = 0; i < cnt; i++) {
const wallet = await generatePureWallet(chain, testnet)
let address: any

Check warning on line 227 in src/management.ts

View workflow job for this annotation

GitHub Actions / 🏗️ Install and build

Unexpected any. Specify a different type
if (wallet.address) {
address = wallet.address
} else {
Expand All @@ -237,7 +237,7 @@
}
const privateKey = wallet.secret ? wallet.secret : await generatePrivateKey(wallet.mnemonic, chain, 1, testnet)
const { signatureId } = await storePrivateKey(chain, testnet, privateKey as string, pwd, path, false)
console.log(`{ signatureId: ${signatureId}, address: ${address} }`)
console.log(JSON.stringify({ signatureId, address }))
}
}

Expand All @@ -261,7 +261,7 @@
}

// TODO: validate all properties from wallet and create a type or interface to replace any bellow
export const isWalletsValid = (wallets: any, options: WalletsValidationOptions) => {

Check warning on line 264 in src/management.ts

View workflow job for this annotation

GitHub Actions / 🏗️ Install and build

Unexpected any. Specify a different type
if (Object.keys(wallets).length === 0) {
console.error(JSON.stringify({ error: `No such wallet for chain '${options.chain}'.` }, null, 2))
return false
Expand Down Expand Up @@ -354,7 +354,7 @@
console.error(JSON.stringify({ error: `No such wallet for signatureId '${id}'.` }, null, 2))
return null
}
let pk: { address: any }

Check warning on line 357 in src/management.ts

View workflow job for this annotation

GitHub Actions / 🏗️ Install and build

Unexpected any. Specify a different type
if (wallet[id].address) {
pk = {
address: wallet[id].address,
Expand Down
Loading