@bsv/sdk 1.4.8 → 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/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/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/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
|
@@ -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
|
}
|