@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.
- package/babel.config.js +5 -1
- package/jest.integration.config.js +1 -1
- package/lib/bundle.js +1880 -1723
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +23189 -9762
- package/lib/bundle_browser.js.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/walletSdk/Anchor/index.d.ts +2 -0
- package/lib/walletSdk/Exceptions/index.d.ts +15 -0
- package/lib/walletSdk/Server/index.d.ts +21 -0
- package/lib/walletSdk/Types/auth.d.ts +11 -1
- package/lib/walletSdk/Types/index.d.ts +1 -0
- package/lib/walletSdk/index.d.ts +3 -1
- package/package.json +7 -10
- package/src/index.ts +6 -0
- package/src/walletSdk/Anchor/index.ts +8 -4
- package/src/walletSdk/Auth/index.ts +3 -3
- package/src/walletSdk/Exceptions/index.ts +35 -0
- package/src/walletSdk/Horizon/Transaction/CommonTransactionBuilder.ts +5 -5
- package/src/walletSdk/Horizon/Transaction/SponsoringBuilder.ts +4 -4
- package/src/walletSdk/Horizon/Transaction/TransactionBuilder.ts +7 -8
- package/src/walletSdk/Server/index.ts +95 -0
- package/src/walletSdk/Types/auth.ts +13 -1
- package/src/walletSdk/Types/index.ts +1 -0
- package/src/walletSdk/index.ts +13 -1
- package/test/accountService.test.ts +12 -40
- package/test/integration/anchorplatform.test.ts +145 -0
- package/test/{integration.test.ts → integration/recovery.test.ts} +2 -2
- package/test/sep6.test.ts +1 -1
- package/test/server.test.ts +71 -0
- package/webpack.config.js +48 -32
- package/.eslintrc.js +0 -76
- package/.github/workflows/integrationTest.yml +0 -19
- package/.github/workflows/runTests.yml +0 -14
- package/.husky/pre-commit +0 -5
- package/LICENSE +0 -204
- package/README.md +0 -51
- package/docs/WalletGuide.md +0 -5
- package/jest.config.js +0 -9
- package/prettier.config.js +0 -1
package/README.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Stellar Typescript Wallet SDK [](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
|
package/docs/WalletGuide.md
DELETED
package/jest.config.js
DELETED
package/prettier.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("@stellar/prettier-config");
|