Skip to main content
Version: 11.x

Variable: hdParsingStrategy

const hdParsingStrategy: 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​

readonly request: object

Index Signature​

[key: string]: (val) => string[]

request.core::bytes_31::bytes31​

readonly core::bytes_31::bytes31: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

request.core::byte_array::ByteArray​

readonly core::byte_array::ByteArray: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

request.core::felt252​

readonly core::felt252: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

request.core::starknet::eth_address::EthAddress​

readonly core::starknet::eth_address::EthAddress: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

request.core::starknet::secp256k1::Secp256k1Point​

readonly core::starknet::secp256k1::Secp256k1Point: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

request.core::integer::u256​

readonly core::integer::u256: (val) => string[]

Parameters​
val​

unknown

Returns​

string[]

response​

readonly response: object

Index Signature​

[key: string]: ((responseIterator) => string) | ((responseIterator) => bigint) | ((responseIterator) => boolean)

response.core::bytes_31::bytes31​

readonly core::bytes_31::bytes31: (responseIterator) => string

Parameters​
responseIterator​

Iterator<string>

Returns​

string

response.core::byte_array::ByteArray​

readonly core::byte_array::ByteArray: (responseIterator) => string

Parameters​
responseIterator​

Iterator<string>

Returns​

string

response.core::felt252​

readonly core::felt252: (responseIterator) => bigint

Parameters​
responseIterator​

Iterator<string>

Returns​

bigint

response.core::starknet::secp256k1::Secp256k1Point​

readonly core::starknet::secp256k1::Secp256k1Point: (responseIterator) => bigint

Parameters​
responseIterator​

Iterator<string>

Returns​

bigint

response.core::integer::u256​

readonly core::integer::u256: (responseIterator) => bigint

Parameters​
responseIterator​

Iterator<string>

Returns​

bigint