Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
How to fetch secondary EOSIO table index with i128 type in eosjs

I want to get data using get_table_rows(). The index of the data is i128 type.

uint128_t by_corp_id_timestamp() const {
      return uint128_t(corp_id) << 64 | timestamp.elapsed.count();
}

So I tried in the order below.

First, the timestamp was converted into time_point.

const time_point = dateToTimePoint(timestamp);

If the timestamp is 2021-09-19T14:32:00.000, the time_point is 1632061920000000.

I succeeded in getting a value with time_point.

Then i tried to make i128 key by combining time_point with corp_id.

buffer_time_stamp.pushArray(numeric.decimalToBinary(16, '' + corp_id + time_point));
const bound_time = numeric.binaryToDecimal(buffer_time_stamp.getUint8Array(16));

If corp_id is 1000 and time_stamp is 2021-09-19T14:32:00.000, bound_time is 10001632061920000000.

According to by_corp_id_timestamp(), I think I properly obtained the key. However, the above bound_time does not work.

Please help me.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!