qbit-rpc
    Preparing search index...

    Type Alias AddressValidation

    AddressValidation:
        | {
            address: string;
            isScript?: boolean;
            isValid: true;
            isWitness?: boolean;
            scriptPubKey: string;
            witnessProgram?: string;
            witnessVersion?: number;
        }
        | { error: string; errorLocations: readonly number[]; isValid: false }

    validateaddress. A P2MR address reports isWitness: true and witnessVersion: 2.

    Type Declaration

    • {
          address: string;
          isScript?: boolean;
          isValid: true;
          isWitness?: boolean;
          scriptPubKey: string;
          witnessProgram?: string;
          witnessVersion?: number;
      }
      • Readonlyaddress: string

        The address validated.

      • Optional ReadonlyisScript?: boolean

        Whether the address pays to a script.

      • ReadonlyisValid: true

        The address is valid on the node's chain.

      • Optional ReadonlyisWitness?: boolean

        Whether it is a witness address.

      • ReadonlyscriptPubKey: string

        The output script the address pays to, as hex.

      • Optional ReadonlywitnessProgram?: string

        The witness program, as hex.

      • Optional ReadonlywitnessVersion?: number

        The witness version: 2 for P2MR.

    • { error: string; errorLocations: readonly number[]; isValid: false }
      • Readonlyerror: string

        Why, in the node's words.

      • ReadonlyerrorLocations: readonly number[]

        Indices of likely errors in the address, when the node can tell (Bech32 errors); otherwise empty.

      • ReadonlyisValid: false

        The address is not valid on the node's chain.