resolve method
Implementation
NativeObject resolve(SupportedType type) {
switch (type) {
case SupportedType.cryptoHDKey:
final response =
nativeResolve(nativeObject, _cryptoHDKey.toNativeUtf8()).ref;
return CryptoHDKey(response.getObject());
case SupportedType.cryptoAccount:
final response =
nativeResolve(nativeObject, _cryptoAccount.toNativeUtf8()).ref;
return CryptoAccount(response.getObject());
case SupportedType.cryptoPSBT:
final response =
nativeResolve(nativeObject, _cryptoPSBT.toNativeUtf8()).ref;
return CryptoPSBT(response.getObject());
case SupportedType.cryptoMultiAccounts:
final response =
nativeResolve(nativeObject, _cryptoMultiAccounts.toNativeUtf8())
.ref;
return CryptoMultiAccounts(response.getObject());
// sol
case SupportedType.solSignRequest:
final response =
nativeResolve(nativeObject, _solSignRequest.toNativeUtf8()).ref;
return SolSignRequest(response.getObject());
case SupportedType.solSignature:
final response =
nativeResolve(nativeObject, _solSignature.toNativeUtf8()).ref;
return SolSignature(response.getObject());
// eth
case SupportedType.ethSignRequest:
final response =
nativeResolve(nativeObject, _ethSignRequest.toNativeUtf8()).ref;
return EthSignRequest(response.getObject());
case SupportedType.ethSignature:
final response =
nativeResolve(nativeObject, _ethSignature.toNativeUtf8()).ref;
return EthSignature(response.getObject());
case SupportedType.cardanoSignature:
final response =
nativeResolve(nativeObject, _cardanoSignature.toNativeUtf8()).ref;
return CardanoSignature(response.getObject());
case SupportedType.cardanoSignDataSignature:
final response = nativeResolve(
nativeObject, _cardanoSignDataSignature.toNativeUtf8())
.ref;
return CardanoSignDataSignature(response.getObject());
case SupportedType.cardanoSignCip8DataSignature:
final response = nativeResolve(
nativeObject, _cardanoSignCip8DataSignature.toNativeUtf8())
.ref;
return CardanoSignCip8DataSignature(response.getObject());
case SupportedType.cardanoCatalystSignature:
final response = nativeResolve(nativeObject,
_cardanoCatalystVotingRegistrationSignature.toNativeUtf8())
.ref;
return CardanoCatalystSignature(response.getObject());
default:
throw Exception("type $type is not supported");
}
}