parseSignRequest method
Attempts to parse the JSON map "request" into a SigningRequest object. Throws errors on failure.
Implementation
@override
SignRequest parseSignRequest({
required Map<String, dynamic> request,
}) {
try {
// Parse the request into a SigningRequest object
return SignRequest.fromJson(request);
} catch (e) {
throw SignResult(
error: SignRequestError(
msg: '''Could not parse signing request, expected format:
{
"code": String, // Pact code to be executed
"data": Object, // Pact environment data
"sender": String, // An account, the gas payer of the transaction
"networkId": String, // Network ID: api.chainweb.com
"chainId": String, // Chain ID: 1, 2, 3... not to be confused with
"gasLimit": Number, // Gas limit
"gasPrice": Number, // Gas price
"signingPubKey": String, // The public key signing the TX
"ttl": Number, // TX Timeout
"caps": [DappCapp],
}
Received:
${request.toString()}''',
),
);
}
}