Skip to content

[WalletRPC] Implement encrypt & decrypt methods #227

@Chralu

Description

@Chralu

Following WalletRPC methods are missing in wallet client.

encrypt_payloads

Encrypt many payloads with account public key.

Request

{
  "serviceName": String,              // Service name to use to encrypt the payload
  "pathSuffix": String,               // Additional information to add to a service derivation path (optional)
  "payloads": [
    {
      "payload": String,              // Payload to encrypt
      "isHexa": boolean               // Precise if the payload if in hexadecimal format
    }
  ]
}

Success Response

{
  "encryptedPayloads": [
    {
      "encryptedPayload": String,        // Encrypted payload
    }
  ]
}

decrypt_payloads

Decrypt many payloads with account private key.

Request

{
  "serviceName": String,              // Service name to use to decrypt the payload
  "pathSuffix": String,               // Additional information to add to a service derivation path (optional)
    "description": String {             // Readable description to explain the purpose of decrypting payloads (locale + description)
    "en": "Readable description in English",
    "fr": "Description lisible en français",
  },
  "payloads": [
    {
      "payload": String,              // Payload to decrypt
      "isHexa": boolean               // Precise if the payload if in hexadecimal format
    }
  ]
}

Success Response

{
  "decryptedPayloads": [
    {
      "decryptedPayload": String,        // Decrypted payload
    }
  ]
}

Additional context

No response

Epic

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions