@stellar/typescript-wallet-sdk 1.3.1 → 1.4.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 (40) hide show
  1. package/babel.config.js +5 -1
  2. package/jest.integration.config.js +1 -1
  3. package/lib/bundle.js +1880 -1723
  4. package/lib/bundle.js.map +1 -1
  5. package/lib/bundle_browser.js +23189 -9762
  6. package/lib/bundle_browser.js.map +1 -1
  7. package/lib/index.d.ts +5 -0
  8. package/lib/walletSdk/Anchor/index.d.ts +2 -0
  9. package/lib/walletSdk/Exceptions/index.d.ts +15 -0
  10. package/lib/walletSdk/Server/index.d.ts +21 -0
  11. package/lib/walletSdk/Types/auth.d.ts +11 -1
  12. package/lib/walletSdk/Types/index.d.ts +1 -0
  13. package/lib/walletSdk/index.d.ts +3 -1
  14. package/package.json +7 -10
  15. package/src/index.ts +6 -0
  16. package/src/walletSdk/Anchor/index.ts +8 -4
  17. package/src/walletSdk/Auth/index.ts +3 -3
  18. package/src/walletSdk/Exceptions/index.ts +35 -0
  19. package/src/walletSdk/Horizon/Transaction/CommonTransactionBuilder.ts +5 -5
  20. package/src/walletSdk/Horizon/Transaction/SponsoringBuilder.ts +4 -4
  21. package/src/walletSdk/Horizon/Transaction/TransactionBuilder.ts +7 -8
  22. package/src/walletSdk/Server/index.ts +95 -0
  23. package/src/walletSdk/Types/auth.ts +13 -1
  24. package/src/walletSdk/Types/index.ts +1 -0
  25. package/src/walletSdk/index.ts +13 -1
  26. package/test/accountService.test.ts +12 -40
  27. package/test/integration/anchorplatform.test.ts +145 -0
  28. package/test/{integration.test.ts → integration/recovery.test.ts} +2 -2
  29. package/test/sep6.test.ts +1 -1
  30. package/test/server.test.ts +71 -0
  31. package/webpack.config.js +48 -32
  32. package/.eslintrc.js +0 -76
  33. package/.github/workflows/integrationTest.yml +0 -19
  34. package/.github/workflows/runTests.yml +0 -14
  35. package/.husky/pre-commit +0 -5
  36. package/LICENSE +0 -204
  37. package/README.md +0 -51
  38. package/docs/WalletGuide.md +0 -5
  39. package/jest.config.js +0 -9
  40. package/prettier.config.js +0 -1
package/README.md DELETED
@@ -1,51 +0,0 @@
1
- # Stellar Typescript Wallet SDK [![npm version](https://badge.fury.io/js/@stellar%2Ftypescript-wallet-sdk.svg)](https://badge.fury.io/js/@stellar%2Ftypescript-wallet-sdk)
2
-
3
- Typescript Wallet SDK is a library that allows developers to build wallet
4
- applications on the Stellar network faster. It utilizes
5
- [Javascript Stellar SDK](https://github.com/stellar/js-stellar-sdk) to
6
- communicate with a Stellar Horizon server.
7
- It offers wide range of functionality to simplify integration with the Stellar
8
- network, and connect to the anchors easily, utilizing various Stellar protocols
9
- (SEPs)
10
-
11
- ## Dependency
12
-
13
- The library is available via npm. To import `typescript-wallet-sdk` library you
14
- need to add it as a dependency to your code:
15
-
16
- yarn:
17
-
18
- ```shell
19
- yarn add @stellar/typescript-wallet-sdk
20
- ```
21
-
22
- npm:
23
-
24
- ```shell
25
- npm install @stellar/typescript-wallet-sdk
26
- ```
27
-
28
- ## Introduction
29
-
30
- Here's a small example creating main wallet class with default configuration
31
- connected to testnet network:
32
-
33
- ```typescript
34
- let wallet = walletSdk.Wallet.TestNet();
35
- ```
36
-
37
- It should later be re-used across the code, as it has access to various useful
38
- children classes. For example, you can authenticate with the `testanchor` as
39
- simple as:
40
-
41
- ```typescript
42
- const authKey = SigningKeypair.fromSecret("my secret key");
43
- const anchor = wallet.anchor({ homeDomain: "testanchor.stellar.org" });
44
- const sep10 = await anchor.sep10();
45
-
46
- const authToken = await sep10.authenticate({ accountKp: authKey });
47
- ```
48
-
49
- Read
50
- [full wallet guide](https://developers.stellar.org/docs/category/build-a-wallet-with-the-wallet-sdk)
51
- for more info
@@ -1,5 +0,0 @@
1
- # Wallet SDK usage guide
2
-
3
- Please refer to
4
- [Stellar Docs](https://developers.stellar.org/docs/category/build-a-wallet) on
5
- how to use wallet sdk.
package/jest.config.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- rootDir: "./",
3
- preset: "ts-jest",
4
- transform: {
5
- "^.+\\.(ts|tsx)?$": "ts-jest",
6
- "^.+\\.(js|jsx)$": "babel-jest",
7
- },
8
- testPathIgnorePatterns: ["/node_modules/", "integration.test.ts"],
9
- };
@@ -1 +0,0 @@
1
- module.exports = require("@stellar/prettier-config");