Function encodeRevealedMessageObject

  • Encodes revealed messages producing an object with names as keys and encoded messages as values and a map with indices as keys and encoded messages as values. Also returns the total amount of names produced by flattening a msg structure.

    Parameters

    • revealedMessages: object

      The messages known to the signer

    • blindedMessageCount: number
    • msgStructure: any
    • encoder: Encoder

    Returns {
        encodedByIndex: Map<number, Uint8Array>;
        encodedByName: {
            [key: string]: Uint8Array;
        };
        total: number;
    }

    • encodedByIndex: Map<number, Uint8Array>
    • encodedByName: {
          [key: string]: Uint8Array;
      }
      • [key: string]: Uint8Array
    • total: number