Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: BITCOIN CORE
by
Husna QA
on 28/05/2024, 23:35:41 UTC
Btw, ada tulisan yang cukup menarik perhatian saya ketika tadi baca di GitHub-nya Bitcoin Core yang di publish oleh sipa (a.k.a Pieter Wuille) beberapa hari lalu mengenai: "Enable importprivkey, addmultisigaddress in descriptor wallets";
-snip-

Untuk usulan importprivkey hampir mirip dengan Pull Request #29136, cuman yang berbeda usulannya Pieter Wuille lebih spesifik buat support fungsi yang ada di legacy wallet yang dalam waktu ke depan bakal dihilangkan dari Bitcoin Core. Sementara salah satu commit dari PR #29136 yang ingin di merge ke master branch dari repository Bitcoin adalah RPC Command addhdkey yang bisa digunakan untuk meng-import BIP32 HD Key (kemungkinan dalam bentuk extended Private Key). Sehingga model single Private Key seperti yang ada di Legacy wallet kemungkinan tidak akan bisa menggunakan argumen addhdkey.

Ini yang paham bahasa pemrograman C++ mungkin bisa ikut berkontribusi atau mencoba test beberapa Covered new code yang terdapat di sini:
https://corecheck.dev/bitcoin/bitcoin/pulls/29130, contoh wallet.cpp

Code:
    };

}

RPCHelpMan gethdkeys()

{

    return RPCHelpMan{

        "gethdkeys",

        "\nList all BIP 32 HD keys in the wallet and which descriptors use them.\n",

        {

            {"options", RPCArg::Type::OBJ_NAMED_PARAMS, RPCArg::Optional::OMITTED, "", {

                {"active_only", RPCArg::Type::BOOL, RPCArg::Default{false}, "Show the keys for only active descriptors"},

                {"private", RPCArg::Type::BOOL, RPCArg::Default{false}, "Show private keys"}

            }},

        },

        RPCResult{RPCResult::Type::ARR, "", "", {

            {

                {RPCResult::Type::OBJ, "", "", {

                    {RPCResult::Type::STR, "xpub", "The extended public key"},

Nampak pada code di atas, dibawah "gethdkeys" tercantum "\nList all BIP 32 HD keys in the wallet and which descriptors use them.\n"

Currently, specified HD keys must already exist in the wallet. To make it easier for the user to know, gethdkeys is also added to list out the HD keys in use by all of the descriptors in the wallet. This will include all HD keys, whether we have the private key, for it, which descriptors use it and their activeness, and optionally the extended private key. In this way, users with more complex wallets will be still be able to get HD keys from their wallet for use in other scenarios, and if they want to use createwalletdescriptor, they can easily get the keys that they can specify to it.