syntax = "proto3"; package crypto; message KeyGenerationRequest { string keyType = 1; } message KeyGenerationResponse { bytes publicKey = 1; bytes privateKey = 2; } message PublicFromPrivateKeyRequest { string keyType = 1; bytes privateKey = 2; } message PublicFromPrivateKeyResponse { bytes publicKey = 1; } message SignRequest { string keyType = 1; bytes privateKey = 2; bytes data = 3; } message SignResponse { bytes signature = 1; } message VerifyRequest { string keyType = 1; bytes data = 2; bytes publicKey = 3; bytes signature = 4; } message VerifyResponse { bool result = 1; } message ShamirShareRequest { uint32 n = 1; // support range of u8 (0~127) uint32 k = 2; // support range of u8 (0~127) bytes data = 3; } message ShamirShareResponse { repeated bytes slices = 1; } message ShamirRecoveryRequest { uint32 k = 1; // support range of u8 (0~127) repeated bytes slices = 2; } message ShamirRecoveryResponse { bytes data = 1; } message GenerateMultiSigAssetRequest { string keyType = 1; repeated bytes publicKeys = 2; uint32 k = 3; } message GenerateMultiSigAssetResponse { string address = 1; } message CombineToWitnessRequest { string keyType = 1; repeated bytes publicKeys = 2; uint32 k = 3; repeated bytes signatures = 4; } message CombineToWitnessResponse { repeated bytes witness = 1; } message GenerateAesKeyRequest { } message GenerateAesKeyResponse { bytes key = 1; } message AesEncryptRequest { bytes key = 1; bytes data = 2; } message AesEncryptResponse { bytes encryptedData = 1; } message AesDecryptRequest { bytes key = 1; bytes encryptedData = 2; } message AesDecryptResponse { bytes data = 1; } message ConstructTxRequest { oneof msg { PolkadotConstructExtrinsicRequest PolkadotConstructExtrinsicRequest = 1; } } message ConstructTxResponse { bytes rawTransaction = 1; } message SendTxRequest { string keyType = 1; bytes rawTransaction = 2; } message SendTxResponse { bytes hash = 1; } message PolkadotConstructExtrinsicRequest { bytes toPublicKey = 1; bytes amount = 2; bytes privateKey = 3; } message ShaRequest { string shaType = 1; bytes content = 2; } message ShaResponse { bytes hash = 1; } message RsaDecryptRequest { string privateKeyPkcs1 = 1; bytes msg = 2; } message RsaDecryptResponse { bytes result = 1; } message RsaEncryptRequest { string publicKeyPkcs1 = 1; bytes msg = 2; } message RsaEncryptResponse { bytes result = 1; } message RsaKeyPairPemPcsk1Request { uint32 bits = 1; } message RsaKeyPairPemPcsk1Response { string publicKey = 1; string privateKey = 2; } message FromSs58AddressRequest { string address = 1; } message FromSs58AddressResponse { bytes result = 1; } message ToSs58AddressRequest { bytes publicKey = 1; } message ToSs58AddressResponse { string address = 1; }