Skip to content

Commit 6a08fb4

Browse files
committed
fix(schnorr): spelling
1 parent 41097c4 commit 6a08fb4

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

docs/api/bitcoin-ts.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export enum AuthenticationErrorCommon {
124124
// (undocumented)
125125
nonNullSignatureFailure = "Program failed a signature verification with a non-null signature (violating the \"NULLFAIL\" rule).",
126126
// (undocumented)
127-
shnorrSizedSignatureInCheckMultiSig = "Program used a shnorr-sized signature (65 bytes) in an OP_CHECKMULTISIG operation.",
127+
schnorrSizedSignatureInCheckMultiSig = "Program used a schnorr-sized signature (65 bytes) in an OP_CHECKMULTISIG operation.",
128128
// (undocumented)
129129
unexpectedElse = "Encountered an OP_ELSE outside of an OP_IF ... OP_ENDIF block.",
130130
// (undocumented)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"doc": "run-s doc:html && open-cli build/docs/index.html",
4646
"doc:html": "typedoc src/index.ts --target ES6 --mode file --excludeNotExported --out build/docs",
4747
"doc:json": "typedoc src/index.ts --target ES6 --mode file --excludeNotExported --json build/docs/typedoc.json",
48+
"doc:next": "run-s build doc:extract doc:generate",
4849
"doc:extract": "api-extractor run --local --typescript-compiler-folder node_modules/typescript",
4950
"doc:generate": "api-documenter markdown -i temp -o docs/markdown",
5051
"doc:check-api": "api-extractor run --typescript-compiler-folder node_modules/typescript",

src/lib/auth/instruction-sets/common/crypto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export const opCheckMultiSig = <
313313
signature.length === ConsensusBCH.schnorrSignatureLength
314314
) {
315315
return applyError<State, Errors>(
316-
AuthenticationErrorCommon.shnorrSizedSignatureInCheckMultiSig,
316+
AuthenticationErrorCommon.schnorrSizedSignatureInCheckMultiSig,
317317
finalState
318318
);
319319
}

src/lib/auth/instruction-sets/common/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export enum AuthenticationErrorCommon {
3131
negativeLocktime = 'Program called an OP_CHECKLOCKTIMEVERIFY or OP_CHECKSEQUENCEVERIFY operation with a negative locktime.',
3232
nonMinimalPush = 'Push operations must use the smallest possible encoding.',
3333
nonNullSignatureFailure = 'Program failed a signature verification with a non-null signature (violating the "NULLFAIL" rule).',
34-
shnorrSizedSignatureInCheckMultiSig = 'Program used a shnorr-sized signature (65 bytes) in an OP_CHECKMULTISIG operation.',
34+
schnorrSizedSignatureInCheckMultiSig = 'Program used a schnorr-sized signature (65 bytes) in an OP_CHECKMULTISIG operation.',
3535
unexpectedElse = 'Encountered an OP_ELSE outside of an OP_IF ... OP_ENDIF block.',
3636
unexpectedEndIf = 'Encountered an OP_ENDIF which is not following a matching OP_IF.',
3737
unknownOpcode = 'Called an unknown opcode.',

src/lib/auth/templates/language/compiler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ export const getCompilerOperationsBCH = <
315315
'schnorr_data_signature',
316316
secp256k1 => secp256k1.signMessageHashSchnorr
317317
),
318-
shnorr_signature: compilerOperationBCHGenerateSignature(
319-
'shnorr_signature',
318+
schnorr_signature: compilerOperationBCHGenerateSignature(
319+
'schnorr_signature',
320320
secp256k1 => secp256k1.signMessageHashSchnorr
321321
),
322322
signature: compilerOperationBCHGenerateSignature(

src/lib/crypto/secp256k1.bench.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,14 @@ test('bench: secp256k1: verify: Schnorr vs. ECDSA', async t => {
266266
let messageHash: Uint8Array;
267267
let pubkeyCompressed: Uint8Array;
268268
let sigDER: Uint8Array;
269-
let sigShnorr: Uint8Array;
269+
let sigSchnorr: Uint8Array;
270270
let result: boolean;
271271
const nextCycle = () => {
272272
const privKey = getValidPrivateKey(secp256k1);
273273
messageHash = randomBytes(privKeyLength);
274274
pubkeyCompressed = secp256k1.derivePublicKeyCompressed(privKey);
275275
sigDER = secp256k1.signMessageHashDER(privKey, messageHash);
276-
sigShnorr = secp256k1.signMessageHashSchnorr(privKey, messageHash);
276+
sigSchnorr = secp256k1.signMessageHashSchnorr(privKey, messageHash);
277277
result = false;
278278
};
279279
nextCycle();
@@ -288,10 +288,10 @@ test('bench: secp256k1: verify: Schnorr vs. ECDSA', async t => {
288288
}
289289
);
290290
s.bench(
291-
'secp256k1.verifySignatureSchnorr (Shnorr, pubkey compressed)',
291+
'secp256k1.verifySignatureSchnorr (Schnorr, pubkey compressed)',
292292
() => {
293293
result = secp256k1.verifySignatureSchnorr(
294-
sigShnorr,
294+
sigSchnorr,
295295
pubkeyCompressed,
296296
messageHash
297297
);

0 commit comments

Comments
 (0)