qbit-rpc
    Preparing search index...

    Class PqcSigningError

    The PQC check before signing refused a PSBT, and nothing was signed. An exhausted key signs nothing and raises no error, so walletProcessPsbt (by default) and checkPqcSigning count the signatures the PSBT needs from each of the wallet's PQC keys first, and refuse when an input names no address to count it by (no_address, see inputIndex), when the node reports an address's PQC state without its keys (no_keys), when a key is exhausted or in a state this version does not know (exhausted, unknown_state, see state), or when a key has fewer signatures left than the PSBT needs from it (would_run_out, see needed and remaining): it would run out partway, leaving the inputs after it unsigned. method is walletprocesspsbt, the call refused. The address is a property only: the message names the input and the key.

    Hierarchy (View Summary)

    Index
    • Parameters

      • reason: PqcSigningRefusal
      • details: {
            address?: string;
            inputIndex?: number;
            needed?: number;
            pubkey?: string;
            remaining?: number;
            state?: string;
        } = {}

      Returns PqcSigningError

    address?: string

    The input's address, for no_keys, exhausted and unknown_state.

    cause?: unknown
    inputIndex?: number

    The input refused (no_address), or the first input spending from address.

    message: string
    method?: string

    The JSON-RPC method the error is about, when there is one.

    name: string
    needed?: number

    For would_run_out: the signatures the PSBT needs from the key, one per input whose address holds it.

    pubkey?: string

    The key, for would_run_out, and for exhausted and unknown_state when a key's state was; absent when the address's overall state was.

    Why the PSBT was refused: see the class's description.

    remaining?: number

    For would_run_out: the key's pqcSignaturesRemaining.

    stack?: string
    state?: string

    The state the node reported, for exhausted and unknown_state.

    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack`

      The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

      The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

      The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

      function a() {
      b();
      }

      function b() {
      c();
      }

      function c() {
      // Create an error without stack trace to avoid calculating the stack trace twice.
      const { stackTraceLimit } = Error;
      Error.stackTraceLimit = 0;
      const error = new Error();
      Error.stackTraceLimit = stackTraceLimit;

      // Capture the stack trace above function b
      Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
      throw error;
      }

      a();

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void