formatMessage method

  1. @override
String formatMessage(
  1. SIWECreateMessageArgs params
)
override

Implementation

@override
String formatMessage(SIWECreateMessageArgs params) {
  final authPayload = SessionAuthPayload.fromJson({
    ...params.toJson(),
    'chains': [params.chainId],
    'aud': params.uri,
    'type': params.type?.t,
  });
  return _web3app.formatAuthMessage(
    iss: 'did:pkh:${params.address}',
    cacaoPayload: CacaoRequestPayload.fromSessionAuthPayload(authPayload),
  );
}