This helper function is used to coerce the type <bigint | undefined> to bigint for the getNonce function above.

  • Parameters

    • OptionalnonceSpace: bigint

      An unsigned 256 bit value that can be used to encode a nonce into a distinct space.

    Returns bigint

    The passed in nonceSpace or instead initialises the nonce to 0.