@bsv/wallet-toolbox-mobile 2.4.0 → 2.4.1
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/out/src/Wallet.d.ts +4 -0
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +6 -1
- package/out/src/Wallet.js.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.js +39 -15
- package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
- package/out/src/sdk/types.d.ts +9 -0
- package/out/src/sdk/types.d.ts.map +1 -1
- package/out/src/sdk/types.js +16 -2
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +8 -0
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/providers/Arcade.d.ts +1 -0
- package/out/src/services/providers/Arcade.d.ts.map +1 -1
- package/out/src/services/providers/Arcade.js +40 -13
- package/out/src/services/providers/Arcade.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts +6 -4
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +12 -7
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts +2 -0
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js +13 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +6 -6
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts +6 -4
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +23 -12
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/managedChange.d.ts +26 -0
- package/out/src/storage/methods/managedChange.d.ts.map +1 -0
- package/out/src/storage/methods/managedChange.js +43 -0
- package/out/src/storage/methods/managedChange.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TableOutput } from '../schema/tables/TableOutput';
|
|
2
|
+
/**
|
|
3
|
+
* Fields that identify an output as wallet-managed BRC-29 change.
|
|
4
|
+
*
|
|
5
|
+
* `type: 'P2PKH'` is historical terminology. In this storage model it does
|
|
6
|
+
* not merely describe the locking script. It selects the wallet's BRC-29
|
|
7
|
+
* unlocking path, so the accompanying derivation fields are also required.
|
|
8
|
+
*/
|
|
9
|
+
export declare const managedChangeOutputFields: {
|
|
10
|
+
readonly type: "P2PKH";
|
|
11
|
+
readonly change: true;
|
|
12
|
+
readonly providedBy: "storage";
|
|
13
|
+
readonly purpose: "change";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* True when an output has all metadata required to use the wallet-managed
|
|
17
|
+
* BRC-29 signing path. `senderIdentityKey` is optional: wallet-created change
|
|
18
|
+
* uses the client's change public key when it is absent, while received
|
|
19
|
+
* BRC-29 payments record the sender's identity key.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isManagedChangeOutput(output: TableOutput | undefined): output is TableOutput;
|
|
22
|
+
/**
|
|
23
|
+
* True when managed change is currently eligible for automatic allocation.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isAutoSpendableChangeOutput(output: TableOutput | undefined): output is TableOutput;
|
|
26
|
+
//# sourceMappingURL=managedChange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managedChange.d.ts","sourceRoot":"","sources":["../../../../../src/storage/methods/managedChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;;;CAK5B,CAAA;AAMV;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,IAAI,WAAW,CAQ7F;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,IAAI,WAAW,CAEnG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.managedChangeOutputFields = void 0;
|
|
4
|
+
exports.isManagedChangeOutput = isManagedChangeOutput;
|
|
5
|
+
exports.isAutoSpendableChangeOutput = isAutoSpendableChangeOutput;
|
|
6
|
+
/**
|
|
7
|
+
* Fields that identify an output as wallet-managed BRC-29 change.
|
|
8
|
+
*
|
|
9
|
+
* `type: 'P2PKH'` is historical terminology. In this storage model it does
|
|
10
|
+
* not merely describe the locking script. It selects the wallet's BRC-29
|
|
11
|
+
* unlocking path, so the accompanying derivation fields are also required.
|
|
12
|
+
*/
|
|
13
|
+
exports.managedChangeOutputFields = {
|
|
14
|
+
type: 'P2PKH',
|
|
15
|
+
change: true,
|
|
16
|
+
providedBy: 'storage',
|
|
17
|
+
purpose: 'change'
|
|
18
|
+
};
|
|
19
|
+
function isNonEmptyString(value) {
|
|
20
|
+
return typeof value === 'string' && value.length > 0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* True when an output has all metadata required to use the wallet-managed
|
|
24
|
+
* BRC-29 signing path. `senderIdentityKey` is optional: wallet-created change
|
|
25
|
+
* uses the client's change public key when it is absent, while received
|
|
26
|
+
* BRC-29 payments record the sender's identity key.
|
|
27
|
+
*/
|
|
28
|
+
function isManagedChangeOutput(output) {
|
|
29
|
+
return output != null &&
|
|
30
|
+
output.type === exports.managedChangeOutputFields.type &&
|
|
31
|
+
output.change === exports.managedChangeOutputFields.change &&
|
|
32
|
+
output.providedBy === exports.managedChangeOutputFields.providedBy &&
|
|
33
|
+
output.purpose === exports.managedChangeOutputFields.purpose &&
|
|
34
|
+
isNonEmptyString(output.derivationPrefix) &&
|
|
35
|
+
isNonEmptyString(output.derivationSuffix);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* True when managed change is currently eligible for automatic allocation.
|
|
39
|
+
*/
|
|
40
|
+
function isAutoSpendableChangeOutput(output) {
|
|
41
|
+
return isManagedChangeOutput(output) && output.spendable && output.spentBy == null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=managedChange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managedChange.js","sourceRoot":"","sources":["../../../../../src/storage/methods/managedChange.ts"],"names":[],"mappings":";;;AA0BA,sDAQC;AAKD,kEAEC;AAvCD;;;;;;GAMG;AACU,QAAA,yBAAyB,GAAG;IACvC,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,QAAQ;CACT,CAAA;AAEV,SAAS,gBAAgB,CAAE,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAE,MAA+B;IACpE,OAAO,MAAM,IAAI,IAAI;QACnB,MAAM,CAAC,IAAI,KAAK,iCAAyB,CAAC,IAAI;QAC9C,MAAM,CAAC,MAAM,KAAK,iCAAyB,CAAC,MAAM;QAClD,MAAM,CAAC,UAAU,KAAK,iCAAyB,CAAC,UAAU;QAC1D,MAAM,CAAC,OAAO,KAAK,iCAAyB,CAAC,OAAO;QACpD,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACzC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;AAC7C,CAAC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CAAE,MAA+B;IAC1E,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAA;AACpF,CAAC"}
|