Ejemplo n.º 1
0
        public async Task <UTXOChanges> SyncAsync(BitcoinExtPubKey extKey, uint256 lastBlockHash, uint256 unconfirmedHash, bool noWait = false)
        {
            lastBlockHash   = lastBlockHash ?? uint256.Zero;
            unconfirmedHash = unconfirmedHash ?? uint256.Zero;
            var bytes = await SendAsync <byte[]>(HttpMethod.Get, null, "v1/sync/{0}?lastBlockHash={1}&unconfirmedHash={2}&noWait={3}", extKey, lastBlockHash, unconfirmedHash, noWait).ConfigureAwait(false);

            UTXOChanges changes = new UTXOChanges();

            changes.FromBytes(bytes);
            return(changes);
        }
Ejemplo n.º 2
0
 public Task <UTXOChanges> SyncAsync(BitcoinExtPubKey extKey, UTXOChanges previousChange, bool noWait = false)
 {
     return(SyncAsync(extKey, previousChange?.Confirmed?.Hash, previousChange?.Unconfirmed?.Hash, noWait));
 }
Ejemplo n.º 3
0
 public UTXOChanges Sync(BitcoinExtPubKey extKey, UTXOChanges previousChange, bool noWait = false)
 {
     return(SyncAsync(extKey, previousChange, noWait).GetAwaiter().GetResult());
 }