Variable: hdParsingStrategy
consthdParsingStrategy:object
Defined in: src/utils/calldata/parser/parsingStrategy.ts:48
The default parsing strategy.
A request is validated, a response is only decoded. What the caller passes in is the caller's mistake to catch, so an argument goes through the class of its declared type and is refused when it does not fit. What a node answers is not, so a response is read as it comes — the declared type is used there only where reading needs it: a negative i8..i128, which is a field element on the wire and only its own class turns back into a negative number, a u256 or u512 spread over several felts, a bytes31 or a ByteArray carrying bytes.
Configuration mapping - data-driven approach Configure parsing strategy for each abi type
Type Declaration
request
readonlyrequest:object
Index Signature
[key: string]: (val) => string[]
request.core::bytes_31::bytes31
readonlycore::bytes_31::bytes31: (val) =>string[]
Parameters
val
unknown
Returns
string[]
request.core::byte_array::ByteArray
readonlycore::byte_array::ByteArray: (val) =>string[]
Parameters
val
unknown
Returns
string[]
request.core::felt252
readonlycore::felt252: (val) =>string[]
Parameters
val
unknown
Returns
string[]
request.core::starknet::eth_address::EthAddress
readonlycore::starknet::eth_address::EthAddress: (val) =>string[]
Parameters
val
unknown
Returns
string[]
request.core::starknet::secp256k1::Secp256k1Point
readonlycore::starknet::secp256k1::Secp256k1Point: (val) =>string[]
Parameters
val
unknown
Returns
string[]
request.core::integer::u256
readonlycore::integer::u256: (val) =>string[]
Parameters
val
unknown
Returns
string[]
response
readonlyresponse:object
Index Signature
[key: string]: ((responseIterator) => string) | ((responseIterator) => bigint) | ((responseIterator) => boolean)
response.core::bytes_31::bytes31
readonlycore::bytes_31::bytes31: (responseIterator) =>string
Parameters
responseIterator
Iterator<string>
Returns
string
response.core::byte_array::ByteArray
readonlycore::byte_array::ByteArray: (responseIterator) =>string
Parameters
responseIterator
Iterator<string>
Returns
string
response.core::felt252
readonlycore::felt252: (responseIterator) =>bigint
Parameters
responseIterator
Iterator<string>
Returns
bigint
response.core::starknet::secp256k1::Secp256k1Point
readonlycore::starknet::secp256k1::Secp256k1Point: (responseIterator) =>bigint
Parameters
responseIterator
Iterator<string>
Returns
bigint
response.core::integer::u256
readonlycore::integer::u256: (responseIterator) =>bigint
Parameters
responseIterator
Iterator<string>
Returns
bigint