@stellar/typescript-wallet-sdk 5.1.0 → 6.0.0-beta.1793996806758
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 +14 -0
- package/lib/bundle.js +1801 -435
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +1801 -435
- package/lib/bundle_browser.js.map +1 -1
- package/lib/walletSdk/Exceptions/index.d.ts +3 -0
- package/lib/walletSdk/Uri/Sep7Pay.d.ts +10 -0
- package/package.json +3 -3
- package/src/walletSdk/Exceptions/index.ts +9 -0
- package/src/walletSdk/Uri/Sep7Pay.ts +42 -1
- package/src/walletSdk/Uri/sep7Parser.ts +18 -2
- package/test/accountService.test.ts +3 -2
- package/test/auth.test.ts +51 -0
- package/test/e2e/reactNative.test.ts +112 -1
- package/test/fixtures/muxedContract.ts +47 -0
- package/test/integration/anchorplatform.test.ts +2 -1
- package/test/integration/recovery.test.ts +10 -10
- package/test/sep6.test.ts +2 -1
- package/test/sep7.test.ts +219 -2
- package/test/server.test.ts +39 -0
- package/test/stellar.test.ts +35 -15
- package/test/transaction.test.ts +43 -0
- package/test/wallet.test.ts +2 -1
package/CHANGELOG.MD
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Release notes - Typescript Wallet SDK - 6.0.0
|
|
2
|
+
|
|
3
|
+
### BREAKING CHANGES
|
|
4
|
+
* **React Native: reading a `stellar.toml` needs a `TextDecoder` that supports `{ fatal: true }`.** stellar-sdk 17.3 and later decodes `stellar.toml` with `TextDecoder("utf-8", { fatal: true })`. Where `TextDecoder` can't be built with `fatal`, as with `fast-text-encoding` on Hermes, `Anchor.sep1()` rejects, and with it every call that needs the anchor's `stellar.toml`, and `verifySignature()` on a SEP-7 URI returns `false` for a valid signature. Both worked with such a `TextDecoder` in 5.1.0. Loading the bundle doesn't need one. Each is verified in a Hermes-like sandbox test
|
|
5
|
+
* `isValidSep7Uri` and `parseSep7Uri` reject a `pay` URI that has a `memo` when its destination is a contract (`C…`) or muxed contract (`W…`) address, and `Sep7Pay` won't build one: its constructor and its `destination` and `memo` setters throw `Sep7ContractMemoError`. Paying either takes a Soroban transaction, and the network rejects a Soroban transaction that has a memo, so a wallet could only drop the memo. A `C…` destination with a memo used to be accepted
|
|
6
|
+
* `Sep10.authenticate` and `Server.signChallengeTransaction` reject a challenge whose `client_domain` operation has no source account or uses the server account as its source, with `ChallengeValidationFailedError`. stellar-sdk 17.3's `WebAuth.readChallengeTx` added this check, since SEP-10 requires that source to be the client domain's signing key. 5.1.0 accepted such a challenge
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
* Protocol 30 support: upgraded `@stellar/stellar-sdk` from `17.0.1` to `17.4.0`, which adds CAP-84 muxed contract (`W…`) addresses. `Stellar.decodeTransaction` and `Sep7Tx.getTransaction` decode a transaction that contains one, and `isValidSep7Uri` accepts a `tx` URI whose transaction contains one. Before, decoding such a transaction threw, so `isValidSep7Uri` returned `false`
|
|
10
|
+
* `isValidSep7Uri` and `parseSep7Uri` accept a muxed contract (`W…`) address as a `pay` destination. As with a contract (`C…`) address, a wallet can only pay it with a Stellar Asset Contract `transfer`. `TransactionBuilder`'s `transfer`, `pathPay` and `accountMerge` reject it, as before
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
* Stricter checks from stellar-sdk 17.1 to 17.4 that reach this SDK: `AccountService.getInfo` and `getHistory` reject with a `TypeError` for an empty account address, which used to query a different Horizon endpoint; `Anchor.sep1()` rejects a `homeDomain` with credentials, a path, a query or a fragment before making a request; and a `stellar.toml` that isn't valid UTF-8 fails to load. See the stellar-sdk changelog for the full list
|
|
14
|
+
|
|
1
15
|
# Release notes - Typescript Wallet SDK - 5.1.0
|
|
2
16
|
|
|
3
17
|
### Added
|