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
+42
View File
@@ -0,0 +1,42 @@
import type {
Provider, TransactionRequest, TransactionResponse
} from "./provider.js";
/**
* A **ContractRunner** is a generic interface which defines an object
* capable of interacting with a Contract on the network.
*
* The more operations supported, the more utility it is capable of.
*
* The most common ContractRunners are [Providers](Provider) which enable
* read-only access and [Signers](Signer) which enable write-access.
*/
export interface ContractRunner {
/**
* The provider used for necessary state querying operations.
*
* This can also point to the **ContractRunner** itself, in the
* case of an [[AbstractProvider]].
*/
provider: null | Provider;
/**
* Required to estimate gas.
*/
estimateGas?: (tx: TransactionRequest) => Promise<bigint>;
/**
* Required for pure, view or static calls to contracts.
*/
call?: (tx: TransactionRequest) => Promise<string>;
/**
* Required to support ENS names
*/
resolveName?: (name: string) => Promise<null | string>;
/**
* Required for state mutating calls
*/
sendTransaction?: (tx: TransactionRequest) => Promise<TransactionResponse>;
}