@dialectlabs/blockchain-sdk-aptos
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -5,2 +5,6 @@ # CHANGELOG | ||
## [1.0.3] - 2022-11-30 | ||
- fix: remove implicit sdk-cred generation | ||
## [1.0.2] - 2022-10-11 | ||
@@ -7,0 +11,0 @@ |
@@ -37,4 +37,2 @@ "use strict"; | ||
type: constants_1.DIALECT_BLOCKCHAIN_SDK_TYPE_APTOS, | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
info: { | ||
@@ -41,0 +39,0 @@ supportsOnChainMessaging: false, |
@@ -22,3 +22,3 @@ "use strict"; | ||
} | ||
if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
else if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
const privateKeyRaw = process.env.DIALECT_SDK_CREDENTIALS; | ||
@@ -30,5 +30,5 @@ const privateKey = new Uint8Array(JSON.parse(privateKeyRaw)); | ||
} | ||
const account = new aptos_1.AptosAccount(); | ||
console.log(`Initializing ${NodeDialectAptosWalletAdapter.name} using generated ${account.pubKey()} public key and ${account.address()} address.`); | ||
return new NodeDialectAptosWalletAdapter(account); | ||
else { | ||
throw new Error(`Error initializing ${NodeDialectAptosWalletAdapter.name}: SDK credential must be provided.`); | ||
} | ||
} | ||
@@ -35,0 +35,0 @@ signMessage(message) { |
@@ -34,4 +34,2 @@ import { EncryptionKeysProvider, IllegalArgumentError } from '@dialectlabs/sdk'; | ||
type: DIALECT_BLOCKCHAIN_SDK_TYPE_APTOS, | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
info: { | ||
@@ -38,0 +36,0 @@ supportsOnChainMessaging: false, |
@@ -18,3 +18,3 @@ import { AptosAccount } from 'aptos'; | ||
} | ||
if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
else if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
const privateKeyRaw = process.env.DIALECT_SDK_CREDENTIALS; | ||
@@ -26,5 +26,5 @@ const privateKey = new Uint8Array(JSON.parse(privateKeyRaw)); | ||
} | ||
const account = new AptosAccount(); | ||
console.log(`Initializing ${NodeDialectAptosWalletAdapter.name} using generated ${account.pubKey()} public key and ${account.address()} address.`); | ||
return new NodeDialectAptosWalletAdapter(account); | ||
else { | ||
throw new Error(`Error initializing ${NodeDialectAptosWalletAdapter.name}: SDK credential must be provided.`); | ||
} | ||
} | ||
@@ -31,0 +31,0 @@ async signMessage(message) { |
{ | ||
"name": "@dialectlabs/blockchain-sdk-aptos", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": "git@github.com:dialectlabs/sdk.git", | ||
@@ -23,3 +23,4 @@ "author": "dialectlabs", | ||
"dev": "yarn clean && concurrently \"npm:build:cjs:watch\" \"npm:build:esm:watch\"", | ||
"test": "jest" | ||
"test": "jest", | ||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"" | ||
}, | ||
@@ -26,0 +27,0 @@ "dependencies": { |
@@ -64,4 +64,2 @@ import type { | ||
type: DIALECT_BLOCKCHAIN_SDK_TYPE_APTOS, | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
info: { | ||
@@ -68,0 +66,0 @@ supportsOnChainMessaging: false, |
@@ -32,4 +32,3 @@ import type { | ||
return new NodeDialectAptosWalletAdapter(account); | ||
} | ||
if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
} else if (process.env.DIALECT_SDK_CREDENTIALS) { | ||
const privateKeyRaw = process.env.DIALECT_SDK_CREDENTIALS; | ||
@@ -44,10 +43,7 @@ const privateKey = new Uint8Array(JSON.parse(privateKeyRaw as string)); | ||
return new NodeDialectAptosWalletAdapter(account); | ||
} else { | ||
throw new Error( | ||
`Error initializing ${NodeDialectAptosWalletAdapter.name}: SDK credential must be provided.`, | ||
); | ||
} | ||
const account = new AptosAccount(); | ||
console.log( | ||
`Initializing ${ | ||
NodeDialectAptosWalletAdapter.name | ||
} using generated ${account.pubKey()} public key and ${account.address()} address.`, | ||
); | ||
return new NodeDialectAptosWalletAdapter(account); | ||
} | ||
@@ -54,0 +50,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
145
191196
2447
1