在区块上读写数据
using System;
using BsvSimpleLibrary;
using System.Collections.Generic;
namespace bsvAddress
{
class Program
{
static void Main(string[] args)
{
string WifprivateKeyStr = "cVkkQ9gmQWb7M7FKKSAnKzkj5b3VJfHZath9YzvtzWqSyshpjLdX";
string destAddress = "1L5D9V3hZQ4iFsXSXv41cwhyurLteP6kH1";//test
string privateKey = ""; //(test) your private key
string txid = "dfd5dbaac7cbc322995fc2f33dabff4d947a172f97f09933a5bc5e08f47760f1";
string uri = bsvConfiguration_class.RestApiUri;
string network = bsvConfiguration_class.testNetwork;
string opReturnData = "bsv test";
Dictionary<string, string> response;
send bsv and / or write data.
// response = bsvTransaction_class.send(WifprivateKeyStr, 0, network,null, null, opReturnData, 1, 0);
//get opreturn data
string s = RestApi_class.getOpReturnData(uri, network, txid, bsvConfiguration_class.encoding);
//get tx
//RestApiTransaction tx = RestApi_class.getOpReturnData(uri, network, txid);
//get utxo
//RestApiUtxo_class[] utxos = RestApiUtxo_class.Equals(uri, network, destAddress);
//get bsv price based on usdt from okex
//double price = BsvPrice_class.getBsvPriceOnUSDT();
//double priceOnSat = BsvPrice_class.getSatoshiPriceOnCent();
}
}
}