refactor: HL EVM signing via sonirico/go-hyperliquid SDK

This commit is contained in:
jackyu66git
2026-05-04 16:15:51 +08:00
parent c5c4c7394f
commit 8b8d4140f9
1974 changed files with 270551 additions and 156 deletions
+21
View File
@@ -0,0 +1,21 @@
import { AES } from "./aes.js";
export abstract class ModeOfOperation {
readonly aes!: AES;
readonly name!: string;
constructor(name: string, key: Uint8Array, cls?: any) {
if (cls && !(this instanceof cls)) {
throw new Error(`${ name } must be instantiated with "new"`);
}
Object.defineProperties(this, {
aes: { enumerable: true, value: new AES(key) },
name: { enumerable: true, value: name }
});
}
abstract encrypt(plaintext: Uint8Array): Uint8Array;
abstract decrypt(ciphertext: Uint8Array): Uint8Array;
}