eip-1193 0.3.2 → 0.3.4

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.
Files changed (2) hide show
  1. package/index.d.ts +19 -15
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -36,14 +36,18 @@ export type EIP1193LegacyTransactionData = BaseEIP1193TransactionData & {
36
36
  export type EIP1193TransactionDataOfType1 = BaseEIP1193TransactionData & {
37
37
  type: "0x1",
38
38
  chainId?: EIP1193ChainId;
39
- accessList?: EIP1193Account[];
39
+ accessList?: EIP1193AccessList;
40
40
  gasPrice?: EIP1193QUANTITY;
41
41
  }
42
42
 
43
+
44
+ export type EIP1193AccessListEntry = { address: EIP1193Account; storageKeys: EIP1193DATA[] };
45
+ export type EIP1193AccessList = EIP1193AccessListEntry[];
46
+
43
47
  export type EIP1193TransactionDataOfType2 = BaseEIP1193TransactionData & {
44
48
  type: "0x2",
45
49
  chainId?: EIP1193ChainId;
46
- accessList?: EIP1193Account[];
50
+ accessList?: EIP1193AccessList;
47
51
  maxFeePerGas?: EIP1193QUANTITY;
48
52
  maxPriorityFeePerGas?: EIP1193QUANTITY
49
53
  }
@@ -478,9 +482,9 @@ export type EIP1193Response =
478
482
  | EIP1193SyncingStatus | false
479
483
  | EIP1193QUANTITY
480
484
  | EIP1193BlockWithTransactions
481
- | EIP1193Transaction
482
- | EIP1193TransactionReceipt
483
- | EIP1193Block
485
+ | EIP1193Transaction | null
486
+ | EIP1193TransactionReceipt | null
487
+ | EIP1193Block | null
484
488
  | EIP1193Log[]
485
489
  | EIP1193DATA
486
490
  | EIP1193ChainId
@@ -599,30 +603,30 @@ export type EIP1193ProviderWithoutEvents<T = EIP1193Request> = {
599
603
  request(args: EIP1193SendRawTransactionRequest): Promise<EIP1193DATA>;
600
604
  request(args: EIP119CallRequest): Promise<EIP1193DATA>;
601
605
  request(args: EIP119EstimateGasRequest): Promise<EIP1193QUANTITY>;
602
- request(args: EIP119GetBlockByHashRequest): Promise<EIP1193Block>;
603
- request(args: EIP119GetBlockByNumberRequest): Promise<EIP1193Block>;
606
+ request(args: EIP119GetBlockByHashRequest): Promise<EIP1193Block | null>;
607
+ request(args: EIP119GetBlockByNumberRequest): Promise<EIP1193Block | null>;
604
608
  request(
605
609
  args: EIP119GetBlockByHashRequest<true>
606
- ): Promise<EIP1193BlockWithTransactions>;
610
+ ): Promise<EIP1193BlockWithTransactions | null>;
607
611
  request(
608
612
  args: EIP119GetBlockByNumberRequest<true>
609
- ): Promise<EIP1193BlockWithTransactions>;
610
- request(args: EIP119GetTransactionByHashRequest): Promise<EIP1193Transaction>;
613
+ ): Promise<EIP1193BlockWithTransactions | null>;
614
+ request(args: EIP119GetTransactionByHashRequest): Promise<EIP1193Transaction | null>;
611
615
  request(
612
616
  args: EIP119GetTransactionByBlockHashAndIndexRequest
613
- ): Promise<EIP1193Transaction>;
617
+ ): Promise<EIP1193Transaction | null>;
614
618
  request(
615
619
  args: EIP119GetTransactionByBlockNumberAndIndexRequest
616
- ): Promise<EIP1193Transaction>;
620
+ ): Promise<EIP1193Transaction | null>;
617
621
  request(
618
622
  args: EIP119GetTransactionReceiptRequest
619
- ): Promise<EIP1193TransactionReceipt>;
623
+ ): Promise<EIP1193TransactionReceipt | null>;
620
624
  request(
621
625
  args: EIP119GetUncleByBlockHashAndIndexRequest
622
- ): Promise<EIP1193Block>;
626
+ ): Promise<EIP1193Block | null>;
623
627
  request(
624
628
  args: EIP119GetUncleByBlockNumberAndIndexRequest
625
- ): Promise<EIP1193Block>;
629
+ ): Promise<EIP1193Block | null>;
626
630
  request(args: EIP119GetLogsRequest): Promise<EIP1193Log[]>;
627
631
  request(args: EIP1193PersonalSignRequest): Promise<EIP1193DATA>;
628
632
  request(args: EIP1193PTypedSignv4Request): Promise<EIP1193DATA>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eip-1193",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Types for EIP-1193",
5
5
  "keywords": [],
6
6
  "author": "",