-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remedy type declaration roll-up issues
- Loading branch information
Showing
7 changed files
with
447 additions
and
430 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,64 @@ | ||
import { ADDRESS, CONTRACT_STORAGE_DIFF_ITEM, FELT, OPENRPC } from './openrpc'; | ||
|
||
export namespace RPC { | ||
export type Response = { | ||
id: number; | ||
jsonrpc: string; | ||
result?: any; | ||
error?: { | ||
code: string; | ||
message: string; | ||
}; | ||
export type Response = { | ||
id: number; | ||
jsonrpc: string; | ||
result?: any; | ||
error?: { | ||
code: string; | ||
message: string; | ||
}; | ||
}; | ||
|
||
export type ChainId = OPENRPC.CHAIN_ID; | ||
export type CallResponse = OPENRPC.CallResponse; | ||
export type ContractAddress = ADDRESS; | ||
export type Felt = FELT; | ||
export type Nonce = OPENRPC.Nonce; | ||
export type ContractClass = OPENRPC.ContractClass | OPENRPC.DeprecatedContractClass; | ||
export type StateUpdate = OPENRPC.StateUpdate; | ||
export type Transaction = OPENRPC.Transaction; | ||
export type PendingTransactions = OPENRPC.PendingTransactions; | ||
export type TransactionHash = OPENRPC.TransactionHash; | ||
export type Trace = OPENRPC.Trace; | ||
export type Traces = OPENRPC.Traces; | ||
export type BlockHash = OPENRPC.BlockHash; | ||
export type BlockHashAndNumber = OPENRPC.BlockHashAndNumber; | ||
export type EstimateFeeResponse = OPENRPC.EstimatedFee; | ||
export type GetBlockWithTxHashesResponse = OPENRPC.BlockWithTxHashes; | ||
export type GetBlockWithTxs = OPENRPC.BlockWithTxs; | ||
export type GetStorageAtResponse = OPENRPC.Storage; | ||
export type TransactionReceipt = OPENRPC.TransactionReceipt; | ||
export type GetTransactionByHashResponse = OPENRPC.Transaction; | ||
export type GetTransactionByBlockIdAndIndex = OPENRPC.Transaction; | ||
export type GetTransactionCountResponse = number; | ||
export type GetBlockNumberResponse = OPENRPC.BlockNumber; | ||
export type GetSyncingStatsResponse = OPENRPC.SyncingStatus; | ||
export type EventFilter = OPENRPC.EventFilter; | ||
export type GetEventsResponse = OPENRPC.Events; | ||
export type InvokedTransaction = OPENRPC.InvokedTransaction; | ||
export type DeclaredTransaction = OPENRPC.DeclaredTransaction; | ||
export type DeployedTransaction = OPENRPC.DeployedTransaction; | ||
export type SimulationFlags = OPENRPC.SimulationFlags; | ||
export type BroadcastedTransaction = OPENRPC.BroadcastedTransaction; | ||
export type EstimatedFee = OPENRPC.EstimatedFee; | ||
export type Methods = OPENRPC.Methods; | ||
export type Storage = OPENRPC.Storage; | ||
export type SimulateTransactionResponse = OPENRPC.SimulatedTransactions; | ||
export type ChainId = OPENRPC.CHAIN_ID; | ||
export type CallResponse = OPENRPC.CallResponse; | ||
export type ContractAddress = ADDRESS; | ||
export type Felt = FELT; | ||
export type Nonce = OPENRPC.Nonce; | ||
export type ContractClass = OPENRPC.ContractClass | OPENRPC.DeprecatedContractClass; | ||
export type StateUpdate = OPENRPC.StateUpdate; | ||
export type Transaction = OPENRPC.Transaction; | ||
export type PendingTransactions = OPENRPC.PendingTransactions; | ||
export type TransactionHash = OPENRPC.TransactionHash; | ||
export type Trace = OPENRPC.Trace; | ||
export type Traces = OPENRPC.Traces; | ||
export type BlockHash = OPENRPC.BlockHash; | ||
export type BlockHashAndNumber = OPENRPC.BlockHashAndNumber; | ||
export type EstimateFeeResponse = OPENRPC.EstimatedFee; | ||
export type GetBlockWithTxHashesResponse = OPENRPC.BlockWithTxHashes; | ||
export type GetBlockWithTxs = OPENRPC.BlockWithTxs; | ||
export type GetStorageAtResponse = OPENRPC.Storage; | ||
export type TransactionReceipt = OPENRPC.TransactionReceipt; | ||
export type GetTransactionByHashResponse = OPENRPC.Transaction; | ||
export type GetTransactionByBlockIdAndIndex = OPENRPC.Transaction; | ||
export type GetTransactionCountResponse = number; | ||
export type GetBlockNumberResponse = OPENRPC.BlockNumber; | ||
export type GetSyncingStatsResponse = OPENRPC.SyncingStatus; | ||
export type EventFilter = OPENRPC.EventFilter; | ||
export type GetEventsResponse = OPENRPC.Events; | ||
export type InvokedTransaction = OPENRPC.InvokedTransaction; | ||
export type DeclaredTransaction = OPENRPC.DeclaredTransaction; | ||
export type DeployedTransaction = OPENRPC.DeployedTransaction; | ||
export type SimulationFlags = OPENRPC.SimulationFlags; | ||
export type BroadcastedTransaction = OPENRPC.BroadcastedTransaction; | ||
export type EstimatedFee = OPENRPC.EstimatedFee; | ||
export type Methods = OPENRPC.Methods; | ||
export type Storage = OPENRPC.Storage; | ||
export type SimulateTransactionResponse = OPENRPC.SimulatedTransactions; | ||
|
||
export enum TransactionType { | ||
DECLARE = 'DECLARE', | ||
DEPLOY = 'DEPLOY', | ||
DEPLOY_ACCOUNT = 'DEPLOY_ACCOUNT', | ||
INVOKE = 'INVOKE', | ||
L1_HANDLER = 'L1_HANDLER', | ||
} | ||
|
||
// Exported Diff on Sequencer (can be removed when diff resolved by new RPC v) | ||
export type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM>; | ||
export type DeprecatedDeclaredClasses = Array<FELT>; | ||
export type Nonces = Array<{ | ||
contract_address: ADDRESS; | ||
nonce: FELT; | ||
}>; | ||
export type ReplacedClasses = Array<{ contract_address: ADDRESS; class_hash: FELT }>; | ||
export enum TransactionType { | ||
DECLARE = 'DECLARE', | ||
DEPLOY = 'DEPLOY', | ||
DEPLOY_ACCOUNT = 'DEPLOY_ACCOUNT', | ||
INVOKE = 'INVOKE', | ||
L1_HANDLER = 'L1_HANDLER', | ||
} | ||
|
||
// Exported Diff on Sequencer (can be removed when diff resolved by new RPC v) | ||
export type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM>; | ||
export type DeprecatedDeclaredClasses = Array<FELT>; | ||
export type Nonces = Array<{ | ||
contract_address: ADDRESS; | ||
nonce: FELT; | ||
}>; | ||
export type ReplacedClasses = Array<{ contract_address: ADDRESS; class_hash: FELT }>; |
Oops, something went wrong.