@hashgraph/hedera-wallet-connect 1.3.7-canary.813a6d2.0 → 1.3.7-canary.a9c215c.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/{src/lib/dapp → dapp}/DAppSigner.js +1 -2
  2. package/dist/{src/lib/dapp → dapp}/index.d.ts +4 -0
  3. package/dist/{src/lib/dapp → dapp}/index.js +42 -46
  4. package/dist/{src/lib/shared → shared}/utils.d.ts +2 -2
  5. package/dist/{src/lib/shared → shared}/utils.js +2 -2
  6. package/package.json +5 -2
  7. package/dist/src/index.d.ts +0 -1
  8. package/dist/src/index.js +0 -20
  9. package/dist/test/_helpers.d.ts +0 -38
  10. package/dist/test/_helpers.js +0 -95
  11. package/dist/test/dapp/DAppConnector.test.d.ts +0 -1
  12. package/dist/test/dapp/DAppConnector.test.js +0 -234
  13. package/dist/test/dapp/DAppSigner.test.d.ts +0 -1
  14. package/dist/test/dapp/DAppSigner.test.js +0 -155
  15. package/dist/test/utils.test.d.ts +0 -1
  16. package/dist/test/utils.test.js +0 -201
  17. package/dist/test/wallet/methods/wallet-executeTransaction.test.d.ts +0 -1
  18. package/dist/test/wallet/methods/wallet-executeTransaction.test.js +0 -43
  19. package/dist/test/wallet/methods/wallet-getNodeAddresses.test.d.ts +0 -1
  20. package/dist/test/wallet/methods/wallet-getNodeAddresses.test.js +0 -40
  21. package/dist/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts +0 -1
  22. package/dist/test/wallet/methods/wallet-signAndExecuteQuery.test.js +0 -41
  23. package/dist/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts +0 -1
  24. package/dist/test/wallet/methods/wallet-signAndExecuteTransaction.test.js +0 -48
  25. package/dist/test/wallet/methods/wallet-signMessage.test.d.ts +0 -1
  26. package/dist/test/wallet/methods/wallet-signMessage.test.js +0 -60
  27. package/dist/test/wallet/methods/wallet-signTransaction.test.d.ts +0 -1
  28. package/dist/test/wallet/methods/wallet-signTransaction.test.js +0 -47
  29. package/dist/test/wallet/wallet-init.test.d.ts +0 -1
  30. package/dist/test/wallet/wallet-init.test.js +0 -53
  31. /package/dist/{src/lib/dapp → dapp}/DAppSigner.d.ts +0 -0
  32. /package/dist/{src/lib/index.d.ts → index.d.ts} +0 -0
  33. /package/dist/{src/lib/index.js → index.js} +0 -0
  34. /package/dist/{src/lib/shared → shared}/chainIds.d.ts +0 -0
  35. /package/dist/{src/lib/shared → shared}/chainIds.js +0 -0
  36. /package/dist/{src/lib/shared → shared}/errors.d.ts +0 -0
  37. /package/dist/{src/lib/shared → shared}/errors.js +0 -0
  38. /package/dist/{src/lib/shared → shared}/events.d.ts +0 -0
  39. /package/dist/{src/lib/shared → shared}/events.js +0 -0
  40. /package/dist/{src/lib/shared → shared}/extensionController.d.ts +0 -0
  41. /package/dist/{src/lib/shared → shared}/extensionController.js +0 -0
  42. /package/dist/{src/lib/shared → shared}/index.d.ts +0 -0
  43. /package/dist/{src/lib/shared → shared}/index.js +0 -0
  44. /package/dist/{src/lib/shared → shared}/logger.d.ts +0 -0
  45. /package/dist/{src/lib/shared → shared}/logger.js +0 -0
  46. /package/dist/{src/lib/shared → shared}/methods.d.ts +0 -0
  47. /package/dist/{src/lib/shared → shared}/methods.js +0 -0
  48. /package/dist/{src/lib/shared → shared}/payloads.d.ts +0 -0
  49. /package/dist/{src/lib/shared → shared}/payloads.js +0 -0
  50. /package/dist/{src/lib/wallet → wallet}/index.d.ts +0 -0
  51. /package/dist/{src/lib/wallet → wallet}/index.js +0 -0
  52. /package/dist/{src/lib/wallet → wallet}/provider.d.ts +0 -0
  53. /package/dist/{src/lib/wallet → wallet}/provider.js +0 -0
  54. /package/dist/{src/lib/wallet → wallet}/types.d.ts +0 -0
  55. /package/dist/{src/lib/wallet → wallet}/types.js +0 -0
@@ -1,53 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
- import { Wallet as HederaWallet, LedgerId } from '@hashgraph/sdk';
21
- import { HederaChainId, Wallet } from '../../src';
22
- import { defaultAccountNumber, projectId, testPrivateKeyECDSA, walletMetadata, } from '../_helpers';
23
- describe(Wallet.name, () => {
24
- describe('create', () => {
25
- let wallet;
26
- beforeAll(async () => {
27
- wallet = await Wallet.create(projectId, walletMetadata);
28
- });
29
- it('should create Wallet instance with a projectId and walletMetadata', async () => {
30
- expect(wallet).toBeInstanceOf(Wallet);
31
- expect(wallet.metadata).toBe(walletMetadata);
32
- expect(wallet.core.projectId).toBe(projectId);
33
- });
34
- describe('getHederaWallet', () => {
35
- // [HederaChainId, accountId, LedgerId]
36
- const testCases = [
37
- [HederaChainId.Mainnet, defaultAccountNumber, LedgerId.MAINNET],
38
- [HederaChainId.Previewnet, defaultAccountNumber, LedgerId.PREVIEWNET],
39
- [HederaChainId.Testnet, defaultAccountNumber, LedgerId.TESTNET],
40
- [HederaChainId.Mainnet, `0.0.${defaultAccountNumber}`, LedgerId.MAINNET],
41
- [HederaChainId.Previewnet, `0.0.${defaultAccountNumber}`, LedgerId.PREVIEWNET],
42
- [HederaChainId.Testnet, `0.0.${defaultAccountNumber}`, LedgerId.TESTNET],
43
- ];
44
- test.each(testCases)('it should initialize HederaWallet with %p chainId and %p accountId', async (chainId, accountId, ledgerId) => {
45
- const hederaWallet = wallet.getHederaWallet(chainId, accountId.toString(), testPrivateKeyECDSA);
46
- expect(wallet).toBeInstanceOf(Wallet);
47
- expect(hederaWallet).toBeInstanceOf(HederaWallet);
48
- expect(hederaWallet.accountId.toString()).toBe(`0.0.${defaultAccountNumber}`);
49
- expect(hederaWallet.provider.getLedgerId()).toBe(ledgerId);
50
- });
51
- });
52
- });
53
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes