Exemplo n.º 1
0
        public IndexerTypes.Result <IndexerTypes.Cell>?GetCells(IndexerTypes.SearchKey searchKey, string order = "asc", int limit = 100, string?afterCursor = null)
        {
            List <object> methodParams = new() { searchKey, order, Hex.Int32ToHex(limit) };

            if (afterCursor != null)
            {
                methodParams.Add(afterCursor);
            }
            return(Call <IndexerTypes.Result <IndexerTypes.Cell> >("get_cells", methodParams.ToArray()));
        }
Exemplo n.º 2
0
 public Types.Header?GetHeaderByNumber(UInt64 number)
 {
     string[] methodParams = { Hex.UInt64ToHex(number) };
     return(Call <Types.Header>("get_header_by_number", methodParams));
 }
Exemplo n.º 3
0
 public Types.EpochView?GetEpochByNumber(UInt64 epochNumber)
 {
     string[] methodParams = { Hex.UInt64ToHex(epochNumber) };
     return(Call <Types.EpochView>("get_epoch_by_number", methodParams));
 }
Exemplo n.º 4
0
 public Types.Block?GetBlockByNumber(UInt64 num)
 {
     string[] methodParams = { Hex.UInt64ToHex(num) };
     return(Call <Types.Block>("get_block_by_number", methodParams));
 }
Exemplo n.º 5
0
 /// <summary>
 /// get a live cell entity
 /// </summary>
 /// <param name="txhash"></param>
 /// <param name="index"></param>
 /// <returns></returns>
 public Types.LiveCell?GetLiveCell(string txhash, ulong index)
 {
     object[] methodParams = { new { index = Hex.UInt64ToHex(index), tx_hash = txhash }, true };
     return(Call <Types.LiveCell>("get_live_cell", methodParams));
 }
Exemplo n.º 6
0
        public UInt64 GetTipBlockNumber()
        {
            var result = Call <string>("get_tip_block_number") ?? "0x0";

            return(Hex.HexToUInt64(result));
        }