Namespace: API
Namespaces
Interfaces
- 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
Type Aliases
Methods
Ƭ Methods: ReadMethods & WriteMethods & TraceMethods
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/methods.d.ts:6
WebSocketMethods
Ƭ WebSocketMethods: Object
Type declaration
| Name | Type | Description |
|---|---|---|
starknet_subscribeNewHeads | { params: { block_id?: SUBSCRIPTION_BLOCK_ID } ; result: SUBSCRIPTION_ID ; errors: TOO_MANY_BLOCKS_BACK | BLOCK_NOT_FOUND ; events: [NewHeadsEvent, ReorgEvent] } | New block headers subscription. Creates a WebSocket stream which will fire events for new block headers. |
starknet_subscribeNewHeads.params | { block_id?: SUBSCRIPTION_BLOCK_ID } | - |
starknet_subscribeNewHeads.params.block_id? | SUBSCRIPTION_BLOCK_ID | The block to get notifications from, default is latest, limited to 1024 blocks back |
starknet_subscribeNewHeads.result | SUBSCRIPTION_ID | - |
starknet_subscribeNewHeads.errors | TOO_MANY_BLOCKS_BACK | BLOCK_NOT_FOUND | - |
starknet_subscribeNewHeads.events | [NewHeadsEvent, ReorgEvent] | starknet_subscriptionNewHeads starknet_subscriptionReorg |
starknet_subscribeEvents | { params: { from_address?: ADDRESS ; keys?: EVENT_KEYS ; block_id?: SUBSCRIPTION_BLOCK_ID ; finality_status?: Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1> } ; result: SUBSCRIPTION_ID ; errors: TOO_MANY_KEYS_IN_FILTER | TOO_MANY_BLOCKS_BACK | BLOCK_NOT_FOUND ; events: [StarknetEventsEvent, ReorgEvent] } | New events subscription. Creates a WebSocket stream which will fire events for new Starknet events from the specified block_id, up to the latest block. |
starknet_subscribeEvents.params | { from_address?: ADDRESS ; keys?: EVENT_KEYS ; block_id?: SUBSCRIPTION_BLOCK_ID ; finality_status?: Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1> } | - |
starknet_subscribeEvents.params.from_address? | ADDRESS | Filter events by from_address which emitted the event |
starknet_subscribeEvents.params.keys? | EVENT_KEYS | The keys to filter events by. If not provided, all events will be returned. |
starknet_subscribeEvents.params.block_id? | SUBSCRIPTION_BLOCK_ID | The block to get notifications from, default is latest, limited to 1024 blocks back |
starknet_subscribeEvents.params.finality_status? | Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1> | The finality status of the most recent events to include, default is ACCEPTED_ON_L2 |
starknet_subscribeEvents.result | SUBSCRIPTION_ID | - |
starknet_subscribeEvents.errors | TOO_MANY_KEYS_IN_FILTER | TOO_MANY_BLOCKS_BACK | BLOCK_NOT_FOUND | - |
starknet_subscribeEvents.events | [StarknetEventsEvent, ReorgEvent] | starknet_subscriptionEvents starknet_subscriptionReorg |
starknet_subscribeTransactionStatus | { params: { transaction_hash: FELT } ; result: SUBSCRIPTION_ID ; events: [TransactionsStatusEvent, ReorgEvent] } | New transaction status subscription. Creates a WebSocket stream which at first fires an event with the current known transaction status, followed by events for every transaction status update |
starknet_subscribeTransactionStatus.params | { transaction_hash: FELT } | - |
starknet_subscribeTransactionStatus.params.transaction_hash | FELT | - |
starknet_subscribeTransactionStatus.result | SUBSCRIPTION_ID | - |
starknet_subscribeTransactionStatus.events | [TransactionsStatusEvent, ReorgEvent] | starknet_subscriptionTransactionStatus starknet_subscriptionReorg |
starknet_subscribeNewTransactionReceipts | { params: { finality_status?: Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1>[] ; sender_address?: ADDRESS[] } ; result: SUBSCRIPTION_ID ; errors: TOO_MANY_ADDRESSES_IN_FILTER ; events: [NewTransactionReceiptsEvent] } | Creates a WebSocket stream which will fire events when new transaction receipts are created. The endpoint receives a vector of finality statuses. An event is fired for each finality status update. It is possible for receipts for pre-confirmed transactions to be received multiple times, or not at all. |
starknet_subscribeNewTransactionReceipts.params | { finality_status?: Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1>[] ; sender_address?: ADDRESS[] } | - |
starknet_subscribeNewTransactionReceipts.params.finality_status? | Exclude<TXN_FINALITY_STATUS, STATUS_ACCEPTED_ON_L1>[] | A vector of finality statuses to receive updates for, default is [ACCEPTED_ON_L2] |
starknet_subscribeNewTransactionReceipts.params.sender_address? | ADDRESS[] | Filter transaction receipts to only include transactions sent by the specified addresses |
starknet_subscribeNewTransactionReceipts.result | SUBSCRIPTION_ID | - |
starknet_subscribeNewTransactionReceipts.errors | TOO_MANY_ADDRESSES_IN_FILTER | - |
starknet_subscribeNewTransactionReceipts.events | [NewTransactionReceiptsEvent] | starknet_subscriptionNewTransactionReceipts |
starknet_subscribeNewTransactions | { params: { finality_status?: TXN_STATUS_WITHOUT_L1[] ; sender_address?: ADDRESS[] } ; result: SUBSCRIPTION_ID ; events: [NewTransactionEvent] } | Creates a WebSocket stream which will fire events when new transaction are created. The endpoint receives a vector of finality statuses. An event is fired for each finality status update. It is possible for events for pre-confirmed and candidate transactions to be received multiple times, or not at all. |
starknet_subscribeNewTransactions.params | { finality_status?: TXN_STATUS_WITHOUT_L1[] ; sender_address?: ADDRESS[] } | - |
starknet_subscribeNewTransactions.params.finality_status? | TXN_STATUS_WITHOUT_L1[] | A vector of finality statuses to receive updates for, default is [ACCEPTED_ON_L2] |
starknet_subscribeNewTransactions.params.sender_address? | ADDRESS[] | Filter to only include transactions sent by the specified addresses |
starknet_subscribeNewTransactions.result | SUBSCRIPTION_ID | - |
starknet_subscribeNewTransactions.events | [NewTransactionEvent] | starknet_subscriptionNewTransaction |
starknet_unsubscribe | { params: { subscription_id: SUBSCRIPTION_ID } ; result: Boolean ; errors: INVALID_SUBSCRIPTION_ID } | Close a previously opened ws stream, with the corresponding subscription id |
starknet_unsubscribe.params | { subscription_id: SUBSCRIPTION_ID } | - |
starknet_unsubscribe.params.subscription_id | SUBSCRIPTION_ID | - |
starknet_unsubscribe.result | Boolean | - |
starknet_unsubscribe.errors | INVALID_SUBSCRIPTION_ID | - |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/methods.d.ts:281
FELT
Ƭ FELT: string
A field element. represented by at most 63 hex digits
Pattern
^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:7
ETH_ADDRESS
Ƭ ETH_ADDRESS: string
an ethereum address represented as 40 hex digits
Pattern
^0x[a-fA-F0-9]{40}$
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:12
STORAGE_KEY
Ƭ STORAGE_KEY: string
A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
Pattern
^0x(0|[0-7]{1}[a-fA-F0-9]{0,62}$)
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:17
ADDRESS
Ƭ ADDRESS: FELT
A contract address on Starknet
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:21
NUM_AS_HEX
Ƭ NUM_AS_HEX: string
string representing an unsigned integer number in prefixed hexadecimal format
Example
'0x..';
Pattern
^0x[a-fA-F0-9]+$
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:27
u64
Ƭ u64: string
64 bit unsigned integers, represented by hex string of length at most 16 "pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,15})$"
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:32
u128
Ƭ u128: string
128 bit unsigned integers, represented by hex string of length at most 32 "pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,31})$"
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:37
SIGNATURE
Ƭ SIGNATURE: FELT[]
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:38
BLOCK_NUMBER
Ƭ BLOCK_NUMBER: number
Minimum
0
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:42
BLOCK_HASH
Ƭ BLOCK_HASH: FELT
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:43
TXN_HASH
Ƭ TXN_HASH: FELT
The hash of an Starknet transaction
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:47
L1_TXN_HASH
Ƭ L1_TXN_HASH: NUM_AS_HEX
The hash of an Ethereum transaction
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:51
CHAIN_ID
Ƭ CHAIN_ID: NUM_AS_HEX
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:52
STATE_MUTABILITY
Ƭ STATE_MUTABILITY: STATE_MUTABILITY_VIEW | STATE_MUTABILITY_EXTERNAL
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:53
FUNCTION_ABI_TYPE
Ƭ FUNCTION_ABI_TYPE: ABI_TYPE_FUNCTION | ABI_TYPE_L1_HANDLER | ABI_TYPE_CONSTRUCTOR
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:54
ABI_NAME_AND_TYPE
Ƭ ABI_NAME_AND_TYPE: Object
common definition
Type declaration
| Name | Type |
|---|---|
name | string |
type | string |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:58
ABI_TYPE
Ƭ ABI_TYPE: Object
common outputs
Type declaration
| Name | Type |
|---|---|
type | string |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:65
ENTRY_POINT_TYPE
Ƭ ENTRY_POINT_TYPE: Uppercase<STATE_MUTABILITY_EXTERNAL> | Uppercase<ABI_TYPE_L1_HANDLER> | Uppercase<ABI_TYPE_CONSTRUCTOR>
Represents the type of an entry point.
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:71
SIMULATION_FLAG
Ƭ SIMULATION_FLAG: typeof SKIP_VALIDATE | typeof SKIP_FEE_CHARGE
Flags that indicate how to simulate a given transaction. By default, the sequencer behavior is replicated locally (enough funds are expected to be in the account, and the fee will be deducted from the balance before the simulation of the next transaction). To skip the fee charge, use the SKIP_FEE_CHARGE flag.
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:75
DA_MODE
Ƭ DA_MODE: EDataAvailabilityMode
Data availability mode. Specifies a storage domain in Starknet. Each domain has different guarantees regarding availability
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:80
TXN_TYPE
Ƭ TXN_TYPE: TXN_TYPE_DECLARE | TXN_TYPE_DEPLOY | TXN_TYPE_DEPLOY_ACCOUNT | TXN_TYPE_INVOKE | Uppercase<ABI_TYPE_L1_HANDLER>
The type of the transaction
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:84
TXN_STATUS
Ƭ TXN_STATUS: STATUS_RECEIVED | STATUS_CANDIDATE | STATUS_PRE_CONFIRMED | STATUS_ACCEPTED_ON_L2 | STATUS_ACCEPTED_ON_L1
Represents the finality status of the transaction, including the case the txn is still in the mempool or failed validation during the block construction phase
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:88
TXN_FINALITY_STATUS
Ƭ TXN_FINALITY_STATUS: STATUS_PRE_CONFIRMED | STATUS_ACCEPTED_ON_L2 | STATUS_ACCEPTED_ON_L1
The finality status of the transaction
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:92
TXN_EXECUTION_STATUS
Ƭ TXN_EXECUTION_STATUS: STATUS_SUCCEEDED | STATUS_REVERTED
The execution status of the transaction
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:96
BLOCK_STATUS
Ƭ BLOCK_STATUS: EBlockStatus
The status of the block
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:100
BLOCK_ID
Ƭ BLOCK_ID: BLOCK_SELECTOR | BLOCK_TAG
A block identifier that can be either a block hash, block number, or a block tag
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:104
BLOCK_SELECTOR
Ƭ BLOCK_SELECTOR: SimpleOneOf<{ block_hash: BLOCK_HASH }, { block_number: BLOCK_NUMBER }>
A block selector that can be either a block hash or block number
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:108
BLOCK_TAG
Ƭ BLOCK_TAG: EBlockTag
A tag specifying a dynamic reference to a block.
Tag l1_accepted refers to the latest Starknet block which was included in a state update on L1 and finalized by the consensus on L1.
Tag latest refers to the latest Starknet block finalized by the consensus on L2.
Tag pre_confirmed refers to the block which is currently being built by the block proposer in height latest + 1.
See
EBlockTag
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:120
TXN_STATUS_WITHOUT_L1
Ƭ TXN_STATUS_WITHOUT_L1: Exclude<TXN_STATUS, STATUS_ACCEPTED_ON_L1>
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:121
SUBSCRIPTION_ID
Ƭ SUBSCRIPTION_ID: string
An identifier for this subscription stream used to associate events with this subscription. Integer
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:126
NEW_TXN_STATUS
Ƭ NEW_TXN_STATUS: Object
Type declaration
| Name | Type |
|---|---|
transaction_hash | TXN_HASH |
status | TXN_STATUS_RESULT |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:127
REORG_DATA
Ƭ REORG_DATA: Object
Data about reorganized blocks, starting and ending block number and hash
Type declaration
| Name | Type | Description |
|---|---|---|
starting_block_hash | BLOCK_HASH | Hash of the first known block of the orphaned chain |
starting_block_number | BLOCK_NUMBER | Number of the first known block of the orphaned chain |
ending_block_hash | BLOCK_HASH | The last known block of the orphaned chain |
ending_block_number | BLOCK_NUMBER | Number of the last known block of the orphaned chain |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:134
NewHeadsEvent
Ƭ NewHeadsEvent: Object
Type declaration
| Name | Type |
|---|---|
subscription_id | SUBSCRIPTION_ID |
result | BLOCK_HEADER |
Defined in
node_modules/@starknet-io/starknet-types-09/dist/types/api/components.d.ts:152
StarknetEventsEvent
Ƭ StarknetEventsEvent: Object
Notification to the client of a new event. The event also includes the finality status of the transaction emitting the event