示例#1
0
 /// <summary> Chain asynchronous. </summary>
 /// <remarks> 19.09.2020. </remarks>
 /// <param name="token"> A token that allows processing to be cancelled. </param>
 /// <returns> The chain. </returns>
 public async Task <string> ChainAsync(CancellationToken token)
 {
     return(await _client.InvokeAsync <string>("system_chain", null, token));
 }
示例#2
0
 public async Task <string> GetMetaDataAsync(CancellationToken token)
 {
     return(await _client.InvokeAsync <string>("state_getMetadata", null, token));
 }
示例#3
0
 /// <summary>Pendings the extrinsic asynchronous.</summary>
 /// <param name="token">The token.</param>
 /// <returns>
 ///   <br />
 /// </returns>
 public async Task <Extrinsic[]> PendingExtrinsicAsync(CancellationToken token)
 {
     return(await _client.InvokeAsync <Extrinsic[]>("author_pendingExtrinsics", null, token));
 }
示例#4
0
        /// Get header of a relay chain block.
        public async Task <Header> GetHeaderAsync(Hash hash, CancellationToken token)
        {
            var parameter = hash != null ? hash.HexString : null;

            return(await _client.InvokeAsync <Header>("chain_getHeader", new object[] { parameter }, token));
        }