@heliuslabs/spr - v0.9.0-alpha
    Preparing search index...

    Interface ViewingKeyLike

    The ViewingKeyTrait surface. Constructors and secretBytes are excluded on purpose: a backend keeps the secret and exposes only operations over it.

    An implementer must hold viewing-key material in memory. Every operation returns synchronously, as Rust's ViewingKeyTrait does: a backend answering viewing-key operations over a wire is not a supported deployment.

    interface ViewingKeyLike {
        publicKey(): X25519PublicKey;
        ecdh(counterparty: X25519PublicKey): Bytes32;
        recipientBootstrapViewTag(): Bytes32;
        transactionViewingKey(firstNullifier: Bytes32): ViewingKey;
        encryptSlot(
            recipientPublicKey: X25519PublicKey,
            plaintext: Uint8Array,
            salt: Bytes16,
            slotIndex: number,
        ): Uint8Array;
        decryptUtxo(
            ciphertext: Uint8Array,
            txViewingPublicKey: X25519PublicKey,
            salt: Bytes16,
            slotIndex: number,
        ): Uint8Array;
        decryptSlotEphemeral(
            recipientPublicKey: X25519PublicKey,
            ciphertext: Uint8Array,
            salt: Bytes16,
            slotIndex: number,
        ): Uint8Array;
        decryptRingDeposit(
            ciphertext: Uint8Array,
            txViewingPublicKey: X25519PublicKey,
            salt: Bytes16,
        ): Uint8Array;
    }

    Implemented by

    Index