-
Notifications
You must be signed in to change notification settings - Fork 9
/
IBlockchainStorage.cs
29 lines (28 loc) · 1.32 KB
/
IBlockchainStorage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using NeoFx.Models;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace NeoFx.Storage
{
public interface IBlockchainStorage
{
uint Height { get; }
public UInt256 GoverningTokenHash { get; }
public UInt256 UtilityTokenHash { get; }
IEnumerable<(ImmutableArray<byte> key, StorageItem item)> EnumerateStorage(in UInt160 scriptHash);
bool TryGetAccount(in UInt160 key, out Account value);
bool TryGetAsset(in UInt256 key, out Asset value);
bool TryGetBlock(in UInt256 key, out Block value);
bool TryGetBlock(uint index, out Block value);
bool TryGetBlock(in UInt256 key, out BlockHeader header, out ImmutableArray<UInt256> hashes);
bool TryGetBlockHash(uint index, out UInt256 value);
bool TryGetContract(in UInt160 key, out DeployedContract value);
bool TryGetCurrentBlockHash(out UInt256 value);
bool TryGetStorage(in StorageKey key, out StorageItem value);
bool TryGetTransaction(in UInt256 key, out uint index, [NotNullWhen(true)] out Transaction? value);
bool TryGetUnspentCoins(in UInt256 key, out ImmutableArray<CoinState> value);
bool TryGetValidator(in EncodedPublicKey key, out Validator value);
}
}