From 2f965b3fccb5e4eaa7a01c52ab6b6a53dd23edea Mon Sep 17 00:00:00 2001 From: KOBAYASHI Keiichi Date: Wed, 20 May 2020 01:16:34 +0900 Subject: [PATCH] KeyId.GetAddress() accepts only Network type. --- bitcoin_transfer/payment_script.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin_transfer/payment_script.md b/bitcoin_transfer/payment_script.md index ca983f6..9ebdc0e 100644 --- a/bitcoin_transfer/payment_script.md +++ b/bitcoin_transfer/payment_script.md @@ -14,8 +14,8 @@ We are able to generate the ScriptPubKey from the Bitcoin Address. This is a ste ```cs var publicKeyHash = new KeyId("14836dbe7f38c5ac3d49e8d790af808a4ee9edcf"); -var testNetAddress = publicKeyHash.GetAddress(ScriptPubKeyType.Legacy, Network.TestNet); -var mainNetAddress = publicKeyHash.GetAddress(ScriptPubKeyType.Legacy, Network.Main); +var testNetAddress = publicKeyHash.GetAddress(Network.TestNet); +var mainNetAddress = publicKeyHash.GetAddress(Network.Main); Console.WriteLine(mainNetAddress.ScriptPubKey); // OP_DUP OP_HASH160 14836dbe7f38c5ac3d49e8d790af808a4ee9edcf OP_EQUALVERIFY OP_CHECKSIG Console.WriteLine(testNetAddress.ScriptPubKey); // OP_DUP OP_HASH160 14836dbe7f38c5ac3d49e8d790af808a4ee9edcf OP_EQUALVERIFY OP_CHECKSIG