util
fetchCalldataDecoder()โ
fetchCalldataDecoder(
_data
:string
|Uint8Array
,to
:string
,_chainId
:string
|number
,recurse
:boolean
):Promise
<{"abi"
:any
;"def"
:Buffer
; }>
Fetches calldata from a remote scanner based on the transaction's chainId
Parametersโ
Parameter | Type | Default value |
---|---|---|
_data | string | Uint8Array | undefined |
to | string | undefined |
_chainId | string | number | undefined |
recurse | boolean | true |
Returnsโ
Promise
<{"abi"
: any
;"def"
: Buffer
; }>
Member | Type | Value |
---|---|---|
abi | any | - |
def | Buffer | ... |
Sourceโ
generateAppSecret()โ
generateAppSecret(
deviceId
:string
|Buffer
,password
:string
|Buffer
,appName
:string
|Buffer
):Buffer
Generates an application secret for use in maintaining connection to device.
Parametersโ
Parameter | Type | Description |
---|---|---|
deviceId | string | Buffer | The device ID of the device you want to generate a token for. |
password | string | Buffer | The password entered when connecting to the device. |
appName | string | Buffer | The name of the application. |
Returnsโ
Buffer
an application secret as a Buffer
Sourceโ
getV()โ
getV(
tx
:any
,resp
:any
):any
Generic signing does not return a v
value like legacy ETH signing requests did.
Get the v
component of the signature as well as an initV
parameter, which is what you need to use to re-create an @ethereumjs/tx
object. There is a lot of tech debt in @ethereumjs/tx
which also
inherits the tech debt of ethereumjs-util.
- The legacy
Transaction
type can call_processSignature
with the regularv
value. - Newer transaction types such as
FeeMarketEIP1559Transaction
will subtract 27 from thev
that gets passed in, so we need to add27
to createinitV
Parametersโ
Parameter | Type | Description |
---|---|---|
tx | any | An @ethereumjs/tx Transaction object or Buffer (serialized tx) |
resp | any | response from Lattice. Can be either legacy or generic signing variety |
Returnsโ
any
bn.js BN object containing the v
param
Sourceโ
selectDefFrom4byteABI()โ
selectDefFrom4byteABI(
abiData
:any
[],selector
:string
):any
Takes a list of ABI data objects and a selector, and returns the earliest ABI data object that matches the selector.
Parametersโ
Parameter | Type |
---|---|
abiData | any [] |
selector | string |
Returnsโ
any