@bsv/sdk 1.4.7 → 1.4.9
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/overlay-tools/SHIPBroadcaster.js +1 -1
- package/dist/cjs/src/wallet/substrates/WalletWireProcessor.js +3 -0
- package/dist/cjs/src/wallet/substrates/WalletWireProcessor.js.map +1 -1
- package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js +3 -0
- package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/cjs/src/wallet/substrates/window.CWI.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/overlay-tools/SHIPBroadcaster.js +1 -1
- package/dist/esm/src/wallet/substrates/WalletWireProcessor.js +3 -0
- package/dist/esm/src/wallet/substrates/WalletWireProcessor.js.map +1 -1
- package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js +3 -0
- package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/esm/src/wallet/substrates/window.CWI.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/wallet/Wallet.interfaces.d.ts +1 -1
- package/dist/types/src/wallet/Wallet.interfaces.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/WalletWireProcessor.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/window.CWI.d.ts +1 -1
- package/dist/types/src/wallet/substrates/window.CWI.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/wallet-substrates.md +1 -1
- package/docs/wallet.md +2 -2
- package/package.json +1 -1
- package/src/overlay-tools/SHIPBroadcaster.ts +1 -1
- package/src/overlay-tools/__tests/SHIPBroadcaster.test.ts +4 -4
- package/src/wallet/Wallet.interfaces.ts +1 -0
- package/src/wallet/substrates/WalletWireProcessor.ts +3 -0
- package/src/wallet/substrates/WalletWireTransceiver.ts +7 -17
- package/src/wallet/substrates/window.CWI.ts +1 -0
|
@@ -382,7 +382,7 @@ export default class WindowCWISubstrate implements WalletInterface {
|
|
|
382
382
|
actions: Array<{
|
|
383
383
|
txid: TXIDHexString;
|
|
384
384
|
satoshis: SatoshiValue;
|
|
385
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
385
|
+
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal" | "failed";
|
|
386
386
|
isOutgoing: boolean;
|
|
387
387
|
description: DescriptionString5to50Bytes;
|
|
388
388
|
labels?: LabelStringUnder300Bytes[];
|
package/docs/wallet.md
CHANGED
|
@@ -2660,7 +2660,7 @@ export default class WindowCWISubstrate implements WalletInterface {
|
|
|
2660
2660
|
actions: Array<{
|
|
2661
2661
|
txid: TXIDHexString;
|
|
2662
2662
|
satoshis: SatoshiValue;
|
|
2663
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
2663
|
+
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal" | "failed";
|
|
2664
2664
|
isOutgoing: boolean;
|
|
2665
2665
|
description: DescriptionString5to50Bytes;
|
|
2666
2666
|
labels?: LabelStringUnder300Bytes[];
|
|
@@ -3501,7 +3501,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3501
3501
|
### Type: ActionStatus
|
|
3502
3502
|
|
|
3503
3503
|
```ts
|
|
3504
|
-
export type ActionStatus = "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal"
|
|
3504
|
+
export type ActionStatus = "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal" | "failed"
|
|
3505
3505
|
```
|
|
3506
3506
|
|
|
3507
3507
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ export interface OverlayBroadcastFacilitator {
|
|
|
74
74
|
send: (url: string, taggedBEEF: TaggedBEEF) => Promise<STEAK>
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const MAX_SHIP_QUERY_TIMEOUT =
|
|
77
|
+
const MAX_SHIP_QUERY_TIMEOUT = 5000
|
|
78
78
|
|
|
79
79
|
export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
|
|
80
80
|
httpClient: typeof fetch
|
|
@@ -88,7 +88,7 @@ describe('SHIPCast', () => {
|
|
|
88
88
|
topics: ['tm_foo']
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
|
|
91
|
+
5000
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
expect(mockFacilitator.send).toHaveBeenCalledWith('https://shiphost.com', {
|
|
@@ -289,7 +289,7 @@ describe('SHIPCast', () => {
|
|
|
289
289
|
topics: ['tm_foo']
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
|
-
|
|
292
|
+
5000
|
|
293
293
|
)
|
|
294
294
|
|
|
295
295
|
expect(mockFacilitator.send).not.toHaveBeenCalled()
|
|
@@ -516,7 +516,7 @@ describe('SHIPCast', () => {
|
|
|
516
516
|
topics: ['tm_foo', 'tm_bar']
|
|
517
517
|
}
|
|
518
518
|
},
|
|
519
|
-
|
|
519
|
+
5000
|
|
520
520
|
)
|
|
521
521
|
|
|
522
522
|
expect(mockFacilitator.send).toHaveBeenCalledTimes(2)
|
|
@@ -971,7 +971,7 @@ describe('SHIPCast', () => {
|
|
|
971
971
|
topics: ['tm_foo', 'tm_bar']
|
|
972
972
|
}
|
|
973
973
|
},
|
|
974
|
-
|
|
974
|
+
5000
|
|
975
975
|
)
|
|
976
976
|
})
|
|
977
977
|
|
|
@@ -43,7 +43,8 @@ import {
|
|
|
43
43
|
SignActionResult,
|
|
44
44
|
TXIDHexString,
|
|
45
45
|
VersionString7To30Bytes,
|
|
46
|
-
WalletInterface
|
|
46
|
+
WalletInterface,
|
|
47
|
+
ActionStatus
|
|
47
48
|
} from '../Wallet.interfaces.js'
|
|
48
49
|
import WalletWire from './WalletWire.js'
|
|
49
50
|
import Certificate from '../../auth/certificates/Certificate.js'
|
|
@@ -602,14 +603,7 @@ export default class WalletWireTransceiver implements WalletInterface {
|
|
|
602
603
|
const actions: Array<{
|
|
603
604
|
txid: TXIDHexString
|
|
604
605
|
satoshis: SatoshiValue
|
|
605
|
-
status:
|
|
606
|
-
| 'completed'
|
|
607
|
-
| 'unprocessed'
|
|
608
|
-
| 'sending'
|
|
609
|
-
| 'unproven'
|
|
610
|
-
| 'unsigned'
|
|
611
|
-
| 'nosend'
|
|
612
|
-
| 'nonfinal'
|
|
606
|
+
status: ActionStatus
|
|
613
607
|
isOutgoing: boolean
|
|
614
608
|
description: DescriptionString5to50Bytes
|
|
615
609
|
labels?: LabelStringUnder300Bytes[]
|
|
@@ -643,14 +637,7 @@ export default class WalletWireTransceiver implements WalletInterface {
|
|
|
643
637
|
const satoshis = resultReader.readVarIntNum()
|
|
644
638
|
|
|
645
639
|
const statusCode = resultReader.readInt8()
|
|
646
|
-
let status:
|
|
647
|
-
| 'completed'
|
|
648
|
-
| 'unprocessed'
|
|
649
|
-
| 'sending'
|
|
650
|
-
| 'unproven'
|
|
651
|
-
| 'unsigned'
|
|
652
|
-
| 'nosend'
|
|
653
|
-
| 'nonfinal'
|
|
640
|
+
let status: ActionStatus
|
|
654
641
|
switch (statusCode) {
|
|
655
642
|
case 1:
|
|
656
643
|
status = 'completed'
|
|
@@ -673,6 +660,9 @@ export default class WalletWireTransceiver implements WalletInterface {
|
|
|
673
660
|
case 7:
|
|
674
661
|
status = 'nonfinal'
|
|
675
662
|
break
|
|
663
|
+
case 8:
|
|
664
|
+
status = 'failed'
|
|
665
|
+
break
|
|
676
666
|
default:
|
|
677
667
|
throw new Error(`Unknown status code: ${statusCode}`)
|
|
678
668
|
}
|