@chainvue/verus-sdk 0.9.0 → 0.10.0
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/README.md +1 -0
- package/dist/assemble/assembler.d.ts +66 -0
- package/dist/assemble/assembler.d.ts.map +1 -0
- package/dist/assemble/assembler.js +155 -0
- package/dist/assemble/assembler.js.map +1 -0
- package/dist/assemble/fundedIdentityUpdate.d.ts +35 -0
- package/dist/assemble/fundedIdentityUpdate.d.ts.map +1 -0
- package/dist/assemble/fundedIdentityUpdate.js +114 -0
- package/dist/assemble/fundedIdentityUpdate.js.map +1 -0
- package/dist/bundle.js +29167 -29285
- package/dist/currency/index.d.ts.map +1 -1
- package/dist/currency/index.js +32 -66
- package/dist/currency/index.js.map +1 -1
- package/dist/fork/boundary.d.ts +19 -0
- package/dist/fork/boundary.d.ts.map +1 -0
- package/dist/fork/boundary.js +49 -0
- package/dist/fork/boundary.js.map +1 -0
- package/dist/fork-shims.d.ts +7 -0
- package/dist/identity/index.d.ts +2 -2
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +180 -296
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/public.d.ts +21 -0
- package/dist/identity/public.d.ts.map +1 -0
- package/dist/identity/public.js +38 -0
- package/dist/identity/public.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/message/index.js +7 -7
- package/dist/message/index.js.map +1 -1
- package/dist/signing/index.d.ts +1 -1
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/index.js +10 -10
- package/dist/signing/index.js.map +1 -1
- package/dist/transfer/index.d.ts.map +1 -1
- package/dist/transfer/index.js +40 -62
- package/dist/transfer/index.js.map +1 -1
- package/dist/types/index.d.ts +0 -47
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -11
- package/dist/utils/index.js.map +1 -1
- package/dist/utxo/index.js +4 -4
- package/dist/utxo/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAKrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAIpF;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,OAAO,GACf,oBAAoB,CAmEtB"}
|
package/dist/currency/index.js
CHANGED
|
@@ -20,18 +20,14 @@ exports.defineCurrency = defineCurrency;
|
|
|
20
20
|
var classify_js_1 = require("./classify.js");
|
|
21
21
|
Object.defineProperty(exports, "classifyCurrency", { enumerable: true, get: function () { return classify_js_1.classifyCurrency; } });
|
|
22
22
|
Object.defineProperty(exports, "CURRENCY_TYPE_ORDER", { enumerable: true, get: function () { return classify_js_1.CURRENCY_TYPE_ORDER; } });
|
|
23
|
-
const
|
|
24
|
-
const verus_typescript_primitives_1 = require("verus-typescript-primitives");
|
|
23
|
+
const boundary_js_1 = require("../fork/boundary.js");
|
|
25
24
|
const bn_js_1 = __importDefault(require("bn.js"));
|
|
26
25
|
const index_js_1 = require("../constants/index.js");
|
|
27
26
|
const index_js_2 = require("../signing/index.js");
|
|
28
|
-
const index_js_3 = require("../
|
|
29
|
-
const index_js_4 = require("../
|
|
30
|
-
const index_js_5 = require("../identity/index.js");
|
|
31
|
-
const brands_js_1 = require("../core/brands.js");
|
|
32
|
-
const index_js_6 = require("../keys/index.js");
|
|
27
|
+
const index_js_3 = require("../identity/index.js");
|
|
28
|
+
const index_js_4 = require("../keys/index.js");
|
|
33
29
|
const errors_js_1 = require("../errors.js");
|
|
34
|
-
const
|
|
30
|
+
const fundedIdentityUpdate_js_1 = require("../assemble/fundedIdentityUpdate.js");
|
|
35
31
|
/**
|
|
36
32
|
* Build and sign a currency definition transaction (manual mode)
|
|
37
33
|
*
|
|
@@ -40,7 +36,7 @@ const { completeFundedIdentityUpdate } = utxo_lib_1.smarttxs;
|
|
|
40
36
|
function defineCurrency(params, network) {
|
|
41
37
|
// Validate inputs at the boundary (this path previously skipped all of it and
|
|
42
38
|
// failed later with a raw ECPair/selection error).
|
|
43
|
-
const wifCheck = (0,
|
|
39
|
+
const wifCheck = (0, index_js_4.validateWif)(params.wif);
|
|
44
40
|
if (!wifCheck.valid) {
|
|
45
41
|
throw new errors_js_1.InvalidWifError(wifCheck.error);
|
|
46
42
|
}
|
|
@@ -54,78 +50,48 @@ function defineCurrency(params, network) {
|
|
|
54
50
|
throw new errors_js_1.TransactionBuildError('currencyDefScript is required');
|
|
55
51
|
}
|
|
56
52
|
const verusNetwork = (0, index_js_2.getNetwork)(network === 'testnet');
|
|
57
|
-
const networkConfig = index_js_1.NETWORK_CONFIG[network];
|
|
58
|
-
const systemId = networkConfig.chainId;
|
|
59
53
|
const currencyDefValue = params.currencyDefValue || 0n;
|
|
60
54
|
// Parse identity and set FLAG_ACTIVECURRENCY
|
|
61
|
-
const identity = new
|
|
55
|
+
const identity = new boundary_js_1.Identity();
|
|
62
56
|
identity.fromBuffer(Buffer.from(params.identityHex, 'hex'));
|
|
63
57
|
// A currency definition spends the identity input under primary authority.
|
|
64
58
|
// The fork signs it with whatever WIF it's handed, so a WIF that doesn't
|
|
65
59
|
// control the identity yields a tx the daemon rejects only at broadcast.
|
|
66
|
-
(0,
|
|
60
|
+
(0, index_js_3.assertWifIsPrimary)(params.wif, identity, verusNetwork);
|
|
67
61
|
if (!identity.hasActiveCurrency()) {
|
|
68
62
|
const currentFlags = identity.flags.toNumber();
|
|
69
63
|
identity.flags = new bn_js_1.default(currentFlags | index_js_1.IDENTITY_FLAG_ACTIVECURRENCY);
|
|
70
64
|
}
|
|
71
|
-
const identityScript =
|
|
65
|
+
const identityScript = boundary_js_1.IdentityScript.fromIdentity(identity);
|
|
72
66
|
const identityOutputScript = identityScript.toBuffer();
|
|
73
67
|
const currencyDefScript = Buffer.from(params.currencyDefScript, 'hex');
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (params.changeAddress.startsWith('i')) {
|
|
94
|
-
txb.addOutput((0, index_js_5.identityPaymentScript)((0, brands_js_1.parseIAddress)(params.changeAddress, 'changeAddress')), (0, index_js_4.toSafeNumber)(selection.nativeChange));
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
txb.addOutput(params.changeAddress, (0, index_js_4.toSafeNumber)(selection.nativeChange));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
const fundedTx = txb.buildIncomplete();
|
|
101
|
-
const fundedHex = fundedTx.toHex();
|
|
102
|
-
// Add the previous identity UTXO as last input
|
|
103
|
-
const prevOutScripts = selection.selected.map(u => Buffer.from(u.script, 'hex'));
|
|
104
|
-
const idUtxo = params.identityUtxo;
|
|
105
|
-
// Any native value on the identity input would be burned to miner fee (the
|
|
106
|
-
// recreated identity output is value 0). Identity outputs normally carry 0.
|
|
107
|
-
if (idUtxo.satoshis !== 0n) {
|
|
108
|
-
throw new errors_js_1.TransactionBuildError(`identityUtxo carries ${idUtxo.satoshis} native satoshis, which would be burned to miner fee ` +
|
|
109
|
-
`(the recreated identity output is value 0). Spend that value separately first.`);
|
|
110
|
-
}
|
|
111
|
-
const completedHex = completeFundedIdentityUpdate(fundedHex, verusNetwork, prevOutScripts, {
|
|
112
|
-
hash: Buffer.from(idUtxo.txid, 'hex').reverse(),
|
|
113
|
-
index: idUtxo.outputIndex,
|
|
114
|
-
sequence: 0xffffffff,
|
|
115
|
-
script: Buffer.from(idUtxo.script, 'hex'),
|
|
68
|
+
// Respend the identity UTXO, recreating its (value-0) definition output with
|
|
69
|
+
// FLAG_ACTIVECURRENCY set, alongside the currency-definition output. The shared
|
|
70
|
+
// assembler funds them, emits native change, grafts on the identity input
|
|
71
|
+
// (re-signed last by the fork), and enforces native + token conservation.
|
|
72
|
+
const assembled = (0, fundedIdentityUpdate_js_1.assembleFundedIdentityUpdate)({
|
|
73
|
+
network,
|
|
74
|
+
wif: params.wif,
|
|
75
|
+
expiryHeight: params.expiryHeight,
|
|
76
|
+
funding: params.utxos,
|
|
77
|
+
identityUtxo: params.identityUtxo,
|
|
78
|
+
outputs: [
|
|
79
|
+
{ script: identityOutputScript, nativeSat: 0n },
|
|
80
|
+
{ script: currencyDefScript, nativeSat: currencyDefValue },
|
|
81
|
+
],
|
|
82
|
+
changeAddress: params.changeAddress,
|
|
83
|
+
// The identity + currency-definition outputs can be large; size the fee from
|
|
84
|
+
// their real byte length so the tx isn't estimated below the relay minimum.
|
|
85
|
+
extraOutputBytes: identityOutputScript.length + currencyDefScript.length,
|
|
86
|
+
label: 'currency definition',
|
|
116
87
|
});
|
|
117
|
-
const allUtxos = [...selection.selected, idUtxo];
|
|
118
|
-
// Inputs fund the currency-definition value + fee; the identity input/output
|
|
119
|
-
// are value 0, so the assembled native fee must equal selection.fee.
|
|
120
|
-
(0, index_js_2.assertNativeConservation)(allUtxos, utxo_lib_1.Transaction.fromHex(completedHex, verusNetwork).outs, selection.fee, 'currency definition');
|
|
121
|
-
const { signedTx, txid } = (0, index_js_2.signTransactionSmart)(completedHex, params.wif, allUtxos, verusNetwork);
|
|
122
88
|
return {
|
|
123
|
-
signedTx,
|
|
124
|
-
txid,
|
|
125
|
-
fee:
|
|
89
|
+
signedTx: assembled.signedTx,
|
|
90
|
+
txid: assembled.txid,
|
|
91
|
+
fee: assembled.fee,
|
|
126
92
|
identityAddress: identity.getIdentityAddress(),
|
|
127
|
-
inputsUsed:
|
|
128
|
-
nativeChange:
|
|
93
|
+
inputsUsed: assembled.inputsUsed,
|
|
94
|
+
nativeChange: assembled.nativeChange,
|
|
129
95
|
};
|
|
130
96
|
}
|
|
131
97
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/currency/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAuBH,wCAsEC;AA3FD,qCAAqC;AACrC,6CAAsE;AAA7D,+GAAA,gBAAgB,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAG9C,qDAA+D;AAC/D,kDAAuB;AACvB,oDAAqE;AAErE,kDAAiD;AACjD,mDAA0D;AAC1D,+CAA+C;AAC/C,4CAAsE;AAGtE,iFAAmF;AAEnF;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,MAA4B,EAC5B,OAAgB;IAEhB,8EAA8E;IAC9E,mDAAmD;IACnD,MAAM,QAAQ,GAAG,IAAA,sBAAW,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACpB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Q,EAAE,CAAC;IACvD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAEvE,6EAA6E;IAC7E,gFAAgF;IAChF,0EAA0E;IAC1E,0EAA0E;IAC1E,MAAM,SAAS,GAAG,IAAA,sDAA4B,EAAC;QAC7C,OAAO;QACP,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,OAAO,EAAE,MAAM,CAAC,KAAK;QACrB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,OAAO,EAAE;YACP,EAAE,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/C,EAAE,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE;SAC3D;QACD,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,6EAA6E;QAC7E,4EAA4E;QAC5E,gBAAgB,EAAE,oBAAoB,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM;QACxE,KAAK,EAAE,qBAAqB;KAC7B,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,GAAG,EAAE,SAAS,CAAC,GAAG;QAClB,eAAe,EAAE,QAAQ,CAAC,kBAAkB,EAAE;QAC9C,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,YAAY,EAAE,SAAS,CAAC,YAAY;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single boundary to the bundled Verus forks (@bitgo/utxo-lib +
|
|
3
|
+
* verus-typescript-primitives).
|
|
4
|
+
*
|
|
5
|
+
* These forks are the only way to speak Verus smart transactions, but they are a
|
|
6
|
+
* hazardous surface: money is modeled as `number`, addresses are version-blind
|
|
7
|
+
* (fromAddress launders the version byte), errors are untyped, and the base is a
|
|
8
|
+
* ~2018-era bitcoinjs API. Containing every import here means the rest of the SDK
|
|
9
|
+
* builds on a controlled re-export instead of touching the raw fork in six
|
|
10
|
+
* places. An ESLint `no-restricted-imports` rule forbids importing the forks
|
|
11
|
+
* anywhere outside this directory, so a new direct import is a lint failure.
|
|
12
|
+
*
|
|
13
|
+
* This module deliberately re-exports the fork surface verbatim (no wrapping) for
|
|
14
|
+
* now; typed adapters (toSafeNumber crossing, error wrapping) can be added here
|
|
15
|
+
* incrementally without touching call sites.
|
|
16
|
+
*/
|
|
17
|
+
export * from 'verus-typescript-primitives';
|
|
18
|
+
export { TransactionBuilder, Transaction, smarttxs, ECPair, IdentitySignature, networks, script, opcodes, address, } from '@bitgo/utxo-lib';
|
|
19
|
+
//# sourceMappingURL=boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../src/fork/boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,GACR,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.address = exports.opcodes = exports.script = exports.networks = exports.IdentitySignature = exports.ECPair = exports.smarttxs = exports.Transaction = exports.TransactionBuilder = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* The single boundary to the bundled Verus forks (@bitgo/utxo-lib +
|
|
20
|
+
* verus-typescript-primitives).
|
|
21
|
+
*
|
|
22
|
+
* These forks are the only way to speak Verus smart transactions, but they are a
|
|
23
|
+
* hazardous surface: money is modeled as `number`, addresses are version-blind
|
|
24
|
+
* (fromAddress launders the version byte), errors are untyped, and the base is a
|
|
25
|
+
* ~2018-era bitcoinjs API. Containing every import here means the rest of the SDK
|
|
26
|
+
* builds on a controlled re-export instead of touching the raw fork in six
|
|
27
|
+
* places. An ESLint `no-restricted-imports` rule forbids importing the forks
|
|
28
|
+
* anywhere outside this directory, so a new direct import is a lint failure.
|
|
29
|
+
*
|
|
30
|
+
* This module deliberately re-exports the fork surface verbatim (no wrapping) for
|
|
31
|
+
* now; typed adapters (toSafeNumber crossing, error wrapping) can be added here
|
|
32
|
+
* incrementally without touching call sites.
|
|
33
|
+
*/
|
|
34
|
+
// verus-typescript-primitives is the source of truth for the shared CC types
|
|
35
|
+
// (OptCCParams, TxDestination, …); @bitgo/utxo-lib re-declares some of them, so
|
|
36
|
+
// only its own transaction/crypto surface is re-exported explicitly to avoid the
|
|
37
|
+
// ambiguity.
|
|
38
|
+
__exportStar(require("verus-typescript-primitives"), exports);
|
|
39
|
+
var utxo_lib_1 = require("@bitgo/utxo-lib");
|
|
40
|
+
Object.defineProperty(exports, "TransactionBuilder", { enumerable: true, get: function () { return utxo_lib_1.TransactionBuilder; } });
|
|
41
|
+
Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return utxo_lib_1.Transaction; } });
|
|
42
|
+
Object.defineProperty(exports, "smarttxs", { enumerable: true, get: function () { return utxo_lib_1.smarttxs; } });
|
|
43
|
+
Object.defineProperty(exports, "ECPair", { enumerable: true, get: function () { return utxo_lib_1.ECPair; } });
|
|
44
|
+
Object.defineProperty(exports, "IdentitySignature", { enumerable: true, get: function () { return utxo_lib_1.IdentitySignature; } });
|
|
45
|
+
Object.defineProperty(exports, "networks", { enumerable: true, get: function () { return utxo_lib_1.networks; } });
|
|
46
|
+
Object.defineProperty(exports, "script", { enumerable: true, get: function () { return utxo_lib_1.script; } });
|
|
47
|
+
Object.defineProperty(exports, "opcodes", { enumerable: true, get: function () { return utxo_lib_1.opcodes; } });
|
|
48
|
+
Object.defineProperty(exports, "address", { enumerable: true, get: function () { return utxo_lib_1.address; } });
|
|
49
|
+
//# sourceMappingURL=boundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary.js","sourceRoot":"","sources":["../../src/fork/boundary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,6EAA6E;AAC7E,gFAAgF;AAChF,iFAAiF;AACjF,aAAa;AACb,8DAA4C;AAC5C,4CAUyB;AATvB,8GAAA,kBAAkB,OAAA;AAClB,uGAAA,WAAW,OAAA;AACX,oGAAA,QAAQ,OAAA;AACR,kGAAA,MAAM,OAAA;AACN,6GAAA,iBAAiB,OAAA;AACjB,oGAAA,QAAQ,OAAA;AACR,kGAAA,MAAM,OAAA;AACN,mGAAA,OAAO,OAAA;AACP,mGAAA,OAAO,OAAA"}
|
package/dist/fork-shims.d.ts
CHANGED
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
// self-contained: no fork packages required, no skipLibCheck. It declares only
|
|
13
13
|
// the surface the public API exposes — intentionally minimal, and free of any
|
|
14
14
|
// transitive type dependency (e.g. bn.js).
|
|
15
|
+
//
|
|
16
|
+
// TWO-FILE SPLIT (intentional, do NOT merge): the RICH internal ambient types
|
|
17
|
+
// live in src/types/bitgo-utxo-lib.d.ts and import bn.js + primitives; this
|
|
18
|
+
// CONSUMER shim must stay dependency-free, so it can only be a hand-kept minimal
|
|
19
|
+
// subset. When the public surface changes (VerusNetworkConfig, networks,
|
|
20
|
+
// TransactionBuilder, Identity, nameAndParentAddrToIAddr), update BOTH so they
|
|
21
|
+
// don't drift.
|
|
15
22
|
|
|
16
23
|
declare module "@bitgo/utxo-lib" {
|
|
17
24
|
export interface VerusNetworkConfig {
|
package/dist/identity/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Identity updates (modify, revoke, recover, lock, unlock)
|
|
8
8
|
* - Script/hash construction for CC outputs
|
|
9
9
|
*/
|
|
10
|
-
import { Identity } from '
|
|
11
|
-
import { nameAndParentAddrToIAddr } from '
|
|
10
|
+
import { Identity } from '../fork/boundary.js';
|
|
11
|
+
import { nameAndParentAddrToIAddr } from '../fork/boundary.js';
|
|
12
12
|
import type { Network } from '../constants/index.js';
|
|
13
13
|
import { type VerusNetwork } from '../signing/index.js';
|
|
14
14
|
import { type IAddress, type RAddress, type Address } from '../core/brands.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAQL,QAAQ,EAQT,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAQL,QAAQ,EAQT,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAW7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzF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