@bsv/sdk 1.3.27 → 1.3.28
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 -2
- 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 -2
- 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/auth.md +4 -4
- package/package.json +1 -1
- package/src/auth/clients/AuthFetch.ts +6 -2
package/docs/auth.md
CHANGED
|
@@ -1139,10 +1139,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1139
1139
|
Creates a nonce derived from a wallet
|
|
1140
1140
|
|
|
1141
1141
|
```ts
|
|
1142
|
-
export async function createNonce(wallet: WalletInterface, counterparty: WalletCounterparty = "self"): Promise<
|
|
1142
|
+
export async function createNonce(wallet: WalletInterface, counterparty: WalletCounterparty = "self"): Promise<Base64String>
|
|
1143
1143
|
```
|
|
1144
1144
|
|
|
1145
|
-
See also: [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
|
|
1145
|
+
See also: [Base64String](./wallet.md#type-base64string), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
|
|
1146
1146
|
|
|
1147
1147
|
Returns
|
|
1148
1148
|
|
|
@@ -1161,10 +1161,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1161
1161
|
Verifies a nonce derived from a wallet
|
|
1162
1162
|
|
|
1163
1163
|
```ts
|
|
1164
|
-
export async function verifyNonce(nonce:
|
|
1164
|
+
export async function verifyNonce(nonce: Base64String, wallet: WalletInterface, counterparty: WalletCounterparty = "self"): Promise<boolean>
|
|
1165
1165
|
```
|
|
1166
1166
|
|
|
1167
|
-
See also: [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
|
|
1167
|
+
See also: [Base64String](./wallet.md#type-base64string), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
|
|
1168
1168
|
|
|
1169
1169
|
Returns
|
|
1170
1170
|
|
package/package.json
CHANGED
|
@@ -405,7 +405,7 @@ export class AuthFetch {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
const derivationPrefix = originalResponse.headers.get('x-bsv-payment-derivation-prefix')
|
|
408
|
-
if (
|
|
408
|
+
if (typeof derivationPrefix !== 'string' || derivationPrefix.length < 1) {
|
|
409
409
|
throw new Error('Missing x-bsv-payment-derivation-prefix response header.')
|
|
410
410
|
}
|
|
411
411
|
|
|
@@ -426,8 +426,12 @@ export class AuthFetch {
|
|
|
426
426
|
outputs: [{
|
|
427
427
|
satoshis: satoshisRequired,
|
|
428
428
|
lockingScript,
|
|
429
|
+
customInstructions: JSON.stringify({ derivationPrefix, derivationSuffix, payee: serverIdentityKey }),
|
|
429
430
|
outputDescription: 'HTTP request payment'
|
|
430
|
-
}]
|
|
431
|
+
}],
|
|
432
|
+
options: {
|
|
433
|
+
randomizeOutputs: false
|
|
434
|
+
}
|
|
431
435
|
})
|
|
432
436
|
|
|
433
437
|
// Attach the payment to the request headers
|