eip-1193 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +31 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type EIP1193Transaction = {
|
|
|
10
10
|
hash: EIP1193DATA;
|
|
11
11
|
input: EIP1193DATA;
|
|
12
12
|
nonce: EIP1193QUANTITY;
|
|
13
|
-
to: EIP1193Account;
|
|
13
|
+
to: EIP1193Account | null;
|
|
14
14
|
transactionIndex: EIP1193QUANTITY | null;
|
|
15
15
|
value: EIP1193QUANTITY;
|
|
16
16
|
v: EIP1193QUANTITY;
|
|
@@ -482,9 +482,9 @@ export type EIP1193Response =
|
|
|
482
482
|
| EIP1193SyncingStatus | false
|
|
483
483
|
| EIP1193QUANTITY
|
|
484
484
|
| EIP1193BlockWithTransactions
|
|
485
|
-
| EIP1193Transaction
|
|
486
|
-
| EIP1193TransactionReceipt
|
|
487
|
-
| EIP1193Block
|
|
485
|
+
| EIP1193Transaction | null
|
|
486
|
+
| EIP1193TransactionReceipt | null
|
|
487
|
+
| EIP1193Block | null
|
|
488
488
|
| EIP1193Log[]
|
|
489
489
|
| EIP1193DATA
|
|
490
490
|
| EIP1193ChainId
|
|
@@ -603,30 +603,30 @@ export type EIP1193ProviderWithoutEvents<T = EIP1193Request> = {
|
|
|
603
603
|
request(args: EIP1193SendRawTransactionRequest): Promise<EIP1193DATA>;
|
|
604
604
|
request(args: EIP119CallRequest): Promise<EIP1193DATA>;
|
|
605
605
|
request(args: EIP119EstimateGasRequest): Promise<EIP1193QUANTITY>;
|
|
606
|
-
request(args: EIP119GetBlockByHashRequest): Promise<EIP1193Block>;
|
|
607
|
-
request(args: EIP119GetBlockByNumberRequest): Promise<EIP1193Block>;
|
|
606
|
+
request(args: EIP119GetBlockByHashRequest): Promise<EIP1193Block | null>;
|
|
607
|
+
request(args: EIP119GetBlockByNumberRequest): Promise<EIP1193Block | null>;
|
|
608
608
|
request(
|
|
609
609
|
args: EIP119GetBlockByHashRequest<true>
|
|
610
|
-
): Promise<EIP1193BlockWithTransactions>;
|
|
610
|
+
): Promise<EIP1193BlockWithTransactions | null>;
|
|
611
611
|
request(
|
|
612
612
|
args: EIP119GetBlockByNumberRequest<true>
|
|
613
|
-
): Promise<EIP1193BlockWithTransactions>;
|
|
614
|
-
request(args: EIP119GetTransactionByHashRequest): Promise<EIP1193Transaction>;
|
|
613
|
+
): Promise<EIP1193BlockWithTransactions | null>;
|
|
614
|
+
request(args: EIP119GetTransactionByHashRequest): Promise<EIP1193Transaction | null>;
|
|
615
615
|
request(
|
|
616
616
|
args: EIP119GetTransactionByBlockHashAndIndexRequest
|
|
617
|
-
): Promise<EIP1193Transaction>;
|
|
617
|
+
): Promise<EIP1193Transaction | null>;
|
|
618
618
|
request(
|
|
619
619
|
args: EIP119GetTransactionByBlockNumberAndIndexRequest
|
|
620
|
-
): Promise<EIP1193Transaction>;
|
|
620
|
+
): Promise<EIP1193Transaction | null>;
|
|
621
621
|
request(
|
|
622
622
|
args: EIP119GetTransactionReceiptRequest
|
|
623
|
-
): Promise<EIP1193TransactionReceipt>;
|
|
623
|
+
): Promise<EIP1193TransactionReceipt | null>;
|
|
624
624
|
request(
|
|
625
625
|
args: EIP119GetUncleByBlockHashAndIndexRequest
|
|
626
|
-
): Promise<EIP1193Block>;
|
|
626
|
+
): Promise<EIP1193Block | null>;
|
|
627
627
|
request(
|
|
628
628
|
args: EIP119GetUncleByBlockNumberAndIndexRequest
|
|
629
|
-
): Promise<EIP1193Block>;
|
|
629
|
+
): Promise<EIP1193Block | null>;
|
|
630
630
|
request(args: EIP119GetLogsRequest): Promise<EIP1193Log[]>;
|
|
631
631
|
request(args: EIP1193PersonalSignRequest): Promise<EIP1193DATA>;
|
|
632
632
|
request(args: EIP1193PTypedSignv4Request): Promise<EIP1193DATA>;
|
|
@@ -644,6 +644,23 @@ export type EIP1193ProviderWithoutEvents<T = EIP1193Request> = {
|
|
|
644
644
|
// request(args: EIP1193GenericRequest): Promise<unknown>;
|
|
645
645
|
};
|
|
646
646
|
|
|
647
|
+
export type EIP119DebugTraceTransactionRequest = {
|
|
648
|
+
readonly method: "debug_traceTransaction";
|
|
649
|
+
readonly params: [EIP1193DATA];
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
export type EIP1193TracedTransaction = {
|
|
653
|
+
failed: boolean;
|
|
654
|
+
gas: EIP1193QUANTITY;
|
|
655
|
+
returnValue: EIP1193DATA;
|
|
656
|
+
structLogs: any[]; // TODO
|
|
657
|
+
// TODO more
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export type EIP1193ProviderExtraMethods = {
|
|
661
|
+
request(args: EIP119DebugTraceTransactionRequest): Promise<EIP1193TracedTransaction>;
|
|
662
|
+
};
|
|
663
|
+
|
|
647
664
|
// export interface EIP1193ProviderWithBasicEvents<T = EIP1193Request>
|
|
648
665
|
// extends BareEIP1193Provider<T> {
|
|
649
666
|
// on(
|