@bsv/sdk 1.4.9 → 1.4.10
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/dist/cjs/package.json +1 -1
- package/dist/cjs/src/auth/clients/AuthFetch.js +6 -1
- package/dist/cjs/src/auth/clients/AuthFetch.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/auth/clients/AuthFetch.js +6 -1
- package/dist/esm/src/auth/clients/AuthFetch.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/auth/clients/AuthFetch.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/README.md +4 -2
- package/package.json +1 -1
- package/src/auth/clients/AuthFetch.ts +5 -1
package/docs/README.md
CHANGED
|
@@ -7,13 +7,15 @@ The documentation is split into various pages, each covering a set of related fu
|
|
|
7
7
|
- [Transaction](./transaction.md) — Covers transaction construction, signing, broadcasters, fee models, merkle proofs, and SPV structures like BUMP
|
|
8
8
|
- [Messages](./messages.md) — Covers generalizable message signing, verification, encryption and decryption
|
|
9
9
|
- [TOTP](./totp.md) - Covers Time-based One Time Password, useful for validating counterparties across unsecured mediums.
|
|
10
|
-
- [Wallet](./wallet
|
|
10
|
+
- [Wallet](./wallet.md) - Covers the Wallet interface for communication between applications and wallets using a standard interface.
|
|
11
|
+
- [Wallet Substrates](./wallet-substrates.md) - Covers the Wallet Substrates which facilitate communication between apps and wallets.
|
|
11
12
|
- [Overlay Tools](./overlay-tools.md) - Covers the use of Overlays for broadcast of transactions based on topics, as well as distributed lookup of tokens.
|
|
12
13
|
- [Auth](./auth.md) - Mutual Authentication and Service Monetization Framework
|
|
14
|
+
- [Storage](./storage.md) — Covers a UHRP client for storing and retrieving data from distributed data storage services by hash.
|
|
13
15
|
- [Compat](./compat.md) — Covers deprecated functionality for legacy systems like BIP32 and ECIES
|
|
14
16
|
|
|
15
17
|
## Swagger
|
|
16
18
|
|
|
17
19
|
[BRC-100](https://brc.dev/100) defines a Unified, Vendor-Neutral, Unchanging, and Open BSV Blockchain Standard Wallet-to-Application Interface which is implemented in this library within the WalletClient class. The API is laid out here as a swagger openapi document to offer a fast-track to understanding the interface which is implemented across multiple substrates. The JSON api is generally considered a developer friendly introduction to the WalletClient, where an binary equivalent ABI may be preferred for production use cases.
|
|
18
20
|
|
|
19
|
-
- [Wallet JSON API Swagger](./swagger)
|
|
21
|
+
- [Wallet JSON API Swagger](./swagger)
|
package/package.json
CHANGED
|
@@ -355,11 +355,15 @@ export class AuthFetch {
|
|
|
355
355
|
const includedHeaders: [string, string][] = []
|
|
356
356
|
for (let [k, v] of Object.entries(headers)) {
|
|
357
357
|
k = k.toLowerCase() // We will always sign lower-case header keys
|
|
358
|
-
if (k.startsWith('x-bsv-') || k === '
|
|
358
|
+
if (k.startsWith('x-bsv-') || k === 'authorization') {
|
|
359
359
|
if (k.startsWith('x-bsv-auth')) {
|
|
360
360
|
throw new Error('No BSV auth headers allowed here!')
|
|
361
361
|
}
|
|
362
362
|
includedHeaders.push([k, v])
|
|
363
|
+
} else if (k.startsWith('content-type')) {
|
|
364
|
+
// Normalize the Content-Type header by removing any parameters (e.g., "; charset=utf-8")
|
|
365
|
+
v = (v as string).split(';')[0].trim()
|
|
366
|
+
includedHeaders.push([k, v])
|
|
363
367
|
} else {
|
|
364
368
|
throw new Error('Unsupported header in the simplified fetch implementation. Only content-type, authorization, and x-bsv-* headers are supported.')
|
|
365
369
|
}
|