tigerbeetle-node 0.14.179 → 0.14.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
package/dist/test.js CHANGED
@@ -65,11 +65,11 @@ test('range check `code` on Account to be u16', async () => {
65
65
  const codeError = await client.createAccounts([account]).catch(error => error);
66
66
  assert_1.default.strictEqual(codeError.message, 'code must be a u16.');
67
67
  const accounts = await client.lookupAccounts([account.id]);
68
- assert_1.default.strictEqual(accounts.length, 0);
68
+ assert_1.default.deepStrictEqual(accounts, []);
69
69
  });
70
70
  test('can create accounts', async () => {
71
71
  const errors = await client.createAccounts([accountA]);
72
- assert_1.default.strictEqual(errors.length, 0);
72
+ assert_1.default.deepStrictEqual(errors, []);
73
73
  });
74
74
  test('can return error on account', async () => {
75
75
  const errors = await client.createAccounts([accountA, accountB]);
@@ -129,7 +129,7 @@ test('can create a transfer', async () => {
129
129
  timestamp: 0n,
130
130
  };
131
131
  const errors = await client.createTransfers([transfer]);
132
- assert_1.default.strictEqual(errors.length, 0);
132
+ assert_1.default.deepStrictEqual(errors, []);
133
133
  const accounts = await client.lookupAccounts([accountA.id, accountB.id]);
134
134
  assert_1.default.strictEqual(accounts.length, 2);
135
135
  assert_1.default.strictEqual(accounts[0].credits_posted, 100n);
@@ -160,7 +160,7 @@ test('can create a two-phase transfer', async () => {
160
160
  timestamp: 0n,
161
161
  };
162
162
  const errors = await client.createTransfers([transfer]);
163
- assert_1.default.strictEqual(errors.length, 0);
163
+ assert_1.default.deepStrictEqual(errors, []);
164
164
  const accounts = await client.lookupAccounts([accountA.id, accountB.id]);
165
165
  assert_1.default.strictEqual(accounts.length, 2);
166
166
  assert_1.default.strictEqual(accounts[0].credits_posted, 100n);
@@ -204,7 +204,7 @@ test('can post a two-phase transfer', async () => {
204
204
  timestamp: 0n,
205
205
  };
206
206
  const errors = await client.createTransfers([commit]);
207
- assert_1.default.strictEqual(errors.length, 0);
207
+ assert_1.default.deepStrictEqual(errors, []);
208
208
  const accounts = await client.lookupAccounts([accountA.id, accountB.id]);
209
209
  assert_1.default.strictEqual(accounts.length, 2);
210
210
  assert_1.default.strictEqual(accounts[0].credits_posted, 150n);
@@ -233,7 +233,7 @@ test('can reject a two-phase transfer', async () => {
233
233
  timestamp: 0n,
234
234
  };
235
235
  const transferErrors = await client.createTransfers([transfer]);
236
- assert_1.default.strictEqual(transferErrors.length, 0);
236
+ assert_1.default.deepStrictEqual(transferErrors, []);
237
237
  const reject = {
238
238
  id: 5n,
239
239
  debit_account_id: BigInt(0),
@@ -250,7 +250,7 @@ test('can reject a two-phase transfer', async () => {
250
250
  timestamp: 0n,
251
251
  };
252
252
  const errors = await client.createTransfers([reject]);
253
- assert_1.default.strictEqual(errors.length, 0);
253
+ assert_1.default.deepStrictEqual(errors, []);
254
254
  const accounts = await client.lookupAccounts([accountA.id, accountB.id]);
255
255
  assert_1.default.strictEqual(accounts.length, 2);
256
256
  assert_1.default.strictEqual(accounts[0].credits_posted, 150n);
@@ -325,7 +325,7 @@ test('cannot void an expired transfer', async () => {
325
325
  timestamp: 0n,
326
326
  };
327
327
  const transferErrors = await client.createTransfers([transfer]);
328
- assert_1.default.strictEqual(transferErrors.length, 0);
328
+ assert_1.default.deepStrictEqual(transferErrors, []);
329
329
  await new Promise(_ => setTimeout(_, 1000));
330
330
  const reject = {
331
331
  id: 7n,
@@ -363,7 +363,7 @@ test('can get account transfers', async () => {
363
363
  timestamp: 0n
364
364
  };
365
365
  const account_errors = await client.createAccounts([accountC]);
366
- assert_1.default.strictEqual(account_errors.length, 0);
366
+ assert_1.default.deepStrictEqual(account_errors, []);
367
367
  var transfers_created = [];
368
368
  for (var i = 0; i < 10; i++) {
369
369
  transfers_created.push({
@@ -383,7 +383,7 @@ test('can get account transfers', async () => {
383
383
  });
384
384
  }
385
385
  const transfers_created_result = await client.createTransfers(transfers_created);
386
- assert_1.default.strictEqual(transfers_created_result.length, 0);
386
+ assert_1.default.deepStrictEqual(transfers_created_result, []);
387
387
  var filter = {
388
388
  account_id: accountC.id,
389
389
  timestamp_min: 0n,
@@ -487,7 +487,7 @@ test('can get account transfers', async () => {
487
487
  };
488
488
  transfers = await client.getAccountTransfers(filter);
489
489
  history = await client.getAccountHistory(filter);
490
- assert_1.default.strictEqual(transfers.length, 0);
490
+ assert_1.default.deepStrictEqual(transfers, []);
491
491
  assert_1.default.strictEqual(history.length, transfers.length);
492
492
  filter = {
493
493
  account_id: accountC.id,
@@ -535,7 +535,7 @@ test('can get account transfers', async () => {
535
535
  };
536
536
  transfers = await client.getAccountTransfers(filter);
537
537
  history = await client.getAccountHistory(filter);
538
- assert_1.default.strictEqual(transfers.length, 0);
538
+ assert_1.default.deepStrictEqual(transfers, []);
539
539
  assert_1.default.strictEqual(history.length, transfers.length);
540
540
  filter = {
541
541
  account_id: 0n,
@@ -544,8 +544,8 @@ test('can get account transfers', async () => {
544
544
  limit: 8190,
545
545
  flags: _1.AccountFilterFlags.credits | _1.AccountFilterFlags.debits,
546
546
  };
547
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
548
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
547
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
548
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
549
549
  filter = {
550
550
  account_id: accountC.id,
551
551
  timestamp_min: (1n << 64n) - 1n,
@@ -553,8 +553,8 @@ test('can get account transfers', async () => {
553
553
  limit: 8190,
554
554
  flags: _1.AccountFilterFlags.credits | _1.AccountFilterFlags.debits,
555
555
  };
556
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
557
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
556
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
557
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
558
558
  filter = {
559
559
  account_id: accountC.id,
560
560
  timestamp_min: 0n,
@@ -562,8 +562,8 @@ test('can get account transfers', async () => {
562
562
  limit: 8190,
563
563
  flags: _1.AccountFilterFlags.credits | _1.AccountFilterFlags.debits,
564
564
  };
565
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
566
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
565
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
566
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
567
567
  filter = {
568
568
  account_id: accountC.id,
569
569
  timestamp_min: (1n << 64n) - 2n,
@@ -571,8 +571,8 @@ test('can get account transfers', async () => {
571
571
  limit: 8190,
572
572
  flags: _1.AccountFilterFlags.credits | _1.AccountFilterFlags.debits,
573
573
  };
574
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
575
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
574
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
575
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
576
576
  filter = {
577
577
  account_id: accountC.id,
578
578
  timestamp_min: 0n,
@@ -580,8 +580,8 @@ test('can get account transfers', async () => {
580
580
  limit: 0,
581
581
  flags: _1.AccountFilterFlags.credits | _1.AccountFilterFlags.debits,
582
582
  };
583
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
584
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
583
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
584
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
585
585
  filter = {
586
586
  account_id: accountC.id,
587
587
  timestamp_min: 0n,
@@ -589,8 +589,8 @@ test('can get account transfers', async () => {
589
589
  limit: 8190,
590
590
  flags: _1.AccountFilterFlags.none,
591
591
  };
592
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
593
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
592
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
593
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
594
594
  filter = {
595
595
  account_id: accountC.id,
596
596
  timestamp_min: 0n,
@@ -598,8 +598,8 @@ test('can get account transfers', async () => {
598
598
  limit: 8190,
599
599
  flags: 0xFFFF,
600
600
  };
601
- assert_1.default.strictEqual((await client.getAccountTransfers(filter)).length, 0);
602
- assert_1.default.strictEqual((await client.getAccountHistory(filter)).length, 0);
601
+ assert_1.default.deepStrictEqual((await client.getAccountTransfers(filter)), []);
602
+ assert_1.default.deepStrictEqual((await client.getAccountHistory(filter)), []);
603
603
  });
604
604
  async function main() {
605
605
  const start = new Date().getTime();
package/dist/test.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C;AAC/C,wBAWU;AAEV,MAAM,MAAM,GAAG,IAAA,eAAY,EAAC;IAC1B,UAAU,EAAE,EAAE;IACd,iBAAiB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,MAAM,CAAC;CACtD,CAAC,CAAA;AAGF,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AACzC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AACzC,MAAM,QAAQ,GAAY;IACxB,EAAE,EAAE,GAAG;IACP,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,EAAE;IACnB,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,EAAE;IACjB,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,EAAE;CACd,CAAA;AACD,MAAM,QA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,CAAA;YACb,CAAC,CAAC,CAAA;SACH;QACD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,GAAC,IAAI,CAAC,CAAA;KACnD;YAAS;QACR,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;KACvB;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAqB,EAAE,EAAE;IACrC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAA","sourcesContent":["import assert, { AssertionError } from 'assert'\nimport {\n createClient,\n Account,\n Transfer,\n TransferFlags,\n CreateAccountError,\n CreateTransferError,\n AccountFilter,\n AccountFilterFlags,\n AccountFlags,\n id,\n} from '.'\n\nconst client = createClient({\n cluster_id: 0n,\n replica_addresses: [process.env.TB_ADDRESS || '3000']\n})\n\n// Test data\nconst Zeroed32Bytes = Buffer.alloc(32, 0)\nconst Zeroed48Bytes = Buffer.alloc(48, 0)\nconst accountA: Account = {\n id: 17n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 718,\n flags: 0,\n timestamp: 0n // this will be set correctly by the TigerBeetle server\n}\nconst accountB: Account = {\n id: 19n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 719,\n flags: 0,\n timestamp: 0n // this will be set correctly by the TigerBeetle server\n}\n\nconst tests: Array<{ name: string, fn: () => Promise<void> }> = []\nfunction test(name: string, fn: () => Promise<void>) {\n tests.push({ name, fn })\n}\ntest.skip = (name: string, fn: () => Promise<void>) => {\n console.log(name + ': SKIPPED')\n}\n\ntest('id() monotonically increasing', async (): Promise<void> => {\n let idA = id();\n for (let i = 0; i < 10_000_000; i++) {\n // Ensure ID is monotonic between milliseconds if the loop executes too fast.\n if (i % 10_000 == 0) {\n await new Promise(resolve => setTimeout(resolve, 1))\n }\n\n const idB = id();\n assert.ok(idB > idA, 'id() returned an id that did not monotonically increase');\n idA = idB;\n }\n})\n\ntest('range check `code` on Account to be u16', async (): Promise<void> => {\n const account = { ...accountA, id: 0n }\n\n account.code = 65535 + 1\n const codeError = await client.createAccounts([account]).catch(error => error)\n assert.strictEqual(codeError.message, 'code must be a u16.')\n\n const accounts = await client.lookupAccounts([account.id])\n assert.strictEqual(accounts.length, 0)\n})\n\ntest('can create accounts', async (): Promise<void> => {\n const errors = await client.createAccounts([accountA])\n assert.strictEqual(errors.length, 0)\n})\n\ntest('can return error on account', async (): Promise<void> => {\n const errors = await client.createAccounts([accountA, accountB])\n\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.exists })\n})\n\ntest('error if timestamp is not set to 0n on account', async (): Promise<void> => {\n const account = { ...accountA, timestamp: 2n, id: 3n }\n const errors = await client.createAccounts([account])\n\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.timestamp_must_be_zero }) \n})\n\ntest('can lookup accounts', async (): Promise<void> => {\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n\n assert.strictEqual(accounts.length, 2)\n const account1 = accounts[0]\n assert.strictEqual(account1.id, 17n)\n assert.strictEqual(account1.credits_posted, 0n)\n assert.strictEqual(account1.credits_pending, 0n)\n assert.strictEqual(account1.debits_posted, 0n)\n assert.strictEqual(account1.debits_pending, 0n)\n assert.strictEqual(account1.user_data_128, 0n)\n assert.strictEqual(account1.user_data_64, 0n)\n assert.strictEqual(account1.user_data_32, 0)\n assert.strictEqual(account1.code, 718)\n assert.strictEqual(account1.ledger, 1)\n assert.strictEqual(account1.flags, 0)\n assert.ok(account1.timestamp > 0n)\n\n const account2 = accounts[1]\n assert.strictEqual(account2.id, 19n)\n assert.strictEqual(account2.credits_posted, 0n)\n assert.strictEqual(account2.credits_pending, 0n)\n assert.strictEqual(account2.debits_posted, 0n)\n assert.strictEqual(account2.debits_pending, 0n)\n assert.strictEqual(account2.user_data_128, 0n)\n assert.strictEqual(account2.user_data_64, 0n)\n assert.strictEqual(account2.user_data_32, 0)\n assert.strictEqual(account2.code, 719)\n assert.strictEqual(account2.ledger, 1)\n assert.strictEqual(account2.flags, 0)\n assert.ok(account2.timestamp > 0n)\n})\n\ntest('can create a transfer', async (): Promise<void> => {\n const transfer: Transfer = {\n id: 1n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: 0,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer])\n assert.strictEqual(errors.length, 0)\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 100n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 100n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can create a two-phase transfer', async (): Promise<void> => {\n let flags = 0\n flags |= TransferFlags.pending\n const transfer: Transfer = {\n id: 2n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 2e9,\n ledger: 1,\n code: 1,\n flags,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer])\n assert.strictEqual(errors.length, 0)\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 100n)\n assert.strictEqual(accounts[0].credits_pending, 50n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 100n)\n assert.strictEqual(accounts[1].debits_pending, 50n)\n\n // Lookup the transfer:\n const transfers = await client.lookupTransfers([transfer.id])\n assert.strictEqual(transfers.length, 1)\n assert.strictEqual(transfers[0].id, 2n)\n assert.strictEqual(transfers[0].debit_account_id, accountB.id)\n assert.strictEqual(transfers[0].credit_account_id, accountA.id)\n assert.strictEqual(transfers[0].amount, 50n)\n assert.strictEqual(transfers[0].user_data_128, 0n)\n assert.strictEqual(transfers[0].user_data_64, 0n)\n assert.strictEqual(transfers[0].user_data_32, 0)\n assert.strictEqual(transfers[0].timeout > 0, true)\n assert.strictEqual(transfers[0].code, 1)\n assert.strictEqual(transfers[0].flags, 2)\n assert.strictEqual(transfers[0].timestamp > 0, true)\n})\n\ntest('can post a two-phase transfer', async (): Promise<void> => {\n let flags = 0\n flags |= TransferFlags.post_pending_transfer\n\n const commit: Transfer = {\n id: 3n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 2n,// must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: flags,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([commit])\n assert.strictEqual(errors.length, 0)\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can reject a two-phase transfer', async (): Promise<void> => {\n // Create a two-phase transfer:\n const transfer: Transfer = {\n id: 4n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 1e9,\n ledger: 1,\n code: 1,\n flags: TransferFlags.pending,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n const transferErrors = await client.createTransfers([transfer])\n assert.strictEqual(transferErrors.length, 0)\n\n // send in the reject\n const reject: Transfer = {\n id: 5n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 4n, // must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.void_pending_transfer,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([reject])\n assert.strictEqual(errors.length, 0)\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can link transfers', async (): Promise<void> => {\n const transfer1: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.linked, // points to transfer2\n timestamp: 0n, // will be set correctly by the TigerBeetle server\n }\n const transfer2: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n // Does not have linked flag as it is the end of the chain.\n // This will also cause it to fail as this is now a duplicate with different flags\n flags: 0,\n timestamp: 0n, // will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer1, transfer2])\n assert.strictEqual(errors.length, 2)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.linked_event_failed })\n assert.deepStrictEqual(errors[1], { index: 1, result: CreateTransferError.exists_with_different_flags })\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('cannot void an expired transfer', async (): Promise<void> => {\n // Create a two-phase transfer:\n const transfer: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 1,\n ledger: 1,\n code: 1,\n flags: TransferFlags.pending,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n const transferErrors = await client.createTransfers([transfer])\n assert.strictEqual(transferErrors.length, 0)\n\n // Wait for the transfer to expire.\n // TODO: Use `await setTimeout(1000)` when upgrade to Node > 15.\n await new Promise(_ => setTimeout(_, 1000));\n \n // send in the reject\n const reject: Transfer = {\n id: 7n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 6n, // must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.void_pending_transfer,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([reject])\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.pending_transfer_expired }) \n})\n\ntest('can get account transfers', async (): Promise<void> => {\n const accountC: Account = {\n id: 21n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 718,\n flags: AccountFlags.history,\n timestamp: 0n\n }\n const account_errors = await client.createAccounts([accountC])\n assert.strictEqual(account_errors.length, 0)\n\n var transfers_created : Transfer[] = [];\n // Create transfers where the new account is either the debit or credit account:\n for (var i=0; i<10;i++) {\n transfers_created.push({\n id: BigInt(i + 10000),\n debit_account_id: i % 2 == 0 ? accountC.id : accountA.id,\n credit_account_id: i % 2 == 0 ? accountB.id : accountC.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: 0,\n timestamp: 0n,\n });\n }\n\n const transfers_created_result = await client.createTransfers(transfers_created)\n assert.strictEqual(transfers_created_result.length, 0)\n\n // Query all transfers for accountC:\n var filter: AccountFilter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n var transfers = await client.getAccountTransfers(filter)\n var history = await client.getAccountHistory(filter)\n assert.strictEqual(transfers.length, transfers_created.length)\n assert.strictEqual(history.length, transfers.length)\n\n var timestamp = 0n;\n var i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query only the debit transfers for accountC, descending:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(transfer.timestamp < timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query only the credit transfers for accountC, descending:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(transfer.timestamp < timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query the first 5 transfers for accountC:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 0n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query the next 5 transfers for accountC, with pagination:\n filter = {\n account_id: accountC.id,\n timestamp_min: timestamp + 1n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query again, no more transfers should be found:\n filter = {\n account_id: accountC.id,\n timestamp_min: timestamp + 1n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, 0)\n assert.strictEqual(history.length, transfers.length)\n\n // Query the first 5 transfers for accountC ORDER BY DESC:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp > transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query the next 5 transfers for accountC, with pagination:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: timestamp - 1n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp > transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++; \n }\n\n // Query again, no more transfers should be found:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: timestamp - 1n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, 0)\n assert.strictEqual(history.length, transfers.length)\n\n // Invalid account:\n filter = {\n account_id: 0n,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Invalid timestamp min:\n filter = {\n account_id: accountC.id,\n timestamp_min: (1n << 64n) - 1n, // ulong max value\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Invalid timestamp max:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: (1n << 64n) - 1n, // ulong max value\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Invalid timestamp range:\n filter = {\n account_id: accountC.id,\n timestamp_min: (1n << 64n) - 2n, // ulong max - 1\n timestamp_max: 1n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Zero limit:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 0,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Empty flags:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.none,\n } \n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n // Invalid flags:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: 0xFFFF,\n }\n assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)\n assert.strictEqual((await client.getAccountHistory(filter)).length, 0)\n\n})\n\nasync function main () {\n const start = new Date().getTime()\n try {\n for (let i = 0; i < tests.length; i++) {\n await tests[i].fn().then(() => {\n console.log(tests[i].name + \": PASSED\")\n }).catch(error => {\n console.log(tests[i].name + \": FAILED\")\n throw error\n })\n }\n const end = new Date().getTime()\n console.log('Time taken (s):', (end - start)/1000)\n } finally {\n await client.destroy()\n }\n}\n\nmain().catch((error: AssertionError) => {\n console.log('operator:', error.operator)\n console.log('stack:', error.stack)\n process.exit(-1);\n})\n"]}
1
+ {"version":3,"file":"test.js","sourceRoot":"","s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AAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,UAAU,CAAC,CAAA;YACzC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,UAAU,CAAC,CAAA;gBACvC,MAAM,KAAK,CAAA;YACb,CAAC,CAAC,CAAA;SACH;QACD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,GAAC,IAAI,CAAC,CAAA;KACnD;YAAS;QACR,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;KACvB;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAqB,EAAE,EAAE;IACrC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAA","sourcesContent":["import assert, { AssertionError } from 'assert'\nimport {\n createClient,\n Account,\n Transfer,\n TransferFlags,\n CreateAccountError,\n CreateTransferError,\n AccountFilter,\n AccountFilterFlags,\n AccountFlags,\n id,\n} from '.'\n\nconst client = createClient({\n cluster_id: 0n,\n replica_addresses: [process.env.TB_ADDRESS || '3000']\n})\n\n// Test data\nconst Zeroed32Bytes = Buffer.alloc(32, 0)\nconst Zeroed48Bytes = Buffer.alloc(48, 0)\nconst accountA: Account = {\n id: 17n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 718,\n flags: 0,\n timestamp: 0n // this will be set correctly by the TigerBeetle server\n}\nconst accountB: Account = {\n id: 19n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 719,\n flags: 0,\n timestamp: 0n // this will be set correctly by the TigerBeetle server\n}\n\nconst tests: Array<{ name: string, fn: () => Promise<void> }> = []\nfunction test(name: string, fn: () => Promise<void>) {\n tests.push({ name, fn })\n}\ntest.skip = (name: string, fn: () => Promise<void>) => {\n console.log(name + ': SKIPPED')\n}\n\ntest('id() monotonically increasing', async (): Promise<void> => {\n let idA = id();\n for (let i = 0; i < 10_000_000; i++) {\n // Ensure ID is monotonic between milliseconds if the loop executes too fast.\n if (i % 10_000 == 0) {\n await new Promise(resolve => setTimeout(resolve, 1))\n }\n\n const idB = id();\n assert.ok(idB > idA, 'id() returned an id that did not monotonically increase');\n idA = idB;\n }\n})\n\ntest('range check `code` on Account to be u16', async (): Promise<void> => {\n const account = { ...accountA, id: 0n }\n\n account.code = 65535 + 1\n const codeError = await client.createAccounts([account]).catch(error => error)\n assert.strictEqual(codeError.message, 'code must be a u16.')\n\n const accounts = await client.lookupAccounts([account.id])\n assert.deepStrictEqual(accounts, [])\n})\n\ntest('can create accounts', async (): Promise<void> => {\n const errors = await client.createAccounts([accountA])\n assert.deepStrictEqual(errors, [])\n})\n\ntest('can return error on account', async (): Promise<void> => {\n const errors = await client.createAccounts([accountA, accountB])\n\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.exists })\n})\n\ntest('error if timestamp is not set to 0n on account', async (): Promise<void> => {\n const account = { ...accountA, timestamp: 2n, id: 3n }\n const errors = await client.createAccounts([account])\n\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.timestamp_must_be_zero })\n})\n\ntest('can lookup accounts', async (): Promise<void> => {\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n\n assert.strictEqual(accounts.length, 2)\n const account1 = accounts[0]\n assert.strictEqual(account1.id, 17n)\n assert.strictEqual(account1.credits_posted, 0n)\n assert.strictEqual(account1.credits_pending, 0n)\n assert.strictEqual(account1.debits_posted, 0n)\n assert.strictEqual(account1.debits_pending, 0n)\n assert.strictEqual(account1.user_data_128, 0n)\n assert.strictEqual(account1.user_data_64, 0n)\n assert.strictEqual(account1.user_data_32, 0)\n assert.strictEqual(account1.code, 718)\n assert.strictEqual(account1.ledger, 1)\n assert.strictEqual(account1.flags, 0)\n assert.ok(account1.timestamp > 0n)\n\n const account2 = accounts[1]\n assert.strictEqual(account2.id, 19n)\n assert.strictEqual(account2.credits_posted, 0n)\n assert.strictEqual(account2.credits_pending, 0n)\n assert.strictEqual(account2.debits_posted, 0n)\n assert.strictEqual(account2.debits_pending, 0n)\n assert.strictEqual(account2.user_data_128, 0n)\n assert.strictEqual(account2.user_data_64, 0n)\n assert.strictEqual(account2.user_data_32, 0)\n assert.strictEqual(account2.code, 719)\n assert.strictEqual(account2.ledger, 1)\n assert.strictEqual(account2.flags, 0)\n assert.ok(account2.timestamp > 0n)\n})\n\ntest('can create a transfer', async (): Promise<void> => {\n const transfer: Transfer = {\n id: 1n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: 0,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer])\n assert.deepStrictEqual(errors, [])\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 100n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 100n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can create a two-phase transfer', async (): Promise<void> => {\n let flags = 0\n flags |= TransferFlags.pending\n const transfer: Transfer = {\n id: 2n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 2e9,\n ledger: 1,\n code: 1,\n flags,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer])\n assert.deepStrictEqual(errors, [])\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 100n)\n assert.strictEqual(accounts[0].credits_pending, 50n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 100n)\n assert.strictEqual(accounts[1].debits_pending, 50n)\n\n // Lookup the transfer:\n const transfers = await client.lookupTransfers([transfer.id])\n assert.strictEqual(transfers.length, 1)\n assert.strictEqual(transfers[0].id, 2n)\n assert.strictEqual(transfers[0].debit_account_id, accountB.id)\n assert.strictEqual(transfers[0].credit_account_id, accountA.id)\n assert.strictEqual(transfers[0].amount, 50n)\n assert.strictEqual(transfers[0].user_data_128, 0n)\n assert.strictEqual(transfers[0].user_data_64, 0n)\n assert.strictEqual(transfers[0].user_data_32, 0)\n assert.strictEqual(transfers[0].timeout > 0, true)\n assert.strictEqual(transfers[0].code, 1)\n assert.strictEqual(transfers[0].flags, 2)\n assert.strictEqual(transfers[0].timestamp > 0, true)\n})\n\ntest('can post a two-phase transfer', async (): Promise<void> => {\n let flags = 0\n flags |= TransferFlags.post_pending_transfer\n\n const commit: Transfer = {\n id: 3n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 2n,// must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: flags,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([commit])\n assert.deepStrictEqual(errors, [])\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can reject a two-phase transfer', async (): Promise<void> => {\n // Create a two-phase transfer:\n const transfer: Transfer = {\n id: 4n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 1e9,\n ledger: 1,\n code: 1,\n flags: TransferFlags.pending,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n const transferErrors = await client.createTransfers([transfer])\n assert.deepStrictEqual(transferErrors, [])\n\n // send in the reject\n const reject: Transfer = {\n id: 5n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 4n, // must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.void_pending_transfer,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([reject])\n assert.deepStrictEqual(errors, [])\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('can link transfers', async (): Promise<void> => {\n const transfer1: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.linked, // points to transfer2\n timestamp: 0n, // will be set correctly by the TigerBeetle server\n }\n const transfer2: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n // Does not have linked flag as it is the end of the chain.\n // This will also cause it to fail as this is now a duplicate with different flags\n flags: 0,\n timestamp: 0n, // will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([transfer1, transfer2])\n assert.strictEqual(errors.length, 2)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.linked_event_failed })\n assert.deepStrictEqual(errors[1], { index: 1, result: CreateTransferError.exists_with_different_flags })\n\n const accounts = await client.lookupAccounts([accountA.id, accountB.id])\n assert.strictEqual(accounts.length, 2)\n assert.strictEqual(accounts[0].credits_posted, 150n)\n assert.strictEqual(accounts[0].credits_pending, 0n)\n assert.strictEqual(accounts[0].debits_posted, 0n)\n assert.strictEqual(accounts[0].debits_pending, 0n)\n\n assert.strictEqual(accounts[1].credits_posted, 0n)\n assert.strictEqual(accounts[1].credits_pending, 0n)\n assert.strictEqual(accounts[1].debits_posted, 150n)\n assert.strictEqual(accounts[1].debits_pending, 0n)\n})\n\ntest('cannot void an expired transfer', async (): Promise<void> => {\n // Create a two-phase transfer:\n const transfer: Transfer = {\n id: 6n,\n debit_account_id: accountB.id,\n credit_account_id: accountA.id,\n amount: 50n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 1,\n ledger: 1,\n code: 1,\n flags: TransferFlags.pending,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n const transferErrors = await client.createTransfers([transfer])\n assert.deepStrictEqual(transferErrors, [])\n\n // Wait for the transfer to expire.\n // TODO: Use `await setTimeout(1000)` when upgrade to Node > 15.\n await new Promise(_ => setTimeout(_, 1000));\n\n // send in the reject\n const reject: Transfer = {\n id: 7n,\n debit_account_id: BigInt(0),\n credit_account_id: BigInt(0),\n amount: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 6n, // must match the id of the pending transfer\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: TransferFlags.void_pending_transfer,\n timestamp: 0n, // this will be set correctly by the TigerBeetle server\n }\n\n const errors = await client.createTransfers([reject])\n assert.strictEqual(errors.length, 1)\n assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.pending_transfer_expired })\n})\n\ntest('can get account transfers', async (): Promise<void> => {\n const accountC: Account = {\n id: 21n,\n debits_pending: 0n,\n debits_posted: 0n,\n credits_pending: 0n,\n credits_posted: 0n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n reserved: 0,\n ledger: 1,\n code: 718,\n flags: AccountFlags.history,\n timestamp: 0n\n }\n const account_errors = await client.createAccounts([accountC])\n assert.deepStrictEqual(account_errors, [])\n\n var transfers_created : Transfer[] = [];\n // Create transfers where the new account is either the debit or credit account:\n for (var i=0; i<10;i++) {\n transfers_created.push({\n id: BigInt(i + 10000),\n debit_account_id: i % 2 == 0 ? accountC.id : accountA.id,\n credit_account_id: i % 2 == 0 ? accountB.id : accountC.id,\n amount: 100n,\n user_data_128: 0n,\n user_data_64: 0n,\n user_data_32: 0,\n pending_id: 0n,\n timeout: 0,\n ledger: 1,\n code: 1,\n flags: 0,\n timestamp: 0n,\n });\n }\n\n const transfers_created_result = await client.createTransfers(transfers_created)\n assert.deepStrictEqual(transfers_created_result, [])\n\n // Query all transfers for accountC:\n var filter: AccountFilter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n var transfers = await client.getAccountTransfers(filter)\n var history = await client.getAccountHistory(filter)\n assert.strictEqual(transfers.length, transfers_created.length)\n assert.strictEqual(history.length, transfers.length)\n\n var timestamp = 0n;\n var i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query only the debit transfers for accountC, descending:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(transfer.timestamp < timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query only the credit transfers for accountC, descending:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(transfer.timestamp < timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query the first 5 transfers for accountC:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 0n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query the next 5 transfers for accountC, with pagination:\n filter = {\n account_id: accountC.id,\n timestamp_min: timestamp + 1n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp < transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query again, no more transfers should be found:\n filter = {\n account_id: accountC.id,\n timestamp_min: timestamp + 1n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.deepStrictEqual(transfers, [])\n assert.strictEqual(history.length, transfers.length)\n\n // Query the first 5 transfers for accountC ORDER BY DESC:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n timestamp = 1n << 64n;\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp > transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query the next 5 transfers for accountC, with pagination:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: timestamp - 1n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.strictEqual(transfers.length, transfers_created.length / 2)\n assert.strictEqual(history.length, transfers.length)\n\n i = 0;\n for (var transfer of transfers) {\n assert.ok(timestamp > transfer.timestamp);\n timestamp = transfer.timestamp;\n\n assert.ok(history[i].timestamp == transfer.timestamp);\n i++;\n }\n\n // Query again, no more transfers should be found:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: timestamp - 1n,\n limit: transfers_created.length / 2,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits | AccountFilterFlags.reversed,\n }\n transfers = await client.getAccountTransfers(filter)\n history = await client.getAccountHistory(filter)\n\n assert.deepStrictEqual(transfers, [])\n assert.strictEqual(history.length, transfers.length)\n\n // Invalid account:\n filter = {\n account_id: 0n,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Invalid timestamp min:\n filter = {\n account_id: accountC.id,\n timestamp_min: (1n << 64n) - 1n, // ulong max value\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Invalid timestamp max:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: (1n << 64n) - 1n, // ulong max value\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Invalid timestamp range:\n filter = {\n account_id: accountC.id,\n timestamp_min: (1n << 64n) - 2n, // ulong max - 1\n timestamp_max: 1n,\n limit: 8190,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Zero limit:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 0,\n flags: AccountFilterFlags.credits | AccountFilterFlags.debits,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Empty flags:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: AccountFilterFlags.none,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n // Invalid flags:\n filter = {\n account_id: accountC.id,\n timestamp_min: 0n,\n timestamp_max: 0n,\n limit: 8190,\n flags: 0xFFFF,\n }\n assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])\n assert.deepStrictEqual((await client.getAccountHistory(filter)), [])\n\n})\n\nasync function main () {\n const start = new Date().getTime()\n try {\n for (let i = 0; i < tests.length; i++) {\n await tests[i].fn().then(() => {\n console.log(tests[i].name + \": PASSED\")\n }).catch(error => {\n console.log(tests[i].name + \": FAILED\")\n throw error\n })\n }\n const end = new Date().getTime()\n console.log('Time taken (s):', (end - start)/1000)\n } finally {\n await client.destroy()\n }\n}\n\nmain().catch((error: AssertionError) => {\n console.log('operator:', error.operator)\n console.log('stack:', error.stack)\n process.exit(-1);\n})\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tigerbeetle-node",
3
- "version": "0.14.179",
3
+ "version": "0.14.181",
4
4
  "description": "TigerBeetle Node.js client",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
package/src/test.ts CHANGED
@@ -81,12 +81,12 @@ test('range check `code` on Account to be u16', async (): Promise<void> => {
81
81
  assert.strictEqual(codeError.message, 'code must be a u16.')
82
82
 
83
83
  const accounts = await client.lookupAccounts([account.id])
84
- assert.strictEqual(accounts.length, 0)
84
+ assert.deepStrictEqual(accounts, [])
85
85
  })
86
86
 
87
87
  test('can create accounts', async (): Promise<void> => {
88
88
  const errors = await client.createAccounts([accountA])
89
- assert.strictEqual(errors.length, 0)
89
+ assert.deepStrictEqual(errors, [])
90
90
  })
91
91
 
92
92
  test('can return error on account', async (): Promise<void> => {
@@ -101,7 +101,7 @@ test('error if timestamp is not set to 0n on account', async (): Promise<void> =
101
101
  const errors = await client.createAccounts([account])
102
102
 
103
103
  assert.strictEqual(errors.length, 1)
104
- assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.timestamp_must_be_zero })
104
+ assert.deepStrictEqual(errors[0], { index: 0, result: CreateAccountError.timestamp_must_be_zero })
105
105
  })
106
106
 
107
107
  test('can lookup accounts', async (): Promise<void> => {
@@ -155,7 +155,7 @@ test('can create a transfer', async (): Promise<void> => {
155
155
  }
156
156
 
157
157
  const errors = await client.createTransfers([transfer])
158
- assert.strictEqual(errors.length, 0)
158
+ assert.deepStrictEqual(errors, [])
159
159
 
160
160
  const accounts = await client.lookupAccounts([accountA.id, accountB.id])
161
161
  assert.strictEqual(accounts.length, 2)
@@ -190,7 +190,7 @@ test('can create a two-phase transfer', async (): Promise<void> => {
190
190
  }
191
191
 
192
192
  const errors = await client.createTransfers([transfer])
193
- assert.strictEqual(errors.length, 0)
193
+ assert.deepStrictEqual(errors, [])
194
194
 
195
195
  const accounts = await client.lookupAccounts([accountA.id, accountB.id])
196
196
  assert.strictEqual(accounts.length, 2)
@@ -241,7 +241,7 @@ test('can post a two-phase transfer', async (): Promise<void> => {
241
241
  }
242
242
 
243
243
  const errors = await client.createTransfers([commit])
244
- assert.strictEqual(errors.length, 0)
244
+ assert.deepStrictEqual(errors, [])
245
245
 
246
246
  const accounts = await client.lookupAccounts([accountA.id, accountB.id])
247
247
  assert.strictEqual(accounts.length, 2)
@@ -274,7 +274,7 @@ test('can reject a two-phase transfer', async (): Promise<void> => {
274
274
  timestamp: 0n, // this will be set correctly by the TigerBeetle server
275
275
  }
276
276
  const transferErrors = await client.createTransfers([transfer])
277
- assert.strictEqual(transferErrors.length, 0)
277
+ assert.deepStrictEqual(transferErrors, [])
278
278
 
279
279
  // send in the reject
280
280
  const reject: Transfer = {
@@ -294,7 +294,7 @@ test('can reject a two-phase transfer', async (): Promise<void> => {
294
294
  }
295
295
 
296
296
  const errors = await client.createTransfers([reject])
297
- assert.strictEqual(errors.length, 0)
297
+ assert.deepStrictEqual(errors, [])
298
298
 
299
299
  const accounts = await client.lookupAccounts([accountA.id, accountB.id])
300
300
  assert.strictEqual(accounts.length, 2)
@@ -379,12 +379,12 @@ test('cannot void an expired transfer', async (): Promise<void> => {
379
379
  timestamp: 0n, // this will be set correctly by the TigerBeetle server
380
380
  }
381
381
  const transferErrors = await client.createTransfers([transfer])
382
- assert.strictEqual(transferErrors.length, 0)
382
+ assert.deepStrictEqual(transferErrors, [])
383
383
 
384
384
  // Wait for the transfer to expire.
385
385
  // TODO: Use `await setTimeout(1000)` when upgrade to Node > 15.
386
386
  await new Promise(_ => setTimeout(_, 1000));
387
-
387
+
388
388
  // send in the reject
389
389
  const reject: Transfer = {
390
390
  id: 7n,
@@ -404,7 +404,7 @@ test('cannot void an expired transfer', async (): Promise<void> => {
404
404
 
405
405
  const errors = await client.createTransfers([reject])
406
406
  assert.strictEqual(errors.length, 1)
407
- assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.pending_transfer_expired })
407
+ assert.deepStrictEqual(errors[0], { index: 0, result: CreateTransferError.pending_transfer_expired })
408
408
  })
409
409
 
410
410
  test('can get account transfers', async (): Promise<void> => {
@@ -424,7 +424,7 @@ test('can get account transfers', async (): Promise<void> => {
424
424
  timestamp: 0n
425
425
  }
426
426
  const account_errors = await client.createAccounts([accountC])
427
- assert.strictEqual(account_errors.length, 0)
427
+ assert.deepStrictEqual(account_errors, [])
428
428
 
429
429
  var transfers_created : Transfer[] = [];
430
430
  // Create transfers where the new account is either the debit or credit account:
@@ -447,7 +447,7 @@ test('can get account transfers', async (): Promise<void> => {
447
447
  }
448
448
 
449
449
  const transfers_created_result = await client.createTransfers(transfers_created)
450
- assert.strictEqual(transfers_created_result.length, 0)
450
+ assert.deepStrictEqual(transfers_created_result, [])
451
451
 
452
452
  // Query all transfers for accountC:
453
453
  var filter: AccountFilter = {
@@ -493,7 +493,7 @@ test('can get account transfers', async (): Promise<void> => {
493
493
  timestamp = transfer.timestamp;
494
494
 
495
495
  assert.ok(history[i].timestamp == transfer.timestamp);
496
- i++;
496
+ i++;
497
497
  }
498
498
 
499
499
  // Query only the credit transfers for accountC, descending:
@@ -517,7 +517,7 @@ test('can get account transfers', async (): Promise<void> => {
517
517
  timestamp = transfer.timestamp;
518
518
 
519
519
  assert.ok(history[i].timestamp == transfer.timestamp);
520
- i++;
520
+ i++;
521
521
  }
522
522
 
523
523
  // Query the first 5 transfers for accountC:
@@ -541,7 +541,7 @@ test('can get account transfers', async (): Promise<void> => {
541
541
  timestamp = transfer.timestamp;
542
542
 
543
543
  assert.ok(history[i].timestamp == transfer.timestamp);
544
- i++;
544
+ i++;
545
545
  }
546
546
 
547
547
  // Query the next 5 transfers for accountC, with pagination:
@@ -564,7 +564,7 @@ test('can get account transfers', async (): Promise<void> => {
564
564
  timestamp = transfer.timestamp;
565
565
 
566
566
  assert.ok(history[i].timestamp == transfer.timestamp);
567
- i++;
567
+ i++;
568
568
  }
569
569
 
570
570
  // Query again, no more transfers should be found:
@@ -578,7 +578,7 @@ test('can get account transfers', async (): Promise<void> => {
578
578
  transfers = await client.getAccountTransfers(filter)
579
579
  history = await client.getAccountHistory(filter)
580
580
 
581
- assert.strictEqual(transfers.length, 0)
581
+ assert.deepStrictEqual(transfers, [])
582
582
  assert.strictEqual(history.length, transfers.length)
583
583
 
584
584
  // Query the first 5 transfers for accountC ORDER BY DESC:
@@ -602,7 +602,7 @@ test('can get account transfers', async (): Promise<void> => {
602
602
  timestamp = transfer.timestamp;
603
603
 
604
604
  assert.ok(history[i].timestamp == transfer.timestamp);
605
- i++;
605
+ i++;
606
606
  }
607
607
 
608
608
  // Query the next 5 transfers for accountC, with pagination:
@@ -625,7 +625,7 @@ test('can get account transfers', async (): Promise<void> => {
625
625
  timestamp = transfer.timestamp;
626
626
 
627
627
  assert.ok(history[i].timestamp == transfer.timestamp);
628
- i++;
628
+ i++;
629
629
  }
630
630
 
631
631
  // Query again, no more transfers should be found:
@@ -639,7 +639,7 @@ test('can get account transfers', async (): Promise<void> => {
639
639
  transfers = await client.getAccountTransfers(filter)
640
640
  history = await client.getAccountHistory(filter)
641
641
 
642
- assert.strictEqual(transfers.length, 0)
642
+ assert.deepStrictEqual(transfers, [])
643
643
  assert.strictEqual(history.length, transfers.length)
644
644
 
645
645
  // Invalid account:
@@ -650,8 +650,8 @@ test('can get account transfers', async (): Promise<void> => {
650
650
  limit: 8190,
651
651
  flags: AccountFilterFlags.credits | AccountFilterFlags.debits,
652
652
  }
653
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
654
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
653
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
654
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
655
655
 
656
656
  // Invalid timestamp min:
657
657
  filter = {
@@ -661,8 +661,8 @@ test('can get account transfers', async (): Promise<void> => {
661
661
  limit: 8190,
662
662
  flags: AccountFilterFlags.credits | AccountFilterFlags.debits,
663
663
  }
664
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
665
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
664
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
665
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
666
666
 
667
667
  // Invalid timestamp max:
668
668
  filter = {
@@ -672,8 +672,8 @@ test('can get account transfers', async (): Promise<void> => {
672
672
  limit: 8190,
673
673
  flags: AccountFilterFlags.credits | AccountFilterFlags.debits,
674
674
  }
675
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
676
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
675
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
676
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
677
677
 
678
678
  // Invalid timestamp range:
679
679
  filter = {
@@ -683,8 +683,8 @@ test('can get account transfers', async (): Promise<void> => {
683
683
  limit: 8190,
684
684
  flags: AccountFilterFlags.credits | AccountFilterFlags.debits,
685
685
  }
686
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
687
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
686
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
687
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
688
688
 
689
689
  // Zero limit:
690
690
  filter = {
@@ -694,8 +694,8 @@ test('can get account transfers', async (): Promise<void> => {
694
694
  limit: 0,
695
695
  flags: AccountFilterFlags.credits | AccountFilterFlags.debits,
696
696
  }
697
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
698
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
697
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
698
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
699
699
 
700
700
  // Empty flags:
701
701
  filter = {
@@ -704,9 +704,9 @@ test('can get account transfers', async (): Promise<void> => {
704
704
  timestamp_max: 0n,
705
705
  limit: 8190,
706
706
  flags: AccountFilterFlags.none,
707
- }
708
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
709
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
707
+ }
708
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
709
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
710
710
 
711
711
  // Invalid flags:
712
712
  filter = {
@@ -716,8 +716,8 @@ test('can get account transfers', async (): Promise<void> => {
716
716
  limit: 8190,
717
717
  flags: 0xFFFF,
718
718
  }
719
- assert.strictEqual((await client.getAccountTransfers(filter)).length, 0)
720
- assert.strictEqual((await client.getAccountHistory(filter)).length, 0)
719
+ assert.deepStrictEqual((await client.getAccountTransfers(filter)), [])
720
+ assert.deepStrictEqual((await client.getAccountHistory(filter)), [])
721
721
 
722
722
  })
723
723