@avalabs/bitcoin-module 0.0.22 → 0.1.0

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.
Files changed (34) hide show
  1. package/LICENSE +9 -0
  2. package/dist/index.cjs +7 -50
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +5 -3
  5. package/dist/index.d.ts +5 -3
  6. package/dist/index.js +8 -45
  7. package/dist/index.js.map +1 -1
  8. package/package.json +12 -3
  9. package/.turbo/turbo-build.log +0 -22
  10. package/.turbo/turbo-lint.log +0 -4
  11. package/.turbo/turbo-test.log +0 -16
  12. package/CHANGELOG.md +0 -49
  13. package/jest.config.js +0 -10
  14. package/src/env.ts +0 -25
  15. package/src/handlers/get-balances/get-balances.test.ts +0 -181
  16. package/src/handlers/get-balances/get-balances.ts +0 -108
  17. package/src/handlers/get-balances/index.ts +0 -1
  18. package/src/handlers/get-network-fee/get-network-fee.test.ts +0 -67
  19. package/src/handlers/get-network-fee/get-network-fee.ts +0 -34
  20. package/src/handlers/get-network-fee/index.ts +0 -1
  21. package/src/handlers/get-transaction-history/convert-btc-transaction.test.ts +0 -108
  22. package/src/handlers/get-transaction-history/convert-btc-transaction.ts +0 -36
  23. package/src/handlers/get-transaction-history/get-transaction-history.test.ts +0 -98
  24. package/src/handlers/get-transaction-history/get-transaction-history.ts +0 -23
  25. package/src/handlers/get-transaction-history/index.ts +0 -1
  26. package/src/index.ts +0 -1
  27. package/src/module.test.ts +0 -57
  28. package/src/module.ts +0 -74
  29. package/src/utils/extract-token-market-data.ts +0 -16
  30. package/src/utils/get-provider.test.ts +0 -55
  31. package/src/utils/get-provider.ts +0 -18
  32. package/tsconfig.jest.json +0 -7
  33. package/tsconfig.json +0 -14
  34. package/tsup.config.ts +0 -4
package/dist/index.d.cts CHANGED
@@ -1,15 +1,17 @@
1
1
  import * as _metamask_rpc_errors from '@metamask/rpc-errors';
2
2
  import * as _avalabs_vm_module_types_dist_transaction_history from '@avalabs/vm-module-types/dist/transaction-history';
3
3
  import * as _avalabs_vm_module_types_dist_balance from '@avalabs/vm-module-types/dist/balance';
4
- import { Module, Environment, GetBalancesParams, Manifest, Network, NetworkFees, GetTransactionHistory, RpcRequest } from '@avalabs/vm-module-types';
4
+ import { Module, Environment, GetAddressParams, GetAddressResponse, GetBalancesParams, Manifest, Network, NetworkFees, GetTransactionHistory, RpcRequest } from '@avalabs/vm-module-types';
5
5
 
6
6
  declare class BitcoinModule implements Module {
7
7
  #private;
8
8
  constructor({ environment }: {
9
9
  environment: Environment;
10
10
  });
11
- getAddress(): Promise<string>;
12
- getBalances({ addresses, currency, network, storage }: GetBalancesParams): Promise<_avalabs_vm_module_types_dist_balance.GetBalancesResponse>;
11
+ getAddress({ accountIndex, xpub, isTestnet, walletType }: GetAddressParams): Promise<GetAddressResponse>;
12
+ getBalances({ addresses, currency, network, storage }: GetBalancesParams): Promise<{
13
+ [x: string]: Record<string, _avalabs_vm_module_types_dist_balance.TokenWithBalanceBTC>;
14
+ }>;
13
15
  getManifest(): Manifest | undefined;
14
16
  getNetworkFee(network: Network): Promise<NetworkFees>;
15
17
  getTransactionHistory({ address, network }: GetTransactionHistory): Promise<{
package/dist/index.d.ts CHANGED
@@ -1,15 +1,17 @@
1
1
  import * as _metamask_rpc_errors from '@metamask/rpc-errors';
2
2
  import * as _avalabs_vm_module_types_dist_transaction_history from '@avalabs/vm-module-types/dist/transaction-history';
3
3
  import * as _avalabs_vm_module_types_dist_balance from '@avalabs/vm-module-types/dist/balance';
4
- import { Module, Environment, GetBalancesParams, Manifest, Network, NetworkFees, GetTransactionHistory, RpcRequest } from '@avalabs/vm-module-types';
4
+ import { Module, Environment, GetAddressParams, GetAddressResponse, GetBalancesParams, Manifest, Network, NetworkFees, GetTransactionHistory, RpcRequest } from '@avalabs/vm-module-types';
5
5
 
6
6
  declare class BitcoinModule implements Module {
7
7
  #private;
8
8
  constructor({ environment }: {
9
9
  environment: Environment;
10
10
  });
11
- getAddress(): Promise<string>;
12
- getBalances({ addresses, currency, network, storage }: GetBalancesParams): Promise<_avalabs_vm_module_types_dist_balance.GetBalancesResponse>;
11
+ getAddress({ accountIndex, xpub, isTestnet, walletType }: GetAddressParams): Promise<GetAddressResponse>;
12
+ getBalances({ addresses, currency, network, storage }: GetBalancesParams): Promise<{
13
+ [x: string]: Record<string, _avalabs_vm_module_types_dist_balance.TokenWithBalanceBTC>;
14
+ }>;
13
15
  getManifest(): Manifest | undefined;
14
16
  getNetworkFee(network: Network): Promise<NetworkFees>;
15
17
  getTransactionHistory({ address, network }: GetTransactionHistory): Promise<{