import assert from 'node:assert/strict';
import { buildMerkleRoot, paymentLeafV1Hash } from './index';

const leaves = [
  {
    txHash: '0x' + '11'.repeat(32),
    from: '0x' + '22'.repeat(20),
    to: '0x' + '33'.repeat(20),
    value: 0n,
    blockNumber: 1n,
    blockTimestamp: 2n,
    gasUsed: 3n,
    success: true,
  },
];
const h = paymentLeafV1Hash(138, leaves[0]);
assert.equal(buildMerkleRoot([h]), h);
console.log('checkpoint-core merkle ok');
