@stellar/typescript-wallet-sdk 1.4.1 → 1.5.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/CHANGELOG.MD +88 -0
- package/examples/sep24/sep24.ts +4 -9
- package/jest.e2e.config.js +9 -0
- package/lib/bundle.js +43625 -43200
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +45203 -42345
- package/lib/bundle_browser.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/walletSdk/Anchor/index.d.ts +1 -1
- package/lib/walletSdk/Auth/AuthHeaderSigner.d.ts +61 -0
- package/lib/walletSdk/Auth/index.d.ts +2 -2
- package/lib/walletSdk/Exceptions/index.d.ts +6 -0
- package/lib/walletSdk/Horizon/AccountService.d.ts +1 -1
- package/lib/walletSdk/Horizon/Stellar.d.ts +1 -1
- package/lib/walletSdk/Horizon/Transaction/TransactionBuilder.d.ts +1 -1
- package/lib/walletSdk/Recovery/AccountRecover.d.ts +1 -1
- package/lib/walletSdk/Recovery/index.d.ts +2 -2
- package/lib/walletSdk/Types/auth.d.ts +17 -0
- package/lib/walletSdk/Types/horizon.d.ts +1 -1
- package/lib/walletSdk/Types/index.d.ts +1 -1
- package/lib/walletSdk/Types/recovery.d.ts +2 -2
- package/package.json +6 -1
- package/src/index.ts +5 -0
- package/src/walletSdk/Anchor/index.ts +1 -1
- package/src/walletSdk/Auth/AuthHeaderSigner.ts +162 -0
- package/src/walletSdk/Auth/index.ts +48 -2
- package/src/walletSdk/Exceptions/index.ts +19 -0
- package/src/walletSdk/Horizon/AccountService.ts +1 -1
- package/src/walletSdk/Horizon/Stellar.ts +1 -1
- package/src/walletSdk/Horizon/Transaction/TransactionBuilder.ts +1 -1
- package/src/walletSdk/Recovery/AccountRecover.ts +1 -1
- package/src/walletSdk/Recovery/index.ts +2 -2
- package/src/walletSdk/Types/auth.ts +19 -0
- package/src/walletSdk/Types/horizon.ts +1 -1
- package/src/walletSdk/Types/index.ts +1 -1
- package/src/walletSdk/Types/recovery.ts +2 -2
- package/test/e2e/README.md +11 -0
- package/test/e2e/browser.test.ts +52 -0
- package/test/integration/README.md +38 -0
- package/test/integration/anchorplatform.test.ts +9 -0
- package/test/server.test.ts +13 -0
- package/test/wallet.test.ts +85 -0
- package/webpack.config.js +4 -0
- package/test/README.md +0 -18
package/CHANGELOG.MD
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Release notes - Typescript Wallet SDK - 1.5.0
|
|
2
|
+
|
|
3
|
+
# Added
|
|
4
|
+
* AuthHeaderSigner to Authentication Flow
|
|
5
|
+
* End to end tests for testing browser build
|
|
6
|
+
* Beta builds on merges to develop branch
|
|
7
|
+
|
|
8
|
+
# Release notes - Typescript Wallet SDK - 1.4.0
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
* SEP-10 sign challenge transaction helper
|
|
12
|
+
* Anchor platform integration tests
|
|
13
|
+
* Change project structure to monorepo
|
|
14
|
+
* Helper for parsing AnchorTransaction
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
* Fix stellar-sdk imports
|
|
18
|
+
|
|
19
|
+
# Release notes - Typescript Wallet SDK - 1.3.1
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
* Upgraded stellar-sdk to 11.1.0
|
|
23
|
+
|
|
24
|
+
# Release notes - Typescript Wallet SDK - 1.3.0
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
* Type aliases
|
|
28
|
+
* Account setup and recovery using SEP-30
|
|
29
|
+
* Customer / SEP-12 code
|
|
30
|
+
* SEP-6 deposit and withdrawal
|
|
31
|
+
* Exchange endpoints
|
|
32
|
+
* Recovery integration tests
|
|
33
|
+
* Watcher and polling for SEP-6
|
|
34
|
+
* AuthToken class
|
|
35
|
+
* Account merge and premade assets
|
|
36
|
+
* SEP-38 info, price, and prices
|
|
37
|
+
* SEP-38 Quote
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
* Some small fixes to recovery code
|
|
41
|
+
|
|
42
|
+
# Release notes - Typescript Wallet SDK - 1.2.1
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
* Better handle axios errors
|
|
46
|
+
|
|
47
|
+
# Release notes - Typescript Wallet SDK - 1.2.0
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
* Sponosring transactions
|
|
51
|
+
* Account modification functions
|
|
52
|
+
* Default domain signer and default client_domain
|
|
53
|
+
* Path payment and swap
|
|
54
|
+
* Sep24 example code
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
* Add build for both node and browser
|
|
58
|
+
|
|
59
|
+
# Release notes - Typescript Wallet SDK - 1.1.3
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
* Check if withdraw memo is hash type
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
* Upgrading stellar-sdk veresion for protocol 20
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Release notes - Typescript Wallet SDK - 1.1.2
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
* Fix watcher stopping
|
|
72
|
+
* Only emit txn if status changed
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Release notes - Typescript Wallet SDK - 1.1.0
|
|
76
|
+
|
|
77
|
+
### Added
|
|
78
|
+
* Submitting a transaction
|
|
79
|
+
* Manage non-XLM trustlines
|
|
80
|
+
* Importing and signing arbitrary transactions given an XDR
|
|
81
|
+
* Horizon getInfo and gitHistory functions
|
|
82
|
+
* Helper method for creating a keypair from random bytes
|
|
83
|
+
* Exporting classes
|
|
84
|
+
* Transfer withdrawal method
|
|
85
|
+
* Fee bump transaction
|
|
86
|
+
* Building function to submitWithFeeIncrease
|
|
87
|
+
|
|
88
|
+
|
package/examples/sep24/sep24.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
Types,
|
|
10
10
|
IssuedAssetId,
|
|
11
11
|
DefaultSigner,
|
|
12
|
+
Wallet,
|
|
12
13
|
} from "../../src";
|
|
13
14
|
import {
|
|
14
15
|
Memo,
|
|
@@ -34,7 +35,7 @@ const clientSecret = process.env.CLIENT_SECRET;
|
|
|
34
35
|
|
|
35
36
|
// Running example
|
|
36
37
|
|
|
37
|
-
let wallet;
|
|
38
|
+
let wallet: Wallet;
|
|
38
39
|
if (runMainnet === "true") {
|
|
39
40
|
console.log("Warning: you are running this script on the public network.");
|
|
40
41
|
wallet = walletSdk.Wallet.MainNet();
|
|
@@ -123,7 +124,6 @@ export let depositDone = false;
|
|
|
123
124
|
export const runDepositWatcher = (anchor: Anchor) => {
|
|
124
125
|
console.log("\nstarting watcher ...");
|
|
125
126
|
|
|
126
|
-
const stop: Types.WatcherStopFunction;
|
|
127
127
|
const onMessage = (m: Types.AnchorTransaction) => {
|
|
128
128
|
console.log({ m });
|
|
129
129
|
if (m.status === Types.TransactionStatus.completed) {
|
|
@@ -138,7 +138,7 @@ export const runDepositWatcher = (anchor: Anchor) => {
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
const watcher = anchor.sep24().watcher();
|
|
141
|
-
const
|
|
141
|
+
const { stop } = watcher.watchAllTransactions({
|
|
142
142
|
authToken: authToken,
|
|
143
143
|
assetCode: asset.code,
|
|
144
144
|
onMessage,
|
|
@@ -146,8 +146,6 @@ export const runDepositWatcher = (anchor: Anchor) => {
|
|
|
146
146
|
timeout: 5000,
|
|
147
147
|
lang: "en-US",
|
|
148
148
|
});
|
|
149
|
-
|
|
150
|
-
stop = resp.stop;
|
|
151
149
|
};
|
|
152
150
|
|
|
153
151
|
// Create Withdrawal
|
|
@@ -188,7 +186,6 @@ const sendWithdrawalTransaction = async (withdrawalTxn, kp) => {
|
|
|
188
186
|
export const runWithdrawWatcher = (anchor, kp) => {
|
|
189
187
|
console.log("\nstarting watcher ...");
|
|
190
188
|
|
|
191
|
-
const stop;
|
|
192
189
|
const onMessage = (m) => {
|
|
193
190
|
console.log({ m });
|
|
194
191
|
|
|
@@ -208,7 +205,7 @@ export const runWithdrawWatcher = (anchor, kp) => {
|
|
|
208
205
|
};
|
|
209
206
|
|
|
210
207
|
const watcher = anchor.sep24().watcher();
|
|
211
|
-
const
|
|
208
|
+
const { stop } = watcher.watchAllTransactions({
|
|
212
209
|
authToken: authToken,
|
|
213
210
|
assetCode: asset.code,
|
|
214
211
|
onMessage,
|
|
@@ -216,8 +213,6 @@ export const runWithdrawWatcher = (anchor, kp) => {
|
|
|
216
213
|
timeout: 5000,
|
|
217
214
|
lang: "en-US",
|
|
218
215
|
});
|
|
219
|
-
|
|
220
|
-
stop = resp.stop;
|
|
221
216
|
};
|
|
222
217
|
|
|
223
218
|
const walletSigner = DefaultSigner;
|