starknet 10.1.0 → 10.3.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 +12 -0
- package/README.md +2 -2
- package/dist/index.d.ts +293 -212
- package/dist/index.global.js +154 -31
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +156 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +156 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as RPCSPEC0103 from '@starknet-io/starknet-types-0103';
|
|
2
|
-
import { PAYMASTER_API, CONTRACT, EDataAvailabilityMode as EDataAvailabilityMode$1, ETransactionType, SUBSCRIPTION_BLOCK_ID, TypedData, CONTRACT_STORAGE_KEYS, StorageProof, CASM_COMPILED_CONTRACT_CLASS, OutsideExecutionTypedData, ETransactionVersion3 as ETransactionVersion3$1, IsType, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, PRE_CONFIRMED_BLOCK_WITH_TX_HASHES, BLOCK_WITH_TX_HASHES, TransactionHash, BlockHash, FAILED_TO_RECEIVE_TXN, NO_TRACE_AVAILABLE, CONTRACT_NOT_FOUND, ENTRYPOINT_NOT_FOUND, BLOCK_NOT_FOUND, INVALID_TXN_INDEX, CLASS_HASH_NOT_FOUND, TXN_HASH_NOT_FOUND, PAGE_SIZE_TOO_BIG, NO_BLOCKS, INVALID_CONTINUATION_TOKEN, TOO_MANY_KEYS_IN_FILTER, CONTRACT_ERROR, TRANSACTION_EXECUTION_ERROR, STORAGE_PROOF_NOT_SUPPORTED, CLASS_ALREADY_DECLARED, INVALID_TRANSACTION_NONCE, INSUFFICIENT_RESOURCES_FOR_VALIDATE, INSUFFICIENT_ACCOUNT_BALANCE, VALIDATION_FAILURE, COMPILATION_FAILED, CONTRACT_CLASS_SIZE_IS_TOO_LARGE, NON_ACCOUNT, DUPLICATE_TX, COMPILED_CLASS_HASH_MISMATCH, UNSUPPORTED_TX_VERSION, UNSUPPORTED_CONTRACT_CLASS_VERSION, UNEXPECTED_ERROR, REPLACEMENT_TRANSACTION_UNDERPRICED, FEE_BELOW_MINIMUM, INVALID_SUBSCRIPTION_ID, TOO_MANY_ADDRESSES_IN_FILTER, TOO_MANY_BLOCKS_BACK, COMPILATION_ERROR, ETransactionVersion as ETransactionVersion$1, SUBSCRIPTION_ID, TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1, TXN_STATUS_WITHOUT_L1, StarknetEventsEvent, TransactionsStatusEvent, NewTransactionReceiptsEvent, NewTransactionEvent, NewHeadsEvent, STORAGE_RESULT, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, StarknetType, StarknetMerkleType, TypedDataRevision, OutsideCallV1, OutsideCallV2, EmittedEvent as EmittedEvent$1, Event as Event$2, Address, Permission, ChainId, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, SpecVersion } from '@starknet-io/starknet-types-0103';
|
|
2
|
+
import { PAYMASTER_API, CONTRACT, EDataAvailabilityMode as EDataAvailabilityMode$1, ETransactionType, SUBSCRIPTION_BLOCK_ID, TypedData, CONTRACT_STORAGE_KEYS, StorageProof, CASM_COMPILED_CONTRACT_CLASS, OutsideExecutionTypedData, ETransactionVersion3 as ETransactionVersion3$1, IsType, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, PRE_CONFIRMED_BLOCK_WITH_TX_HASHES, BLOCK_WITH_TX_HASHES, TransactionHash, BlockHash, FAILED_TO_RECEIVE_TXN, NO_TRACE_AVAILABLE, CONTRACT_NOT_FOUND, ENTRYPOINT_NOT_FOUND, BLOCK_NOT_FOUND, INVALID_TXN_INDEX, CLASS_HASH_NOT_FOUND, TXN_HASH_NOT_FOUND, PAGE_SIZE_TOO_BIG, NO_BLOCKS, INVALID_CONTINUATION_TOKEN, TOO_MANY_KEYS_IN_FILTER, CONTRACT_ERROR, TRANSACTION_EXECUTION_ERROR, STORAGE_PROOF_NOT_SUPPORTED, CLASS_ALREADY_DECLARED, INVALID_TRANSACTION_NONCE, INSUFFICIENT_RESOURCES_FOR_VALIDATE, INSUFFICIENT_ACCOUNT_BALANCE, VALIDATION_FAILURE, COMPILATION_FAILED, CONTRACT_CLASS_SIZE_IS_TOO_LARGE, NON_ACCOUNT, DUPLICATE_TX, COMPILED_CLASS_HASH_MISMATCH, UNSUPPORTED_TX_VERSION, UNSUPPORTED_CONTRACT_CLASS_VERSION, UNEXPECTED_ERROR, REPLACEMENT_TRANSACTION_UNDERPRICED, FEE_BELOW_MINIMUM, INVALID_SUBSCRIPTION_ID, TOO_MANY_ADDRESSES_IN_FILTER, TOO_MANY_BLOCKS_BACK, COMPILATION_ERROR, ETransactionVersion as ETransactionVersion$1, SUBSCRIPTION_ID, TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1, TXN_STATUS_WITHOUT_L1, StarknetEventsEvent, TransactionsStatusEvent, NewTransactionReceiptsEvent, NewTransactionEvent, NewHeadsEvent, STORAGE_RESULT, INVOKE_TXN_V3, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, StarknetType, StarknetMerkleType, TypedDataRevision, OutsideCallV1, OutsideCallV2, EmittedEvent as EmittedEvent$1, Event as Event$2, Address, Permission, ChainId, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, SpecVersion } from '@starknet-io/starknet-types-0103';
|
|
3
3
|
export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from '@starknet-io/starknet-types-0103';
|
|
4
|
-
import * as RPC from '@starknet-io/starknet-types-0101';
|
|
4
|
+
import * as RPC$1 from '@starknet-io/starknet-types-0101';
|
|
5
5
|
import { WatchAssetParameters as WatchAssetParameters$1, AddStarknetChainParameters as AddStarknetChainParameters$1, Signature as Signature$2, Address as Address$1, Permission as Permission$1, ChainId as ChainId$1, AccountDeploymentData as AccountDeploymentData$1, AddInvokeTransactionParameters as AddInvokeTransactionParameters$1, AddInvokeTransactionResult as AddInvokeTransactionResult$1, AddDeclareTransactionParameters as AddDeclareTransactionParameters$1, AddDeclareTransactionResult as AddDeclareTransactionResult$1, TypedData as TypedData$1, SpecVersion as SpecVersion$1 } from '@starknet-io/starknet-types-0101';
|
|
6
6
|
import * as weierstrass from '@noble/curves/abstract/weierstrass';
|
|
7
7
|
import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
|
|
8
|
-
import * as
|
|
8
|
+
import * as RPC from '@starknet-io/starknet-types-09';
|
|
9
9
|
import { Abi as Abi$1, TypedContract } from 'abi-wan-kanabi';
|
|
10
10
|
import { WalletWithStarknetFeatures, StandardEventsChangeProperties } from '@starknet-io/get-starknet-wallet-standard/features';
|
|
11
11
|
import * as poseidon from '@noble/curves/abstract/poseidon';
|
|
@@ -54,9 +54,8 @@ declare namespace jsonrpc {
|
|
|
54
54
|
|
|
55
55
|
declare const index$4_PAYMASTER_API: typeof PAYMASTER_API;
|
|
56
56
|
declare const index$4_RPCSPEC0103: typeof RPCSPEC0103;
|
|
57
|
-
declare const index$4_RPCSPEC09: typeof RPCSPEC09;
|
|
58
57
|
declare namespace index$4 {
|
|
59
|
-
export { jsonrpc as JRPC, index$4_PAYMASTER_API as PAYMASTER_API, index$4_RPCSPEC0103 as RPCSPEC0103,
|
|
58
|
+
export { jsonrpc as JRPC, index$4_PAYMASTER_API as PAYMASTER_API, index$4_RPCSPEC0103 as RPCSPEC0103, RPC as RPCSPEC09 };
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
type CairoEnumRaw = Record<string, any>;
|
|
@@ -466,7 +465,7 @@ type MergeProperties<T1 extends Record<any, any>, T2 extends Record<any, any>> =
|
|
|
466
465
|
currently supported RPC specifications
|
|
467
466
|
*/
|
|
468
467
|
type Merge<T1, T2> = Simplify<T1 extends Array<any> ? T2 extends Array<any> ? Array<Merge<ArrayElement<T1>, ArrayElement<T2>>> : T1 : T2 extends Array<any> ? T2 : T1 extends object ? T2 extends object ? MergeProperties<T1, T2> : T1 : T2 extends object ? T2 : T1 | T2>;
|
|
469
|
-
type ETransactionVersion =
|
|
468
|
+
type ETransactionVersion = RPC.ETransactionVersion;
|
|
470
469
|
declare const ETransactionVersion: {
|
|
471
470
|
readonly V0: "0x0";
|
|
472
471
|
readonly V1: "0x1";
|
|
@@ -477,7 +476,7 @@ declare const ETransactionVersion: {
|
|
|
477
476
|
readonly F2: "0x100000000000000000000000000000002";
|
|
478
477
|
readonly F3: "0x100000000000000000000000000000003";
|
|
479
478
|
};
|
|
480
|
-
type ETransactionVersion2 =
|
|
479
|
+
type ETransactionVersion2 = RPC.ETransactionVersion2;
|
|
481
480
|
declare const ETransactionVersion2: {
|
|
482
481
|
readonly V0: "0x0";
|
|
483
482
|
readonly V1: "0x1";
|
|
@@ -486,25 +485,25 @@ declare const ETransactionVersion2: {
|
|
|
486
485
|
readonly F1: "0x100000000000000000000000000000001";
|
|
487
486
|
readonly F2: "0x100000000000000000000000000000002";
|
|
488
487
|
};
|
|
489
|
-
type ETransactionVersion3 =
|
|
488
|
+
type ETransactionVersion3 = RPC.ETransactionVersion3;
|
|
490
489
|
declare const ETransactionVersion3: {
|
|
491
490
|
readonly V3: "0x3";
|
|
492
491
|
readonly F3: "0x100000000000000000000000000000003";
|
|
493
492
|
};
|
|
494
|
-
type BLOCK_HASH = Merge<RPCSPEC0103.BLOCK_HASH,
|
|
495
|
-
type BLOCK_NUMBER = Merge<RPCSPEC0103.BLOCK_NUMBER,
|
|
496
|
-
type FELT = Merge<RPCSPEC0103.FELT,
|
|
497
|
-
type TXN_HASH = Merge<RPCSPEC0103.TXN_HASH,
|
|
498
|
-
type PRICE_UNIT = Merge<RPCSPEC0103.PRICE_UNIT,
|
|
499
|
-
type RESOURCE_PRICE = Merge<RPCSPEC0103.RESOURCE_PRICE,
|
|
500
|
-
type SIMULATION_FLAG = Merge<RPCSPEC0103.SIMULATION_FLAG,
|
|
501
|
-
type STATE_UPDATE = Merge<RPCSPEC0103.STATE_UPDATE,
|
|
502
|
-
type PRE_CONFIRMED_STATE_UPDATE = Merge<RPCSPEC0103.PRE_CONFIRMED_STATE_UPDATE,
|
|
503
|
-
type BlockWithTxHashes = Merge<RPCSPEC0103.BlockWithTxHashes,
|
|
504
|
-
type ContractClassPayload = Merge<RPCSPEC0103.ContractClass,
|
|
505
|
-
type DeclaredTransaction = Merge<RPCSPEC0103.DeclaredTransaction,
|
|
506
|
-
type InvokedTransaction = Merge<RPCSPEC0103.InvokedTransaction,
|
|
507
|
-
type DeployedAccountTransaction = Merge<RPCSPEC0103.DeployedAccountTransaction,
|
|
493
|
+
type BLOCK_HASH = Merge<RPCSPEC0103.BLOCK_HASH, RPC.BLOCK_HASH>;
|
|
494
|
+
type BLOCK_NUMBER = Merge<RPCSPEC0103.BLOCK_NUMBER, RPC.BLOCK_NUMBER>;
|
|
495
|
+
type FELT = Merge<RPCSPEC0103.FELT, RPC.FELT>;
|
|
496
|
+
type TXN_HASH = Merge<RPCSPEC0103.TXN_HASH, RPC.TXN_HASH>;
|
|
497
|
+
type PRICE_UNIT = Merge<RPCSPEC0103.PRICE_UNIT, RPC.PRICE_UNIT>;
|
|
498
|
+
type RESOURCE_PRICE = Merge<RPCSPEC0103.RESOURCE_PRICE, RPC.RESOURCE_PRICE>;
|
|
499
|
+
type SIMULATION_FLAG = Merge<RPCSPEC0103.SIMULATION_FLAG, RPC.SIMULATION_FLAG>;
|
|
500
|
+
type STATE_UPDATE = Merge<RPCSPEC0103.STATE_UPDATE, RPC.STATE_UPDATE>;
|
|
501
|
+
type PRE_CONFIRMED_STATE_UPDATE = Merge<RPCSPEC0103.PRE_CONFIRMED_STATE_UPDATE, RPC.PRE_CONFIRMED_STATE_UPDATE>;
|
|
502
|
+
type BlockWithTxHashes = Merge<RPCSPEC0103.BlockWithTxHashes, RPC.BlockWithTxHashes>;
|
|
503
|
+
type ContractClassPayload = Merge<RPCSPEC0103.ContractClass, RPC.ContractClass>;
|
|
504
|
+
type DeclaredTransaction = Merge<RPCSPEC0103.DeclaredTransaction, RPC.DeclaredTransaction>;
|
|
505
|
+
type InvokedTransaction = Merge<RPCSPEC0103.InvokedTransaction, RPC.InvokedTransaction>;
|
|
506
|
+
type DeployedAccountTransaction = Merge<RPCSPEC0103.DeployedAccountTransaction, RPC.DeployedAccountTransaction>;
|
|
508
507
|
type L1_HANDLER_TXN = RPCSPEC0103.L1_HANDLER_TXN;
|
|
509
508
|
type EDataAvailabilityMode = RPCSPEC0103.EDataAvailabilityMode;
|
|
510
509
|
declare const EDataAvailabilityMode: {
|
|
@@ -516,18 +515,18 @@ declare const EDAMode: {
|
|
|
516
515
|
readonly L1: 0;
|
|
517
516
|
readonly L2: 1;
|
|
518
517
|
};
|
|
519
|
-
type EmittedEvent = Merge<RPCSPEC0103.EmittedEvent,
|
|
520
|
-
type Event$1 = Merge<RPCSPEC0103.Event,
|
|
521
|
-
type Receipt = Merge<RPCSPEC0103.TransactionReceiptProductionBlock,
|
|
518
|
+
type EmittedEvent = Merge<RPCSPEC0103.EmittedEvent, RPC.EmittedEvent>;
|
|
519
|
+
type Event$1 = Merge<RPCSPEC0103.Event, RPC.Event>;
|
|
520
|
+
type Receipt = Merge<RPCSPEC0103.TransactionReceiptProductionBlock, RPC.TransactionReceiptProductionBlock>;
|
|
522
521
|
/**
|
|
523
522
|
* original response from estimate fee without parsing
|
|
524
523
|
*/
|
|
525
|
-
type FeeEstimate = Merge<RPCSPEC0103.FEE_ESTIMATE,
|
|
524
|
+
type FeeEstimate = Merge<RPCSPEC0103.FEE_ESTIMATE, RPC.FEE_ESTIMATE>;
|
|
526
525
|
type ApiEstimateFeeResponse = FeeEstimate[];
|
|
527
526
|
declare function isRPC08Plus_ResourceBounds(entry: ResourceBounds): entry is RPCSPEC0103.ResourceBounds;
|
|
528
527
|
declare function isRPC08Plus_ResourceBoundsBN(entry: ResourceBoundsBN): entry is ResourceBoundsBN;
|
|
529
|
-
type ResourceBounds = Merge<RPCSPEC0103.ResourceBounds,
|
|
530
|
-
type EventFilter =
|
|
528
|
+
type ResourceBounds = Merge<RPCSPEC0103.ResourceBounds, RPC.ResourceBounds>;
|
|
529
|
+
type EventFilter = RPC.EventFilter;
|
|
531
530
|
/**
|
|
532
531
|
* Represents percentage overhead for each resource bound
|
|
533
532
|
* numerical 50 means 50% overhead
|
|
@@ -545,8 +544,8 @@ type ResourceBoundsBN = {
|
|
|
545
544
|
[P in keyof ResourceBounds[K]]: bigint;
|
|
546
545
|
} : number;
|
|
547
546
|
};
|
|
548
|
-
type SimulateTransaction = SimpleOneOf<
|
|
549
|
-
type SimulateTransactionResponse =
|
|
547
|
+
type SimulateTransaction = SimpleOneOf<RPC.SimulateTransaction, RPCSPEC0103.SimulateTransaction>;
|
|
548
|
+
type SimulateTransactionResponse = RPC.SimulateTransactionResponse | RPCSPEC0103.SimulateTransactionResponse;
|
|
550
549
|
type INITIAL_READS = RPCSPEC0103.INITIAL_READS;
|
|
551
550
|
/** Flags to request additional fields in transaction responses (RPC 0.10.1+) */
|
|
552
551
|
type ETxnResponseFlag = RPCSPEC0103.ETxnResponseFlag;
|
|
@@ -567,13 +566,13 @@ declare const ESubscriptionTag: {
|
|
|
567
566
|
type BlockTransactionTrace = RPCSPEC0103.BlockTransactionTrace;
|
|
568
567
|
/** Block transaction traces with optional initial storage reads (RPC 0.10.1+) */
|
|
569
568
|
type BlockTransactionsTracesWithInitialReads = RPCSPEC0103.BlockTransactionsTracesWithInitialReads;
|
|
570
|
-
type TransactionTrace = SimpleOneOf<
|
|
571
|
-
type TransactionWithHash = Merge<RPCSPEC0103.TransactionWithHash,
|
|
572
|
-
type TransactionReceipt = Merge<RPCSPEC0103.TransactionReceipt,
|
|
569
|
+
type TransactionTrace = SimpleOneOf<RPC.TRANSACTION_TRACE, RPCSPEC0103.TRANSACTION_TRACE>;
|
|
570
|
+
type TransactionWithHash = Merge<RPCSPEC0103.TransactionWithHash, RPC.TransactionWithHash>;
|
|
571
|
+
type TransactionReceipt = Merge<RPCSPEC0103.TransactionReceipt, RPC.TransactionReceipt>;
|
|
573
572
|
type Methods = RPCSPEC0103.Methods;
|
|
574
|
-
type TXN_STATUS = Merge<RPCSPEC0103.TXN_STATUS,
|
|
575
|
-
type TXN_EXECUTION_STATUS = Merge<RPCSPEC0103.TXN_EXECUTION_STATUS,
|
|
576
|
-
type TransactionStatus = Merge<RPCSPEC0103.TransactionStatus,
|
|
573
|
+
type TXN_STATUS = Merge<RPCSPEC0103.TXN_STATUS, RPC.TXN_STATUS>;
|
|
574
|
+
type TXN_EXECUTION_STATUS = Merge<RPCSPEC0103.TXN_EXECUTION_STATUS, RPC.TXN_EXECUTION_STATUS>;
|
|
575
|
+
type TransactionStatus = Merge<RPCSPEC0103.TransactionStatus, RPC.TransactionStatus>;
|
|
577
576
|
type ETransactionStatus = RPCSPEC0103.ETransactionStatus;
|
|
578
577
|
declare const ETransactionStatus: {
|
|
579
578
|
readonly RECEIVED: "RECEIVED";
|
|
@@ -587,9 +586,9 @@ declare const ETransactionExecutionStatus: {
|
|
|
587
586
|
readonly SUCCEEDED: "SUCCEEDED";
|
|
588
587
|
readonly REVERTED: "REVERTED";
|
|
589
588
|
};
|
|
590
|
-
type FEE_ESTIMATE = Merge<RPCSPEC0103.FEE_ESTIMATE,
|
|
591
|
-
type EVENTS_CHUNK = Merge<RPCSPEC0103.EVENTS_CHUNK,
|
|
592
|
-
type TransactionType =
|
|
589
|
+
type FEE_ESTIMATE = Merge<RPCSPEC0103.FEE_ESTIMATE, RPC.FEE_ESTIMATE>;
|
|
590
|
+
type EVENTS_CHUNK = Merge<RPCSPEC0103.EVENTS_CHUNK, RPC.EVENTS_CHUNK>;
|
|
591
|
+
type TransactionType = RPC.ETransactionType;
|
|
593
592
|
declare const TransactionType: {
|
|
594
593
|
readonly DECLARE: "DECLARE";
|
|
595
594
|
readonly DEPLOY: "DEPLOY";
|
|
@@ -597,24 +596,24 @@ declare const TransactionType: {
|
|
|
597
596
|
readonly INVOKE: "INVOKE";
|
|
598
597
|
readonly L1_HANDLER: "L1_HANDLER";
|
|
599
598
|
};
|
|
600
|
-
type BlockStatus =
|
|
599
|
+
type BlockStatus = RPC.EBlockStatus;
|
|
601
600
|
declare const BlockStatus: {
|
|
602
601
|
readonly PRE_CONFIRMED: "PRE_CONFIRMED";
|
|
603
602
|
readonly ACCEPTED_ON_L2: "ACCEPTED_ON_L2";
|
|
604
603
|
readonly ACCEPTED_ON_L1: "ACCEPTED_ON_L1";
|
|
605
604
|
};
|
|
606
|
-
type TransactionFinalityStatus =
|
|
605
|
+
type TransactionFinalityStatus = RPC.ETransactionFinalityStatus;
|
|
607
606
|
declare const TransactionFinalityStatus: {
|
|
608
607
|
readonly PRE_CONFIRMED: "PRE_CONFIRMED";
|
|
609
608
|
readonly ACCEPTED_ON_L2: "ACCEPTED_ON_L2";
|
|
610
609
|
readonly ACCEPTED_ON_L1: "ACCEPTED_ON_L1";
|
|
611
610
|
};
|
|
612
|
-
type TransactionExecutionStatus =
|
|
611
|
+
type TransactionExecutionStatus = RPC.ETransactionExecutionStatus;
|
|
613
612
|
declare const TransactionExecutionStatus: {
|
|
614
613
|
readonly SUCCEEDED: "SUCCEEDED";
|
|
615
614
|
readonly REVERTED: "REVERTED";
|
|
616
615
|
};
|
|
617
|
-
type BlockTag =
|
|
616
|
+
type BlockTag = RPC.EBlockTag;
|
|
618
617
|
declare const BlockTag: {
|
|
619
618
|
readonly LATEST: "latest";
|
|
620
619
|
readonly PRE_CONFIRMED: "pre_confirmed";
|
|
@@ -1360,7 +1359,7 @@ declare abstract class ProviderInterface {
|
|
|
1360
1359
|
* @param txHash - transaction hash
|
|
1361
1360
|
* @returns Transaction trace
|
|
1362
1361
|
*/
|
|
1363
|
-
abstract getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC0103.TRANSACTION_TRACE |
|
|
1362
|
+
abstract getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC0103.TRANSACTION_TRACE | RPC.TRANSACTION_TRACE>;
|
|
1364
1363
|
/**
|
|
1365
1364
|
* Get the status of a transaction
|
|
1366
1365
|
* @param transactionHash - transaction hash
|
|
@@ -1403,7 +1402,7 @@ declare abstract class ProviderInterface {
|
|
|
1403
1402
|
* @param blockIdentifier - block identifier
|
|
1404
1403
|
* @returns Fee estimate
|
|
1405
1404
|
*/
|
|
1406
|
-
abstract estimateMessageFee(message:
|
|
1405
|
+
abstract estimateMessageFee(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC0103.FEE_ESTIMATE | RPC.MESSAGE_FEE_ESTIMATE>;
|
|
1407
1406
|
/**
|
|
1408
1407
|
* Get node synchronization status
|
|
1409
1408
|
* @returns Sync status or false if not syncing
|
|
@@ -1414,7 +1413,7 @@ declare abstract class ProviderInterface {
|
|
|
1414
1413
|
* @param eventFilter - event filter
|
|
1415
1414
|
* @returns Events and pagination info
|
|
1416
1415
|
*/
|
|
1417
|
-
abstract getEvents(eventFilter: RPCSPEC0103.EventFilter |
|
|
1416
|
+
abstract getEvents(eventFilter: RPCSPEC0103.EventFilter | RPC.EventFilter): Promise<RPCSPEC0103.EVENTS_CHUNK | RPC.EVENTS_CHUNK>;
|
|
1418
1417
|
/**
|
|
1419
1418
|
* Verify in Starknet a signature of a TypedData object or of a given hash.
|
|
1420
1419
|
* @param {BigNumberish | TypedData} message TypedData object to be verified, or message hash to be verified.
|
|
@@ -1456,7 +1455,7 @@ declare abstract class ProviderInterface {
|
|
|
1456
1455
|
* @param transactionHash - L1 transaction hash
|
|
1457
1456
|
* @returns L1 message status
|
|
1458
1457
|
*/
|
|
1459
|
-
abstract getL1MessagesStatus(transactionHash: BigNumberish): Promise<RPCSPEC0103.L1L2MessagesStatus |
|
|
1458
|
+
abstract getL1MessagesStatus(transactionHash: BigNumberish): Promise<RPCSPEC0103.L1L2MessagesStatus | RPC.L1L2MessagesStatus>;
|
|
1460
1459
|
/**
|
|
1461
1460
|
* Get Merkle paths in state tries
|
|
1462
1461
|
* @param classHashes - class hashes
|
|
@@ -3613,7 +3612,7 @@ type ParsedEvents = Array<ParsedEvent> & {
|
|
|
3613
3612
|
};
|
|
3614
3613
|
/**
|
|
3615
3614
|
* Advance formatting used to get js types data as result
|
|
3616
|
-
* @description https://
|
|
3615
|
+
* @description https://starknet-io.github.io/starknet.js/docs/guides/define_call_message/#formatresponse
|
|
3617
3616
|
* @example
|
|
3618
3617
|
* ```typescript
|
|
3619
3618
|
* // assign custom or existing method to resulting data
|
|
@@ -4497,7 +4496,7 @@ declare class RpcChannel$2 {
|
|
|
4497
4496
|
setChainId(chainId: _StarknetChainId): void;
|
|
4498
4497
|
fetch(method: string, params?: object, id?: string | number): Promise<Response>;
|
|
4499
4498
|
protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
|
|
4500
|
-
protected fetchEndpoint<T extends keyof
|
|
4499
|
+
protected fetchEndpoint<T extends keyof RPC.Methods>(method: T, params?: RPC.Methods[T]['params']): Promise<RPC.Methods[T]['result']>;
|
|
4501
4500
|
getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">;
|
|
4502
4501
|
/**
|
|
4503
4502
|
* fetch rpc node specVersion
|
|
@@ -4512,10 +4511,10 @@ declare class RpcChannel$2 {
|
|
|
4512
4511
|
/**
|
|
4513
4512
|
* Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
|
|
4514
4513
|
*/
|
|
4515
|
-
getMessagesStatus(txHash: BigNumberish): Promise<
|
|
4516
|
-
getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?:
|
|
4517
|
-
blockIdentifier?: BlockIdentifier): Promise<
|
|
4518
|
-
getCompiledCasm(classHash: BigNumberish): Promise<
|
|
4514
|
+
getMessagesStatus(txHash: BigNumberish): Promise<RPC.L1L2MessagesStatus>;
|
|
4515
|
+
getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?: RPC.CONTRACT_STORAGE_KEYS[], // TODO: allow BigNUmberish[] and fix formatting before request
|
|
4516
|
+
blockIdentifier?: BlockIdentifier): Promise<RPC.StorageProof>;
|
|
4517
|
+
getCompiledCasm(classHash: BigNumberish): Promise<RPC.CASM_COMPILED_CONTRACT_CLASS>;
|
|
4519
4518
|
getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
4520
4519
|
/**
|
|
4521
4520
|
* Helper method to get the starknet version from the block, default latest block
|
|
@@ -4525,7 +4524,7 @@ declare class RpcChannel$2 {
|
|
|
4525
4524
|
/**
|
|
4526
4525
|
* Get the most recent accepted block hash and number
|
|
4527
4526
|
*/
|
|
4528
|
-
getBlockLatestAccepted(): Promise<
|
|
4527
|
+
getBlockLatestAccepted(): Promise<RPC.BlockHashAndNumber>;
|
|
4529
4528
|
/**
|
|
4530
4529
|
* Get the most recent accepted block number
|
|
4531
4530
|
* redundant use getBlockLatestAccepted();
|
|
@@ -4533,42 +4532,42 @@ declare class RpcChannel$2 {
|
|
|
4533
4532
|
*/
|
|
4534
4533
|
getBlockNumber(): Promise<number>;
|
|
4535
4534
|
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4536
|
-
status:
|
|
4537
|
-
} &
|
|
4535
|
+
status: RPC.BLOCK_STATUS;
|
|
4536
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TX_HASHES & {}) | (RPC.BLOCK_BODY_WITH_TX_HASHES & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4538
4537
|
block_hash?: undefined;
|
|
4539
4538
|
new_root?: undefined;
|
|
4540
4539
|
status?: undefined;
|
|
4541
4540
|
parent_hash?: undefined;
|
|
4542
4541
|
})>;
|
|
4543
4542
|
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4544
|
-
status:
|
|
4545
|
-
} &
|
|
4543
|
+
status: RPC.BLOCK_STATUS;
|
|
4544
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TXS & {}) | (RPC.BLOCK_BODY_WITH_TXS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4546
4545
|
block_hash?: undefined;
|
|
4547
4546
|
new_root?: undefined;
|
|
4548
4547
|
status?: undefined;
|
|
4549
4548
|
parent_hash?: undefined;
|
|
4550
4549
|
})>;
|
|
4551
4550
|
getBlockWithReceipts(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4552
|
-
status:
|
|
4553
|
-
} &
|
|
4551
|
+
status: RPC.BLOCK_STATUS;
|
|
4552
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_RECEIPTS & {}) | (RPC.BLOCK_BODY_WITH_RECEIPTS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4554
4553
|
block_hash?: undefined;
|
|
4555
4554
|
new_root?: undefined;
|
|
4556
4555
|
status?: undefined;
|
|
4557
4556
|
parent_hash?: undefined;
|
|
4558
4557
|
})>;
|
|
4559
|
-
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<(
|
|
4558
|
+
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<(RPC.STATE_UPDATE & {}) | (RPC.PRE_CONFIRMED_STATE_UPDATE & {
|
|
4560
4559
|
new_root?: undefined;
|
|
4561
4560
|
})>;
|
|
4562
|
-
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<
|
|
4561
|
+
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<RPC.BlockTransactionsTraces>;
|
|
4563
4562
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
4564
|
-
getTransactionByHash(txHash: BigNumberish): Promise<
|
|
4565
|
-
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<
|
|
4566
|
-
getTransactionReceipt(txHash: BigNumberish): Promise<
|
|
4567
|
-
getTransactionTrace(txHash: BigNumberish): Promise<
|
|
4563
|
+
getTransactionByHash(txHash: BigNumberish): Promise<RPC.TXN_WITH_HASH>;
|
|
4564
|
+
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<RPC.TXN_WITH_HASH>;
|
|
4565
|
+
getTransactionReceipt(txHash: BigNumberish): Promise<RPC.TXN_RECEIPT_WITH_BLOCK_INFO>;
|
|
4566
|
+
getTransactionTrace(txHash: BigNumberish): Promise<RPC.TRANSACTION_TRACE>;
|
|
4568
4567
|
/**
|
|
4569
4568
|
* Get the status of a transaction
|
|
4570
4569
|
*/
|
|
4571
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<
|
|
4570
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<RPC.TXN_STATUS_RESULT>;
|
|
4572
4571
|
/**
|
|
4573
4572
|
* @param invocations AccountInvocations
|
|
4574
4573
|
* @param simulateTransactionOptions blockIdentifier and flags to skip validation and fee charge<br/>
|
|
@@ -4576,49 +4575,50 @@ declare class RpcChannel$2 {
|
|
|
4576
4575
|
* - skipValidate (default true)<br/>
|
|
4577
4576
|
* - skipFeeCharge (default true)<br/>
|
|
4578
4577
|
*/
|
|
4579
|
-
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<
|
|
4580
|
-
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<
|
|
4578
|
+
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<RPC.SimulateTransactionResponse>;
|
|
4579
|
+
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<RPC.TXN_RECEIPT>;
|
|
4581
4580
|
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
4582
4581
|
getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
4583
|
-
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(
|
|
4582
|
+
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC.CONTRACT_CLASS & {
|
|
4584
4583
|
program?: undefined;
|
|
4585
|
-
}) | (
|
|
4584
|
+
}) | (RPC.DEPRECATED_CONTRACT_CLASS & {
|
|
4586
4585
|
sierra_program?: undefined;
|
|
4587
4586
|
contract_class_version?: undefined;
|
|
4588
4587
|
})>;
|
|
4589
|
-
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(
|
|
4588
|
+
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC.CONTRACT_CLASS & {
|
|
4590
4589
|
program?: undefined;
|
|
4591
|
-
}) | (
|
|
4590
|
+
}) | (RPC.DEPRECATED_CONTRACT_CLASS & {
|
|
4592
4591
|
sierra_program?: undefined;
|
|
4593
4592
|
contract_class_version?: undefined;
|
|
4594
4593
|
})>;
|
|
4595
|
-
getEstimateFee(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<
|
|
4596
|
-
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<
|
|
4597
|
-
|
|
4598
|
-
|
|
4594
|
+
getEstimateFee(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<RPC.FEE_ESTIMATE[]>;
|
|
4595
|
+
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<RPC.InvokedTransaction>;
|
|
4596
|
+
invokeSignedTx(transaction: RPC.INVOKE_TXN_V3): Promise<RPC.InvokedTransaction>;
|
|
4597
|
+
declare(declareTransaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPC.DeclaredTransaction | RPC.TXN_RECEIPT>;
|
|
4598
|
+
deployAccount(deployAccountTransaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPC.DeployedAccountTransaction | RPC.TXN_RECEIPT>;
|
|
4599
4599
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
4600
4600
|
/**
|
|
4601
4601
|
* NEW: Estimate the fee for a message from L1
|
|
4602
4602
|
* @param message Message From L1
|
|
4603
4603
|
*/
|
|
4604
|
-
estimateMessageFee(message:
|
|
4604
|
+
estimateMessageFee(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPC.MESSAGE_FEE_ESTIMATE>;
|
|
4605
4605
|
/**
|
|
4606
4606
|
* Returns an object about the sync status, or false if the node is not synching
|
|
4607
4607
|
* @returns Object with the stats data
|
|
4608
4608
|
*/
|
|
4609
|
-
getSyncingStats(): Promise<
|
|
4609
|
+
getSyncingStats(): Promise<RPC.Syncing>;
|
|
4610
4610
|
/**
|
|
4611
4611
|
* Returns all events matching the given filter
|
|
4612
4612
|
* @returns events and the pagination of the events
|
|
4613
4613
|
*/
|
|
4614
|
-
getEvents(eventFilter:
|
|
4614
|
+
getEvents(eventFilter: RPC.EventFilter): Promise<RPC.EVENTS_CHUNK>;
|
|
4615
4615
|
buildTransaction<T extends AccountInvocationItem>(invocation: T, versionType?: 'fee' | 'transaction'): Promise<T extends {
|
|
4616
4616
|
type: typeof ETransactionType.INVOKE;
|
|
4617
|
-
} ?
|
|
4617
|
+
} ? RPC.INVOKE_TXN_V3 : T extends {
|
|
4618
4618
|
type: typeof ETransactionType.DECLARE;
|
|
4619
|
-
} ?
|
|
4619
|
+
} ? RPC.BROADCASTED_DECLARE_TXN_V3 : T extends {
|
|
4620
4620
|
type: typeof ETransactionType.DEPLOY_ACCOUNT;
|
|
4621
|
-
} ?
|
|
4621
|
+
} ? RPC.DEPLOY_ACCOUNT_TXN_V3 : never>;
|
|
4622
4622
|
}
|
|
4623
4623
|
|
|
4624
4624
|
declare namespace rpc_0_9_0 {
|
|
@@ -4651,7 +4651,7 @@ declare class RpcChannel$1 {
|
|
|
4651
4651
|
setChainId(chainId: _StarknetChainId): void;
|
|
4652
4652
|
fetch(method: string, params?: object, id?: string | number): Promise<Response>;
|
|
4653
4653
|
protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
|
|
4654
|
-
protected fetchEndpoint<T extends keyof RPC.Methods>(method: T, params?: RPC.Methods[T]['params']): Promise<RPC.Methods[T]['result']>;
|
|
4654
|
+
protected fetchEndpoint<T extends keyof RPC$1.Methods>(method: T, params?: RPC$1.Methods[T]['params']): Promise<RPC$1.Methods[T]['result']>;
|
|
4655
4655
|
getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">;
|
|
4656
4656
|
/**
|
|
4657
4657
|
* fetch rpc node specVersion
|
|
@@ -4666,10 +4666,10 @@ declare class RpcChannel$1 {
|
|
|
4666
4666
|
/**
|
|
4667
4667
|
* Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
|
|
4668
4668
|
*/
|
|
4669
|
-
getMessagesStatus(txHash: BigNumberish): Promise<RPC.L1L2MessagesStatus>;
|
|
4670
|
-
getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?: RPC.CONTRACT_STORAGE_KEYS[], // TODO: allow BigNUmberish[] and fix formatting before request
|
|
4671
|
-
blockIdentifier?: BlockIdentifier): Promise<RPC.StorageProof>;
|
|
4672
|
-
getCompiledCasm(classHash: BigNumberish): Promise<RPC.CASM_COMPILED_CONTRACT_CLASS>;
|
|
4669
|
+
getMessagesStatus(txHash: BigNumberish): Promise<RPC$1.L1L2MessagesStatus>;
|
|
4670
|
+
getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?: RPC$1.CONTRACT_STORAGE_KEYS[], // TODO: allow BigNUmberish[] and fix formatting before request
|
|
4671
|
+
blockIdentifier?: BlockIdentifier): Promise<RPC$1.StorageProof>;
|
|
4672
|
+
getCompiledCasm(classHash: BigNumberish): Promise<RPC$1.CASM_COMPILED_CONTRACT_CLASS>;
|
|
4673
4673
|
getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
4674
4674
|
/**
|
|
4675
4675
|
* Helper method to get the starknet version from the block, default latest block
|
|
@@ -4679,7 +4679,7 @@ declare class RpcChannel$1 {
|
|
|
4679
4679
|
/**
|
|
4680
4680
|
* Get the most recent accepted block hash and number
|
|
4681
4681
|
*/
|
|
4682
|
-
getBlockLatestAccepted(): Promise<RPC.BlockHashAndNumber>;
|
|
4682
|
+
getBlockLatestAccepted(): Promise<RPC$1.BlockHashAndNumber>;
|
|
4683
4683
|
/**
|
|
4684
4684
|
* Get the most recent accepted block number
|
|
4685
4685
|
* redundant use getBlockLatestAccepted();
|
|
@@ -4687,8 +4687,8 @@ declare class RpcChannel$1 {
|
|
|
4687
4687
|
*/
|
|
4688
4688
|
getBlockNumber(): Promise<number>;
|
|
4689
4689
|
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4690
|
-
status: RPC.BLOCK_STATUS;
|
|
4691
|
-
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TX_HASHES & {}) | (RPC.BLOCK_BODY_WITH_TX_HASHES & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4690
|
+
status: RPC$1.BLOCK_STATUS;
|
|
4691
|
+
} & RPC$1.BLOCK_HEADER & RPC$1.BLOCK_BODY_WITH_TX_HASHES & {}) | (RPC$1.BLOCK_BODY_WITH_TX_HASHES & RPC$1.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4692
4692
|
block_hash?: undefined;
|
|
4693
4693
|
new_root?: undefined;
|
|
4694
4694
|
status?: undefined;
|
|
@@ -4710,8 +4710,8 @@ declare class RpcChannel$1 {
|
|
|
4710
4710
|
getBlockWithTxs(blockIdentifier?: BlockIdentifier, options?: {
|
|
4711
4711
|
includeProofFacts?: boolean;
|
|
4712
4712
|
}): Promise<({
|
|
4713
|
-
status: RPC.BLOCK_STATUS;
|
|
4714
|
-
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TXS & {}) | (RPC.BLOCK_BODY_WITH_TXS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4713
|
+
status: RPC$1.BLOCK_STATUS;
|
|
4714
|
+
} & RPC$1.BLOCK_HEADER & RPC$1.BLOCK_BODY_WITH_TXS & {}) | (RPC$1.BLOCK_BODY_WITH_TXS & RPC$1.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4715
4715
|
block_hash?: undefined;
|
|
4716
4716
|
new_root?: undefined;
|
|
4717
4717
|
status?: undefined;
|
|
@@ -4733,8 +4733,8 @@ declare class RpcChannel$1 {
|
|
|
4733
4733
|
getBlockWithReceipts(blockIdentifier?: BlockIdentifier, options?: {
|
|
4734
4734
|
includeProofFacts?: boolean;
|
|
4735
4735
|
}): Promise<({
|
|
4736
|
-
status: RPC.BLOCK_STATUS;
|
|
4737
|
-
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_RECEIPTS & {}) | (RPC.BLOCK_BODY_WITH_RECEIPTS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4736
|
+
status: RPC$1.BLOCK_STATUS;
|
|
4737
|
+
} & RPC$1.BLOCK_HEADER & RPC$1.BLOCK_BODY_WITH_RECEIPTS & {}) | (RPC$1.BLOCK_BODY_WITH_RECEIPTS & RPC$1.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
4738
4738
|
block_hash?: undefined;
|
|
4739
4739
|
new_root?: undefined;
|
|
4740
4740
|
status?: undefined;
|
|
@@ -4747,7 +4747,7 @@ declare class RpcChannel$1 {
|
|
|
4747
4747
|
transaction_count?: undefined;
|
|
4748
4748
|
state_diff_length?: undefined;
|
|
4749
4749
|
})>;
|
|
4750
|
-
getBlockStateUpdate(blockIdentifier?: BlockIdentifier, contractAddresses?: BigNumberish[]): Promise<(RPC.STATE_UPDATE & {}) | (RPC.PRE_CONFIRMED_STATE_UPDATE & {
|
|
4750
|
+
getBlockStateUpdate(blockIdentifier?: BlockIdentifier, contractAddresses?: BigNumberish[]): Promise<(RPC$1.STATE_UPDATE & {}) | (RPC$1.PRE_CONFIRMED_STATE_UPDATE & {
|
|
4751
4751
|
new_root?: undefined;
|
|
4752
4752
|
})>;
|
|
4753
4753
|
/**
|
|
@@ -4758,7 +4758,7 @@ declare class RpcChannel$1 {
|
|
|
4758
4758
|
*/
|
|
4759
4759
|
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier, options?: {
|
|
4760
4760
|
returnInitialReads?: boolean;
|
|
4761
|
-
}): Promise<RPC.BlockTransactionsTraces>;
|
|
4761
|
+
}): Promise<RPC$1.BlockTransactionsTraces>;
|
|
4762
4762
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
4763
4763
|
/**
|
|
4764
4764
|
* Get transaction by hash
|
|
@@ -4768,7 +4768,7 @@ declare class RpcChannel$1 {
|
|
|
4768
4768
|
*/
|
|
4769
4769
|
getTransactionByHash(txHash: BigNumberish, options?: {
|
|
4770
4770
|
includeProofFacts?: boolean;
|
|
4771
|
-
}): Promise<RPC.TXN_WITH_HASH>;
|
|
4771
|
+
}): Promise<RPC$1.TXN_WITH_HASH>;
|
|
4772
4772
|
/**
|
|
4773
4773
|
* Get transaction by block identifier and index
|
|
4774
4774
|
* @param blockIdentifier - block identifier
|
|
@@ -4778,13 +4778,13 @@ declare class RpcChannel$1 {
|
|
|
4778
4778
|
*/
|
|
4779
4779
|
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number, options?: {
|
|
4780
4780
|
includeProofFacts?: boolean;
|
|
4781
|
-
}): Promise<RPC.TXN_WITH_HASH>;
|
|
4782
|
-
getTransactionReceipt(txHash: BigNumberish): Promise<RPC.TXN_RECEIPT_WITH_BLOCK_INFO>;
|
|
4783
|
-
getTransactionTrace(txHash: BigNumberish): Promise<RPC.TRANSACTION_TRACE>;
|
|
4781
|
+
}): Promise<RPC$1.TXN_WITH_HASH>;
|
|
4782
|
+
getTransactionReceipt(txHash: BigNumberish): Promise<RPC$1.TXN_RECEIPT_WITH_BLOCK_INFO>;
|
|
4783
|
+
getTransactionTrace(txHash: BigNumberish): Promise<RPC$1.TRANSACTION_TRACE>;
|
|
4784
4784
|
/**
|
|
4785
4785
|
* Get the status of a transaction
|
|
4786
4786
|
*/
|
|
4787
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<RPC.TXN_STATUS_RESULT>;
|
|
4787
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<RPC$1.TXN_STATUS_RESULT>;
|
|
4788
4788
|
/**
|
|
4789
4789
|
* @param invocations AccountInvocations
|
|
4790
4790
|
* @param simulateTransactionOptions blockIdentifier and flags to skip validation and fee charge<br/>
|
|
@@ -4793,49 +4793,50 @@ declare class RpcChannel$1 {
|
|
|
4793
4793
|
* - skipFeeCharge (default true)<br/>
|
|
4794
4794
|
* - returnInitialReads (default false) - include initial storage reads in trace (RPC 0.10.1+)<br/>
|
|
4795
4795
|
*/
|
|
4796
|
-
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<RPC.SimulateTransactionResponse>;
|
|
4797
|
-
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<RPC.TXN_RECEIPT>;
|
|
4798
|
-
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier, responseFlags?: RPC.STORAGE_RESPONSE_FLAG[]): Promise<string | RPC.STORAGE_RESULT>;
|
|
4796
|
+
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<RPC$1.SimulateTransactionResponse>;
|
|
4797
|
+
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<RPC$1.TXN_RECEIPT>;
|
|
4798
|
+
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier, responseFlags?: RPC$1.STORAGE_RESPONSE_FLAG[]): Promise<string | RPC$1.STORAGE_RESULT>;
|
|
4799
4799
|
getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
4800
|
-
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC.CONTRACT_CLASS & {
|
|
4800
|
+
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC$1.CONTRACT_CLASS & {
|
|
4801
4801
|
program?: undefined;
|
|
4802
|
-
}) | (RPC.DEPRECATED_CONTRACT_CLASS & {
|
|
4802
|
+
}) | (RPC$1.DEPRECATED_CONTRACT_CLASS & {
|
|
4803
4803
|
sierra_program?: undefined;
|
|
4804
4804
|
contract_class_version?: undefined;
|
|
4805
4805
|
})>;
|
|
4806
|
-
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC.CONTRACT_CLASS & {
|
|
4806
|
+
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC$1.CONTRACT_CLASS & {
|
|
4807
4807
|
program?: undefined;
|
|
4808
|
-
}) | (RPC.DEPRECATED_CONTRACT_CLASS & {
|
|
4808
|
+
}) | (RPC$1.DEPRECATED_CONTRACT_CLASS & {
|
|
4809
4809
|
sierra_program?: undefined;
|
|
4810
4810
|
contract_class_version?: undefined;
|
|
4811
4811
|
})>;
|
|
4812
|
-
getEstimateFee(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<RPC.FEE_ESTIMATE[]>;
|
|
4813
|
-
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<RPC.InvokedTransaction>;
|
|
4814
|
-
|
|
4815
|
-
|
|
4812
|
+
getEstimateFee(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<RPC$1.FEE_ESTIMATE[]>;
|
|
4813
|
+
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<RPC$1.InvokedTransaction>;
|
|
4814
|
+
invokeSignedTx(transaction: RPC$1.INVOKE_TXN_V3): Promise<RPC$1.InvokedTransaction>;
|
|
4815
|
+
declare(declareTransaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPC$1.TXN_RECEIPT | RPC$1.DeclaredTransaction>;
|
|
4816
|
+
deployAccount(deployAccountTransaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPC$1.TXN_RECEIPT | RPC$1.DeployedAccountTransaction>;
|
|
4816
4817
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
4817
4818
|
/**
|
|
4818
4819
|
* NEW: Estimate the fee for a message from L1
|
|
4819
4820
|
* @param message Message From L1
|
|
4820
4821
|
*/
|
|
4821
|
-
estimateMessageFee(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPC.MESSAGE_FEE_ESTIMATE>;
|
|
4822
|
+
estimateMessageFee(message: RPC$1.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPC$1.MESSAGE_FEE_ESTIMATE>;
|
|
4822
4823
|
/**
|
|
4823
4824
|
* Returns an object about the sync status, or false if the node is not synching
|
|
4824
4825
|
* @returns Object with the stats data
|
|
4825
4826
|
*/
|
|
4826
|
-
getSyncingStats(): Promise<RPC.Syncing>;
|
|
4827
|
+
getSyncingStats(): Promise<RPC$1.Syncing>;
|
|
4827
4828
|
/**
|
|
4828
4829
|
* Returns all events matching the given filter
|
|
4829
4830
|
* @returns events and the pagination of the events
|
|
4830
4831
|
*/
|
|
4831
|
-
getEvents(eventFilter: RPC.EventFilter): Promise<RPC.EVENTS_CHUNK>;
|
|
4832
|
+
getEvents(eventFilter: RPC$1.EventFilter): Promise<RPC$1.EVENTS_CHUNK>;
|
|
4832
4833
|
buildTransaction<T extends AccountInvocationItem>(invocation: T, versionType?: 'fee' | 'transaction'): Promise<T extends {
|
|
4833
4834
|
type: typeof ETransactionType.INVOKE;
|
|
4834
|
-
} ? RPC.BROADCASTED_INVOKE_TXN : T extends {
|
|
4835
|
+
} ? RPC$1.BROADCASTED_INVOKE_TXN : T extends {
|
|
4835
4836
|
type: typeof ETransactionType.DECLARE;
|
|
4836
|
-
} ? RPC.BROADCASTED_DECLARE_TXN_V3 : T extends {
|
|
4837
|
+
} ? RPC$1.BROADCASTED_DECLARE_TXN_V3 : T extends {
|
|
4837
4838
|
type: typeof ETransactionType.DEPLOY_ACCOUNT;
|
|
4838
|
-
} ? RPC.DEPLOY_ACCOUNT_TXN_V3 : never>;
|
|
4839
|
+
} ? RPC$1.DEPLOY_ACCOUNT_TXN_V3 : never>;
|
|
4839
4840
|
}
|
|
4840
4841
|
|
|
4841
4842
|
declare namespace rpc_0_10_2 {
|
|
@@ -5353,11 +5354,11 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5353
5354
|
getBlock(blockIdentifier: 'pre_confirmed'): Promise<PreConfirmedBlock>;
|
|
5354
5355
|
getBlock(blockIdentifier: 'latest'): Promise<Block$1>;
|
|
5355
5356
|
getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse>;
|
|
5356
|
-
getBlockLatestAccepted(): Promise<
|
|
5357
|
+
getBlockLatestAccepted(): Promise<RPC.BlockHashAndNumber>;
|
|
5357
5358
|
getBlockNumber(): Promise<number>;
|
|
5358
5359
|
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<({
|
|
5359
|
-
status:
|
|
5360
|
-
} &
|
|
5360
|
+
status: RPC.BLOCK_STATUS;
|
|
5361
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TX_HASHES & {}) | (RPC.BLOCK_BODY_WITH_TX_HASHES & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
5361
5362
|
block_hash?: undefined;
|
|
5362
5363
|
new_root?: undefined;
|
|
5363
5364
|
status?: undefined;
|
|
@@ -5366,8 +5367,8 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5366
5367
|
getBlockWithTxs(blockIdentifier?: BlockIdentifier, options?: {
|
|
5367
5368
|
includeProofFacts?: boolean;
|
|
5368
5369
|
}): Promise<({
|
|
5369
|
-
status:
|
|
5370
|
-
} &
|
|
5370
|
+
status: RPC.BLOCK_STATUS;
|
|
5371
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_TXS & {}) | (RPC.BLOCK_BODY_WITH_TXS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
5371
5372
|
block_hash?: undefined;
|
|
5372
5373
|
new_root?: undefined;
|
|
5373
5374
|
status?: undefined;
|
|
@@ -5390,8 +5391,8 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5390
5391
|
getBlockWithReceipts(blockIdentifier?: BlockIdentifier, options?: {
|
|
5391
5392
|
includeProofFacts?: boolean;
|
|
5392
5393
|
}): Promise<({
|
|
5393
|
-
status:
|
|
5394
|
-
} &
|
|
5394
|
+
status: RPC.BLOCK_STATUS;
|
|
5395
|
+
} & RPC.BLOCK_HEADER & RPC.BLOCK_BODY_WITH_RECEIPTS & {}) | (RPC.BLOCK_BODY_WITH_RECEIPTS & RPC.PRE_CONFIRMED_BLOCK_HEADER & {
|
|
5395
5396
|
block_hash?: undefined;
|
|
5396
5397
|
new_root?: undefined;
|
|
5397
5398
|
status?: undefined;
|
|
@@ -5409,99 +5410,99 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5409
5410
|
getBlockStateUpdate(blockIdentifier?: BlockIdentifier, contractAddresses?: BigNumberish[]): Promise<StateUpdateResponse>;
|
|
5410
5411
|
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier, options?: {
|
|
5411
5412
|
returnInitialReads?: boolean;
|
|
5412
|
-
}): Promise<
|
|
5413
|
+
}): Promise<RPC.BlockTransactionsTraces | RPC$1.BlockTransactionsTracesWithInitialReads>;
|
|
5413
5414
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
5414
5415
|
getTransaction(txHash: BigNumberish, options?: {
|
|
5415
5416
|
includeProofFacts?: boolean;
|
|
5416
|
-
}): Promise<(
|
|
5417
|
-
transaction_hash:
|
|
5418
|
-
}) | (
|
|
5419
|
-
transaction_hash:
|
|
5420
|
-
}) | (
|
|
5421
|
-
transaction_hash:
|
|
5417
|
+
}): Promise<(RPC.INVOKE_TXN_V0 & {
|
|
5418
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5419
|
+
}) | (RPC.INVOKE_TXN_V1 & {
|
|
5420
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5421
|
+
}) | (RPC.INVOKE_TXN_V3 & {
|
|
5422
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5422
5423
|
}) | ({
|
|
5423
5424
|
version: "0x0";
|
|
5424
|
-
type: Uppercase<
|
|
5425
|
-
nonce:
|
|
5426
|
-
} &
|
|
5427
|
-
transaction_hash:
|
|
5428
|
-
}) | (
|
|
5429
|
-
transaction_hash:
|
|
5430
|
-
}) | (
|
|
5431
|
-
transaction_hash:
|
|
5432
|
-
}) | (
|
|
5433
|
-
transaction_hash:
|
|
5434
|
-
}) | (
|
|
5435
|
-
transaction_hash:
|
|
5436
|
-
}) | (
|
|
5437
|
-
transaction_hash:
|
|
5438
|
-
}) | (
|
|
5439
|
-
transaction_hash:
|
|
5440
|
-
}) | (
|
|
5441
|
-
transaction_hash:
|
|
5425
|
+
type: Uppercase<RPC.ABI_TYPE_L1_HANDLER>;
|
|
5426
|
+
nonce: RPC.NUM_AS_HEX;
|
|
5427
|
+
} & RPC.FUNCTION_CALL & {
|
|
5428
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5429
|
+
}) | (RPC.DECLARE_TXN_V0 & {
|
|
5430
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5431
|
+
}) | (RPC.DECLARE_TXN_V1 & {
|
|
5432
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5433
|
+
}) | (RPC.DECLARE_TXN_V2 & {
|
|
5434
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5435
|
+
}) | (RPC.DECLARE_TXN_V3 & {
|
|
5436
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5437
|
+
}) | (RPC.DEPLOY_TXN & {
|
|
5438
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5439
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V1 & {
|
|
5440
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5441
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V3 & {
|
|
5442
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5442
5443
|
})>;
|
|
5443
5444
|
getTransactionByHash(txHash: BigNumberish, options?: {
|
|
5444
5445
|
includeProofFacts?: boolean;
|
|
5445
|
-
}): Promise<(
|
|
5446
|
-
transaction_hash:
|
|
5447
|
-
}) | (
|
|
5448
|
-
transaction_hash:
|
|
5449
|
-
}) | (
|
|
5450
|
-
transaction_hash:
|
|
5446
|
+
}): Promise<(RPC.INVOKE_TXN_V0 & {
|
|
5447
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5448
|
+
}) | (RPC.INVOKE_TXN_V1 & {
|
|
5449
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5450
|
+
}) | (RPC.INVOKE_TXN_V3 & {
|
|
5451
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5451
5452
|
}) | ({
|
|
5452
5453
|
version: "0x0";
|
|
5453
|
-
type: Uppercase<
|
|
5454
|
-
nonce:
|
|
5455
|
-
} &
|
|
5456
|
-
transaction_hash:
|
|
5457
|
-
}) | (
|
|
5458
|
-
transaction_hash:
|
|
5459
|
-
}) | (
|
|
5460
|
-
transaction_hash:
|
|
5461
|
-
}) | (
|
|
5462
|
-
transaction_hash:
|
|
5463
|
-
}) | (
|
|
5464
|
-
transaction_hash:
|
|
5465
|
-
}) | (
|
|
5466
|
-
transaction_hash:
|
|
5467
|
-
}) | (
|
|
5468
|
-
transaction_hash:
|
|
5469
|
-
}) | (
|
|
5470
|
-
transaction_hash:
|
|
5454
|
+
type: Uppercase<RPC.ABI_TYPE_L1_HANDLER>;
|
|
5455
|
+
nonce: RPC.NUM_AS_HEX;
|
|
5456
|
+
} & RPC.FUNCTION_CALL & {
|
|
5457
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5458
|
+
}) | (RPC.DECLARE_TXN_V0 & {
|
|
5459
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5460
|
+
}) | (RPC.DECLARE_TXN_V1 & {
|
|
5461
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5462
|
+
}) | (RPC.DECLARE_TXN_V2 & {
|
|
5463
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5464
|
+
}) | (RPC.DECLARE_TXN_V3 & {
|
|
5465
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5466
|
+
}) | (RPC.DEPLOY_TXN & {
|
|
5467
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5468
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V1 & {
|
|
5469
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5470
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V3 & {
|
|
5471
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5471
5472
|
})>;
|
|
5472
5473
|
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number, options?: {
|
|
5473
5474
|
includeProofFacts?: boolean;
|
|
5474
|
-
}): Promise<(
|
|
5475
|
-
transaction_hash:
|
|
5476
|
-
}) | (
|
|
5477
|
-
transaction_hash:
|
|
5478
|
-
}) | (
|
|
5479
|
-
transaction_hash:
|
|
5475
|
+
}): Promise<(RPC.INVOKE_TXN_V0 & {
|
|
5476
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5477
|
+
}) | (RPC.INVOKE_TXN_V1 & {
|
|
5478
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5479
|
+
}) | (RPC.INVOKE_TXN_V3 & {
|
|
5480
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5480
5481
|
}) | ({
|
|
5481
5482
|
version: "0x0";
|
|
5482
|
-
type: Uppercase<
|
|
5483
|
-
nonce:
|
|
5484
|
-
} &
|
|
5485
|
-
transaction_hash:
|
|
5486
|
-
}) | (
|
|
5487
|
-
transaction_hash:
|
|
5488
|
-
}) | (
|
|
5489
|
-
transaction_hash:
|
|
5490
|
-
}) | (
|
|
5491
|
-
transaction_hash:
|
|
5492
|
-
}) | (
|
|
5493
|
-
transaction_hash:
|
|
5494
|
-
}) | (
|
|
5495
|
-
transaction_hash:
|
|
5496
|
-
}) | (
|
|
5497
|
-
transaction_hash:
|
|
5498
|
-
}) | (
|
|
5499
|
-
transaction_hash:
|
|
5483
|
+
type: Uppercase<RPC.ABI_TYPE_L1_HANDLER>;
|
|
5484
|
+
nonce: RPC.NUM_AS_HEX;
|
|
5485
|
+
} & RPC.FUNCTION_CALL & {
|
|
5486
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5487
|
+
}) | (RPC.DECLARE_TXN_V0 & {
|
|
5488
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5489
|
+
}) | (RPC.DECLARE_TXN_V1 & {
|
|
5490
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5491
|
+
}) | (RPC.DECLARE_TXN_V2 & {
|
|
5492
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5493
|
+
}) | (RPC.DECLARE_TXN_V3 & {
|
|
5494
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5495
|
+
}) | (RPC.DEPLOY_TXN & {
|
|
5496
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5497
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V1 & {
|
|
5498
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5499
|
+
}) | (RPC.DEPLOY_ACCOUNT_TXN_V3 & {
|
|
5500
|
+
transaction_hash: RPC.TXN_HASH;
|
|
5500
5501
|
})>;
|
|
5501
5502
|
getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
5502
|
-
getTransactionTrace<V extends _SupportedRpcVersion = _SupportedRpcVersion>(txHash: BigNumberish): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.TRANSACTION_TRACE :
|
|
5503
|
-
getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC0103.TRANSACTION_TRACE |
|
|
5504
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<
|
|
5503
|
+
getTransactionTrace<V extends _SupportedRpcVersion = _SupportedRpcVersion>(txHash: BigNumberish): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.TRANSACTION_TRACE : RPC.TRANSACTION_TRACE>;
|
|
5504
|
+
getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC0103.TRANSACTION_TRACE | RPC.TRANSACTION_TRACE>;
|
|
5505
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<RPC.TXN_STATUS_RESULT>;
|
|
5505
5506
|
getSimulateTransaction(invocations: AccountInvocations, options?: getSimulateTransactionOptions): Promise<SimulateTransactionOverheadResponse>;
|
|
5506
5507
|
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<GetTransactionReceiptResponse>;
|
|
5507
5508
|
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier, responseFlags?: RPCSPEC0103.STORAGE_RESPONSE_FLAG[]): Promise<STORAGE_RESULT>;
|
|
@@ -5518,6 +5519,34 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5518
5519
|
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<{
|
|
5519
5520
|
transaction_hash: string;
|
|
5520
5521
|
}>;
|
|
5522
|
+
/**
|
|
5523
|
+
* Submit a pre-signed INVOKE_TXN_V3 transaction to the network.
|
|
5524
|
+
*
|
|
5525
|
+
* Broadcasts a transaction previously built and signed by `Account.getSignedTransaction()`.
|
|
5526
|
+
* Fees are already included in the signed transaction and will not be re-estimated.
|
|
5527
|
+
*
|
|
5528
|
+
* @param transaction - A fully signed `RPC.INVOKE_TXN_V3` object, as returned by `Account.getSignedTransaction()`
|
|
5529
|
+
*
|
|
5530
|
+
* @returns The transaction hash if `waitMode` is disabled (default), or the transaction receipt if `waitMode` is enabled.
|
|
5531
|
+
*
|
|
5532
|
+
* @remarks
|
|
5533
|
+
* - The transaction must be signed before calling this method ; use `Account.getSignedTransaction()` to produce it.
|
|
5534
|
+
* - Resubmitting the same signed transaction (same nonce) will be rejected by the network.
|
|
5535
|
+
* - If `waitMode` is enabled on the provider, this method waits for the transaction to be included in a block before returning.
|
|
5536
|
+
*
|
|
5537
|
+
* @example
|
|
5538
|
+
* ```typescript
|
|
5539
|
+
* const signedTx = await account.getSignedTransaction([
|
|
5540
|
+
* { contractAddress: erc20Address, entrypoint: 'transfer', calldata: [recipient, amount, 0] }
|
|
5541
|
+
* ]);
|
|
5542
|
+
* // inspect or store signedTx, then submit when ready:
|
|
5543
|
+
* const { transaction_hash } = await provider.invokeSignedTx(signedTx);
|
|
5544
|
+
* await provider.waitForTransaction(transaction_hash);
|
|
5545
|
+
* ```
|
|
5546
|
+
*/
|
|
5547
|
+
invokeSignedTx(transaction: INVOKE_TXN_V3): Promise<{
|
|
5548
|
+
transaction_hash: string;
|
|
5549
|
+
}>;
|
|
5521
5550
|
declareContract(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<{
|
|
5522
5551
|
class_hash: string;
|
|
5523
5552
|
transaction_hash: string;
|
|
@@ -5527,11 +5556,11 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5527
5556
|
transaction_hash: string;
|
|
5528
5557
|
}>;
|
|
5529
5558
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
5530
|
-
estimateMessageFee<V extends _SupportedRpcVersion = _SupportedRpcVersion>(message:
|
|
5531
|
-
estimateMessageFee(message:
|
|
5532
|
-
getSyncingStats(): Promise<
|
|
5533
|
-
getEvents<V extends _SupportedRpcVersion = _SupportedRpcVersion>(eventFilter: V extends SupportedRpcVersion0_10 ? RPCSPEC0103.EventFilter :
|
|
5534
|
-
getEvents(eventFilter: RPCSPEC0103.EventFilter |
|
|
5559
|
+
estimateMessageFee<V extends _SupportedRpcVersion = _SupportedRpcVersion>(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.FEE_ESTIMATE : RPC.MESSAGE_FEE_ESTIMATE>;
|
|
5560
|
+
estimateMessageFee(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC0103.FEE_ESTIMATE | RPC.MESSAGE_FEE_ESTIMATE>;
|
|
5561
|
+
getSyncingStats(): Promise<RPC.Syncing>;
|
|
5562
|
+
getEvents<V extends _SupportedRpcVersion = _SupportedRpcVersion>(eventFilter: V extends SupportedRpcVersion0_10 ? RPCSPEC0103.EventFilter : RPC.EventFilter): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.EVENTS_CHUNK : RPC.EVENTS_CHUNK>;
|
|
5563
|
+
getEvents(eventFilter: RPCSPEC0103.EventFilter | RPC.EventFilter): Promise<RPCSPEC0103.EVENTS_CHUNK | RPC.EVENTS_CHUNK>;
|
|
5535
5564
|
verifyMessageInStarknet(message: BigNumberish | TypedData, signature: Signature, accountAddress: BigNumberish, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
|
|
5536
5565
|
okResponse: string[];
|
|
5537
5566
|
nokResponse: string[];
|
|
@@ -5539,8 +5568,8 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
5539
5568
|
}): Promise<boolean>;
|
|
5540
5569
|
isClassDeclared(contractClassIdentifier: ContractClassIdentifier, blockIdentifier?: BlockIdentifier): Promise<boolean>;
|
|
5541
5570
|
prepareInvocations(invocations: Invocations): Promise<Invocations>;
|
|
5542
|
-
getL1MessagesStatus<V extends _SupportedRpcVersion = _SupportedRpcVersion>(transactionHash: BigNumberish): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.L1L2MessagesStatus :
|
|
5543
|
-
getL1MessagesStatus(transactionHash: BigNumberish): Promise<RPCSPEC0103.L1L2MessagesStatus |
|
|
5571
|
+
getL1MessagesStatus<V extends _SupportedRpcVersion = _SupportedRpcVersion>(transactionHash: BigNumberish): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0103.L1L2MessagesStatus : RPC.L1L2MessagesStatus>;
|
|
5572
|
+
getL1MessagesStatus(transactionHash: BigNumberish): Promise<RPCSPEC0103.L1L2MessagesStatus | RPC.L1L2MessagesStatus>;
|
|
5544
5573
|
getStorageProof(classHashes: BigNumberish[], contractAddresses: BigNumberish[], contractsStorageKeys: CONTRACT_STORAGE_KEYS[], blockIdentifier?: BlockIdentifier): Promise<StorageProof>;
|
|
5545
5574
|
getCompiledCasm(classHash: BigNumberish): Promise<CASM_COMPILED_CONTRACT_CLASS>;
|
|
5546
5575
|
getEstimateTip(blockIdentifier?: BlockIdentifier, options?: TipAnalysisOptions): Promise<TipEstimate>;
|
|
@@ -5598,7 +5627,38 @@ declare class Account implements AccountInterface {
|
|
|
5598
5627
|
estimateDeployFee(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
|
|
5599
5628
|
estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
|
|
5600
5629
|
simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionOverheadResponse>;
|
|
5630
|
+
/**
|
|
5631
|
+
* Shared preparation logic for execute() and buildExecute().
|
|
5632
|
+
* Runs hooks, estimates fees, and builds accountInvocations.
|
|
5633
|
+
* @private
|
|
5634
|
+
*/
|
|
5635
|
+
private prepareInvoke;
|
|
5601
5636
|
execute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
|
|
5637
|
+
/**
|
|
5638
|
+
* Build a signed INVOKE_TXN_V3 transaction without submitting it to the network.
|
|
5639
|
+
*
|
|
5640
|
+
* Produces a fully signed transaction object that can be inspected, stored,
|
|
5641
|
+
* or submitted later via `provider.channel.sendTransaction()`.
|
|
5642
|
+
* Main usage is to send a virtual transaction to a proof server.
|
|
5643
|
+
* Fees are estimated automatically if not provided.
|
|
5644
|
+
*
|
|
5645
|
+
* @param transactions - Single call or array of calls to include in the transaction
|
|
5646
|
+
* @param transactionsDetail - Transaction execution options
|
|
5647
|
+
* @returns A fully signed `RPC.INVOKE_TXN_V3` object, ready to broadcast
|
|
5648
|
+
*
|
|
5649
|
+
* @remarks
|
|
5650
|
+
* - Unlike `execute()`, this method does **not** submit the transaction ; the account nonce is unchanged after the call.
|
|
5651
|
+
* - The `afterExecute` plugin hook is intentionally **not** triggered.
|
|
5652
|
+
* - The returned object can be broadcast with `provider.channel.sendTransaction()`.
|
|
5653
|
+
*
|
|
5654
|
+
* @example
|
|
5655
|
+
* ```typescript
|
|
5656
|
+
* const signedTx = await account.getSignedTransaction(
|
|
5657
|
+
* { contractAddress: erc20Address, entrypoint: 'transfer', calldata: [recipient, amount, 0] }
|
|
5658
|
+
* );
|
|
5659
|
+
* ```
|
|
5660
|
+
*/
|
|
5661
|
+
getSignedTransaction(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<INVOKE_TXN_V3>;
|
|
5602
5662
|
/**
|
|
5603
5663
|
* First check if contract is already declared, if not declare it
|
|
5604
5664
|
* If contract already declared returned transaction_hash is ''.
|
|
@@ -5815,8 +5875,8 @@ declare class WalletAccountV5 extends Account {
|
|
|
5815
5875
|
/**
|
|
5816
5876
|
* ACCOUNT METHODS
|
|
5817
5877
|
*/
|
|
5818
|
-
execute(calls: AllowArray<Call>): Promise<RPC.AddInvokeTransactionResult>;
|
|
5819
|
-
declare(payload: DeclareContractPayload): Promise<RPC.AddDeclareTransactionResult>;
|
|
5878
|
+
execute(calls: AllowArray<Call>): Promise<RPC$1.AddInvokeTransactionResult>;
|
|
5879
|
+
declare(payload: DeclareContractPayload): Promise<RPC$1.AddDeclareTransactionResult>;
|
|
5820
5880
|
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
|
|
5821
5881
|
signMessage(typedData: TypedData): Promise<Signature$2>;
|
|
5822
5882
|
static connect(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface, silentMode?: boolean): Promise<WalletAccountV5>;
|
|
@@ -6629,7 +6689,7 @@ type CalcDeployAccountTxHashArgs = CalcV3DeployAccountTxHashArgs;
|
|
|
6629
6689
|
declare function calculateDeployAccountTransactionHash$1(args: CalcDeployAccountTxHashArgs): string;
|
|
6630
6690
|
|
|
6631
6691
|
/**
|
|
6632
|
-
*
|
|
6692
|
+
* Pure Pedersen hash utilities — no calldata dependency
|
|
6633
6693
|
*/
|
|
6634
6694
|
|
|
6635
6695
|
declare function computePedersenHash(a: BigNumberish, b: BigNumberish): string;
|
|
@@ -6647,6 +6707,11 @@ declare function computePedersenHash(a: BigNumberish, b: BigNumberish): string;
|
|
|
6647
6707
|
*/
|
|
6648
6708
|
declare function computeHashOnElements(data: BigNumberish[]): string;
|
|
6649
6709
|
declare const computePedersenHashOnElements: typeof computeHashOnElements;
|
|
6710
|
+
|
|
6711
|
+
/**
|
|
6712
|
+
* Cairo 0 Class Hash computation using Pedersen hash
|
|
6713
|
+
*/
|
|
6714
|
+
|
|
6650
6715
|
/**
|
|
6651
6716
|
* Calculate contract address from class hash
|
|
6652
6717
|
*
|
|
@@ -9416,6 +9481,22 @@ declare class CairoByteArray {
|
|
|
9416
9481
|
toBigInt(): bigint;
|
|
9417
9482
|
toHexString(): string;
|
|
9418
9483
|
toBuffer(): any;
|
|
9484
|
+
/**
|
|
9485
|
+
* Compute the Pedersen hash of this ByteArray, following OpenZeppelin's `hash_byte_array` algorithm.
|
|
9486
|
+
*
|
|
9487
|
+
* Serializes the ByteArray to its felt252 components (data array length, each data chunk,
|
|
9488
|
+
* pending_word, pending_word_len), then chains Pedersen hash over all elements starting
|
|
9489
|
+
* from 0, and finalizes with the total element count.
|
|
9490
|
+
*
|
|
9491
|
+
* @returns {string} hex-string felt252 Pedersen hash of the ByteArray
|
|
9492
|
+
* @example
|
|
9493
|
+
* ```typescript
|
|
9494
|
+
* const ba = new CairoByteArray('Hello');
|
|
9495
|
+
* const result = ba.hash();
|
|
9496
|
+
* // result = 0x15d19ad651ffaf8e90a13938db2081fa3ff01de0712e00cbe69891bace66c51
|
|
9497
|
+
* ```
|
|
9498
|
+
*/
|
|
9499
|
+
hash(): string;
|
|
9419
9500
|
/**
|
|
9420
9501
|
* returns an array of all the data chunks and the pending word
|
|
9421
9502
|
* when concatenated, represents the original bytes sequence
|