Skip to content

Commit

Permalink
refactor: simplify imports
Browse files Browse the repository at this point in the history
Signed-off-by: theanmolsharma <[email protected]>
  • Loading branch information
theanmolsharma committed Dec 30, 2023
1 parent 94eec80 commit 9d97f4e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
18 changes: 7 additions & 11 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
export {
decodeSilentPaymentAddress,
encodeSilentPaymentAddress,
} from './encoding.ts';

export { hashOutpoints, calculateSumOfPrivateKeys } from './utility.ts';

export { createOutputs } from './outputs.ts';
export { scanOutputs } from './scanning.ts';

export { Transaction } from './transaction.ts';
export * from './constants.ts';
export * from './encoding.ts';
export * from './interface.ts';
export * from './outputs.ts';
export * from './scanning.ts';
export * from './transaction.ts';
export * from './utility.ts';
2 changes: 1 addition & 1 deletion test/encoding.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createLabeledSilentPaymentAddress,
decodeSilentPaymentAddress,
encodeSilentPaymentAddress,
} from '../src/core/encoding';
} from '../src/core';
import { Buffer } from 'buffer';
import { unlabelled, labelled } from './fixtures/encoding';

Expand Down
8 changes: 6 additions & 2 deletions test/outputs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Outpoint, PrivateKey, RecipientAddress } from '../src/core/interface';
import { createOutputs } from '../src/core';
import {
createOutputs,
Outpoint,
PrivateKey,
RecipientAddress,
} from '../src/core';
import { testData } from './fixtures/outputs';

describe('Outputs', () => {
Expand Down
3 changes: 1 addition & 2 deletions test/scanning.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { scanOutputs } from '../src/core';
import { LabelMap } from '../src/core/interface';
import { scanOutputs, LabelMap } from '../src/core';
import { Buffer } from 'buffer';
import { testData } from './fixtures/scanning';

Expand Down
8 changes: 6 additions & 2 deletions test/utility.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Outpoint, PrivateKey } from '../src/core/interface';
import { calculateSumOfPrivateKeys, hashOutpoints } from '../src/core';
import {
calculateSumOfPrivateKeys,
hashOutpoints,
Outpoint,
PrivateKey,
} from '../src/core';
import { inputPrivateKeys, outpoints } from './fixtures/utility';

describe('Utility', () => {
Expand Down

0 comments on commit 9d97f4e

Please sign in to comment.