GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Bifrost-Technologies/Solnet.Ore: Solnet.Ore is a C# sdk and client for the Ore V2 program on Solana

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
Solnet.Ore
Solnet.Ore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Solnet.Ore.sln
Solnet.Ore.sln
 
 

Repository files navigation

Solnet.Ore

Solnet.Ore is a C# sdk and client for the Ore V2 program on Solana

How to use client example

using Solnet.Ore;
using Solnet.Ore.Accounts;
using Solnet.Ore.Models;
using Solnet.Programs.Utilities;
using Solnet.Wallet;

//Miner is the sender, miner, and payer in this instance
Account miner = Account.FromSecretKey("SECRET_KEY_HERE");
string rpc_provider = "RPC_URL_HERE";
OreClient oreClient = new OreClient(rpc_provider);
var tokenaccount = AssociatedTokenAccountProgram.DeriveAssociatedTokenAccount(miner.PublicKey, PDALookup.FindMintPDA());
var proofRequest = await oreClient.GetProofAccountAsync(PDALookup.FindProofPDA(miner.PublicKey).address);
if (proofRequest != null)
{
    Proof proof = proofRequest.ParsedResult;
    long cut_off = await oreClient.GetCutoff(proof, 5);
    string CurrentChallenge = new PublicKey(proof.Challenge).Key;
    Console.WriteLine("Pool Balance: " + proof.Balance);
    Console.WriteLine("Current Challenge: " + CurrentChallenge);
    Console.WriteLine("Cut Off: " + Convert.ToDateTime(cut_off).ToShortTimeString());

await oreClient.OpenProof(miner, miner, miner);

//Supply a real digest and nonce from drillx via API calls to your API controller to fill this in. Worker <-> API
Solution solution = new Solution
{
    Digest = new byte[16],
    Nonce = new byte[8],
};
await oreClient.MineOre(miner, solution);
await oreClient.ClaimOre(miner, tokenaccount, proof.Balance);
await oreClient.StakeOre(miner, proof.balance);

Console.ReadKey();
}

About

Solnet.Ore is a C# sdk and client for the Ore V2 program on Solana

Topics

csharpdrillxnet8oreore-clipowsolanasolnet

Resources

Readme
MIT license
Activity
Custom properties

Stars

5 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.