1. napi_status napi_create_bigint_words(napi_env env,
    2. int sign_bit,
    3. size_t word_count,
    4. const uint64_t* words,
    5. napi_value* result);
    • [in] env: The environment that the API is invoked under.
    • [in] sign_bit: Determines if the resulting BigInt will be positive or negative.
    • [in] word_count: The length of the words array.
    • [in] words: An array of uint64_t little-endian 64-bit words.
    • [out] result: A napi_value representing a JavaScript BigInt.

    Returns napi_ok if the API succeeded.

    This API converts an array of unsigned 64-bit words into a single BigInt value.

    The resulting BigInt is calculated as: (–1)sign_bit (words[0] × (264)0 + words[1] × (264)1 + …)