starknet 5.22.0 → 5.23.0
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/CHANGELOG.md +22 -0
- package/dist/index.d.ts +1361 -830
- package/dist/index.global.js +715 -351
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +387 -229
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +386 -229
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -153,6 +153,8 @@ declare const UDC: {
|
|
|
153
153
|
ADDRESS: string;
|
|
154
154
|
ENTRYPOINT: string;
|
|
155
155
|
};
|
|
156
|
+
declare const RPC_GOERLI_NODES: string[];
|
|
157
|
+
declare const RPC_MAINNET_NODES: string[];
|
|
156
158
|
|
|
157
159
|
declare const constants_API_VERSION: typeof API_VERSION;
|
|
158
160
|
declare const constants_BN_FEE_TRANSACTION_VERSION_1: typeof BN_FEE_TRANSACTION_VERSION_1;
|
|
@@ -168,6 +170,8 @@ declare const constants_MASK_250: typeof MASK_250;
|
|
|
168
170
|
declare const constants_MASK_251: typeof MASK_251;
|
|
169
171
|
type constants_NetworkName = NetworkName;
|
|
170
172
|
declare const constants_NetworkName: typeof NetworkName;
|
|
173
|
+
declare const constants_RPC_GOERLI_NODES: typeof RPC_GOERLI_NODES;
|
|
174
|
+
declare const constants_RPC_MAINNET_NODES: typeof RPC_MAINNET_NODES;
|
|
171
175
|
type constants_StarknetChainId = StarknetChainId;
|
|
172
176
|
declare const constants_StarknetChainId: typeof StarknetChainId;
|
|
173
177
|
declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
|
|
@@ -189,6 +193,8 @@ declare namespace constants {
|
|
|
189
193
|
constants_MASK_250 as MASK_250,
|
|
190
194
|
constants_MASK_251 as MASK_251,
|
|
191
195
|
constants_NetworkName as NetworkName,
|
|
196
|
+
constants_RPC_GOERLI_NODES as RPC_GOERLI_NODES,
|
|
197
|
+
constants_RPC_MAINNET_NODES as RPC_MAINNET_NODES,
|
|
192
198
|
constants_StarknetChainId as StarknetChainId,
|
|
193
199
|
constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN,
|
|
194
200
|
constants_TransactionHashPrefix as TransactionHashPrefix,
|
|
@@ -401,7 +407,7 @@ type EntryPointsByType = {
|
|
|
401
407
|
};
|
|
402
408
|
type ContractEntryPointFields = {
|
|
403
409
|
selector: string;
|
|
404
|
-
offset: string;
|
|
410
|
+
offset: string | number;
|
|
405
411
|
builtins?: Builtins;
|
|
406
412
|
};
|
|
407
413
|
interface Program extends Record<string, any> {
|
|
@@ -415,7 +421,7 @@ type CairoAssembly = {
|
|
|
415
421
|
compiler_version: string;
|
|
416
422
|
bytecode: ByteCode;
|
|
417
423
|
hints: any[];
|
|
418
|
-
pythonic_hints
|
|
424
|
+
pythonic_hints?: PythonicHints;
|
|
419
425
|
entry_points_by_type: EntryPointsByType;
|
|
420
426
|
};
|
|
421
427
|
/** COMPILED CONTRACT */
|
|
@@ -577,7 +583,7 @@ type Details = {
|
|
|
577
583
|
type InvocationsDetailsWithNonce = InvocationsDetails & {
|
|
578
584
|
nonce: BigNumberish;
|
|
579
585
|
};
|
|
580
|
-
declare enum TransactionType
|
|
586
|
+
declare enum TransactionType {
|
|
581
587
|
DECLARE = "DECLARE",
|
|
582
588
|
DEPLOY = "DEPLOY",
|
|
583
589
|
DEPLOY_ACCOUNT = "DEPLOY_ACCOUNT",
|
|
@@ -587,7 +593,7 @@ declare enum TransactionType$1 {
|
|
|
587
593
|
* new statuses are defined by props: finality_status and execution_status
|
|
588
594
|
* to be #deprecated
|
|
589
595
|
*/
|
|
590
|
-
declare enum TransactionStatus {
|
|
596
|
+
declare enum TransactionStatus$1 {
|
|
591
597
|
NOT_RECEIVED = "NOT_RECEIVED",
|
|
592
598
|
RECEIVED = "RECEIVED",
|
|
593
599
|
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
@@ -595,13 +601,13 @@ declare enum TransactionStatus {
|
|
|
595
601
|
REJECTED = "REJECTED",
|
|
596
602
|
REVERTED = "REVERTED"
|
|
597
603
|
}
|
|
598
|
-
declare enum TransactionFinalityStatus
|
|
604
|
+
declare enum TransactionFinalityStatus {
|
|
599
605
|
NOT_RECEIVED = "NOT_RECEIVED",
|
|
600
606
|
RECEIVED = "RECEIVED",
|
|
601
607
|
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
602
608
|
ACCEPTED_ON_L1 = "ACCEPTED_ON_L1"
|
|
603
609
|
}
|
|
604
|
-
declare enum TransactionExecutionStatus
|
|
610
|
+
declare enum TransactionExecutionStatus {
|
|
605
611
|
REJECTED = "REJECTED",
|
|
606
612
|
REVERTED = "REVERTED",
|
|
607
613
|
SUCCEEDED = "SUCCEEDED"
|
|
@@ -627,11 +633,11 @@ type BlockIdentifier = BlockNumber | BigNumberish;
|
|
|
627
633
|
* items used by AccountInvocations
|
|
628
634
|
*/
|
|
629
635
|
type AccountInvocationItem = (({
|
|
630
|
-
type: TransactionType
|
|
636
|
+
type: TransactionType.DECLARE;
|
|
631
637
|
} & DeclareContractTransaction) | ({
|
|
632
|
-
type: TransactionType
|
|
638
|
+
type: TransactionType.DEPLOY_ACCOUNT;
|
|
633
639
|
} & DeployAccountContractTransaction) | ({
|
|
634
|
-
type: TransactionType
|
|
640
|
+
type: TransactionType.INVOKE;
|
|
635
641
|
} & Invocation)) & InvocationsDetailsWithNonce;
|
|
636
642
|
/**
|
|
637
643
|
* Complete invocations array with account details (internal type from account -> provider)
|
|
@@ -641,13 +647,13 @@ type AccountInvocations = AccountInvocationItem[];
|
|
|
641
647
|
* Invocations array user provide to bulk method (simulate)
|
|
642
648
|
*/
|
|
643
649
|
type Invocations = Array<({
|
|
644
|
-
type: TransactionType
|
|
650
|
+
type: TransactionType.DECLARE;
|
|
645
651
|
} & OptionalPayload<DeclareContractPayload>) | ({
|
|
646
|
-
type: TransactionType
|
|
652
|
+
type: TransactionType.DEPLOY;
|
|
647
653
|
} & OptionalPayload<AllowArray<UniversalDeployerContractPayload>>) | ({
|
|
648
|
-
type: TransactionType
|
|
654
|
+
type: TransactionType.DEPLOY_ACCOUNT;
|
|
649
655
|
} & OptionalPayload<DeployAccountContractPayload>) | ({
|
|
650
|
-
type: TransactionType
|
|
656
|
+
type: TransactionType.INVOKE;
|
|
651
657
|
} & OptionalPayload<AllowArray<Call>>)>;
|
|
652
658
|
type Tupled = {
|
|
653
659
|
element: any;
|
|
@@ -661,8 +667,8 @@ type ParsedStruct = {
|
|
|
661
667
|
};
|
|
662
668
|
type waitForTransactionOptions = {
|
|
663
669
|
retryInterval?: number;
|
|
664
|
-
successStates?: Array<TransactionFinalityStatus
|
|
665
|
-
errorStates?: Array<TransactionFinalityStatus
|
|
670
|
+
successStates?: Array<TransactionFinalityStatus | TransactionExecutionStatus>;
|
|
671
|
+
errorStates?: Array<TransactionFinalityStatus | TransactionExecutionStatus>;
|
|
666
672
|
};
|
|
667
673
|
type getSimulateTransactionOptions = {
|
|
668
674
|
blockIdentifier?: BlockIdentifier;
|
|
@@ -698,11 +704,12 @@ interface ProviderOptions {
|
|
|
698
704
|
rpc?: RpcProviderOptions;
|
|
699
705
|
}
|
|
700
706
|
type RpcProviderOptions = {
|
|
701
|
-
nodeUrl
|
|
707
|
+
nodeUrl?: string | NetworkName;
|
|
702
708
|
retries?: number;
|
|
703
709
|
headers?: object;
|
|
704
710
|
blockIdentifier?: BlockIdentifier;
|
|
705
711
|
chainId?: StarknetChainId;
|
|
712
|
+
default?: boolean;
|
|
706
713
|
};
|
|
707
714
|
type SequencerHttpMethod = 'POST' | 'GET';
|
|
708
715
|
type SequencerProviderOptions = {
|
|
@@ -717,109 +724,160 @@ type SequencerProviderOptions = {
|
|
|
717
724
|
gatewayUrl?: string;
|
|
718
725
|
});
|
|
719
726
|
|
|
727
|
+
type RequestBody = {
|
|
728
|
+
id: number | string;
|
|
729
|
+
jsonrpc: '2.0';
|
|
730
|
+
method: string;
|
|
731
|
+
params?: {};
|
|
732
|
+
};
|
|
733
|
+
type ResponseBody = {
|
|
734
|
+
id: number | string;
|
|
735
|
+
jsonrpc: '2.0';
|
|
736
|
+
} & (SuccessResponseBody | ErrorResponseBody);
|
|
737
|
+
type SuccessResponseBody = {
|
|
738
|
+
result: unknown;
|
|
739
|
+
};
|
|
740
|
+
type ErrorResponseBody = {
|
|
741
|
+
error: Error$1;
|
|
742
|
+
};
|
|
743
|
+
type Error$1 = {
|
|
744
|
+
code: number;
|
|
745
|
+
message: string;
|
|
746
|
+
data?: unknown;
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
type index$2_ErrorResponseBody = ErrorResponseBody;
|
|
750
|
+
type index$2_RequestBody = RequestBody;
|
|
751
|
+
type index$2_ResponseBody = ResponseBody;
|
|
752
|
+
type index$2_SuccessResponseBody = SuccessResponseBody;
|
|
753
|
+
declare namespace index$2 {
|
|
754
|
+
export {
|
|
755
|
+
Error$1 as Error,
|
|
756
|
+
index$2_ErrorResponseBody as ErrorResponseBody,
|
|
757
|
+
index$2_RequestBody as RequestBody,
|
|
758
|
+
index$2_ResponseBody as ResponseBody,
|
|
759
|
+
index$2_SuccessResponseBody as SuccessResponseBody,
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
|
|
720
763
|
/**
|
|
721
|
-
*
|
|
722
|
-
* https://github.com/starkware-libs/starknet-specs/tree/v0.4.0-rc3
|
|
723
|
-
*
|
|
724
|
-
* Starknet Node Read API 0.4.0 - rpc tag v0.4.0-rc3
|
|
725
|
-
* Starknet Node Write API 0.4.0 - rpc tag v0.4.0-rc3
|
|
726
|
-
* Starknet Node Trace API 0.4.0 - rpc tag v0.4.0-rc3
|
|
764
|
+
* PRIMITIVES
|
|
727
765
|
*/
|
|
728
766
|
/**
|
|
729
767
|
* A field element. represented by at most 63 hex digits
|
|
730
768
|
* @pattern ^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$
|
|
731
769
|
*/
|
|
732
770
|
type FELT = string;
|
|
733
|
-
type ADDRESS = FELT;
|
|
734
|
-
type NUM_AS_HEX = string;
|
|
735
|
-
type SIGNATURE = Array<FELT>;
|
|
736
771
|
/**
|
|
737
772
|
* an ethereum address represented as 40 hex digits
|
|
738
773
|
* @pattern ^0x[a-fA-F0-9]{40}$
|
|
739
774
|
*/
|
|
740
775
|
type ETH_ADDRESS = string;
|
|
776
|
+
/**
|
|
777
|
+
* A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
|
|
778
|
+
* @pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$
|
|
779
|
+
*/
|
|
780
|
+
type STORAGE_KEY = string;
|
|
781
|
+
type ADDRESS = FELT;
|
|
782
|
+
type NUM_AS_HEX = string;
|
|
783
|
+
type SIGNATURE = Array<FELT>;
|
|
741
784
|
type BLOCK_NUMBER = number;
|
|
742
785
|
type BLOCK_HASH = FELT;
|
|
743
786
|
type TXN_HASH = FELT;
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
787
|
+
type CHAIN_ID = NUM_AS_HEX;
|
|
788
|
+
type STRUCT_ABI_TYPE = 'struct';
|
|
789
|
+
type EVENT_ABI_TYPE = 'event';
|
|
790
|
+
type FUNCTION_ABI_TYPE = 'function' | 'l1_handler' | 'constructor';
|
|
791
|
+
type ENTRY_POINT_TYPE = 'EXTERNAL' | 'L1_HANDLER' | 'CONSTRUCTOR';
|
|
792
|
+
type CALL_TYPE = 'LIBRARY_CALL' | 'CALL';
|
|
793
|
+
type TXN_STATUS = 'RECEIVED' | 'REJECTED' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
794
|
+
type SIMULATION_FLAG$1 = 'SKIP_VALIDATE' | 'SKIP_FEE_CHARGE';
|
|
795
|
+
type DA_MODE = 'L1' | 'L2';
|
|
796
|
+
type TXN_TYPE = 'DECLARE' | 'DEPLOY' | 'DEPLOY_ACCOUNT' | 'INVOKE' | 'L1_HANDLER';
|
|
797
|
+
type TXN_FINALITY_STATUS = 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
798
|
+
type TXN_EXECUTION_STATUS = 'SUCCEEDED' | 'REVERTED';
|
|
751
799
|
type BLOCK_STATUS = 'PENDING' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1' | 'REJECTED';
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
type
|
|
800
|
+
type BLOCK_TAG = 'latest' | 'pending';
|
|
801
|
+
/**
|
|
802
|
+
* READ API
|
|
803
|
+
*/
|
|
804
|
+
type EVENTS_CHUNK = {
|
|
805
|
+
events: EMITTED_EVENT[];
|
|
806
|
+
continuation_token?: string;
|
|
807
|
+
};
|
|
808
|
+
type RESULT_PAGE_REQUEST = {
|
|
809
|
+
continuation_token?: string;
|
|
810
|
+
chunk_size: number;
|
|
811
|
+
};
|
|
812
|
+
type EMITTED_EVENT = EVENT$1 & {
|
|
757
813
|
block_hash: BLOCK_HASH;
|
|
758
|
-
} | {
|
|
759
814
|
block_number: BLOCK_NUMBER;
|
|
760
|
-
|
|
761
|
-
type MSG_TO_L1 = {
|
|
762
|
-
to_address: FELT;
|
|
763
|
-
payload: Array<FELT>;
|
|
815
|
+
transaction_hash: TXN_HASH;
|
|
764
816
|
};
|
|
765
|
-
type
|
|
766
|
-
from_address:
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
817
|
+
type EVENT$1 = {
|
|
818
|
+
from_address: ADDRESS;
|
|
819
|
+
} & EVENT_CONTENT;
|
|
820
|
+
type EVENT_CONTENT = {
|
|
821
|
+
keys: FELT[];
|
|
822
|
+
data: FELT[];
|
|
770
823
|
};
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
SUCCEEDED = "SUCCEEDED",
|
|
777
|
-
REVERTED = "REVERTED"
|
|
778
|
-
}
|
|
779
|
-
type EVENT = {
|
|
780
|
-
from_address: FELT;
|
|
781
|
-
keys: Array<FELT>;
|
|
782
|
-
data: Array<FELT>;
|
|
824
|
+
type EVENT_FILTER = {
|
|
825
|
+
from_block?: BLOCK_ID;
|
|
826
|
+
to_block?: BLOCK_ID;
|
|
827
|
+
address?: ADDRESS;
|
|
828
|
+
keys?: FELT[][];
|
|
783
829
|
};
|
|
784
|
-
type
|
|
785
|
-
transaction_hash: TXN_HASH;
|
|
786
|
-
actual_fee: FELT;
|
|
787
|
-
execution_status: TXN_EXECUTION_STATUS;
|
|
788
|
-
finality_status: TXN_FINALITY_STATUS;
|
|
830
|
+
type BLOCK_ID = {
|
|
789
831
|
block_hash?: BLOCK_HASH;
|
|
790
832
|
block_number?: BLOCK_NUMBER;
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
833
|
+
} | BLOCK_TAG;
|
|
834
|
+
type SYNC_STATUS = {
|
|
835
|
+
starting_block_hash: BLOCK_HASH;
|
|
836
|
+
starting_block_num: BLOCK_NUMBER;
|
|
837
|
+
current_block_hash: BLOCK_HASH;
|
|
838
|
+
current_block_num: BLOCK_NUMBER;
|
|
839
|
+
highest_block_hash: BLOCK_HASH;
|
|
840
|
+
highest_block_num: BLOCK_NUMBER;
|
|
794
841
|
};
|
|
795
|
-
type
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
type?: TXN_TYPE;
|
|
799
|
-
messages_sent: Array<MSG_TO_L1>;
|
|
800
|
-
events: Array<EVENT>;
|
|
801
|
-
execution_status: TXN_EXECUTION_STATUS;
|
|
802
|
-
finality_status: TXN_FINALITY_STATUS;
|
|
803
|
-
revert_reason?: string;
|
|
842
|
+
type NEW_CLASSES = {
|
|
843
|
+
class_hash: FELT;
|
|
844
|
+
compiled_class_hash: FELT;
|
|
804
845
|
};
|
|
805
|
-
type
|
|
806
|
-
|
|
807
|
-
} & COMMON_RECEIPT_PROPERTIES;
|
|
808
|
-
type DECLARE_TXN_RECEIPT = {
|
|
809
|
-
type: 'DECLARE';
|
|
810
|
-
} & COMMON_RECEIPT_PROPERTIES;
|
|
811
|
-
type DEPLOY_TXN_RECEIPT = {
|
|
812
|
-
type: 'DEPLOY';
|
|
813
|
-
contract_address: FELT;
|
|
814
|
-
} & COMMON_RECEIPT_PROPERTIES;
|
|
815
|
-
type L1_HANDLER_TXN_RECEIPT = {
|
|
816
|
-
type: 'L1_HANDLER';
|
|
817
|
-
} & COMMON_RECEIPT_PROPERTIES;
|
|
818
|
-
type PENDING_DEPLOY_TXN_RECEIPT = {
|
|
846
|
+
type REPLACED_CLASS = {
|
|
847
|
+
class_hash: FELT;
|
|
819
848
|
contract_address: FELT;
|
|
820
|
-
}
|
|
821
|
-
type
|
|
822
|
-
|
|
849
|
+
};
|
|
850
|
+
type NONCE_UPDATE = {
|
|
851
|
+
contract_address: ADDRESS;
|
|
852
|
+
nonce: FELT;
|
|
853
|
+
};
|
|
854
|
+
type STATE_DIFF = {
|
|
855
|
+
storage_diffs: CONTRACT_STORAGE_DIFF_ITEM[];
|
|
856
|
+
deprecated_declared_classes: FELT[];
|
|
857
|
+
declared_classes: NEW_CLASSES[];
|
|
858
|
+
deployed_contracts: DEPLOYED_CONTRACT_ITEM[];
|
|
859
|
+
replaced_classes: REPLACED_CLASS[];
|
|
860
|
+
nonces: NONCE_UPDATE[];
|
|
861
|
+
};
|
|
862
|
+
type PENDING_STATE_UPDATE = {
|
|
863
|
+
old_root: FELT;
|
|
864
|
+
state_diff: STATE_DIFF;
|
|
865
|
+
};
|
|
866
|
+
type STATE_UPDATE = {
|
|
867
|
+
block_hash: BLOCK_HASH;
|
|
868
|
+
old_root: FELT;
|
|
869
|
+
new_root: FELT;
|
|
870
|
+
state_diff: STATE_DIFF;
|
|
871
|
+
};
|
|
872
|
+
type BLOCK_BODY_WITH_TX_HASHES = {
|
|
873
|
+
transactions: TXN_HASH[];
|
|
874
|
+
};
|
|
875
|
+
type BLOCK_BODY_WITH_TXS = {
|
|
876
|
+
transactions: {
|
|
877
|
+
transaction: TXN;
|
|
878
|
+
transaction_hash: TXN_HASH;
|
|
879
|
+
}[];
|
|
880
|
+
};
|
|
823
881
|
type BLOCK_HEADER = {
|
|
824
882
|
block_hash: BLOCK_HASH;
|
|
825
883
|
parent_hash: BLOCK_HASH;
|
|
@@ -827,25 +885,46 @@ type BLOCK_HEADER = {
|
|
|
827
885
|
new_root: FELT;
|
|
828
886
|
timestamp: number;
|
|
829
887
|
sequencer_address: FELT;
|
|
888
|
+
l1_gas_price: RESOURCE_PRICE;
|
|
889
|
+
starknet_version: string;
|
|
830
890
|
};
|
|
831
|
-
type
|
|
832
|
-
|
|
891
|
+
type PENDING_BLOCK_HEADER = {
|
|
892
|
+
parent_hash: BLOCK_HASH;
|
|
893
|
+
timestamp: number;
|
|
894
|
+
sequencer_address: FELT;
|
|
895
|
+
l1_gas_price: RESOURCE_PRICE;
|
|
896
|
+
starknet_version: string;
|
|
833
897
|
};
|
|
834
898
|
type BLOCK_WITH_TX_HASHES = {
|
|
835
899
|
status: BLOCK_STATUS;
|
|
836
900
|
} & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES;
|
|
837
|
-
type
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
901
|
+
type BLOCK_WITH_TXS = {
|
|
902
|
+
status: BLOCK_STATUS;
|
|
903
|
+
} & BLOCK_HEADER & BLOCK_BODY_WITH_TXS;
|
|
904
|
+
type PENDING_BLOCK_WITH_TX_HASHES = BLOCK_BODY_WITH_TX_HASHES & PENDING_BLOCK_HEADER;
|
|
905
|
+
type PENDING_BLOCK_WITH_TXS = BLOCK_BODY_WITH_TXS & PENDING_BLOCK_HEADER;
|
|
906
|
+
type DEPLOYED_CONTRACT_ITEM = {
|
|
907
|
+
address: FELT;
|
|
908
|
+
class_hash: FELT;
|
|
841
909
|
};
|
|
842
|
-
type
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
910
|
+
type CONTRACT_STORAGE_DIFF_ITEM = {
|
|
911
|
+
address: string;
|
|
912
|
+
storage_entries: StorageDiffItem[];
|
|
913
|
+
};
|
|
914
|
+
type StorageDiffItem = {
|
|
915
|
+
key: string;
|
|
916
|
+
value: string;
|
|
917
|
+
};
|
|
918
|
+
type TXN = INVOKE_TXN | L1_HANDLER_TXN | DECLARE_TXN | DEPLOY_TXN | DEPLOY_ACCOUNT_TXN;
|
|
919
|
+
type DECLARE_TXN = DECLARE_TXN_V0 | DECLARE_TXN_V1 | DECLARE_TXN_V2;
|
|
920
|
+
type DECLARE_TXN_V0 = {
|
|
921
|
+
type: 'DECLARE';
|
|
922
|
+
sender_address: ADDRESS;
|
|
923
|
+
max_fee: FELT;
|
|
924
|
+
version: '0x0';
|
|
925
|
+
signature: SIGNATURE;
|
|
926
|
+
class_hash: FELT;
|
|
846
927
|
};
|
|
847
|
-
type INVOKE_TXN = INVOKE_TXN_V0 | INVOKE_TXN_V1;
|
|
848
|
-
type DECLARE_TXN = DECLARE_TXN_V1 | DECLARE_TXN_V2;
|
|
849
928
|
type DECLARE_TXN_V1 = {
|
|
850
929
|
type: 'DECLARE';
|
|
851
930
|
sender_address: ADDRESS;
|
|
@@ -853,11 +932,8 @@ type DECLARE_TXN_V1 = {
|
|
|
853
932
|
version: '0x1';
|
|
854
933
|
signature: SIGNATURE;
|
|
855
934
|
nonce: FELT;
|
|
856
|
-
} & ({
|
|
857
|
-
contract_class: DEPRECATED_CONTRACT_CLASS;
|
|
858
|
-
} | {
|
|
859
935
|
class_hash: FELT;
|
|
860
|
-
}
|
|
936
|
+
};
|
|
861
937
|
type DECLARE_TXN_V2 = {
|
|
862
938
|
type: 'DECLARE';
|
|
863
939
|
sender_address: ADDRESS;
|
|
@@ -866,12 +942,33 @@ type DECLARE_TXN_V2 = {
|
|
|
866
942
|
version: '0x2';
|
|
867
943
|
signature: SIGNATURE;
|
|
868
944
|
nonce: FELT;
|
|
869
|
-
} & ({
|
|
870
|
-
contract_class: CONTRACT_CLASS;
|
|
871
|
-
} | {
|
|
872
945
|
class_hash: FELT;
|
|
873
|
-
}
|
|
874
|
-
type
|
|
946
|
+
};
|
|
947
|
+
type BROADCASTED_TXN = BROADCASTED_INVOKE_TXN | BROADCASTED_DECLARE_TXN | BROADCASTED_DEPLOY_ACCOUNT_TXN;
|
|
948
|
+
type BROADCASTED_INVOKE_TXN = INVOKE_TXN_V0 | INVOKE_TXN_V1;
|
|
949
|
+
type BROADCASTED_DEPLOY_ACCOUNT_TXN = DEPLOY_ACCOUNT_TXN;
|
|
950
|
+
type BROADCASTED_DECLARE_TXN = BROADCASTED_DECLARE_TXN_V1 | BROADCASTED_DECLARE_TXN_V2;
|
|
951
|
+
type BROADCASTED_DECLARE_TXN_V1 = {
|
|
952
|
+
type: 'DECLARE';
|
|
953
|
+
sender_address: ADDRESS;
|
|
954
|
+
max_fee: FELT;
|
|
955
|
+
version: NUM_AS_HEX;
|
|
956
|
+
signature: SIGNATURE;
|
|
957
|
+
nonce: FELT;
|
|
958
|
+
contract_class: DEPRECATED_CONTRACT_CLASS;
|
|
959
|
+
};
|
|
960
|
+
type BROADCASTED_DECLARE_TXN_V2 = {
|
|
961
|
+
type: 'DECLARE';
|
|
962
|
+
sender_address: ADDRESS;
|
|
963
|
+
compiled_class_hash: FELT;
|
|
964
|
+
max_fee: FELT;
|
|
965
|
+
version: NUM_AS_HEX;
|
|
966
|
+
signature: SIGNATURE;
|
|
967
|
+
nonce: FELT;
|
|
968
|
+
contract_class: CONTRACT_CLASS;
|
|
969
|
+
};
|
|
970
|
+
type DEPLOY_ACCOUNT_TXN = DEPLOY_ACCOUNT_TXN_V1;
|
|
971
|
+
type DEPLOY_ACCOUNT_TXN_V1 = {
|
|
875
972
|
type: 'DEPLOY_ACCOUNT';
|
|
876
973
|
max_fee: FELT;
|
|
877
974
|
version: NUM_AS_HEX;
|
|
@@ -883,27 +980,12 @@ type DEPLOY_ACCOUNT_TXN = {
|
|
|
883
980
|
};
|
|
884
981
|
type DEPLOY_TXN = {
|
|
885
982
|
type: 'DEPLOY';
|
|
983
|
+
version: NUM_AS_HEX;
|
|
886
984
|
contract_address_salt: FELT;
|
|
887
985
|
constructor_calldata: FELT[];
|
|
888
986
|
class_hash: FELT;
|
|
889
|
-
version: NUM_AS_HEX;
|
|
890
|
-
};
|
|
891
|
-
type DEPLOY_ACCOUNT_TXN_RECEIPT = COMMON_RECEIPT_PROPERTIES & {
|
|
892
|
-
type: 'DEPLOY_ACCOUNT';
|
|
893
|
-
contract_address: FELT;
|
|
894
987
|
};
|
|
895
|
-
type
|
|
896
|
-
type TXN_WITH_HASH = TXN & {
|
|
897
|
-
transaction_hash: TXN_HASH;
|
|
898
|
-
};
|
|
899
|
-
declare enum L1_HANDLER {
|
|
900
|
-
'L1_HANDLER' = 0
|
|
901
|
-
}
|
|
902
|
-
type L1_HANDLER_TXN = {
|
|
903
|
-
version: NUM_AS_HEX;
|
|
904
|
-
type: L1_HANDLER;
|
|
905
|
-
nonce: NUM_AS_HEX;
|
|
906
|
-
} & FUNCTION_CALL;
|
|
988
|
+
type INVOKE_TXN = INVOKE_TXN_V0 | INVOKE_TXN_V1;
|
|
907
989
|
type INVOKE_TXN_V0 = {
|
|
908
990
|
type: 'INVOKE';
|
|
909
991
|
max_fee: FELT;
|
|
@@ -918,722 +1000,1107 @@ type INVOKE_TXN_V1 = {
|
|
|
918
1000
|
sender_address: ADDRESS;
|
|
919
1001
|
calldata: FELT[];
|
|
920
1002
|
max_fee: FELT;
|
|
921
|
-
version:
|
|
1003
|
+
version: NUM_AS_HEX;
|
|
922
1004
|
signature: SIGNATURE;
|
|
923
1005
|
nonce: FELT;
|
|
924
1006
|
};
|
|
925
|
-
type
|
|
926
|
-
|
|
1007
|
+
type L1_HANDLER_TXN = {
|
|
1008
|
+
version: NUM_AS_HEX;
|
|
1009
|
+
type: 'L1_HANDLER';
|
|
1010
|
+
nonce: NUM_AS_HEX;
|
|
1011
|
+
} & FUNCTION_CALL;
|
|
1012
|
+
type COMMON_RECEIPT_PROPERTIES = {
|
|
1013
|
+
transaction_hash: TXN_HASH;
|
|
1014
|
+
actual_fee: FELT;
|
|
1015
|
+
execution_status: TXN_EXECUTION_STATUS;
|
|
1016
|
+
finality_status: TXN_FINALITY_STATUS;
|
|
1017
|
+
block_hash: BLOCK_HASH;
|
|
1018
|
+
block_number: BLOCK_NUMBER;
|
|
1019
|
+
messages_sent: MSG_TO_L1[];
|
|
1020
|
+
revert_reason: string;
|
|
1021
|
+
events: EVENT$1[];
|
|
1022
|
+
execution_resources: EXECUTION_RESOURCES;
|
|
927
1023
|
};
|
|
928
|
-
type
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
type
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1024
|
+
type PENDING_COMMON_RECEIPT_PROPERTIES = {
|
|
1025
|
+
transaction_hash: TXN_HASH;
|
|
1026
|
+
actual_fee: FELT;
|
|
1027
|
+
type: TXN_TYPE;
|
|
1028
|
+
messages_sent: MSG_TO_L1[];
|
|
1029
|
+
events: EVENT$1[];
|
|
1030
|
+
revert_reason: string;
|
|
1031
|
+
finality_status: 'ACCEPTED_ON_L2';
|
|
1032
|
+
execution_status: TXN_EXECUTION_STATUS;
|
|
1033
|
+
execution_resources: EXECUTION_RESOURCES;
|
|
1034
|
+
};
|
|
1035
|
+
type INVOKE_TXN_RECEIPT = {
|
|
1036
|
+
type: 'INVOKE';
|
|
1037
|
+
} & COMMON_RECEIPT_PROPERTIES;
|
|
1038
|
+
type PENDING_INVOKE_TXN_RECEIPT = {
|
|
1039
|
+
type: 'INVOKE';
|
|
1040
|
+
} & PENDING_COMMON_RECEIPT_PROPERTIES;
|
|
1041
|
+
type DECLARE_TXN_RECEIPT = {
|
|
1042
|
+
type: 'DECLARE';
|
|
1043
|
+
} & COMMON_RECEIPT_PROPERTIES;
|
|
1044
|
+
type PENDING_DECLARE_TXN_RECEIPT = {
|
|
1045
|
+
type: 'DECLARE';
|
|
1046
|
+
} & PENDING_COMMON_RECEIPT_PROPERTIES;
|
|
1047
|
+
type DEPLOY_ACCOUNT_TXN_RECEIPT = {
|
|
1048
|
+
type: 'DEPLOY_ACCOUNT';
|
|
1049
|
+
contract_address: FELT;
|
|
1050
|
+
} & COMMON_RECEIPT_PROPERTIES;
|
|
1051
|
+
type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT = {
|
|
1052
|
+
type: 'DEPLOY_ACCOUNT';
|
|
1053
|
+
contract_address: FELT;
|
|
1054
|
+
} & PENDING_COMMON_RECEIPT_PROPERTIES;
|
|
1055
|
+
type DEPLOY_TXN_RECEIPT = {
|
|
1056
|
+
type: 'DEPLOY';
|
|
1057
|
+
contract_address: FELT;
|
|
1058
|
+
} & COMMON_RECEIPT_PROPERTIES;
|
|
1059
|
+
type L1_HANDLER_TXN_RECEIPT = {
|
|
1060
|
+
type: 'L1_HANDLER';
|
|
1061
|
+
message_hash: NUM_AS_HEX;
|
|
1062
|
+
} & COMMON_RECEIPT_PROPERTIES;
|
|
1063
|
+
type PENDING_L1_HANDLER_TXN_RECEIPT = {
|
|
1064
|
+
type: 'L1_HANDLER';
|
|
1065
|
+
message_hash: NUM_AS_HEX;
|
|
1066
|
+
} & PENDING_COMMON_RECEIPT_PROPERTIES;
|
|
1067
|
+
type TXN_RECEIPT = INVOKE_TXN_RECEIPT | L1_HANDLER_TXN_RECEIPT | DECLARE_TXN_RECEIPT | DEPLOY_TXN_RECEIPT | DEPLOY_ACCOUNT_TXN_RECEIPT;
|
|
1068
|
+
type PENDING_TXN_RECEIPT = PENDING_INVOKE_TXN_RECEIPT | PENDING_L1_HANDLER_TXN_RECEIPT | PENDING_DECLARE_TXN_RECEIPT | PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT;
|
|
1069
|
+
type MSG_TO_L1 = {
|
|
1070
|
+
from_address: FELT;
|
|
1071
|
+
to_address: FELT;
|
|
1072
|
+
payload: FELT[];
|
|
1073
|
+
};
|
|
1074
|
+
type MSG_FROM_L1 = {
|
|
1075
|
+
from_address: ETH_ADDRESS;
|
|
1076
|
+
to_address: ADDRESS;
|
|
1077
|
+
entry_point_selector: FELT;
|
|
1078
|
+
payload: FELT[];
|
|
1079
|
+
};
|
|
1080
|
+
type FUNCTION_CALL = {
|
|
1081
|
+
contract_address: ADDRESS;
|
|
1082
|
+
entry_point_selector: FELT;
|
|
1083
|
+
calldata: FELT[];
|
|
935
1084
|
};
|
|
936
1085
|
type CONTRACT_CLASS = {
|
|
937
|
-
sierra_program:
|
|
1086
|
+
sierra_program: FELT[];
|
|
938
1087
|
contract_class_version: string;
|
|
939
1088
|
entry_points_by_type: {
|
|
940
|
-
CONSTRUCTOR:
|
|
941
|
-
EXTERNAL:
|
|
942
|
-
L1_HANDLER:
|
|
1089
|
+
CONSTRUCTOR: SIERRA_ENTRY_POINT[];
|
|
1090
|
+
EXTERNAL: SIERRA_ENTRY_POINT[];
|
|
1091
|
+
L1_HANDLER: SIERRA_ENTRY_POINT[];
|
|
943
1092
|
};
|
|
944
|
-
abi
|
|
1093
|
+
abi: string;
|
|
945
1094
|
};
|
|
946
1095
|
type DEPRECATED_CONTRACT_CLASS = {
|
|
947
1096
|
program: string;
|
|
948
1097
|
entry_points_by_type: {
|
|
949
|
-
CONSTRUCTOR:
|
|
950
|
-
EXTERNAL:
|
|
951
|
-
L1_HANDLER:
|
|
1098
|
+
CONSTRUCTOR: DEPRECATED_CAIRO_ENTRY_POINT[];
|
|
1099
|
+
EXTERNAL: DEPRECATED_CAIRO_ENTRY_POINT[];
|
|
1100
|
+
L1_HANDLER: DEPRECATED_CAIRO_ENTRY_POINT[];
|
|
952
1101
|
};
|
|
953
|
-
abi
|
|
954
|
-
};
|
|
955
|
-
type CONTRACT_ABI = Array<CONTRACT_ABI_ENTRY>;
|
|
956
|
-
type CONTRACT_ABI_ENTRY = FUNCTION_ABI_ENTRY | EVENT_ABI_ENTRY | STRUCT_ABI_ENTRY;
|
|
957
|
-
declare enum STRUCT_ABI_TYPE {
|
|
958
|
-
'struct' = 0
|
|
959
|
-
}
|
|
960
|
-
declare enum EVENT_ABI_TYPE {
|
|
961
|
-
'event' = 0
|
|
962
|
-
}
|
|
963
|
-
declare enum FUNCTION_ABI_TYPE {
|
|
964
|
-
'function' = 0,
|
|
965
|
-
'l1_handler' = 1,
|
|
966
|
-
'constructor' = 2
|
|
967
|
-
}
|
|
968
|
-
type STRUCT_ABI_ENTRY = STRUCT_ABI_TYPE & {
|
|
969
|
-
name: string;
|
|
970
|
-
size: number;
|
|
971
|
-
members: Array<STRUCT_MEMBER>;
|
|
972
|
-
};
|
|
973
|
-
type STRUCT_MEMBER = {
|
|
974
|
-
offset: number;
|
|
975
|
-
} & TYPED_PARAMETER;
|
|
976
|
-
type EVENT_ABI_ENTRY = {
|
|
977
|
-
name: string;
|
|
978
|
-
keys: Array<TYPED_PARAMETER>;
|
|
979
|
-
data: Array<TYPED_PARAMETER>;
|
|
980
|
-
} & EVENT_ABI_TYPE;
|
|
981
|
-
type FUNCTION_ABI_ENTRY = {
|
|
982
|
-
type: FUNCTION_ABI_TYPE;
|
|
983
|
-
name: string;
|
|
984
|
-
inputs: Array<TYPED_PARAMETER>;
|
|
985
|
-
outputs: Array<TYPED_PARAMETER>;
|
|
986
|
-
};
|
|
987
|
-
type TYPED_PARAMETER = {
|
|
988
|
-
name: string;
|
|
989
|
-
type: string;
|
|
1102
|
+
abi: CONTRACT_ABI;
|
|
990
1103
|
};
|
|
991
1104
|
type DEPRECATED_CAIRO_ENTRY_POINT = {
|
|
992
|
-
offset: NUM_AS_HEX;
|
|
1105
|
+
offset: NUM_AS_HEX | number;
|
|
993
1106
|
selector: FELT;
|
|
994
1107
|
};
|
|
995
1108
|
type SIERRA_ENTRY_POINT = {
|
|
996
1109
|
selector: FELT;
|
|
997
1110
|
function_idx: number;
|
|
998
1111
|
};
|
|
999
|
-
type
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}[];
|
|
1005
|
-
};
|
|
1006
|
-
type DEPLOYED_CONTRACT_ITEM = {
|
|
1007
|
-
address: FELT;
|
|
1008
|
-
class_hash: FELT;
|
|
1009
|
-
};
|
|
1010
|
-
type STATE_UPDATE = {
|
|
1011
|
-
block_hash: BLOCK_HASH;
|
|
1012
|
-
new_root: FELT;
|
|
1013
|
-
} & PENDING_STATE_UPDATE;
|
|
1014
|
-
type PENDING_STATE_UPDATE = {
|
|
1015
|
-
old_root: FELT;
|
|
1016
|
-
state_diff: {
|
|
1017
|
-
storage_diffs: Array<CONTRACT_STORAGE_DIFF_ITEM>;
|
|
1018
|
-
deprecated_declared_classes: Array<FELT>;
|
|
1019
|
-
declared_classes: Array<{
|
|
1020
|
-
class_hash: FELT;
|
|
1021
|
-
compiled_class_hash: FELT;
|
|
1022
|
-
}>;
|
|
1023
|
-
deployed_contracts: Array<DEPLOYED_CONTRACT_ITEM>;
|
|
1024
|
-
replaced_classes: Array<{
|
|
1025
|
-
contract_address: ADDRESS;
|
|
1026
|
-
class_hash: FELT;
|
|
1027
|
-
}>;
|
|
1028
|
-
nonces: Array<{
|
|
1029
|
-
contract_address: ADDRESS;
|
|
1030
|
-
nonce: FELT;
|
|
1031
|
-
}>;
|
|
1032
|
-
};
|
|
1033
|
-
};
|
|
1034
|
-
/**
|
|
1035
|
-
* A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
|
|
1036
|
-
* @pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$
|
|
1037
|
-
*/
|
|
1038
|
-
type STORAGE_KEY = string;
|
|
1039
|
-
type EVENT_FILTER = {
|
|
1040
|
-
from_block?: BLOCK_ID;
|
|
1041
|
-
to_block?: BLOCK_ID;
|
|
1042
|
-
address?: ADDRESS;
|
|
1043
|
-
keys?: Array<Array<FELT>>;
|
|
1112
|
+
type CONTRACT_ABI = CONTRACT_ABI_ENTRY[];
|
|
1113
|
+
type CONTRACT_ABI_ENTRY = {
|
|
1114
|
+
selector: FELT;
|
|
1115
|
+
input: string;
|
|
1116
|
+
output: string;
|
|
1044
1117
|
};
|
|
1045
|
-
type
|
|
1046
|
-
|
|
1047
|
-
|
|
1118
|
+
type STRUCT_ABI_ENTRY = {
|
|
1119
|
+
type: STRUCT_ABI_TYPE;
|
|
1120
|
+
name: string;
|
|
1121
|
+
size: number;
|
|
1122
|
+
members: STRUCT_MEMBER[];
|
|
1048
1123
|
};
|
|
1049
|
-
type
|
|
1050
|
-
|
|
1051
|
-
chunk_size: number;
|
|
1124
|
+
type STRUCT_MEMBER = TYPED_PARAMETER & {
|
|
1125
|
+
offset: number;
|
|
1052
1126
|
};
|
|
1053
|
-
type
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1127
|
+
type EVENT_ABI_ENTRY = {
|
|
1128
|
+
type: EVENT_ABI_TYPE;
|
|
1129
|
+
name: string;
|
|
1130
|
+
keys: TYPED_PARAMETER[];
|
|
1131
|
+
data: TYPED_PARAMETER[];
|
|
1057
1132
|
};
|
|
1058
|
-
type
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1133
|
+
type FUNCTION_STATE_MUTABILITY = 'view';
|
|
1134
|
+
type FUNCTION_ABI_ENTRY = {
|
|
1135
|
+
type: FUNCTION_ABI_TYPE;
|
|
1136
|
+
name: string;
|
|
1137
|
+
inputs: TYPED_PARAMETER[];
|
|
1138
|
+
outputs: TYPED_PARAMETER[];
|
|
1139
|
+
stateMutability: FUNCTION_STATE_MUTABILITY;
|
|
1140
|
+
};
|
|
1141
|
+
type TYPED_PARAMETER = {
|
|
1142
|
+
name: string;
|
|
1143
|
+
type: string;
|
|
1065
1144
|
};
|
|
1066
1145
|
type FEE_ESTIMATE = {
|
|
1067
1146
|
gas_consumed: NUM_AS_HEX;
|
|
1068
1147
|
gas_price: NUM_AS_HEX;
|
|
1069
1148
|
overall_fee: NUM_AS_HEX;
|
|
1070
1149
|
};
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1150
|
+
type RESOURCE_LIMITS = {
|
|
1151
|
+
max_amount: NUM_AS_HEX;
|
|
1152
|
+
max_price_per_unit: NUM_AS_HEX;
|
|
1153
|
+
};
|
|
1154
|
+
type RESOURCE_PRICE = {
|
|
1155
|
+
price_in_strk?: NUM_AS_HEX;
|
|
1156
|
+
price_in_wei: NUM_AS_HEX;
|
|
1157
|
+
};
|
|
1158
|
+
type EXECUTION_RESOURCES = {
|
|
1159
|
+
steps: NUM_AS_HEX;
|
|
1160
|
+
memory_holes: NUM_AS_HEX;
|
|
1161
|
+
range_check_builtin_applications: NUM_AS_HEX;
|
|
1162
|
+
pedersen_builtin_applications: NUM_AS_HEX;
|
|
1163
|
+
poseidon_builtin_applications: NUM_AS_HEX;
|
|
1164
|
+
ec_op_builtin_applications: NUM_AS_HEX;
|
|
1165
|
+
ecdsa_builtin_applications: NUM_AS_HEX;
|
|
1166
|
+
bitwise_builtin_applications: NUM_AS_HEX;
|
|
1167
|
+
keccak_builtin_applications: NUM_AS_HEX;
|
|
1168
|
+
};
|
|
1169
|
+
/**
|
|
1170
|
+
* TRACE API
|
|
1171
|
+
*/
|
|
1172
|
+
type TRANSACTION_TRACE = {
|
|
1173
|
+
invoke_tx_trace?: INVOKE_TXN_TRACE;
|
|
1174
|
+
declare_tx_trace?: DECLARE_TXN_TRACE;
|
|
1175
|
+
deploy_account_tx_trace?: DEPLOY_ACCOUNT_TXN_TRACE;
|
|
1176
|
+
l1_handler_tx_trace?: L1_HANDLER_TXN_TRACE;
|
|
1089
1177
|
};
|
|
1090
|
-
type NESTED_CALL = FUNCTION_INVOCATION;
|
|
1091
1178
|
type INVOKE_TXN_TRACE = {
|
|
1092
1179
|
validate_invocation: FUNCTION_INVOCATION;
|
|
1093
1180
|
execute_invocation: FUNCTION_INVOCATION | {
|
|
1094
1181
|
revert_reason: string;
|
|
1095
1182
|
};
|
|
1096
1183
|
fee_transfer_invocation: FUNCTION_INVOCATION;
|
|
1184
|
+
state_diff: STATE_DIFF;
|
|
1185
|
+
type: 'INVOKE';
|
|
1097
1186
|
};
|
|
1098
1187
|
type DECLARE_TXN_TRACE = {
|
|
1099
1188
|
validate_invocation: FUNCTION_INVOCATION;
|
|
1100
1189
|
fee_transfer_invocation: FUNCTION_INVOCATION;
|
|
1190
|
+
state_diff: STATE_DIFF;
|
|
1191
|
+
type: 'DECLARE';
|
|
1101
1192
|
};
|
|
1102
1193
|
type DEPLOY_ACCOUNT_TXN_TRACE = {
|
|
1103
1194
|
validate_invocation: FUNCTION_INVOCATION;
|
|
1104
1195
|
constructor_invocation: FUNCTION_INVOCATION;
|
|
1105
1196
|
fee_transfer_invocation: FUNCTION_INVOCATION;
|
|
1197
|
+
state_diff: STATE_DIFF;
|
|
1198
|
+
type: 'DEPLOY_ACCOUNT';
|
|
1106
1199
|
};
|
|
1107
1200
|
type L1_HANDLER_TXN_TRACE = {
|
|
1108
1201
|
function_invocation: FUNCTION_INVOCATION;
|
|
1202
|
+
type: 'L1_HANDLER';
|
|
1109
1203
|
};
|
|
1110
|
-
type
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1204
|
+
type NESTED_CALL = FUNCTION_INVOCATION;
|
|
1205
|
+
type FUNCTION_INVOCATION = {
|
|
1206
|
+
function_call: FUNCTION_CALL;
|
|
1207
|
+
caller_address: string;
|
|
1208
|
+
class_hash: string;
|
|
1209
|
+
entry_point_type: ENTRY_POINT_TYPE;
|
|
1210
|
+
call_type: CALL_TYPE;
|
|
1211
|
+
result: string[];
|
|
1212
|
+
calls: NESTED_CALL[];
|
|
1213
|
+
events: ORDERED_EVENT[];
|
|
1214
|
+
messages: ORDERED_MESSAGE[];
|
|
1215
|
+
};
|
|
1216
|
+
type ORDERED_EVENT = {
|
|
1217
|
+
order: number;
|
|
1218
|
+
event: EVENT$1;
|
|
1219
|
+
};
|
|
1220
|
+
type ORDERED_MESSAGE = {
|
|
1221
|
+
order: number;
|
|
1222
|
+
message: MSG_TO_L1;
|
|
1223
|
+
};
|
|
1224
|
+
|
|
1225
|
+
type components_ADDRESS = ADDRESS;
|
|
1226
|
+
type components_BLOCK_BODY_WITH_TXS = BLOCK_BODY_WITH_TXS;
|
|
1227
|
+
type components_BLOCK_BODY_WITH_TX_HASHES = BLOCK_BODY_WITH_TX_HASHES;
|
|
1228
|
+
type components_BLOCK_HASH = BLOCK_HASH;
|
|
1229
|
+
type components_BLOCK_HEADER = BLOCK_HEADER;
|
|
1230
|
+
type components_BLOCK_ID = BLOCK_ID;
|
|
1231
|
+
type components_BLOCK_NUMBER = BLOCK_NUMBER;
|
|
1232
|
+
type components_BLOCK_STATUS = BLOCK_STATUS;
|
|
1233
|
+
type components_BLOCK_TAG = BLOCK_TAG;
|
|
1234
|
+
type components_BLOCK_WITH_TXS = BLOCK_WITH_TXS;
|
|
1235
|
+
type components_BLOCK_WITH_TX_HASHES = BLOCK_WITH_TX_HASHES;
|
|
1236
|
+
type components_BROADCASTED_DECLARE_TXN = BROADCASTED_DECLARE_TXN;
|
|
1237
|
+
type components_BROADCASTED_DECLARE_TXN_V1 = BROADCASTED_DECLARE_TXN_V1;
|
|
1238
|
+
type components_BROADCASTED_DECLARE_TXN_V2 = BROADCASTED_DECLARE_TXN_V2;
|
|
1239
|
+
type components_BROADCASTED_DEPLOY_ACCOUNT_TXN = BROADCASTED_DEPLOY_ACCOUNT_TXN;
|
|
1240
|
+
type components_BROADCASTED_INVOKE_TXN = BROADCASTED_INVOKE_TXN;
|
|
1241
|
+
type components_BROADCASTED_TXN = BROADCASTED_TXN;
|
|
1242
|
+
type components_CALL_TYPE = CALL_TYPE;
|
|
1243
|
+
type components_CHAIN_ID = CHAIN_ID;
|
|
1244
|
+
type components_COMMON_RECEIPT_PROPERTIES = COMMON_RECEIPT_PROPERTIES;
|
|
1245
|
+
type components_CONTRACT_ABI = CONTRACT_ABI;
|
|
1246
|
+
type components_CONTRACT_ABI_ENTRY = CONTRACT_ABI_ENTRY;
|
|
1247
|
+
type components_CONTRACT_CLASS = CONTRACT_CLASS;
|
|
1248
|
+
type components_CONTRACT_STORAGE_DIFF_ITEM = CONTRACT_STORAGE_DIFF_ITEM;
|
|
1249
|
+
type components_DA_MODE = DA_MODE;
|
|
1250
|
+
type components_DECLARE_TXN = DECLARE_TXN;
|
|
1251
|
+
type components_DECLARE_TXN_RECEIPT = DECLARE_TXN_RECEIPT;
|
|
1252
|
+
type components_DECLARE_TXN_TRACE = DECLARE_TXN_TRACE;
|
|
1253
|
+
type components_DECLARE_TXN_V0 = DECLARE_TXN_V0;
|
|
1254
|
+
type components_DECLARE_TXN_V1 = DECLARE_TXN_V1;
|
|
1255
|
+
type components_DECLARE_TXN_V2 = DECLARE_TXN_V2;
|
|
1256
|
+
type components_DEPLOYED_CONTRACT_ITEM = DEPLOYED_CONTRACT_ITEM;
|
|
1257
|
+
type components_DEPLOY_ACCOUNT_TXN = DEPLOY_ACCOUNT_TXN;
|
|
1258
|
+
type components_DEPLOY_ACCOUNT_TXN_RECEIPT = DEPLOY_ACCOUNT_TXN_RECEIPT;
|
|
1259
|
+
type components_DEPLOY_ACCOUNT_TXN_TRACE = DEPLOY_ACCOUNT_TXN_TRACE;
|
|
1260
|
+
type components_DEPLOY_ACCOUNT_TXN_V1 = DEPLOY_ACCOUNT_TXN_V1;
|
|
1261
|
+
type components_DEPLOY_TXN = DEPLOY_TXN;
|
|
1262
|
+
type components_DEPLOY_TXN_RECEIPT = DEPLOY_TXN_RECEIPT;
|
|
1263
|
+
type components_DEPRECATED_CAIRO_ENTRY_POINT = DEPRECATED_CAIRO_ENTRY_POINT;
|
|
1264
|
+
type components_DEPRECATED_CONTRACT_CLASS = DEPRECATED_CONTRACT_CLASS;
|
|
1265
|
+
type components_EMITTED_EVENT = EMITTED_EVENT;
|
|
1266
|
+
type components_ENTRY_POINT_TYPE = ENTRY_POINT_TYPE;
|
|
1267
|
+
type components_ETH_ADDRESS = ETH_ADDRESS;
|
|
1268
|
+
type components_EVENTS_CHUNK = EVENTS_CHUNK;
|
|
1269
|
+
type components_EVENT_ABI_ENTRY = EVENT_ABI_ENTRY;
|
|
1270
|
+
type components_EVENT_ABI_TYPE = EVENT_ABI_TYPE;
|
|
1271
|
+
type components_EVENT_CONTENT = EVENT_CONTENT;
|
|
1272
|
+
type components_EVENT_FILTER = EVENT_FILTER;
|
|
1273
|
+
type components_EXECUTION_RESOURCES = EXECUTION_RESOURCES;
|
|
1274
|
+
type components_FEE_ESTIMATE = FEE_ESTIMATE;
|
|
1275
|
+
type components_FELT = FELT;
|
|
1276
|
+
type components_FUNCTION_ABI_ENTRY = FUNCTION_ABI_ENTRY;
|
|
1277
|
+
type components_FUNCTION_ABI_TYPE = FUNCTION_ABI_TYPE;
|
|
1278
|
+
type components_FUNCTION_CALL = FUNCTION_CALL;
|
|
1279
|
+
type components_FUNCTION_INVOCATION = FUNCTION_INVOCATION;
|
|
1280
|
+
type components_FUNCTION_STATE_MUTABILITY = FUNCTION_STATE_MUTABILITY;
|
|
1281
|
+
type components_INVOKE_TXN = INVOKE_TXN;
|
|
1282
|
+
type components_INVOKE_TXN_RECEIPT = INVOKE_TXN_RECEIPT;
|
|
1283
|
+
type components_INVOKE_TXN_TRACE = INVOKE_TXN_TRACE;
|
|
1284
|
+
type components_INVOKE_TXN_V0 = INVOKE_TXN_V0;
|
|
1285
|
+
type components_INVOKE_TXN_V1 = INVOKE_TXN_V1;
|
|
1286
|
+
type components_L1_HANDLER_TXN = L1_HANDLER_TXN;
|
|
1287
|
+
type components_L1_HANDLER_TXN_RECEIPT = L1_HANDLER_TXN_RECEIPT;
|
|
1288
|
+
type components_L1_HANDLER_TXN_TRACE = L1_HANDLER_TXN_TRACE;
|
|
1289
|
+
type components_MSG_FROM_L1 = MSG_FROM_L1;
|
|
1290
|
+
type components_MSG_TO_L1 = MSG_TO_L1;
|
|
1291
|
+
type components_NESTED_CALL = NESTED_CALL;
|
|
1292
|
+
type components_NEW_CLASSES = NEW_CLASSES;
|
|
1293
|
+
type components_NONCE_UPDATE = NONCE_UPDATE;
|
|
1294
|
+
type components_NUM_AS_HEX = NUM_AS_HEX;
|
|
1295
|
+
type components_ORDERED_EVENT = ORDERED_EVENT;
|
|
1296
|
+
type components_ORDERED_MESSAGE = ORDERED_MESSAGE;
|
|
1297
|
+
type components_PENDING_BLOCK_HEADER = PENDING_BLOCK_HEADER;
|
|
1298
|
+
type components_PENDING_BLOCK_WITH_TXS = PENDING_BLOCK_WITH_TXS;
|
|
1299
|
+
type components_PENDING_BLOCK_WITH_TX_HASHES = PENDING_BLOCK_WITH_TX_HASHES;
|
|
1300
|
+
type components_PENDING_COMMON_RECEIPT_PROPERTIES = PENDING_COMMON_RECEIPT_PROPERTIES;
|
|
1301
|
+
type components_PENDING_DECLARE_TXN_RECEIPT = PENDING_DECLARE_TXN_RECEIPT;
|
|
1302
|
+
type components_PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT = PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT;
|
|
1303
|
+
type components_PENDING_INVOKE_TXN_RECEIPT = PENDING_INVOKE_TXN_RECEIPT;
|
|
1304
|
+
type components_PENDING_L1_HANDLER_TXN_RECEIPT = PENDING_L1_HANDLER_TXN_RECEIPT;
|
|
1305
|
+
type components_PENDING_STATE_UPDATE = PENDING_STATE_UPDATE;
|
|
1306
|
+
type components_PENDING_TXN_RECEIPT = PENDING_TXN_RECEIPT;
|
|
1307
|
+
type components_REPLACED_CLASS = REPLACED_CLASS;
|
|
1308
|
+
type components_RESOURCE_LIMITS = RESOURCE_LIMITS;
|
|
1309
|
+
type components_RESOURCE_PRICE = RESOURCE_PRICE;
|
|
1310
|
+
type components_RESULT_PAGE_REQUEST = RESULT_PAGE_REQUEST;
|
|
1311
|
+
type components_SIERRA_ENTRY_POINT = SIERRA_ENTRY_POINT;
|
|
1312
|
+
type components_SIGNATURE = SIGNATURE;
|
|
1313
|
+
type components_STATE_DIFF = STATE_DIFF;
|
|
1314
|
+
type components_STATE_UPDATE = STATE_UPDATE;
|
|
1315
|
+
type components_STORAGE_KEY = STORAGE_KEY;
|
|
1316
|
+
type components_STRUCT_ABI_ENTRY = STRUCT_ABI_ENTRY;
|
|
1317
|
+
type components_STRUCT_ABI_TYPE = STRUCT_ABI_TYPE;
|
|
1318
|
+
type components_STRUCT_MEMBER = STRUCT_MEMBER;
|
|
1319
|
+
type components_SYNC_STATUS = SYNC_STATUS;
|
|
1320
|
+
type components_StorageDiffItem = StorageDiffItem;
|
|
1321
|
+
type components_TRANSACTION_TRACE = TRANSACTION_TRACE;
|
|
1322
|
+
type components_TXN = TXN;
|
|
1323
|
+
type components_TXN_EXECUTION_STATUS = TXN_EXECUTION_STATUS;
|
|
1324
|
+
type components_TXN_FINALITY_STATUS = TXN_FINALITY_STATUS;
|
|
1325
|
+
type components_TXN_HASH = TXN_HASH;
|
|
1326
|
+
type components_TXN_RECEIPT = TXN_RECEIPT;
|
|
1327
|
+
type components_TXN_STATUS = TXN_STATUS;
|
|
1328
|
+
type components_TXN_TYPE = TXN_TYPE;
|
|
1329
|
+
type components_TYPED_PARAMETER = TYPED_PARAMETER;
|
|
1330
|
+
declare namespace components {
|
|
1331
|
+
export {
|
|
1332
|
+
components_ADDRESS as ADDRESS,
|
|
1333
|
+
components_BLOCK_BODY_WITH_TXS as BLOCK_BODY_WITH_TXS,
|
|
1334
|
+
components_BLOCK_BODY_WITH_TX_HASHES as BLOCK_BODY_WITH_TX_HASHES,
|
|
1335
|
+
components_BLOCK_HASH as BLOCK_HASH,
|
|
1336
|
+
components_BLOCK_HEADER as BLOCK_HEADER,
|
|
1337
|
+
components_BLOCK_ID as BLOCK_ID,
|
|
1338
|
+
components_BLOCK_NUMBER as BLOCK_NUMBER,
|
|
1339
|
+
components_BLOCK_STATUS as BLOCK_STATUS,
|
|
1340
|
+
components_BLOCK_TAG as BLOCK_TAG,
|
|
1341
|
+
components_BLOCK_WITH_TXS as BLOCK_WITH_TXS,
|
|
1342
|
+
components_BLOCK_WITH_TX_HASHES as BLOCK_WITH_TX_HASHES,
|
|
1343
|
+
components_BROADCASTED_DECLARE_TXN as BROADCASTED_DECLARE_TXN,
|
|
1344
|
+
components_BROADCASTED_DECLARE_TXN_V1 as BROADCASTED_DECLARE_TXN_V1,
|
|
1345
|
+
components_BROADCASTED_DECLARE_TXN_V2 as BROADCASTED_DECLARE_TXN_V2,
|
|
1346
|
+
components_BROADCASTED_DEPLOY_ACCOUNT_TXN as BROADCASTED_DEPLOY_ACCOUNT_TXN,
|
|
1347
|
+
components_BROADCASTED_INVOKE_TXN as BROADCASTED_INVOKE_TXN,
|
|
1348
|
+
components_BROADCASTED_TXN as BROADCASTED_TXN,
|
|
1349
|
+
components_CALL_TYPE as CALL_TYPE,
|
|
1350
|
+
components_CHAIN_ID as CHAIN_ID,
|
|
1351
|
+
components_COMMON_RECEIPT_PROPERTIES as COMMON_RECEIPT_PROPERTIES,
|
|
1352
|
+
components_CONTRACT_ABI as CONTRACT_ABI,
|
|
1353
|
+
components_CONTRACT_ABI_ENTRY as CONTRACT_ABI_ENTRY,
|
|
1354
|
+
components_CONTRACT_CLASS as CONTRACT_CLASS,
|
|
1355
|
+
components_CONTRACT_STORAGE_DIFF_ITEM as CONTRACT_STORAGE_DIFF_ITEM,
|
|
1356
|
+
components_DA_MODE as DA_MODE,
|
|
1357
|
+
components_DECLARE_TXN as DECLARE_TXN,
|
|
1358
|
+
components_DECLARE_TXN_RECEIPT as DECLARE_TXN_RECEIPT,
|
|
1359
|
+
components_DECLARE_TXN_TRACE as DECLARE_TXN_TRACE,
|
|
1360
|
+
components_DECLARE_TXN_V0 as DECLARE_TXN_V0,
|
|
1361
|
+
components_DECLARE_TXN_V1 as DECLARE_TXN_V1,
|
|
1362
|
+
components_DECLARE_TXN_V2 as DECLARE_TXN_V2,
|
|
1363
|
+
components_DEPLOYED_CONTRACT_ITEM as DEPLOYED_CONTRACT_ITEM,
|
|
1364
|
+
components_DEPLOY_ACCOUNT_TXN as DEPLOY_ACCOUNT_TXN,
|
|
1365
|
+
components_DEPLOY_ACCOUNT_TXN_RECEIPT as DEPLOY_ACCOUNT_TXN_RECEIPT,
|
|
1366
|
+
components_DEPLOY_ACCOUNT_TXN_TRACE as DEPLOY_ACCOUNT_TXN_TRACE,
|
|
1367
|
+
components_DEPLOY_ACCOUNT_TXN_V1 as DEPLOY_ACCOUNT_TXN_V1,
|
|
1368
|
+
components_DEPLOY_TXN as DEPLOY_TXN,
|
|
1369
|
+
components_DEPLOY_TXN_RECEIPT as DEPLOY_TXN_RECEIPT,
|
|
1370
|
+
components_DEPRECATED_CAIRO_ENTRY_POINT as DEPRECATED_CAIRO_ENTRY_POINT,
|
|
1371
|
+
components_DEPRECATED_CONTRACT_CLASS as DEPRECATED_CONTRACT_CLASS,
|
|
1372
|
+
components_EMITTED_EVENT as EMITTED_EVENT,
|
|
1373
|
+
components_ENTRY_POINT_TYPE as ENTRY_POINT_TYPE,
|
|
1374
|
+
components_ETH_ADDRESS as ETH_ADDRESS,
|
|
1375
|
+
EVENT$1 as EVENT,
|
|
1376
|
+
components_EVENTS_CHUNK as EVENTS_CHUNK,
|
|
1377
|
+
components_EVENT_ABI_ENTRY as EVENT_ABI_ENTRY,
|
|
1378
|
+
components_EVENT_ABI_TYPE as EVENT_ABI_TYPE,
|
|
1379
|
+
components_EVENT_CONTENT as EVENT_CONTENT,
|
|
1380
|
+
components_EVENT_FILTER as EVENT_FILTER,
|
|
1381
|
+
components_EXECUTION_RESOURCES as EXECUTION_RESOURCES,
|
|
1382
|
+
components_FEE_ESTIMATE as FEE_ESTIMATE,
|
|
1383
|
+
components_FELT as FELT,
|
|
1384
|
+
components_FUNCTION_ABI_ENTRY as FUNCTION_ABI_ENTRY,
|
|
1385
|
+
components_FUNCTION_ABI_TYPE as FUNCTION_ABI_TYPE,
|
|
1386
|
+
components_FUNCTION_CALL as FUNCTION_CALL,
|
|
1387
|
+
components_FUNCTION_INVOCATION as FUNCTION_INVOCATION,
|
|
1388
|
+
components_FUNCTION_STATE_MUTABILITY as FUNCTION_STATE_MUTABILITY,
|
|
1389
|
+
components_INVOKE_TXN as INVOKE_TXN,
|
|
1390
|
+
components_INVOKE_TXN_RECEIPT as INVOKE_TXN_RECEIPT,
|
|
1391
|
+
components_INVOKE_TXN_TRACE as INVOKE_TXN_TRACE,
|
|
1392
|
+
components_INVOKE_TXN_V0 as INVOKE_TXN_V0,
|
|
1393
|
+
components_INVOKE_TXN_V1 as INVOKE_TXN_V1,
|
|
1394
|
+
components_L1_HANDLER_TXN as L1_HANDLER_TXN,
|
|
1395
|
+
components_L1_HANDLER_TXN_RECEIPT as L1_HANDLER_TXN_RECEIPT,
|
|
1396
|
+
components_L1_HANDLER_TXN_TRACE as L1_HANDLER_TXN_TRACE,
|
|
1397
|
+
components_MSG_FROM_L1 as MSG_FROM_L1,
|
|
1398
|
+
components_MSG_TO_L1 as MSG_TO_L1,
|
|
1399
|
+
components_NESTED_CALL as NESTED_CALL,
|
|
1400
|
+
components_NEW_CLASSES as NEW_CLASSES,
|
|
1401
|
+
components_NONCE_UPDATE as NONCE_UPDATE,
|
|
1402
|
+
components_NUM_AS_HEX as NUM_AS_HEX,
|
|
1403
|
+
components_ORDERED_EVENT as ORDERED_EVENT,
|
|
1404
|
+
components_ORDERED_MESSAGE as ORDERED_MESSAGE,
|
|
1405
|
+
components_PENDING_BLOCK_HEADER as PENDING_BLOCK_HEADER,
|
|
1406
|
+
components_PENDING_BLOCK_WITH_TXS as PENDING_BLOCK_WITH_TXS,
|
|
1407
|
+
components_PENDING_BLOCK_WITH_TX_HASHES as PENDING_BLOCK_WITH_TX_HASHES,
|
|
1408
|
+
components_PENDING_COMMON_RECEIPT_PROPERTIES as PENDING_COMMON_RECEIPT_PROPERTIES,
|
|
1409
|
+
components_PENDING_DECLARE_TXN_RECEIPT as PENDING_DECLARE_TXN_RECEIPT,
|
|
1410
|
+
components_PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT as PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT,
|
|
1411
|
+
components_PENDING_INVOKE_TXN_RECEIPT as PENDING_INVOKE_TXN_RECEIPT,
|
|
1412
|
+
components_PENDING_L1_HANDLER_TXN_RECEIPT as PENDING_L1_HANDLER_TXN_RECEIPT,
|
|
1413
|
+
components_PENDING_STATE_UPDATE as PENDING_STATE_UPDATE,
|
|
1414
|
+
components_PENDING_TXN_RECEIPT as PENDING_TXN_RECEIPT,
|
|
1415
|
+
components_REPLACED_CLASS as REPLACED_CLASS,
|
|
1416
|
+
components_RESOURCE_LIMITS as RESOURCE_LIMITS,
|
|
1417
|
+
components_RESOURCE_PRICE as RESOURCE_PRICE,
|
|
1418
|
+
components_RESULT_PAGE_REQUEST as RESULT_PAGE_REQUEST,
|
|
1419
|
+
components_SIERRA_ENTRY_POINT as SIERRA_ENTRY_POINT,
|
|
1420
|
+
components_SIGNATURE as SIGNATURE,
|
|
1421
|
+
SIMULATION_FLAG$1 as SIMULATION_FLAG,
|
|
1422
|
+
components_STATE_DIFF as STATE_DIFF,
|
|
1423
|
+
components_STATE_UPDATE as STATE_UPDATE,
|
|
1424
|
+
components_STORAGE_KEY as STORAGE_KEY,
|
|
1425
|
+
components_STRUCT_ABI_ENTRY as STRUCT_ABI_ENTRY,
|
|
1426
|
+
components_STRUCT_ABI_TYPE as STRUCT_ABI_TYPE,
|
|
1427
|
+
components_STRUCT_MEMBER as STRUCT_MEMBER,
|
|
1428
|
+
components_SYNC_STATUS as SYNC_STATUS,
|
|
1429
|
+
components_StorageDiffItem as StorageDiffItem,
|
|
1430
|
+
components_TRANSACTION_TRACE as TRANSACTION_TRACE,
|
|
1431
|
+
components_TXN as TXN,
|
|
1432
|
+
components_TXN_EXECUTION_STATUS as TXN_EXECUTION_STATUS,
|
|
1433
|
+
components_TXN_FINALITY_STATUS as TXN_FINALITY_STATUS,
|
|
1434
|
+
components_TXN_HASH as TXN_HASH,
|
|
1435
|
+
components_TXN_RECEIPT as TXN_RECEIPT,
|
|
1436
|
+
components_TXN_STATUS as TXN_STATUS,
|
|
1437
|
+
components_TXN_TYPE as TXN_TYPE,
|
|
1438
|
+
components_TYPED_PARAMETER as TYPED_PARAMETER,
|
|
1439
|
+
};
|
|
1114
1440
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
type DeprecatedContractClass = DEPRECATED_CONTRACT_CLASS;
|
|
1126
|
-
type CallResponse = Array<FELT>;
|
|
1127
|
-
type EstimatedFee = FEE_ESTIMATE;
|
|
1128
|
-
type BlockNumber = BLOCK_NUMBER;
|
|
1129
|
-
type BlockHashAndNumber = {
|
|
1130
|
-
block_hash: BLOCK_HASH;
|
|
1131
|
-
block_number: BLOCK_NUMBER;
|
|
1132
|
-
};
|
|
1133
|
-
type CHAIN_ID = string;
|
|
1134
|
-
type PendingTransactions = Array<TransactionWithHash>;
|
|
1135
|
-
type SyncingStatus = false | SYNC_STATUS;
|
|
1136
|
-
type Events = EVENTS_CHUNK;
|
|
1137
|
-
type Trace = TRANSACTION_TRACE;
|
|
1138
|
-
type Traces = Array<{
|
|
1139
|
-
transaction_hash: FELT;
|
|
1140
|
-
trace_root: TRANSACTION_TRACE;
|
|
1141
|
-
}>;
|
|
1142
|
-
type TransactionHash = TXN_HASH;
|
|
1143
|
-
type BlockHash = BLOCK_HASH;
|
|
1144
|
-
type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
1145
|
-
type InvokedTransaction = {
|
|
1146
|
-
transaction_hash: TXN_HASH;
|
|
1147
|
-
};
|
|
1148
|
-
type DeclaredTransaction = {
|
|
1149
|
-
transaction_hash: TXN_HASH;
|
|
1150
|
-
class_hash: FELT;
|
|
1441
|
+
|
|
1442
|
+
interface FAILED_TO_RECEIVE_TXN {
|
|
1443
|
+
code: 1;
|
|
1444
|
+
message: 'Failed to write transaction';
|
|
1445
|
+
}
|
|
1446
|
+
interface NO_TRACE_AVAILABLE {
|
|
1447
|
+
code: 10;
|
|
1448
|
+
message: 'No trace available for transaction';
|
|
1449
|
+
data: {
|
|
1450
|
+
status: 'RECEIVED' | 'REJECTED';
|
|
1151
1451
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1452
|
+
}
|
|
1453
|
+
interface CONTRACT_NOT_FOUND {
|
|
1454
|
+
code: 20;
|
|
1455
|
+
message: 'Contract not found';
|
|
1456
|
+
}
|
|
1457
|
+
interface INVALID_MESSAGE_SELECTOR {
|
|
1458
|
+
code: 21;
|
|
1459
|
+
message: 'Invalid message selector';
|
|
1460
|
+
}
|
|
1461
|
+
interface INVALID_CALL_DATA {
|
|
1462
|
+
code: 22;
|
|
1463
|
+
message: 'Invalid call data';
|
|
1464
|
+
}
|
|
1465
|
+
interface BLOCK_NOT_FOUND {
|
|
1466
|
+
code: 24;
|
|
1467
|
+
message: 'Block not found';
|
|
1468
|
+
}
|
|
1469
|
+
interface INVALID_TXN_HASH {
|
|
1470
|
+
code: 25;
|
|
1471
|
+
message: 'Invalid transaction hash';
|
|
1472
|
+
}
|
|
1473
|
+
interface INVALID_BLOCK_HASH {
|
|
1474
|
+
code: 26;
|
|
1475
|
+
message: 'Invalid block hash';
|
|
1476
|
+
}
|
|
1477
|
+
interface INVALID_TXN_INDEX {
|
|
1478
|
+
code: 27;
|
|
1479
|
+
message: 'Invalid transaction index in a block';
|
|
1480
|
+
}
|
|
1481
|
+
interface CLASS_HASH_NOT_FOUND {
|
|
1482
|
+
code: 28;
|
|
1483
|
+
message: 'Class hash not found';
|
|
1484
|
+
}
|
|
1485
|
+
interface TXN_HASH_NOT_FOUND {
|
|
1486
|
+
code: 29;
|
|
1487
|
+
message: 'Transaction hash not found';
|
|
1488
|
+
}
|
|
1489
|
+
interface PAGE_SIZE_TOO_BIG {
|
|
1490
|
+
code: 31;
|
|
1491
|
+
message: 'Requested page size is too big';
|
|
1492
|
+
}
|
|
1493
|
+
interface NO_BLOCKS {
|
|
1494
|
+
code: 32;
|
|
1495
|
+
message: 'There are no blocks';
|
|
1496
|
+
}
|
|
1497
|
+
interface INVALID_CONTINUATION_TOKEN {
|
|
1498
|
+
code: 33;
|
|
1499
|
+
message: 'The supplied continuation token is invalid or unknown';
|
|
1500
|
+
}
|
|
1501
|
+
interface TOO_MANY_KEYS_IN_FILTER {
|
|
1502
|
+
code: 34;
|
|
1503
|
+
message: 'Too many keys provided in a filter';
|
|
1504
|
+
}
|
|
1505
|
+
interface CONTRACT_ERROR {
|
|
1506
|
+
code: 40;
|
|
1507
|
+
message: 'Contract error';
|
|
1508
|
+
data: {
|
|
1509
|
+
revert_error: string;
|
|
1155
1510
|
};
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1511
|
+
}
|
|
1512
|
+
interface CLASS_ALREADY_DECLARED {
|
|
1513
|
+
code: 51;
|
|
1514
|
+
message: 'Class already declared';
|
|
1515
|
+
}
|
|
1516
|
+
interface INVALID_TRANSACTION_NONCE {
|
|
1517
|
+
code: 52;
|
|
1518
|
+
message: 'Invalid transaction nonce';
|
|
1519
|
+
}
|
|
1520
|
+
interface INSUFFICIENT_MAX_FEE {
|
|
1521
|
+
code: 53;
|
|
1522
|
+
message: 'Max fee is smaller than the minimal transaction cost (validation plus fee transfer)';
|
|
1523
|
+
}
|
|
1524
|
+
interface INSUFFICIENT_ACCOUNT_BALANCE {
|
|
1525
|
+
code: 54;
|
|
1526
|
+
message: "Account balance is smaller than the transaction's max_fee";
|
|
1527
|
+
}
|
|
1528
|
+
interface VALIDATION_FAILURE {
|
|
1529
|
+
code: 55;
|
|
1530
|
+
message: 'Account validation failed';
|
|
1531
|
+
}
|
|
1532
|
+
interface COMPILATION_FAILED {
|
|
1533
|
+
code: 56;
|
|
1534
|
+
message: 'Compilation failed';
|
|
1535
|
+
}
|
|
1536
|
+
interface CONTRACT_CLASS_SIZE_IS_TOO_LARGE {
|
|
1537
|
+
code: 57;
|
|
1538
|
+
message: 'Contract class size it too large';
|
|
1539
|
+
}
|
|
1540
|
+
interface NON_ACCOUNT {
|
|
1541
|
+
code: 58;
|
|
1542
|
+
message: 'Sender address in not an account contract';
|
|
1543
|
+
}
|
|
1544
|
+
interface DUPLICATE_TX {
|
|
1545
|
+
code: 59;
|
|
1546
|
+
message: 'A transaction with the same hash already exists in the mempool';
|
|
1547
|
+
}
|
|
1548
|
+
interface COMPILED_CLASS_HASH_MISMATCH {
|
|
1549
|
+
code: 60;
|
|
1550
|
+
message: 'the compiled class hash did not match the one supplied in the transaction';
|
|
1551
|
+
}
|
|
1552
|
+
interface UNSUPPORTED_TX_VERSION {
|
|
1553
|
+
code: 61;
|
|
1554
|
+
message: 'the transaction version is not supported';
|
|
1555
|
+
}
|
|
1556
|
+
interface UNSUPPORTED_CONTRACT_CLASS_VERSION {
|
|
1557
|
+
code: 62;
|
|
1558
|
+
message: 'the contract class version is not supported';
|
|
1559
|
+
}
|
|
1560
|
+
interface UNEXPECTED_ERROR {
|
|
1561
|
+
code: 63;
|
|
1562
|
+
message: 'An unexpected error occurred';
|
|
1563
|
+
data: string;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
type errors_BLOCK_NOT_FOUND = BLOCK_NOT_FOUND;
|
|
1567
|
+
type errors_CLASS_ALREADY_DECLARED = CLASS_ALREADY_DECLARED;
|
|
1568
|
+
type errors_CLASS_HASH_NOT_FOUND = CLASS_HASH_NOT_FOUND;
|
|
1569
|
+
type errors_COMPILATION_FAILED = COMPILATION_FAILED;
|
|
1570
|
+
type errors_COMPILED_CLASS_HASH_MISMATCH = COMPILED_CLASS_HASH_MISMATCH;
|
|
1571
|
+
type errors_CONTRACT_CLASS_SIZE_IS_TOO_LARGE = CONTRACT_CLASS_SIZE_IS_TOO_LARGE;
|
|
1572
|
+
type errors_CONTRACT_ERROR = CONTRACT_ERROR;
|
|
1573
|
+
type errors_CONTRACT_NOT_FOUND = CONTRACT_NOT_FOUND;
|
|
1574
|
+
type errors_DUPLICATE_TX = DUPLICATE_TX;
|
|
1575
|
+
type errors_FAILED_TO_RECEIVE_TXN = FAILED_TO_RECEIVE_TXN;
|
|
1576
|
+
type errors_INSUFFICIENT_ACCOUNT_BALANCE = INSUFFICIENT_ACCOUNT_BALANCE;
|
|
1577
|
+
type errors_INSUFFICIENT_MAX_FEE = INSUFFICIENT_MAX_FEE;
|
|
1578
|
+
type errors_INVALID_BLOCK_HASH = INVALID_BLOCK_HASH;
|
|
1579
|
+
type errors_INVALID_CALL_DATA = INVALID_CALL_DATA;
|
|
1580
|
+
type errors_INVALID_CONTINUATION_TOKEN = INVALID_CONTINUATION_TOKEN;
|
|
1581
|
+
type errors_INVALID_MESSAGE_SELECTOR = INVALID_MESSAGE_SELECTOR;
|
|
1582
|
+
type errors_INVALID_TRANSACTION_NONCE = INVALID_TRANSACTION_NONCE;
|
|
1583
|
+
type errors_INVALID_TXN_HASH = INVALID_TXN_HASH;
|
|
1584
|
+
type errors_INVALID_TXN_INDEX = INVALID_TXN_INDEX;
|
|
1585
|
+
type errors_NON_ACCOUNT = NON_ACCOUNT;
|
|
1586
|
+
type errors_NO_BLOCKS = NO_BLOCKS;
|
|
1587
|
+
type errors_NO_TRACE_AVAILABLE = NO_TRACE_AVAILABLE;
|
|
1588
|
+
type errors_PAGE_SIZE_TOO_BIG = PAGE_SIZE_TOO_BIG;
|
|
1589
|
+
type errors_TOO_MANY_KEYS_IN_FILTER = TOO_MANY_KEYS_IN_FILTER;
|
|
1590
|
+
type errors_TXN_HASH_NOT_FOUND = TXN_HASH_NOT_FOUND;
|
|
1591
|
+
type errors_UNEXPECTED_ERROR = UNEXPECTED_ERROR;
|
|
1592
|
+
type errors_UNSUPPORTED_CONTRACT_CLASS_VERSION = UNSUPPORTED_CONTRACT_CLASS_VERSION;
|
|
1593
|
+
type errors_UNSUPPORTED_TX_VERSION = UNSUPPORTED_TX_VERSION;
|
|
1594
|
+
type errors_VALIDATION_FAILURE = VALIDATION_FAILURE;
|
|
1595
|
+
declare namespace errors {
|
|
1596
|
+
export {
|
|
1597
|
+
errors_BLOCK_NOT_FOUND as BLOCK_NOT_FOUND,
|
|
1598
|
+
errors_CLASS_ALREADY_DECLARED as CLASS_ALREADY_DECLARED,
|
|
1599
|
+
errors_CLASS_HASH_NOT_FOUND as CLASS_HASH_NOT_FOUND,
|
|
1600
|
+
errors_COMPILATION_FAILED as COMPILATION_FAILED,
|
|
1601
|
+
errors_COMPILED_CLASS_HASH_MISMATCH as COMPILED_CLASS_HASH_MISMATCH,
|
|
1602
|
+
errors_CONTRACT_CLASS_SIZE_IS_TOO_LARGE as CONTRACT_CLASS_SIZE_IS_TOO_LARGE,
|
|
1603
|
+
errors_CONTRACT_ERROR as CONTRACT_ERROR,
|
|
1604
|
+
errors_CONTRACT_NOT_FOUND as CONTRACT_NOT_FOUND,
|
|
1605
|
+
errors_DUPLICATE_TX as DUPLICATE_TX,
|
|
1606
|
+
errors_FAILED_TO_RECEIVE_TXN as FAILED_TO_RECEIVE_TXN,
|
|
1607
|
+
errors_INSUFFICIENT_ACCOUNT_BALANCE as INSUFFICIENT_ACCOUNT_BALANCE,
|
|
1608
|
+
errors_INSUFFICIENT_MAX_FEE as INSUFFICIENT_MAX_FEE,
|
|
1609
|
+
errors_INVALID_BLOCK_HASH as INVALID_BLOCK_HASH,
|
|
1610
|
+
errors_INVALID_CALL_DATA as INVALID_CALL_DATA,
|
|
1611
|
+
errors_INVALID_CONTINUATION_TOKEN as INVALID_CONTINUATION_TOKEN,
|
|
1612
|
+
errors_INVALID_MESSAGE_SELECTOR as INVALID_MESSAGE_SELECTOR,
|
|
1613
|
+
errors_INVALID_TRANSACTION_NONCE as INVALID_TRANSACTION_NONCE,
|
|
1614
|
+
errors_INVALID_TXN_HASH as INVALID_TXN_HASH,
|
|
1615
|
+
errors_INVALID_TXN_INDEX as INVALID_TXN_INDEX,
|
|
1616
|
+
errors_NON_ACCOUNT as NON_ACCOUNT,
|
|
1617
|
+
errors_NO_BLOCKS as NO_BLOCKS,
|
|
1618
|
+
errors_NO_TRACE_AVAILABLE as NO_TRACE_AVAILABLE,
|
|
1619
|
+
errors_PAGE_SIZE_TOO_BIG as PAGE_SIZE_TOO_BIG,
|
|
1620
|
+
errors_TOO_MANY_KEYS_IN_FILTER as TOO_MANY_KEYS_IN_FILTER,
|
|
1621
|
+
errors_TXN_HASH_NOT_FOUND as TXN_HASH_NOT_FOUND,
|
|
1622
|
+
errors_UNEXPECTED_ERROR as UNEXPECTED_ERROR,
|
|
1623
|
+
errors_UNSUPPORTED_CONTRACT_CLASS_VERSION as UNSUPPORTED_CONTRACT_CLASS_VERSION,
|
|
1624
|
+
errors_UNSUPPORTED_TX_VERSION as UNSUPPORTED_TX_VERSION,
|
|
1625
|
+
errors_VALIDATION_FAILURE as VALIDATION_FAILURE,
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* Types that are not in spec but required for UX
|
|
1631
|
+
*/
|
|
1632
|
+
|
|
1633
|
+
type ContractClass = CONTRACT_CLASS | DEPRECATED_CONTRACT_CLASS;
|
|
1634
|
+
type SimulateTransactionResponse$2 = {
|
|
1635
|
+
transaction_trace: TRANSACTION_TRACE;
|
|
1636
|
+
fee_estimation: FEE_ESTIMATE;
|
|
1637
|
+
}[];
|
|
1638
|
+
type FeeEstimate = FEE_ESTIMATE;
|
|
1639
|
+
type TransactionWithHash = TXN & {
|
|
1640
|
+
transaction_hash: TXN_HASH;
|
|
1641
|
+
};
|
|
1642
|
+
type BlockHashAndNumber = {
|
|
1643
|
+
block_hash: BLOCK_HASH;
|
|
1644
|
+
block_number: BLOCK_NUMBER;
|
|
1645
|
+
};
|
|
1646
|
+
type BlockWithTxs = BLOCK_WITH_TXS | PENDING_BLOCK_WITH_TXS;
|
|
1647
|
+
type BlockWithTxHashes = BLOCK_WITH_TX_HASHES | PENDING_BLOCK_WITH_TX_HASHES;
|
|
1648
|
+
type StateUpdate = STATE_UPDATE | PENDING_STATE_UPDATE;
|
|
1649
|
+
type BlockTransactionsTraces = {
|
|
1650
|
+
transaction_hash: FELT;
|
|
1651
|
+
trace_root: TRANSACTION_TRACE;
|
|
1652
|
+
}[];
|
|
1653
|
+
type Syncing = boolean | SYNC_STATUS;
|
|
1654
|
+
type Events = EVENTS_CHUNK;
|
|
1655
|
+
type InvokedTransaction = {
|
|
1656
|
+
transaction_hash: TXN_HASH;
|
|
1657
|
+
};
|
|
1658
|
+
type DeclaredTransaction = {
|
|
1659
|
+
transaction_hash: TXN_HASH;
|
|
1660
|
+
class_hash: FELT;
|
|
1661
|
+
};
|
|
1662
|
+
type DeployedAccountTransaction = {
|
|
1663
|
+
transaction_hash: TXN_HASH;
|
|
1664
|
+
contract_address: FELT;
|
|
1665
|
+
};
|
|
1666
|
+
type ContractAddress = ADDRESS;
|
|
1667
|
+
type Felt = FELT;
|
|
1668
|
+
type Nonce$2 = FELT;
|
|
1669
|
+
type TransactionHash = TXN_HASH;
|
|
1670
|
+
type TransactionTrace = TRANSACTION_TRACE;
|
|
1671
|
+
type BlockHash = BLOCK_HASH;
|
|
1672
|
+
type TransactionReceipt = TXN_RECEIPT | PENDING_TXN_RECEIPT;
|
|
1673
|
+
type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
1674
|
+
type SimulationFlags$1 = Array<SIMULATION_FLAG$1>;
|
|
1675
|
+
type L1Message = MSG_FROM_L1;
|
|
1676
|
+
type BaseTransaction = BROADCASTED_TXN;
|
|
1677
|
+
type ChainId = CHAIN_ID;
|
|
1678
|
+
type Transaction$1 = TXN;
|
|
1679
|
+
type TransactionStatus = {
|
|
1680
|
+
finality_status: TXN_STATUS;
|
|
1681
|
+
execution_status?: TXN_EXECUTION_STATUS;
|
|
1682
|
+
};
|
|
1683
|
+
type StorageDiffs$1 = Array<CONTRACT_STORAGE_DIFF_ITEM>;
|
|
1684
|
+
type DeprecatedDeclaredClasses = Array<FELT>;
|
|
1685
|
+
type NonceUpdates = NONCE_UPDATE[];
|
|
1686
|
+
type ReplacedClasses$1 = REPLACED_CLASS[];
|
|
1687
|
+
declare enum ETransactionType {
|
|
1688
|
+
DECLARE = "DECLARE",
|
|
1689
|
+
DEPLOY = "DEPLOY",
|
|
1690
|
+
DEPLOY_ACCOUNT = "DEPLOY_ACCOUNT",
|
|
1691
|
+
INVOKE = "INVOKE",
|
|
1692
|
+
L1_HANDLER = "L1_HANDLER"
|
|
1693
|
+
}
|
|
1694
|
+
declare enum ESimulationFlag {
|
|
1695
|
+
SKIP_VALIDATE = "SKIP_VALIDATE",
|
|
1696
|
+
SKIP_FEE_CHARGE = "SKIP_FEE_CHARGE"
|
|
1697
|
+
}
|
|
1698
|
+
declare enum ETransactionStatus {
|
|
1699
|
+
RECEIVED = "RECEIVED",
|
|
1700
|
+
REJECTED = "REJECTED",
|
|
1701
|
+
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
1702
|
+
ACCEPTED_ON_L1 = "ACCEPTED_ON_L1"
|
|
1703
|
+
}
|
|
1704
|
+
declare enum ETransactionFinalityStatus {
|
|
1705
|
+
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
1706
|
+
ACCEPTED_ON_L1 = "ACCEPTED_ON_L1"
|
|
1707
|
+
}
|
|
1708
|
+
declare enum ETransactionExecutionStatus {
|
|
1709
|
+
SUCCEEDED = "SUCCEEDED",
|
|
1710
|
+
REVERTED = "REVERTED"
|
|
1711
|
+
}
|
|
1712
|
+
declare enum EBlockTag {
|
|
1713
|
+
LATEST = "latest",
|
|
1714
|
+
PENDING = "pending"
|
|
1715
|
+
}
|
|
1716
|
+
declare enum EDataAvailabilityMode {
|
|
1717
|
+
L1 = "L1",
|
|
1718
|
+
L2 = "L2"
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
type Methods = ReadMethods & WriteMethods & TraceMethods;
|
|
1722
|
+
type ReadMethods = {
|
|
1723
|
+
starknet_specVersion: {
|
|
1724
|
+
params: [];
|
|
1725
|
+
result: string;
|
|
1160
1726
|
};
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
starknet_getBlockWithTxHashes: {
|
|
1165
|
-
params: {
|
|
1166
|
-
block_id: BLOCK_ID;
|
|
1167
|
-
};
|
|
1168
|
-
result: BlockWithTxHashes;
|
|
1169
|
-
errors: Errors.BLOCK_NOT_FOUND;
|
|
1170
|
-
};
|
|
1171
|
-
starknet_getBlockWithTxs: {
|
|
1172
|
-
params: {
|
|
1173
|
-
block_id: BLOCK_ID;
|
|
1174
|
-
};
|
|
1175
|
-
result: BlockWithTxs;
|
|
1176
|
-
errors: Errors.BLOCK_NOT_FOUND;
|
|
1177
|
-
};
|
|
1178
|
-
starknet_getStateUpdate: {
|
|
1179
|
-
params: {
|
|
1180
|
-
block_id: BLOCK_ID;
|
|
1181
|
-
};
|
|
1182
|
-
result: StateUpdate;
|
|
1183
|
-
errors: Errors.BLOCK_NOT_FOUND;
|
|
1727
|
+
starknet_getBlockWithTxHashes: {
|
|
1728
|
+
params: {
|
|
1729
|
+
block_id: BLOCK_ID;
|
|
1184
1730
|
};
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
result: Storage;
|
|
1192
|
-
errors: Errors.CONTRACT_NOT_FOUND | Errors.BLOCK_NOT_FOUND;
|
|
1193
|
-
};
|
|
1194
|
-
starknet_getTransactionByHash: {
|
|
1195
|
-
params: {
|
|
1196
|
-
transaction_hash: TXN_HASH;
|
|
1197
|
-
};
|
|
1198
|
-
result: TransactionWithHash;
|
|
1199
|
-
errors: Errors.TXN_HASH_NOT_FOUND;
|
|
1200
|
-
};
|
|
1201
|
-
starknet_getTransactionByBlockIdAndIndex: {
|
|
1202
|
-
params: {
|
|
1203
|
-
block_id: BLOCK_ID;
|
|
1204
|
-
index: number;
|
|
1205
|
-
};
|
|
1206
|
-
result: TransactionWithHash;
|
|
1207
|
-
errors: Errors.BLOCK_NOT_FOUND | Errors.INVALID_TXN_INDEX;
|
|
1208
|
-
};
|
|
1209
|
-
starknet_getTransactionReceipt: {
|
|
1210
|
-
params: {
|
|
1211
|
-
transaction_hash: TXN_HASH;
|
|
1212
|
-
};
|
|
1213
|
-
result: TransactionReceipt;
|
|
1214
|
-
errors: Errors.TXN_HASH_NOT_FOUND;
|
|
1731
|
+
result: BlockWithTxHashes;
|
|
1732
|
+
errors: BLOCK_NOT_FOUND;
|
|
1733
|
+
};
|
|
1734
|
+
starknet_getBlockWithTxs: {
|
|
1735
|
+
params: {
|
|
1736
|
+
block_id: BLOCK_ID;
|
|
1215
1737
|
};
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
errors: Errors.BLOCK_NOT_FOUND | Errors.CLASS_HASH_NOT_FOUND;
|
|
1738
|
+
result: BlockWithTxs;
|
|
1739
|
+
errors: BLOCK_NOT_FOUND;
|
|
1740
|
+
};
|
|
1741
|
+
starknet_getStateUpdate: {
|
|
1742
|
+
params: {
|
|
1743
|
+
block_id: BLOCK_ID;
|
|
1223
1744
|
};
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1745
|
+
result: STATE_UPDATE | PENDING_STATE_UPDATE;
|
|
1746
|
+
errors: BLOCK_NOT_FOUND;
|
|
1747
|
+
};
|
|
1748
|
+
starknet_getStorageAt: {
|
|
1749
|
+
params: {
|
|
1750
|
+
contract_address: ADDRESS;
|
|
1751
|
+
key: STORAGE_KEY;
|
|
1752
|
+
block_id: BLOCK_ID;
|
|
1231
1753
|
};
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
errors: Errors.BLOCK_NOT_FOUND | Errors.CONTRACT_NOT_FOUND;
|
|
1754
|
+
result: FELT;
|
|
1755
|
+
errors: CONTRACT_NOT_FOUND | BLOCK_NOT_FOUND;
|
|
1756
|
+
};
|
|
1757
|
+
starknet_getTransactionStatus: {
|
|
1758
|
+
params: {
|
|
1759
|
+
transaction_hash: TXN_HASH;
|
|
1239
1760
|
};
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1761
|
+
result: TransactionStatus;
|
|
1762
|
+
errors: TXN_HASH_NOT_FOUND;
|
|
1763
|
+
};
|
|
1764
|
+
starknet_getTransactionByHash: {
|
|
1765
|
+
params: {
|
|
1766
|
+
transaction_hash: TXN_HASH;
|
|
1246
1767
|
};
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1768
|
+
result: TransactionWithHash;
|
|
1769
|
+
errors: TXN_HASH_NOT_FOUND;
|
|
1770
|
+
};
|
|
1771
|
+
starknet_getTransactionByBlockIdAndIndex: {
|
|
1772
|
+
params: {
|
|
1773
|
+
block_id: BLOCK_ID;
|
|
1774
|
+
index: number;
|
|
1254
1775
|
};
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
errors: Errors.CONTRACT_NOT_FOUND | Errors.CONTRACT_ERROR | Errors.BLOCK_NOT_FOUND;
|
|
1776
|
+
result: TransactionWithHash;
|
|
1777
|
+
errors: BLOCK_NOT_FOUND | INVALID_TXN_INDEX;
|
|
1778
|
+
};
|
|
1779
|
+
starknet_getTransactionReceipt: {
|
|
1780
|
+
params: {
|
|
1781
|
+
transaction_hash: TXN_HASH;
|
|
1262
1782
|
};
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
block_id: BLOCK_ID;
|
|
1271
|
-
};
|
|
1272
|
-
result: FEE_ESTIMATE;
|
|
1273
|
-
errors: Errors.CONTRACT_NOT_FOUND | Errors.CONTRACT_ERROR | Errors.BLOCK_NOT_FOUND;
|
|
1783
|
+
result: TransactionReceipt;
|
|
1784
|
+
errors: TXN_HASH_NOT_FOUND;
|
|
1785
|
+
};
|
|
1786
|
+
starknet_getClass: {
|
|
1787
|
+
params: {
|
|
1788
|
+
block_id: BLOCK_ID;
|
|
1789
|
+
class_hash: FELT;
|
|
1274
1790
|
};
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1791
|
+
result: ContractClass;
|
|
1792
|
+
errors: BLOCK_NOT_FOUND | CLASS_HASH_NOT_FOUND;
|
|
1793
|
+
};
|
|
1794
|
+
starknet_getClassHashAt: {
|
|
1795
|
+
params: {
|
|
1796
|
+
block_id: BLOCK_ID;
|
|
1797
|
+
contract_address: ADDRESS;
|
|
1279
1798
|
};
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1799
|
+
result: FELT;
|
|
1800
|
+
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1801
|
+
};
|
|
1802
|
+
starknet_getClassAt: {
|
|
1803
|
+
params: {
|
|
1804
|
+
block_id: BLOCK_ID;
|
|
1805
|
+
contract_address: ADDRESS;
|
|
1284
1806
|
};
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1807
|
+
result: ContractClass;
|
|
1808
|
+
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1809
|
+
};
|
|
1810
|
+
starknet_getBlockTransactionCount: {
|
|
1811
|
+
params: {
|
|
1812
|
+
block_id: BLOCK_ID;
|
|
1288
1813
|
};
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1814
|
+
result: number;
|
|
1815
|
+
errors: BLOCK_NOT_FOUND;
|
|
1816
|
+
};
|
|
1817
|
+
starknet_call: {
|
|
1818
|
+
params: {
|
|
1819
|
+
request: FUNCTION_CALL;
|
|
1820
|
+
block_id: BLOCK_ID;
|
|
1292
1821
|
};
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1822
|
+
result: FELT[];
|
|
1823
|
+
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1824
|
+
};
|
|
1825
|
+
starknet_estimateFee: {
|
|
1826
|
+
params: {
|
|
1827
|
+
request: BROADCASTED_TXN[];
|
|
1828
|
+
block_id: BLOCK_ID;
|
|
1296
1829
|
};
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1830
|
+
result: FeeEstimate[];
|
|
1831
|
+
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1832
|
+
};
|
|
1833
|
+
starknet_estimateMessageFee: {
|
|
1834
|
+
params: {
|
|
1835
|
+
message: MSG_FROM_L1;
|
|
1836
|
+
block_id: BLOCK_ID;
|
|
1303
1837
|
};
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1838
|
+
result: FeeEstimate;
|
|
1839
|
+
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1840
|
+
};
|
|
1841
|
+
starknet_blockNumber: {
|
|
1842
|
+
params: [];
|
|
1843
|
+
result: BLOCK_NUMBER;
|
|
1844
|
+
errors: NO_BLOCKS;
|
|
1845
|
+
};
|
|
1846
|
+
starknet_blockHashAndNumber: {
|
|
1847
|
+
params: [];
|
|
1848
|
+
result: BlockHashAndNumber;
|
|
1849
|
+
errors: NO_BLOCKS;
|
|
1850
|
+
};
|
|
1851
|
+
starknet_chainId: {
|
|
1852
|
+
params: [];
|
|
1853
|
+
result: CHAIN_ID;
|
|
1854
|
+
};
|
|
1855
|
+
starknet_syncing: {
|
|
1856
|
+
params: [];
|
|
1857
|
+
result: Syncing;
|
|
1858
|
+
};
|
|
1859
|
+
starknet_getEvents: {
|
|
1860
|
+
params: {
|
|
1861
|
+
filter: EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
1311
1862
|
};
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1863
|
+
result: Events;
|
|
1864
|
+
errors: PAGE_SIZE_TOO_BIG | INVALID_CONTINUATION_TOKEN | BLOCK_NOT_FOUND | TOO_MANY_KEYS_IN_FILTER;
|
|
1865
|
+
};
|
|
1866
|
+
starknet_getNonce: {
|
|
1867
|
+
params: {
|
|
1868
|
+
block_id: BLOCK_ID;
|
|
1869
|
+
contract_address: ADDRESS;
|
|
1318
1870
|
};
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1871
|
+
result: Nonce$2;
|
|
1872
|
+
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1873
|
+
};
|
|
1874
|
+
};
|
|
1875
|
+
type WriteMethods = {
|
|
1876
|
+
starknet_addInvokeTransaction: {
|
|
1877
|
+
params: {
|
|
1878
|
+
invoke_transaction: BROADCASTED_INVOKE_TXN;
|
|
1325
1879
|
};
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
contract_address: FELT;
|
|
1333
|
-
};
|
|
1334
|
-
errors: Errors.INSUFFICIENT_ACCOUNT_BALANCE | Errors.INSUFFICIENT_MAX_FEE | Errors.INVALID_TRANSACTION_NONCE | Errors.VALIDATION_FAILURE | Errors.NON_ACCOUNT | Errors.CLASS_HASH_NOT_FOUND | Errors.DUPLICATE_TX | Errors.UNSUPPORTED_TX_VERSION | Errors.UNEXPECTED_ERROR;
|
|
1880
|
+
result: InvokedTransaction;
|
|
1881
|
+
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
1882
|
+
};
|
|
1883
|
+
starknet_addDeclareTransaction: {
|
|
1884
|
+
params: {
|
|
1885
|
+
declare_transaction: BROADCASTED_DECLARE_TXN;
|
|
1335
1886
|
};
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1887
|
+
result: DeclaredTransaction;
|
|
1888
|
+
errors: CLASS_ALREADY_DECLARED | COMPILATION_FAILED | COMPILED_CLASS_HASH_MISMATCH | INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | CONTRACT_CLASS_SIZE_IS_TOO_LARGE | UNSUPPORTED_TX_VERSION | UNSUPPORTED_CONTRACT_CLASS_VERSION | UNEXPECTED_ERROR;
|
|
1889
|
+
};
|
|
1890
|
+
starknet_addDeployAccountTransaction: {
|
|
1891
|
+
params: {
|
|
1892
|
+
deploy_account_transaction: BROADCASTED_DEPLOY_ACCOUNT_TXN;
|
|
1342
1893
|
};
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1894
|
+
result: DeployedAccountTransaction;
|
|
1895
|
+
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | CLASS_HASH_NOT_FOUND | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
1896
|
+
};
|
|
1897
|
+
};
|
|
1898
|
+
type TraceMethods = {
|
|
1899
|
+
starknet_traceTransaction: {
|
|
1900
|
+
params: {
|
|
1901
|
+
transaction_hash: TXN_HASH;
|
|
1349
1902
|
};
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
block_id: BLOCK_ID;
|
|
1357
|
-
transactions: Array<BaseTransaction>;
|
|
1358
|
-
simulation_flags: Array<SIMULATION_FLAG$1>;
|
|
1359
|
-
};
|
|
1360
|
-
result: SimulatedTransactions;
|
|
1361
|
-
errors: Errors.CONTRACT_NOT_FOUND | Errors.CONTRACT_ERROR | Errors.BLOCK_NOT_FOUND;
|
|
1903
|
+
result: TransactionTrace;
|
|
1904
|
+
errors: INVALID_TXN_HASH | NO_TRACE_AVAILABLE;
|
|
1905
|
+
};
|
|
1906
|
+
starknet_traceBlockTransactions: {
|
|
1907
|
+
params: {
|
|
1908
|
+
block_id: BLOCK_ID;
|
|
1362
1909
|
};
|
|
1910
|
+
result: BlockTransactionsTraces;
|
|
1911
|
+
errors: BLOCK_NOT_FOUND;
|
|
1363
1912
|
};
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
}
|
|
1370
|
-
interface NO_TRACE_AVAILABLE {
|
|
1371
|
-
code: 10;
|
|
1372
|
-
message: 'No trace available for transaction';
|
|
1373
|
-
data: {
|
|
1374
|
-
status: 'RECEIVED' | 'REJECTED';
|
|
1913
|
+
starknet_simulateTransactions: {
|
|
1914
|
+
params: {
|
|
1915
|
+
block_id: BLOCK_ID;
|
|
1916
|
+
transactions: Array<BROADCASTED_TXN>;
|
|
1917
|
+
simulation_flags: Array<SIMULATION_FLAG$1>;
|
|
1375
1918
|
};
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
code: 20;
|
|
1379
|
-
message: 'Contract not found';
|
|
1380
|
-
}
|
|
1381
|
-
interface INVALID_MESSAGE_SELECTOR {
|
|
1382
|
-
code: 21;
|
|
1383
|
-
message: 'Invalid message selector';
|
|
1384
|
-
}
|
|
1385
|
-
interface INVALID_CALL_DATA {
|
|
1386
|
-
code: 22;
|
|
1387
|
-
message: 'Invalid call data';
|
|
1388
|
-
}
|
|
1389
|
-
interface BLOCK_NOT_FOUND {
|
|
1390
|
-
code: 24;
|
|
1391
|
-
message: 'Block not found';
|
|
1392
|
-
}
|
|
1393
|
-
interface INVALID_TXN_HASH {
|
|
1394
|
-
code: 25;
|
|
1395
|
-
message: 'Invalid transaction hash';
|
|
1396
|
-
}
|
|
1397
|
-
interface INVALID_BLOCK_HASH {
|
|
1398
|
-
code: 26;
|
|
1399
|
-
message: 'Invalid block hash';
|
|
1400
|
-
}
|
|
1401
|
-
interface INVALID_TXN_INDEX {
|
|
1402
|
-
code: 27;
|
|
1403
|
-
message: 'Invalid transaction index in a block';
|
|
1404
|
-
}
|
|
1405
|
-
interface CLASS_HASH_NOT_FOUND {
|
|
1406
|
-
code: 28;
|
|
1407
|
-
message: 'Class hash not found';
|
|
1408
|
-
}
|
|
1409
|
-
interface TXN_HASH_NOT_FOUND {
|
|
1410
|
-
code: 29;
|
|
1411
|
-
message: 'Transaction hash not found';
|
|
1412
|
-
}
|
|
1413
|
-
interface PAGE_SIZE_TOO_BIG {
|
|
1414
|
-
code: 31;
|
|
1415
|
-
message: 'Requested page size is too big';
|
|
1416
|
-
}
|
|
1417
|
-
interface NO_BLOCKS {
|
|
1418
|
-
code: 32;
|
|
1419
|
-
message: 'There are no blocks';
|
|
1420
|
-
}
|
|
1421
|
-
interface INVALID_CONTINUATION_TOKEN {
|
|
1422
|
-
code: 33;
|
|
1423
|
-
message: 'The supplied continuation token is invalid or unknown';
|
|
1424
|
-
}
|
|
1425
|
-
interface TOO_MANY_KEYS_IN_FILTER {
|
|
1426
|
-
code: 34;
|
|
1427
|
-
message: 'Too many keys provided in a filter';
|
|
1428
|
-
}
|
|
1429
|
-
interface CONTRACT_ERROR {
|
|
1430
|
-
code: 40;
|
|
1431
|
-
message: 'Contract error';
|
|
1432
|
-
}
|
|
1433
|
-
interface CLASS_ALREADY_DECLARED {
|
|
1434
|
-
code: 51;
|
|
1435
|
-
message: 'Class already declared';
|
|
1436
|
-
}
|
|
1437
|
-
interface INVALID_TRANSACTION_NONCE {
|
|
1438
|
-
code: 52;
|
|
1439
|
-
message: 'Invalid transaction nonce';
|
|
1440
|
-
}
|
|
1441
|
-
interface INSUFFICIENT_MAX_FEE {
|
|
1442
|
-
code: 53;
|
|
1443
|
-
message: 'Max fee is smaller than the minimal transaction cost (validation plus fee transfer)';
|
|
1444
|
-
}
|
|
1445
|
-
interface INSUFFICIENT_ACCOUNT_BALANCE {
|
|
1446
|
-
code: 54;
|
|
1447
|
-
message: "Account balance is smaller than the transaction's max_fee";
|
|
1448
|
-
}
|
|
1449
|
-
interface VALIDATION_FAILURE {
|
|
1450
|
-
code: 55;
|
|
1451
|
-
message: 'Account validation failed';
|
|
1452
|
-
}
|
|
1453
|
-
interface COMPILATION_FAILED {
|
|
1454
|
-
code: 56;
|
|
1455
|
-
message: 'Compilation failed';
|
|
1456
|
-
}
|
|
1457
|
-
interface CONTRACT_CLASS_SIZE_IS_TOO_LARGE {
|
|
1458
|
-
code: 57;
|
|
1459
|
-
message: 'Contract class size it too large';
|
|
1460
|
-
}
|
|
1461
|
-
interface NON_ACCOUNT {
|
|
1462
|
-
code: 58;
|
|
1463
|
-
message: 'Sender address in not an account contract';
|
|
1464
|
-
}
|
|
1465
|
-
interface DUPLICATE_TX {
|
|
1466
|
-
code: 59;
|
|
1467
|
-
message: 'A transaction with the same hash already exists in the mempool';
|
|
1468
|
-
}
|
|
1469
|
-
interface COMPILED_CLASS_HASH_MISMATCH {
|
|
1470
|
-
code: 60;
|
|
1471
|
-
message: 'the compiled class hash did not match the one supplied in the transaction';
|
|
1472
|
-
}
|
|
1473
|
-
interface UNSUPPORTED_TX_VERSION {
|
|
1474
|
-
code: 61;
|
|
1475
|
-
message: 'the transaction version is not supported';
|
|
1476
|
-
}
|
|
1477
|
-
interface UNSUPPORTED_CONTRACT_CLASS_VERSION {
|
|
1478
|
-
code: 62;
|
|
1479
|
-
message: 'the contract class version is not supported';
|
|
1480
|
-
}
|
|
1481
|
-
interface UNEXPECTED_ERROR {
|
|
1482
|
-
code: 63;
|
|
1483
|
-
message: 'An unexpected error occured';
|
|
1484
|
-
data: string;
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
type Response = {
|
|
1489
|
-
id: number;
|
|
1490
|
-
jsonrpc: string;
|
|
1491
|
-
result?: any;
|
|
1492
|
-
error?: {
|
|
1493
|
-
code: string;
|
|
1494
|
-
message: string;
|
|
1919
|
+
result: SimulateTransactionResponse$2;
|
|
1920
|
+
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1495
1921
|
};
|
|
1496
1922
|
};
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
type
|
|
1507
|
-
type
|
|
1508
|
-
type
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
type
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
type
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
type
|
|
1520
|
-
type
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
type
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
type
|
|
1528
|
-
type
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
type
|
|
1536
|
-
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* TypeScript Representation of Cairo1 v2+ Starknet Contract ABI
|
|
1926
|
+
*
|
|
1927
|
+
* starknet_metadata.json - tags/v0.5.0
|
|
1928
|
+
*
|
|
1929
|
+
* 'starknet-specs' (OpenRpc protocol types)
|
|
1930
|
+
* https://github.com/starkware-libs/starknet-specs
|
|
1931
|
+
*/
|
|
1932
|
+
type ABI = Array<FUNCTION | CONSTRUCTOR | L1_HANDLER | EVENT | STRUCT | ENUM | INTERFACE | IMPL>;
|
|
1933
|
+
type FUNCTION = {
|
|
1934
|
+
type: 'function';
|
|
1935
|
+
name: string;
|
|
1936
|
+
inputs: Array<{
|
|
1937
|
+
name: string;
|
|
1938
|
+
type: string;
|
|
1939
|
+
}>;
|
|
1940
|
+
outputs?: Array<{
|
|
1941
|
+
type: string;
|
|
1942
|
+
}>;
|
|
1943
|
+
state_mutability: 'view' | 'external';
|
|
1944
|
+
};
|
|
1945
|
+
type CONSTRUCTOR = {
|
|
1946
|
+
type: 'constructor';
|
|
1947
|
+
name: 'constructor';
|
|
1948
|
+
inputs: Array<{
|
|
1949
|
+
name: string;
|
|
1950
|
+
type: string;
|
|
1951
|
+
}>;
|
|
1952
|
+
};
|
|
1953
|
+
type L1_HANDLER = {
|
|
1954
|
+
type: 'l1_handler';
|
|
1955
|
+
name: string;
|
|
1956
|
+
inputs: Array<{
|
|
1957
|
+
name: string;
|
|
1958
|
+
type: string;
|
|
1959
|
+
}>;
|
|
1960
|
+
outputs?: Array<{
|
|
1961
|
+
type: string;
|
|
1962
|
+
}>;
|
|
1963
|
+
state_mutability: 'view' | 'external';
|
|
1964
|
+
};
|
|
1965
|
+
type EVENT = {
|
|
1966
|
+
type: 'event';
|
|
1967
|
+
name: string;
|
|
1968
|
+
} & (ENUM_EVENT | STRUCT_EVENT);
|
|
1969
|
+
type STRUCT_EVENT = {
|
|
1970
|
+
kind: 'struct';
|
|
1971
|
+
members: Array<EVENT_FIELD>;
|
|
1972
|
+
};
|
|
1973
|
+
type ENUM_EVENT = {
|
|
1974
|
+
kind: 'enum';
|
|
1975
|
+
variants: Array<EVENT_FIELD>;
|
|
1976
|
+
};
|
|
1977
|
+
type STRUCT = {
|
|
1978
|
+
type: 'struct';
|
|
1979
|
+
name: string;
|
|
1980
|
+
members: Array<{
|
|
1981
|
+
name: string;
|
|
1982
|
+
type: string;
|
|
1983
|
+
}>;
|
|
1984
|
+
};
|
|
1985
|
+
type ENUM = {
|
|
1986
|
+
type: 'enum';
|
|
1987
|
+
name: string;
|
|
1988
|
+
variants: Array<{
|
|
1989
|
+
name: string;
|
|
1990
|
+
type: string;
|
|
1991
|
+
}>;
|
|
1992
|
+
};
|
|
1993
|
+
type INTERFACE = {
|
|
1994
|
+
type: 'interface';
|
|
1995
|
+
name: string;
|
|
1996
|
+
items: Array<FUNCTION>;
|
|
1997
|
+
};
|
|
1998
|
+
type IMPL = {
|
|
1999
|
+
type: 'impl';
|
|
2000
|
+
name: string;
|
|
2001
|
+
interface_name: string;
|
|
2002
|
+
};
|
|
2003
|
+
type EVENT_FIELD = {
|
|
2004
|
+
name: string;
|
|
2005
|
+
type: string;
|
|
2006
|
+
kind: 'key' | 'data' | 'nested';
|
|
1537
2007
|
};
|
|
1538
|
-
type StorageDiffs$1 = Array<CONTRACT_STORAGE_DIFF_ITEM>;
|
|
1539
|
-
type DeprecatedDeclaredClasses = Array<FELT>;
|
|
1540
|
-
type Nonces$1 = Array<{
|
|
1541
|
-
contract_address: ADDRESS;
|
|
1542
|
-
nonce: FELT;
|
|
1543
|
-
}>;
|
|
1544
|
-
type ReplacedClasses$1 = Array<{
|
|
1545
|
-
contract_address: ADDRESS;
|
|
1546
|
-
class_hash: FELT;
|
|
1547
|
-
}>;
|
|
1548
2008
|
|
|
2009
|
+
type rpc_ABI = ABI;
|
|
1549
2010
|
type rpc_BaseTransaction = BaseTransaction;
|
|
1550
2011
|
type rpc_BlockHash = BlockHash;
|
|
1551
2012
|
type rpc_BlockHashAndNumber = BlockHashAndNumber;
|
|
1552
|
-
type
|
|
2013
|
+
type rpc_BlockTransactionsTraces = BlockTransactionsTraces;
|
|
2014
|
+
type rpc_BlockWithTxHashes = BlockWithTxHashes;
|
|
2015
|
+
type rpc_BlockWithTxs = BlockWithTxs;
|
|
1553
2016
|
type rpc_ChainId = ChainId;
|
|
1554
2017
|
type rpc_ContractAddress = ContractAddress;
|
|
1555
2018
|
type rpc_ContractClass = ContractClass;
|
|
1556
2019
|
type rpc_DeclaredTransaction = DeclaredTransaction;
|
|
1557
|
-
type
|
|
2020
|
+
type rpc_DeployedAccountTransaction = DeployedAccountTransaction;
|
|
1558
2021
|
type rpc_DeprecatedDeclaredClasses = DeprecatedDeclaredClasses;
|
|
1559
|
-
type
|
|
2022
|
+
type rpc_EBlockTag = EBlockTag;
|
|
2023
|
+
declare const rpc_EBlockTag: typeof EBlockTag;
|
|
2024
|
+
type rpc_EDataAvailabilityMode = EDataAvailabilityMode;
|
|
2025
|
+
declare const rpc_EDataAvailabilityMode: typeof EDataAvailabilityMode;
|
|
2026
|
+
type rpc_ESimulationFlag = ESimulationFlag;
|
|
2027
|
+
declare const rpc_ESimulationFlag: typeof ESimulationFlag;
|
|
2028
|
+
type rpc_ETransactionExecutionStatus = ETransactionExecutionStatus;
|
|
2029
|
+
declare const rpc_ETransactionExecutionStatus: typeof ETransactionExecutionStatus;
|
|
2030
|
+
type rpc_ETransactionFinalityStatus = ETransactionFinalityStatus;
|
|
2031
|
+
declare const rpc_ETransactionFinalityStatus: typeof ETransactionFinalityStatus;
|
|
2032
|
+
type rpc_ETransactionStatus = ETransactionStatus;
|
|
2033
|
+
declare const rpc_ETransactionStatus: typeof ETransactionStatus;
|
|
2034
|
+
type rpc_ETransactionType = ETransactionType;
|
|
2035
|
+
declare const rpc_ETransactionType: typeof ETransactionType;
|
|
1560
2036
|
type rpc_EventFilter = EventFilter;
|
|
2037
|
+
type rpc_Events = Events;
|
|
2038
|
+
type rpc_FeeEstimate = FeeEstimate;
|
|
1561
2039
|
type rpc_Felt = Felt;
|
|
1562
|
-
type rpc_GetBlockNumberResponse = GetBlockNumberResponse;
|
|
1563
|
-
type rpc_GetBlockWithTxHashesResponse = GetBlockWithTxHashesResponse;
|
|
1564
|
-
type rpc_GetBlockWithTxs = GetBlockWithTxs;
|
|
1565
|
-
type rpc_GetEventsResponse = GetEventsResponse;
|
|
1566
|
-
type rpc_GetStorageAtResponse = GetStorageAtResponse;
|
|
1567
|
-
type rpc_GetSyncingStatsResponse = GetSyncingStatsResponse;
|
|
1568
|
-
type rpc_GetTransactionByBlockIdAndIndex = GetTransactionByBlockIdAndIndex;
|
|
1569
|
-
type rpc_GetTransactionByHashResponse = GetTransactionByHashResponse;
|
|
1570
|
-
type rpc_GetTransactionCountResponse = GetTransactionCountResponse;
|
|
1571
2040
|
type rpc_InvokedTransaction = InvokedTransaction;
|
|
2041
|
+
type rpc_L1Message = L1Message;
|
|
1572
2042
|
type rpc_Methods = Methods;
|
|
1573
|
-
type
|
|
1574
|
-
type rpc_Response = Response;
|
|
1575
|
-
declare const rpc_SimulationFlag: typeof SimulationFlag;
|
|
2043
|
+
type rpc_NonceUpdates = NonceUpdates;
|
|
1576
2044
|
type rpc_StateUpdate = StateUpdate;
|
|
1577
|
-
type
|
|
1578
|
-
type rpc_Traces = Traces;
|
|
1579
|
-
declare const rpc_TransactionExecutionStatus: typeof TransactionExecutionStatus;
|
|
1580
|
-
declare const rpc_TransactionFinalityStatus: typeof TransactionFinalityStatus;
|
|
2045
|
+
type rpc_Syncing = Syncing;
|
|
1581
2046
|
type rpc_TransactionHash = TransactionHash;
|
|
1582
2047
|
type rpc_TransactionReceipt = TransactionReceipt;
|
|
1583
|
-
|
|
2048
|
+
type rpc_TransactionStatus = TransactionStatus;
|
|
2049
|
+
type rpc_TransactionTrace = TransactionTrace;
|
|
2050
|
+
type rpc_TransactionWithHash = TransactionWithHash;
|
|
1584
2051
|
declare namespace rpc {
|
|
1585
2052
|
export {
|
|
2053
|
+
rpc_ABI as ABI,
|
|
1586
2054
|
rpc_BaseTransaction as BaseTransaction,
|
|
1587
2055
|
rpc_BlockHash as BlockHash,
|
|
1588
2056
|
rpc_BlockHashAndNumber as BlockHashAndNumber,
|
|
1589
|
-
|
|
2057
|
+
rpc_BlockTransactionsTraces as BlockTransactionsTraces,
|
|
2058
|
+
rpc_BlockWithTxHashes as BlockWithTxHashes,
|
|
2059
|
+
rpc_BlockWithTxs as BlockWithTxs,
|
|
1590
2060
|
rpc_ChainId as ChainId,
|
|
1591
2061
|
rpc_ContractAddress as ContractAddress,
|
|
1592
2062
|
rpc_ContractClass as ContractClass,
|
|
1593
2063
|
rpc_DeclaredTransaction as DeclaredTransaction,
|
|
1594
|
-
|
|
2064
|
+
rpc_DeployedAccountTransaction as DeployedAccountTransaction,
|
|
1595
2065
|
rpc_DeprecatedDeclaredClasses as DeprecatedDeclaredClasses,
|
|
1596
|
-
|
|
1597
|
-
|
|
2066
|
+
rpc_EBlockTag as EBlockTag,
|
|
2067
|
+
rpc_EDataAvailabilityMode as EDataAvailabilityMode,
|
|
2068
|
+
rpc_ESimulationFlag as ESimulationFlag,
|
|
2069
|
+
rpc_ETransactionExecutionStatus as ETransactionExecutionStatus,
|
|
2070
|
+
rpc_ETransactionFinalityStatus as ETransactionFinalityStatus,
|
|
2071
|
+
rpc_ETransactionStatus as ETransactionStatus,
|
|
2072
|
+
rpc_ETransactionType as ETransactionType,
|
|
2073
|
+
errors as Errors,
|
|
1598
2074
|
rpc_EventFilter as EventFilter,
|
|
2075
|
+
rpc_Events as Events,
|
|
2076
|
+
rpc_FeeEstimate as FeeEstimate,
|
|
1599
2077
|
rpc_Felt as Felt,
|
|
1600
|
-
rpc_GetBlockNumberResponse as GetBlockNumberResponse,
|
|
1601
|
-
rpc_GetBlockWithTxHashesResponse as GetBlockWithTxHashesResponse,
|
|
1602
|
-
rpc_GetBlockWithTxs as GetBlockWithTxs,
|
|
1603
|
-
rpc_GetEventsResponse as GetEventsResponse,
|
|
1604
|
-
rpc_GetStorageAtResponse as GetStorageAtResponse,
|
|
1605
|
-
rpc_GetSyncingStatsResponse as GetSyncingStatsResponse,
|
|
1606
|
-
rpc_GetTransactionByBlockIdAndIndex as GetTransactionByBlockIdAndIndex,
|
|
1607
|
-
rpc_GetTransactionByHashResponse as GetTransactionByHashResponse,
|
|
1608
|
-
rpc_GetTransactionCountResponse as GetTransactionCountResponse,
|
|
1609
2078
|
rpc_InvokedTransaction as InvokedTransaction,
|
|
2079
|
+
index$2 as JRPC,
|
|
2080
|
+
rpc_L1Message as L1Message,
|
|
1610
2081
|
rpc_Methods as Methods,
|
|
1611
2082
|
Nonce$2 as Nonce,
|
|
1612
|
-
|
|
1613
|
-
rpc_PendingTransactions as PendingTransactions,
|
|
2083
|
+
rpc_NonceUpdates as NonceUpdates,
|
|
1614
2084
|
ReplacedClasses$1 as ReplacedClasses,
|
|
1615
|
-
|
|
2085
|
+
components as SPEC,
|
|
1616
2086
|
SimulateTransactionResponse$2 as SimulateTransactionResponse,
|
|
1617
|
-
rpc_SimulationFlag as SimulationFlag,
|
|
1618
2087
|
SimulationFlags$1 as SimulationFlags,
|
|
1619
2088
|
rpc_StateUpdate as StateUpdate,
|
|
1620
|
-
Storage$2 as Storage,
|
|
1621
2089
|
StorageDiffs$1 as StorageDiffs,
|
|
1622
|
-
|
|
1623
|
-
rpc_Traces as Traces,
|
|
2090
|
+
rpc_Syncing as Syncing,
|
|
1624
2091
|
Transaction$1 as Transaction,
|
|
1625
|
-
rpc_TransactionExecutionStatus as TransactionExecutionStatus,
|
|
1626
|
-
rpc_TransactionFinalityStatus as TransactionFinalityStatus,
|
|
1627
2092
|
rpc_TransactionHash as TransactionHash,
|
|
1628
2093
|
rpc_TransactionReceipt as TransactionReceipt,
|
|
1629
|
-
|
|
2094
|
+
rpc_TransactionStatus as TransactionStatus,
|
|
2095
|
+
rpc_TransactionTrace as TransactionTrace,
|
|
2096
|
+
rpc_TransactionWithHash as TransactionWithHash,
|
|
1630
2097
|
};
|
|
1631
2098
|
}
|
|
1632
2099
|
|
|
1633
2100
|
type GetTransactionStatusResponse = {
|
|
1634
|
-
tx_status: TransactionStatus;
|
|
1635
|
-
execution_status: TransactionExecutionStatus
|
|
1636
|
-
finality_status: TransactionFinalityStatus
|
|
2101
|
+
tx_status: TransactionStatus$1;
|
|
2102
|
+
execution_status: TransactionExecutionStatus;
|
|
2103
|
+
finality_status: TransactionFinalityStatus;
|
|
1637
2104
|
block_hash?: string;
|
|
1638
2105
|
tx_failure_reason?: {
|
|
1639
2106
|
code: string;
|
|
@@ -1694,7 +2161,7 @@ type TransactionTraceResponse = {
|
|
|
1694
2161
|
signature: string[];
|
|
1695
2162
|
};
|
|
1696
2163
|
type DeclareTransaction = {
|
|
1697
|
-
type: TransactionType
|
|
2164
|
+
type: TransactionType.DECLARE;
|
|
1698
2165
|
sender_address: string;
|
|
1699
2166
|
contract_class: ContractClass$1;
|
|
1700
2167
|
signature?: string[];
|
|
@@ -1704,14 +2171,14 @@ type DeclareTransaction = {
|
|
|
1704
2171
|
compiled_class_hash?: string;
|
|
1705
2172
|
};
|
|
1706
2173
|
type DeployTransaction = {
|
|
1707
|
-
type: TransactionType
|
|
2174
|
+
type: TransactionType.DEPLOY;
|
|
1708
2175
|
contract_definition: ContractClass$1;
|
|
1709
2176
|
contract_address_salt: BigNumberish;
|
|
1710
2177
|
constructor_calldata: string[];
|
|
1711
2178
|
nonce?: BigNumberish;
|
|
1712
2179
|
};
|
|
1713
2180
|
type DeployAccountTransaction = {
|
|
1714
|
-
type: TransactionType
|
|
2181
|
+
type: TransactionType.DEPLOY_ACCOUNT;
|
|
1715
2182
|
class_hash: string;
|
|
1716
2183
|
contract_address_salt: BigNumberish;
|
|
1717
2184
|
constructor_calldata: string[];
|
|
@@ -1721,7 +2188,7 @@ type DeployAccountTransaction = {
|
|
|
1721
2188
|
nonce?: BigNumberish;
|
|
1722
2189
|
};
|
|
1723
2190
|
type InvokeFunctionTransaction = {
|
|
1724
|
-
type: TransactionType
|
|
2191
|
+
type: TransactionType.INVOKE;
|
|
1725
2192
|
sender_address: string;
|
|
1726
2193
|
signature?: string[];
|
|
1727
2194
|
entry_point_type?: EntryPointType.EXTERNAL;
|
|
@@ -1747,18 +2214,18 @@ interface InvokeFunctionTransactionResponse extends InvokeFunctionTransaction {
|
|
|
1747
2214
|
}
|
|
1748
2215
|
type TransactionResponse = DeclareTransaction | DeployTransaction | InvokeFunctionTransactionResponse;
|
|
1749
2216
|
type SuccessfulTransactionResponse = {
|
|
1750
|
-
execution_status: TransactionExecutionStatus
|
|
1751
|
-
finality_status: TransactionFinalityStatus
|
|
1752
|
-
status: TransactionStatus;
|
|
2217
|
+
execution_status: TransactionExecutionStatus.SUCCEEDED;
|
|
2218
|
+
finality_status: TransactionFinalityStatus;
|
|
2219
|
+
status: TransactionStatus$1;
|
|
1753
2220
|
block_hash: string;
|
|
1754
2221
|
block_number: BlockNumber;
|
|
1755
2222
|
transaction_index: number;
|
|
1756
2223
|
transaction: TransactionResponse;
|
|
1757
2224
|
};
|
|
1758
2225
|
type RevertedTransactionResponse = {
|
|
1759
|
-
execution_status: TransactionExecutionStatus
|
|
1760
|
-
finality_status: TransactionFinalityStatus
|
|
1761
|
-
status: TransactionStatus;
|
|
2226
|
+
execution_status: TransactionExecutionStatus.REVERTED;
|
|
2227
|
+
finality_status: TransactionFinalityStatus;
|
|
2228
|
+
status: TransactionStatus$1;
|
|
1762
2229
|
block_hash: string;
|
|
1763
2230
|
block_number: BlockNumber;
|
|
1764
2231
|
transaction_index: number;
|
|
@@ -1766,7 +2233,7 @@ type RevertedTransactionResponse = {
|
|
|
1766
2233
|
revert_error: string;
|
|
1767
2234
|
};
|
|
1768
2235
|
type FailedTransactionResponse = {
|
|
1769
|
-
status: TransactionStatus.REJECTED;
|
|
2236
|
+
status: TransactionStatus$1.REJECTED;
|
|
1770
2237
|
transaction_failure_reason: {
|
|
1771
2238
|
code: string;
|
|
1772
2239
|
error_message: string;
|
|
@@ -1776,9 +2243,9 @@ type FailedTransactionResponse = {
|
|
|
1776
2243
|
type GetTransactionResponse$1 = SuccessfulTransactionResponse | RevertedTransactionResponse | FailedTransactionResponse;
|
|
1777
2244
|
type TransactionReceiptResponse = SuccessfulTransactionReceiptResponse$1 | RevertedTransactionReceiptResponse$1 | RejectedTransactionReceiptResponse$1;
|
|
1778
2245
|
type SuccessfulTransactionReceiptResponse$1 = {
|
|
1779
|
-
execution_status: TransactionExecutionStatus
|
|
1780
|
-
finality_status: TransactionFinalityStatus
|
|
1781
|
-
status: TransactionStatus;
|
|
2246
|
+
execution_status: TransactionExecutionStatus.SUCCEEDED;
|
|
2247
|
+
finality_status: TransactionFinalityStatus;
|
|
2248
|
+
status: TransactionStatus$1;
|
|
1782
2249
|
actual_fee: string;
|
|
1783
2250
|
block_hash: string;
|
|
1784
2251
|
block_number: BlockNumber;
|
|
@@ -1789,9 +2256,9 @@ type SuccessfulTransactionReceiptResponse$1 = {
|
|
|
1789
2256
|
execution_resources?: ExecutionResources;
|
|
1790
2257
|
};
|
|
1791
2258
|
type RevertedTransactionReceiptResponse$1 = {
|
|
1792
|
-
execution_status: TransactionExecutionStatus
|
|
1793
|
-
finality_status: TransactionFinalityStatus
|
|
1794
|
-
status: TransactionStatus.REVERTED;
|
|
2259
|
+
execution_status: TransactionExecutionStatus.REVERTED;
|
|
2260
|
+
finality_status: TransactionFinalityStatus;
|
|
2261
|
+
status: TransactionStatus$1.REVERTED;
|
|
1795
2262
|
actual_fee: string;
|
|
1796
2263
|
block_hash: string;
|
|
1797
2264
|
block_number: BlockNumber;
|
|
@@ -1802,9 +2269,9 @@ type RevertedTransactionReceiptResponse$1 = {
|
|
|
1802
2269
|
revert_error: string;
|
|
1803
2270
|
};
|
|
1804
2271
|
type RejectedTransactionReceiptResponse$1 = {
|
|
1805
|
-
execution_status: TransactionExecutionStatus
|
|
1806
|
-
finality_status: TransactionFinalityStatus
|
|
1807
|
-
status: TransactionStatus.REJECTED;
|
|
2272
|
+
execution_status: TransactionExecutionStatus.REJECTED;
|
|
2273
|
+
finality_status: TransactionFinalityStatus;
|
|
2274
|
+
status: TransactionStatus$1.REJECTED;
|
|
1808
2275
|
transaction_hash: string;
|
|
1809
2276
|
l2_to_l1_messages: string[];
|
|
1810
2277
|
events: string[];
|
|
@@ -1831,7 +2298,7 @@ type GetBlockResponse$1 = {
|
|
|
1831
2298
|
from_address: string;
|
|
1832
2299
|
}[];
|
|
1833
2300
|
block_number: BlockNumber;
|
|
1834
|
-
status: TransactionStatus;
|
|
2301
|
+
status: TransactionStatus$1;
|
|
1835
2302
|
transaction_index: number;
|
|
1836
2303
|
};
|
|
1837
2304
|
};
|
|
@@ -2223,7 +2690,7 @@ interface MessageToL2 {
|
|
|
2223
2690
|
payload: Array<string>;
|
|
2224
2691
|
}
|
|
2225
2692
|
type RejectedTransactionResponse = {
|
|
2226
|
-
status: `${TransactionStatus.REJECTED}`;
|
|
2693
|
+
status: `${TransactionStatus$1.REJECTED}`;
|
|
2227
2694
|
transaction_failure_reason: {
|
|
2228
2695
|
code: string;
|
|
2229
2696
|
error_message: string;
|
|
@@ -2232,10 +2699,10 @@ type RejectedTransactionResponse = {
|
|
|
2232
2699
|
type GetTransactionReceiptResponse = SuccessfulTransactionReceiptResponse | RevertedTransactionReceiptResponse | RejectedTransactionReceiptResponse;
|
|
2233
2700
|
type SuccessfulTransactionReceiptResponse = InvokeTransactionReceiptResponse | DeployTransactionReceiptResponse | DeclareTransactionReceiptResponse;
|
|
2234
2701
|
interface InvokeTransactionReceiptResponse {
|
|
2235
|
-
type?: TransactionType
|
|
2236
|
-
execution_status: TransactionExecutionStatus
|
|
2237
|
-
finality_status: TransactionFinalityStatus
|
|
2238
|
-
status?: `${TransactionStatus}`;
|
|
2702
|
+
type?: TransactionType;
|
|
2703
|
+
execution_status: TransactionExecutionStatus;
|
|
2704
|
+
finality_status: TransactionFinalityStatus;
|
|
2705
|
+
status?: `${TransactionStatus$1}`;
|
|
2239
2706
|
actual_fee: string;
|
|
2240
2707
|
block_hash: BlockHash;
|
|
2241
2708
|
block_number: BlockNumber;
|
|
@@ -2246,10 +2713,10 @@ interface InvokeTransactionReceiptResponse {
|
|
|
2246
2713
|
execution_resources?: any;
|
|
2247
2714
|
}
|
|
2248
2715
|
type DeclareTransactionReceiptResponse = {
|
|
2249
|
-
type?: TransactionType
|
|
2250
|
-
execution_status: TransactionExecutionStatus
|
|
2251
|
-
finality_status: TransactionFinalityStatus
|
|
2252
|
-
status?: `${TransactionStatus}`;
|
|
2716
|
+
type?: TransactionType;
|
|
2717
|
+
execution_status: TransactionExecutionStatus;
|
|
2718
|
+
finality_status: TransactionFinalityStatus;
|
|
2719
|
+
status?: `${TransactionStatus$1}`;
|
|
2253
2720
|
actual_fee: string;
|
|
2254
2721
|
block_hash: BlockHash;
|
|
2255
2722
|
block_number: BlockNumber;
|
|
@@ -2260,17 +2727,17 @@ type DeclareTransactionReceiptResponse = {
|
|
|
2260
2727
|
};
|
|
2261
2728
|
type DeployTransactionReceiptResponse = InvokeTransactionReceiptResponse;
|
|
2262
2729
|
type RejectedTransactionReceiptResponse = {
|
|
2263
|
-
status: `${TransactionStatus.REJECTED}`;
|
|
2730
|
+
status: `${TransactionStatus$1.REJECTED}`;
|
|
2264
2731
|
transaction_failure_reason: {
|
|
2265
2732
|
code: string;
|
|
2266
2733
|
error_message: string;
|
|
2267
2734
|
};
|
|
2268
2735
|
};
|
|
2269
2736
|
type RevertedTransactionReceiptResponse = {
|
|
2270
|
-
type?: TransactionType
|
|
2271
|
-
execution_status: TransactionExecutionStatus
|
|
2272
|
-
finality_status: TransactionFinalityStatus
|
|
2273
|
-
status?: TransactionStatus;
|
|
2737
|
+
type?: TransactionType | any;
|
|
2738
|
+
execution_status: TransactionExecutionStatus.REVERTED | any;
|
|
2739
|
+
finality_status: TransactionFinalityStatus | any;
|
|
2740
|
+
status?: TransactionStatus$1;
|
|
2274
2741
|
actual_fee: string;
|
|
2275
2742
|
block_hash?: string;
|
|
2276
2743
|
block_number?: BlockNumber;
|
|
@@ -2297,16 +2764,16 @@ type CallContractResponse = {
|
|
|
2297
2764
|
result: Array<string>;
|
|
2298
2765
|
};
|
|
2299
2766
|
type EstimateFeeAction = {
|
|
2300
|
-
type: TransactionType
|
|
2767
|
+
type: TransactionType.INVOKE;
|
|
2301
2768
|
payload: AllowArray<Call>;
|
|
2302
2769
|
} | {
|
|
2303
|
-
type: TransactionType
|
|
2770
|
+
type: TransactionType.DECLARE;
|
|
2304
2771
|
payload: DeclareContractPayload;
|
|
2305
2772
|
} | {
|
|
2306
|
-
type: TransactionType
|
|
2773
|
+
type: TransactionType.DEPLOY_ACCOUNT;
|
|
2307
2774
|
payload: DeployAccountContractPayload;
|
|
2308
2775
|
} | {
|
|
2309
|
-
type: TransactionType
|
|
2776
|
+
type: TransactionType.DEPLOY;
|
|
2310
2777
|
payload: UniversalDeployerContractPayload;
|
|
2311
2778
|
};
|
|
2312
2779
|
type EstimateFeeResponseBulk = Array<EstimateFeeResponse>;
|
|
@@ -2314,8 +2781,8 @@ type Storage = Storage$1;
|
|
|
2314
2781
|
type Nonce = Nonce$1;
|
|
2315
2782
|
type SimulationFlags = SimulationFlags$1;
|
|
2316
2783
|
type SimulatedTransaction = {
|
|
2317
|
-
transaction_trace:
|
|
2318
|
-
fee_estimation:
|
|
2784
|
+
transaction_trace: TransactionTrace | TransactionTraceResponse;
|
|
2785
|
+
fee_estimation: FeeEstimate | EstimateFeeResponse$1;
|
|
2319
2786
|
suggestedMaxFee?: string | bigint;
|
|
2320
2787
|
};
|
|
2321
2788
|
type SimulateTransactionResponse = SimulatedTransaction[];
|
|
@@ -2326,7 +2793,7 @@ interface StateUpdateResponse {
|
|
|
2326
2793
|
state_diff: {
|
|
2327
2794
|
storage_diffs: StorageDiffs$1;
|
|
2328
2795
|
deployed_contracts: DeployedContracts;
|
|
2329
|
-
nonces:
|
|
2796
|
+
nonces: NonceUpdates;
|
|
2330
2797
|
old_declared_contracts?: OldDeclaredContracts;
|
|
2331
2798
|
declared_classes?: DeclaredClasses;
|
|
2332
2799
|
replaced_classes?: ReplacedClasses | ReplacedClasses$1;
|
|
@@ -2630,8 +3097,12 @@ type index$1_StateUpdateResponse = StateUpdateResponse;
|
|
|
2630
3097
|
type index$1_Storage = Storage;
|
|
2631
3098
|
type index$1_StructAbi = StructAbi;
|
|
2632
3099
|
type index$1_SuccessfulTransactionReceiptResponse = SuccessfulTransactionReceiptResponse;
|
|
2633
|
-
type index$
|
|
2634
|
-
declare const index$
|
|
3100
|
+
type index$1_TransactionExecutionStatus = TransactionExecutionStatus;
|
|
3101
|
+
declare const index$1_TransactionExecutionStatus: typeof TransactionExecutionStatus;
|
|
3102
|
+
type index$1_TransactionFinalityStatus = TransactionFinalityStatus;
|
|
3103
|
+
declare const index$1_TransactionFinalityStatus: typeof TransactionFinalityStatus;
|
|
3104
|
+
type index$1_TransactionType = TransactionType;
|
|
3105
|
+
declare const index$1_TransactionType: typeof TransactionType;
|
|
2635
3106
|
type index$1_Tupled = Tupled;
|
|
2636
3107
|
type index$1_TypedData = TypedData;
|
|
2637
3108
|
type index$1_Uint = Uint;
|
|
@@ -2788,10 +3259,10 @@ declare namespace index$1 {
|
|
|
2788
3259
|
index$1_Storage as Storage,
|
|
2789
3260
|
index$1_StructAbi as StructAbi,
|
|
2790
3261
|
index$1_SuccessfulTransactionReceiptResponse as SuccessfulTransactionReceiptResponse,
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
3262
|
+
index$1_TransactionExecutionStatus as TransactionExecutionStatus,
|
|
3263
|
+
index$1_TransactionFinalityStatus as TransactionFinalityStatus,
|
|
3264
|
+
TransactionStatus$1 as TransactionStatus,
|
|
3265
|
+
index$1_TransactionType as TransactionType,
|
|
2795
3266
|
index$1_Tupled as Tupled,
|
|
2796
3267
|
index$1_TypedData as TypedData,
|
|
2797
3268
|
index$1_Uint as Uint,
|
|
@@ -2841,7 +3312,7 @@ declare abstract class ProviderInterface {
|
|
|
2841
3312
|
*/
|
|
2842
3313
|
abstract getClassAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<ContractClassResponse>;
|
|
2843
3314
|
/**
|
|
2844
|
-
* Returns the class hash deployed
|
|
3315
|
+
* Returns the contract class hash in the given block for the contract deployed at the given address
|
|
2845
3316
|
*
|
|
2846
3317
|
* @param contractAddress - contract address
|
|
2847
3318
|
* @param blockIdentifier - block identifier
|
|
@@ -2856,14 +3327,14 @@ declare abstract class ProviderInterface {
|
|
|
2856
3327
|
*/
|
|
2857
3328
|
abstract getClassByHash(classHash: string): Promise<ContractClassResponse>;
|
|
2858
3329
|
/**
|
|
2859
|
-
*
|
|
3330
|
+
* Returns the nonce associated with the given address in the given block
|
|
2860
3331
|
*
|
|
2861
3332
|
* @param contractAddress - contract address
|
|
2862
3333
|
* @returns the hex nonce
|
|
2863
3334
|
*/
|
|
2864
3335
|
abstract getNonceForAddress(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<Nonce>;
|
|
2865
3336
|
/**
|
|
2866
|
-
*
|
|
3337
|
+
* Get the value of the storage (contract's variable) at the given address and key
|
|
2867
3338
|
*
|
|
2868
3339
|
* @param contractAddress
|
|
2869
3340
|
* @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)
|
|
@@ -3021,7 +3492,7 @@ declare abstract class ProviderInterface {
|
|
|
3021
3492
|
*/
|
|
3022
3493
|
abstract getSimulateTransaction(invocations: AccountInvocations, options?: getSimulateTransactionOptions): Promise<SimulateTransactionResponse>;
|
|
3023
3494
|
/**
|
|
3024
|
-
* Gets the state changes in a specific block
|
|
3495
|
+
* Gets the state changes in a specific block (result of executing the requested block)
|
|
3025
3496
|
*
|
|
3026
3497
|
* @param blockIdentifier - block identifier
|
|
3027
3498
|
* @returns StateUpdateResponse
|
|
@@ -3047,6 +3518,9 @@ declare abstract class ProviderInterface {
|
|
|
3047
3518
|
abstract getContractVersion(contractAddress: undefined, classHash: string, options?: getContractVersionOptions): Promise<ContractVersion>;
|
|
3048
3519
|
}
|
|
3049
3520
|
|
|
3521
|
+
/**
|
|
3522
|
+
* @deprecated Use RpcProvider instead. Common Provider will be removed with Sequencer provider.
|
|
3523
|
+
*/
|
|
3050
3524
|
declare class Provider implements ProviderInterface {
|
|
3051
3525
|
private provider;
|
|
3052
3526
|
constructor(providerOrOptions?: ProviderOptions | ProviderInterface);
|
|
@@ -3184,6 +3658,7 @@ declare class SequencerProvider implements ProviderInterface {
|
|
|
3184
3658
|
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): AccountTransactionItem;
|
|
3185
3659
|
}
|
|
3186
3660
|
|
|
3661
|
+
declare const getDefaultNodeUrl: (networkName?: NetworkName, mute?: boolean) => string;
|
|
3187
3662
|
declare class RpcProvider implements ProviderInterface {
|
|
3188
3663
|
nodeUrl: string;
|
|
3189
3664
|
headers: object;
|
|
@@ -3191,75 +3666,131 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
3191
3666
|
private retries;
|
|
3192
3667
|
private blockIdentifier;
|
|
3193
3668
|
private chainId?;
|
|
3194
|
-
constructor(optionsOrProvider
|
|
3195
|
-
fetch(method:
|
|
3196
|
-
protected errorHandler(
|
|
3669
|
+
constructor(optionsOrProvider?: RpcProviderOptions);
|
|
3670
|
+
fetch(method: string, params?: object, id?: string | number): Promise<Response>;
|
|
3671
|
+
protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
|
|
3197
3672
|
protected fetchEndpoint<T extends keyof Methods>(method: T, params?: Methods[T]['params']): Promise<Methods[T]['result']>;
|
|
3198
3673
|
getChainId(): Promise<StarknetChainId>;
|
|
3674
|
+
/**
|
|
3675
|
+
* NEW: Returns the version of the Starknet JSON-RPC specification being used
|
|
3676
|
+
*/
|
|
3677
|
+
getSpecVersion(): Promise<string>;
|
|
3678
|
+
getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3679
|
+
/**
|
|
3680
|
+
* @deprecated use getBlockWithTxHashes or getBlockWithTxs (will be removed on sequencer deprecation)
|
|
3681
|
+
*/
|
|
3199
3682
|
getBlock(blockIdentifier?: BlockIdentifier): Promise<GetBlockResponse>;
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3683
|
+
/**
|
|
3684
|
+
* @deprecated renamed to getBlockLatestAccepted(); (will be removed in next minor version)
|
|
3685
|
+
*/
|
|
3686
|
+
getBlockHashAndNumber: () => Promise<BlockHashAndNumber>;
|
|
3687
|
+
/**
|
|
3688
|
+
* Get the most recent accepted block hash and number
|
|
3689
|
+
*/
|
|
3690
|
+
getBlockLatestAccepted(): Promise<BlockHashAndNumber>;
|
|
3691
|
+
/**
|
|
3692
|
+
* @deprecated redundant use getBlockLatestAccepted();
|
|
3693
|
+
* Get the most recent accepted block number
|
|
3694
|
+
* @returns Number of the latest block
|
|
3695
|
+
*/
|
|
3696
|
+
getBlockNumber(): Promise<number>;
|
|
3697
|
+
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes>;
|
|
3698
|
+
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs>;
|
|
3699
|
+
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<PENDING_STATE_UPDATE | STATE_UPDATE>;
|
|
3700
|
+
/**
|
|
3701
|
+
* @deprecated renamed to getBlockStateUpdate();
|
|
3702
|
+
*/
|
|
3703
|
+
getStateUpdate: (blockIdentifier?: BlockIdentifier) => Promise<PENDING_STATE_UPDATE | STATE_UPDATE>;
|
|
3704
|
+
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces>;
|
|
3705
|
+
/**
|
|
3706
|
+
* Returns the execution traces of all transactions included in the given block
|
|
3707
|
+
* @deprecated renamed to getBlockTransactionsTraces()
|
|
3708
|
+
*/
|
|
3709
|
+
traceBlockTransactions: (blockIdentifier?: BlockIdentifier) => Promise<BlockTransactionsTraces>;
|
|
3710
|
+
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
3711
|
+
/**
|
|
3712
|
+
* Get the number of transactions in a block given a block id
|
|
3713
|
+
* @deprecated renamed to getBlockTransactionCount()
|
|
3714
|
+
* @returns Number of transactions
|
|
3715
|
+
*/
|
|
3716
|
+
getTransactionCount: (blockIdentifier?: BlockIdentifier) => Promise<number>;
|
|
3717
|
+
/**
|
|
3718
|
+
* Return transactions from pending block
|
|
3719
|
+
* @deprecated Instead use getBlock(BlockTag.pending); (will be removed in next minor version)
|
|
3720
|
+
*/
|
|
3721
|
+
getPendingTransactions(): Promise<TransactionWithHash[]>;
|
|
3722
|
+
/**
|
|
3723
|
+
* @deprecated use getTransactionByHash or getTransactionByBlockIdAndIndex (will be removed on sequencer deprecation)
|
|
3724
|
+
*/
|
|
3725
|
+
getTransaction(txHash: BigNumberish): Promise<InvokeTransactionResponse | DeclareTransactionResponse | RejectedTransactionResponse>;
|
|
3726
|
+
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash>;
|
|
3727
|
+
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash>;
|
|
3728
|
+
getTransactionReceipt(txHash: BigNumberish): Promise<TransactionReceipt>;
|
|
3729
|
+
getTransactionTrace(txHash: BigNumberish): Promise<TRANSACTION_TRACE>;
|
|
3730
|
+
/**
|
|
3731
|
+
* @deprecated renamed to getTransactionTrace();
|
|
3732
|
+
* For a given executed transaction, return the trace of its execution, including internal calls
|
|
3733
|
+
*/
|
|
3734
|
+
traceTransaction: (txHash: BigNumberish) => Promise<TRANSACTION_TRACE>;
|
|
3735
|
+
/**
|
|
3736
|
+
* NEW: Get the status of a transaction
|
|
3737
|
+
*/
|
|
3738
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus>;
|
|
3739
|
+
/**
|
|
3740
|
+
* @deprecated renamed to simulateTransaction();
|
|
3741
|
+
*/
|
|
3742
|
+
getSimulateTransaction: (invocations: AccountInvocations, { blockIdentifier, skipValidate, skipFeeCharge, }: getSimulateTransactionOptions) => Promise<SimulateTransactionResponse>;
|
|
3743
|
+
/**
|
|
3744
|
+
* @param invocations AccountInvocations
|
|
3745
|
+
* @param simulateTransactionOptions blockIdentifier and flags to skip validation and fee charge<br/>
|
|
3746
|
+
* - blockIdentifier<br/>
|
|
3747
|
+
* - skipValidate (default false)<br/>
|
|
3748
|
+
* - skipFeeCharge (default true)<br/>
|
|
3749
|
+
*/
|
|
3750
|
+
simulateTransaction(invocations: AccountInvocations, { blockIdentifier, skipValidate, skipFeeCharge, }: getSimulateTransactionOptions): Promise<SimulateTransactionResponse>;
|
|
3751
|
+
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<TransactionReceipt>;
|
|
3752
|
+
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3753
|
+
getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3754
|
+
getClassByHash(classHash: BigNumberish): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
|
|
3755
|
+
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
|
|
3756
|
+
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
|
|
3216
3757
|
getCode(_contractAddress: string, _blockIdentifier?: BlockIdentifier): Promise<GetCodeResponse>;
|
|
3217
|
-
getContractVersion(contractAddress:
|
|
3218
|
-
getContractVersion(contractAddress: undefined, classHash:
|
|
3758
|
+
getContractVersion(contractAddress: BigNumberish, classHash?: undefined, options?: getContractVersionOptions): Promise<ContractVersion>;
|
|
3759
|
+
getContractVersion(contractAddress: undefined, classHash: BigNumberish, options?: getContractVersionOptions): Promise<ContractVersion>;
|
|
3760
|
+
/**
|
|
3761
|
+
* @deprecated use get*type*EstimateFee (will be refactored based on type after sequencer deprecation)
|
|
3762
|
+
*/
|
|
3219
3763
|
getEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
3220
3764
|
getInvokeEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
3221
3765
|
getDeclareEstimateFee(invocation: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
3222
3766
|
getDeployAccountEstimateFee(invocation: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
3223
3767
|
getEstimateFeeBulk(invocations: AccountInvocations, { blockIdentifier, skipValidate }: getEstimateFeeBulkOptions): Promise<EstimateFeeResponseBulk>;
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3768
|
+
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction>;
|
|
3769
|
+
declareContract({ contract, signature, senderAddress, compiledClassHash }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclaredTransaction>;
|
|
3770
|
+
deployAccountContract({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployedAccountTransaction>;
|
|
3227
3771
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
3228
|
-
traceTransaction(transactionHash: TransactionHash): Promise<Trace>;
|
|
3229
|
-
traceBlockTransactions(blockHash: BlockHash): Promise<Traces>;
|
|
3230
|
-
waitForTransaction(txHash: string, options?: waitForTransactionOptions): Promise<any>;
|
|
3231
3772
|
/**
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3234
|
-
*
|
|
3235
|
-
* @param blockIdentifier
|
|
3236
|
-
* @returns Number of transactions
|
|
3237
|
-
*/
|
|
3238
|
-
getTransactionCount(blockIdentifier?: BlockIdentifier): Promise<GetTransactionCountResponse>;
|
|
3239
|
-
/**
|
|
3240
|
-
* Gets the latest block number
|
|
3241
|
-
*
|
|
3242
|
-
*
|
|
3243
|
-
* @returns Number of the latest block
|
|
3773
|
+
* NEW: Estimate the fee for a message from L1
|
|
3774
|
+
* @param message Message From L1
|
|
3244
3775
|
*/
|
|
3245
|
-
|
|
3776
|
+
estimateMessageFee(message: L1Message, blockIdentifier?: BlockIdentifier): Promise<FEE_ESTIMATE>;
|
|
3246
3777
|
/**
|
|
3247
|
-
*
|
|
3248
|
-
*
|
|
3249
|
-
*
|
|
3778
|
+
* Returns an object about the sync status, or false if the node is not synching
|
|
3250
3779
|
* @returns Object with the stats data
|
|
3251
3780
|
*/
|
|
3252
|
-
getSyncingStats(): Promise<
|
|
3781
|
+
getSyncingStats(): Promise<Syncing>;
|
|
3253
3782
|
/**
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
3783
|
+
* Returns all events matching the given filter
|
|
3257
3784
|
* @returns events and the pagination of the events
|
|
3258
3785
|
*/
|
|
3259
|
-
getEvents(eventFilter: EventFilter): Promise<
|
|
3260
|
-
|
|
3261
|
-
|
|
3786
|
+
getEvents(eventFilter: EventFilter): Promise<EVENTS_CHUNK>;
|
|
3787
|
+
/**
|
|
3788
|
+
* StarknetId Endpoint (get name from address)
|
|
3789
|
+
*/
|
|
3262
3790
|
getStarkName(address: BigNumberish, StarknetIdContract?: string): Promise<string>;
|
|
3791
|
+
/**
|
|
3792
|
+
* StarknetId Endpoint (get address from name)
|
|
3793
|
+
*/
|
|
3263
3794
|
getAddressFromStarkName(name: string, StarknetIdContract?: string): Promise<string>;
|
|
3264
3795
|
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): BaseTransaction;
|
|
3265
3796
|
}
|
|
@@ -4176,7 +4707,7 @@ declare namespace num {
|
|
|
4176
4707
|
|
|
4177
4708
|
/**
|
|
4178
4709
|
* Transforms a list of Calls, each with their own calldata, into
|
|
4179
|
-
* two arrays: one with the
|
|
4710
|
+
* two arrays: one with the entry points, and one with the concatenated calldata
|
|
4180
4711
|
*/
|
|
4181
4712
|
declare const transformCallsToMulticallArrays: (calls: Call[]) => {
|
|
4182
4713
|
callArray: ParsedStruct[];
|
|
@@ -4452,7 +4983,7 @@ interface Context {
|
|
|
4452
4983
|
*/
|
|
4453
4984
|
declare const getDependencies: (types: TypedData['types'], type: string, dependencies?: string[]) => string[];
|
|
4454
4985
|
/**
|
|
4455
|
-
* Encode a type to a string. All
|
|
4986
|
+
* Encode a type to a string. All dependent types are alphabetically sorted.
|
|
4456
4987
|
*/
|
|
4457
4988
|
declare const encodeType: (types: TypedData['types'], type: string) => string;
|
|
4458
4989
|
/**
|
|
@@ -4465,13 +4996,13 @@ declare const getTypeHash: (types: TypedData['types'], type: string) => string;
|
|
|
4465
4996
|
*/
|
|
4466
4997
|
declare const encodeValue: (types: TypedData['types'], type: string, data: unknown, ctx?: Context) => [string, string];
|
|
4467
4998
|
/**
|
|
4468
|
-
* Encode the data to an ABI encoded Buffer. The data should be a key -> value object with all the required values.
|
|
4469
|
-
*
|
|
4999
|
+
* Encode the data to an ABI encoded Buffer. The data should be a key -> value object with all the required values.
|
|
5000
|
+
* All dependent types are automatically encoded.
|
|
4470
5001
|
*/
|
|
4471
5002
|
declare const encodeData: <T extends TypedData>(types: T["types"], type: string, data: T["message"]) => string[][];
|
|
4472
5003
|
/**
|
|
4473
|
-
* Get encoded data as a hash. The data should be a key -> value object with all the required values.
|
|
4474
|
-
* types are automatically encoded.
|
|
5004
|
+
* Get encoded data as a hash. The data should be a key -> value object with all the required values.
|
|
5005
|
+
* All dependent types are automatically encoded.
|
|
4475
5006
|
*/
|
|
4476
5007
|
declare const getStructHash: <T extends TypedData>(types: T["types"], type: string, data: T["message"]) => string;
|
|
4477
5008
|
/**
|
|
@@ -4827,4 +5358,4 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
|
|
|
4827
5358
|
/** @deprecated prefer the 'num' naming */
|
|
4828
5359
|
declare const number: typeof num;
|
|
4829
5360
|
|
|
4830
|
-
export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass$1 as ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, PythonicHints, rpc as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus
|
|
5361
|
+
export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass$1 as ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, PythonicHints, rpc as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, TransactionStatus$1 as TransactionStatus, TransactionType, Tupled, TypedContract, TypedData, Uint, Uint256, UniversalDeployerContractPayload, ValidateType, WeierstrassSignatureType, addAddressPadding, buildUrl, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, getContractVersionOptions, getDefaultNodeUrl, getEstimateFeeBulkOptions, getSimulateTransactionOptions, hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$1 as types, uint256$1 as uint256, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
|