Skip to content

Commit 8c877a2

Browse files
authored
chore: fix some comments (#508)
Signed-off-by: riskrole <yuhang@before.tech>
1 parent 42cdb48 commit 8c877a2

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

examples/webpack-example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# `steem-js` webpack configuration example
2-
This is a demo of `steem-js` and webpack usage targetting both the Web and
2+
This is a demo of `steem-js` and webpack usage targeting both the Web and
33
Node.js platforms.
44

55
## Compiling the example

src/auth/ecc/src/aes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Long = ByteBuffer.Long;
1212
Spec: http://localhost:3002/steem/@dantheman/how-to-encrypt-a-memo-when-transferring-steem
1313
@throws {Error|TypeError} - "Invalid Key, ..."
1414
@arg {PrivateKey} private_key - required and used for decryption
15-
@arg {PublicKey} public_key - required and used to calcualte the shared secret
15+
@arg {PublicKey} public_key - required and used to calculate the shared secret
1616
@arg {string} [nonce = uniqueNonce()] - assigned a random unique uint64
1717
1818
@return {object}
@@ -27,7 +27,7 @@ export function encrypt(private_key, public_key, message, nonce = uniqueNonce())
2727
/**
2828
Spec: http://localhost:3002/steem/@dantheman/how-to-encrypt-a-memo-when-transferring-steem
2929
@arg {PrivateKey} private_key - required and used for decryption
30-
@arg {PublicKey} public_key - required and used to calcualte the shared secret
30+
@arg {PublicKey} public_key - required and used to calculate the shared secret
3131
@arg {string} nonce - random or unique uint64, provides entropy when re-using the same private/public keys.
3232
@arg {Buffer} message - Encrypted or plain text message
3333
@arg {number} checksum - shared secret checksum

src/auth/ecc/src/key_private.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class PrivateKey {
2020

2121
static fromBuffer(buf) {
2222
if (!Buffer.isBuffer(buf)) {
23-
throw new Error("Expecting paramter to be a Buffer type");
23+
throw new Error("Expecting parameter to be a Buffer type");
2424
}
2525
if (32 !== buf.length) {
2626
console.log(`WARN: Expecting 32 bytes, instead got ${buf.length}, stack trace:`, new Error().stack);

src/auth/ecc/src/signature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Signature {
7171
*/
7272
static signBufferSha256(buf_sha256, private_key) {
7373
if( buf_sha256.length !== 32 || ! Buffer.isBuffer(buf_sha256) )
74-
throw new Error("buf_sha256: 32 byte buffer requred")
74+
throw new Error("buf_sha256: 32 byte buffer required")
7575
private_key = toPrivateObj(private_key)
7676
assert(private_key, 'private_key required')
7777

test/KeyFormats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import assert from "assert"
44
var test = function(key) {
55
describe("steem.auth: key_formats", function() {
66

7-
it("Calcualtes public key from private key", function() {
7+
it("Calculates public key from private key", function() {
88
var private_key = PrivateKey.fromHex(key.private_key);
99
var public_key = private_key.toPublicKey();
1010
assert.equal(key.public_key, public_key.toPublicKeyString());

0 commit comments

Comments
 (0)