Function compilerOperationHelperDeriveHdKeyPrivate

  • Parameters

    • __namedParameters: {
          configuration: {
              entityOwnership: {
                  [variableId: string]: string;
              };
              ripemd160: {
                  hash: ((input) => Uint8Array) & ((input) => Uint8Array);
              };
              secp256k1: {
                  addTweakPrivateKey: ((privateKey, tweakValue) => string | Uint8Array);
                  addTweakPublicKeyCompressed: ((publicKey, tweakValue) => string | Uint8Array);
                  derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
                  signMessageHashDER: ((privateKey, messageHash) => string | Uint8Array);
                  signMessageHashSchnorr: ((privateKey, messageHash) => string | Uint8Array);
                  validatePublicKey: ((publicKey) => boolean);
              };
              sha256: {
                  hash: ((input) => Uint8Array) & ((input) => Uint8Array);
              };
              sha512: {
                  hash: ((input) => Uint8Array) & ((input) => Uint8Array);
              };
              variables: {
                  [variableId: string]: WalletTemplateVariable;
              };
          };
          hdKeys: {
              addressIndex?: number;
              hdPrivateKeys?: {
                  [entityId: string]: string;
              };
              hdPublicKeys?: {
                  [entityId: string]: string;
              };
          };
          identifier: string;
      }
      • configuration: {
            entityOwnership: {
                [variableId: string]: string;
            };
            ripemd160: {
                hash: ((input) => Uint8Array) & ((input) => Uint8Array);
            };
            secp256k1: {
                addTweakPrivateKey: ((privateKey, tweakValue) => string | Uint8Array);
                addTweakPublicKeyCompressed: ((publicKey, tweakValue) => string | Uint8Array);
                derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
                signMessageHashDER: ((privateKey, messageHash) => string | Uint8Array);
                signMessageHashSchnorr: ((privateKey, messageHash) => string | Uint8Array);
                validatePublicKey: ((publicKey) => boolean);
            };
            sha256: {
                hash: ((input) => Uint8Array) & ((input) => Uint8Array);
            };
            sha512: {
                hash: ((input) => Uint8Array) & ((input) => Uint8Array);
            };
            variables: {
                [variableId: string]: WalletTemplateVariable;
            };
        }
        • entityOwnership: {
              [variableId: string]: string;
          }
          • [variableId: string]: string
        • ripemd160: {
              hash: ((input) => Uint8Array) & ((input) => Uint8Array);
          }
          • hash: ((input) => Uint8Array) & ((input) => Uint8Array)
        • secp256k1: {
              addTweakPrivateKey: ((privateKey, tweakValue) => string | Uint8Array);
              addTweakPublicKeyCompressed: ((publicKey, tweakValue) => string | Uint8Array);
              derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
              signMessageHashDER: ((privateKey, messageHash) => string | Uint8Array);
              signMessageHashSchnorr: ((privateKey, messageHash) => string | Uint8Array);
              validatePublicKey: ((publicKey) => boolean);
          }
          • addTweakPrivateKey: ((privateKey, tweakValue) => string | Uint8Array)
              • (privateKey, tweakValue): string | Uint8Array
              • Parameters

                • privateKey: Uint8Array
                • tweakValue: Uint8Array

                Returns string | Uint8Array

          • addTweakPublicKeyCompressed: ((publicKey, tweakValue) => string | Uint8Array)
              • (publicKey, tweakValue): string | Uint8Array
              • Parameters

                • publicKey: Uint8Array
                • tweakValue: Uint8Array

                Returns string | Uint8Array

          • derivePublicKeyCompressed: ((privateKey) => string | Uint8Array)
              • (privateKey): string | Uint8Array
              • Parameters

                • privateKey: Uint8Array

                Returns string | Uint8Array

          • signMessageHashDER: ((privateKey, messageHash) => string | Uint8Array)
              • (privateKey, messageHash): string | Uint8Array
              • Parameters

                • privateKey: Uint8Array
                • messageHash: Uint8Array

                Returns string | Uint8Array

          • signMessageHashSchnorr: ((privateKey, messageHash) => string | Uint8Array)
              • (privateKey, messageHash): string | Uint8Array
              • Parameters

                • privateKey: Uint8Array
                • messageHash: Uint8Array

                Returns string | Uint8Array

          • validatePublicKey: ((publicKey) => boolean)
              • (publicKey): boolean
              • Parameters

                • publicKey: Uint8Array

                Returns boolean

        • sha256: {
              hash: ((input) => Uint8Array) & ((input) => Uint8Array);
          }
          • hash: ((input) => Uint8Array) & ((input) => Uint8Array)
        • sha512: {
              hash: ((input) => Uint8Array) & ((input) => Uint8Array);
          }
          • hash: ((input) => Uint8Array) & ((input) => Uint8Array)
        • variables: {
              [variableId: string]: WalletTemplateVariable;
          }
      • hdKeys: {
            addressIndex?: number;
            hdPrivateKeys?: {
                [entityId: string]: string;
            };
            hdPublicKeys?: {
                [entityId: string]: string;
            };
        }
        • Optional addressIndex?: number

          The current address index to be used for this compilation. The addressIndex gets added to each WalletTemplateHdKey.addressOffset to calculate the dynamic index (i) used in each WalletTemplateHdKey.privateDerivationPath or WalletTemplateHdKey.publicDerivationPath.

          This is required for any compiler operation that requires derivation. Typically, the value is incremented by one for each address in a wallet.

        • Optional hdPrivateKeys?: {
              [entityId: string]: string;
          }

          A map of entity IDs to HD private keys. These HD private keys are used to derive each HdKey variable assigned to that entity (as specified in CompilerConfiguration.entityOwnership) according to its WalletTemplateHdKey.privateDerivationPath.

          HD private keys may be encoded for either mainnet or testnet (the network information is ignored).

          If both an HD private key (in hdPrivateKeys) and HD public key (in hdPublicKeys) are provided for the same entity in the same compilation (not recommended), only the HD private key is used.

          • [entityId: string]: string
        • Optional hdPublicKeys?: {
              [entityId: string]: string;
          }

          A map of entity IDs to HD public keys. These HD public keys are used to derive public keys for each HdKey variable assigned to that entity (as specified in CompilerConfiguration.entityOwnership) according to its WalletTemplateHdKey.publicDerivationPath.

          HD public keys may be encoded for either mainnet or testnet (the network information is ignored).

          If both an HD private key (in hdPrivateKeys) and HD public key (in hdPublicKeys) are provided for the same entity in the same compilation (not recommended), the HD private key is used.

          • [entityId: string]: string
      • identifier: string

    Returns CompilerOperationError | CompilerOperationSuccess

Generated using TypeDoc