@bitgo-beta/utxo-lib 8.0.3-beta.5 → 8.0.3-beta.500
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 +19 -16
- package/dist/src/address.js +5 -5
- package/dist/src/addressFormat.d.ts +1 -1
- package/dist/src/addressFormat.d.ts.map +1 -1
- package/dist/src/addressFormat.js +9 -9
- package/dist/src/bitgo/Musig2.d.ts +5 -10
- package/dist/src/bitgo/Musig2.d.ts.map +1 -1
- package/dist/src/bitgo/Musig2.js +41 -66
- package/dist/src/bitgo/PsbtUtil.d.ts +71 -0
- package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -0
- package/dist/src/bitgo/PsbtUtil.js +133 -0
- package/dist/src/bitgo/Unspent.d.ts +2 -2
- package/dist/src/bitgo/Unspent.d.ts.map +1 -1
- package/dist/src/bitgo/Unspent.js +3 -3
- package/dist/src/bitgo/UtxoPsbt.d.ts +26 -39
- package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/UtxoPsbt.js +200 -169
- package/dist/src/bitgo/UtxoTransaction.d.ts.map +1 -1
- package/dist/src/bitgo/UtxoTransaction.js +9 -9
- package/dist/src/bitgo/bitcoincash/address.js +6 -6
- package/dist/src/bitgo/bitcoincash/index.js +6 -2
- package/dist/src/bitgo/dash/DashTransaction.js +3 -3
- package/dist/src/bitgo/dash/index.js +6 -2
- package/dist/src/bitgo/index.d.ts +10 -0
- package/dist/src/bitgo/index.d.ts.map +1 -1
- package/dist/src/bitgo/index.js +10 -3
- package/dist/src/bitgo/keyutil.d.ts +9 -0
- package/dist/src/bitgo/keyutil.d.ts.map +1 -1
- package/dist/src/bitgo/keyutil.js +24 -2
- package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
- package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
- package/dist/src/bitgo/legacysafe/index.js +61 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +1 -1
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -1
- package/dist/src/bitgo/litecoin/LitecoinTransaction.js +2 -2
- package/dist/src/bitgo/litecoin/index.js +6 -2
- package/dist/src/bitgo/outputScripts.d.ts +7 -6
- package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
- package/dist/src/bitgo/outputScripts.js +29 -14
- package/dist/src/bitgo/parseInput.d.ts +11 -7
- package/dist/src/bitgo/parseInput.d.ts.map +1 -1
- package/dist/src/bitgo/parseInput.js +23 -7
- package/dist/src/bitgo/psbt/fromHalfSigned.js +5 -5
- package/dist/src/bitgo/signature.d.ts +4 -4
- package/dist/src/bitgo/signature.d.ts.map +1 -1
- package/dist/src/bitgo/signature.js +24 -9
- package/dist/src/bitgo/transaction.d.ts +31 -3
- package/dist/src/bitgo/transaction.d.ts.map +1 -1
- package/dist/src/bitgo/transaction.js +38 -16
- package/dist/src/bitgo/transactionAmounts.d.ts +9 -0
- package/dist/src/bitgo/transactionAmounts.d.ts.map +1 -0
- package/dist/src/bitgo/transactionAmounts.js +33 -0
- package/dist/src/bitgo/types.d.ts +9 -2
- package/dist/src/bitgo/types.d.ts.map +1 -1
- package/dist/src/bitgo/types.js +11 -2
- package/dist/src/bitgo/wallet/Psbt.d.ts +90 -26
- package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Psbt.js +241 -101
- package/dist/src/bitgo/wallet/Unspent.d.ts +43 -9
- package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Unspent.js +168 -74
- package/dist/src/bitgo/wallet/WalletKeys.d.ts +1 -1
- package/dist/src/bitgo/wallet/WalletKeys.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
- package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/WalletOutput.js +68 -27
- package/dist/src/bitgo/wallet/WalletScripts.js +2 -2
- package/dist/src/bitgo/wallet/WalletUnspentSigner.js +7 -7
- package/dist/src/bitgo/wallet/chains.d.ts +2 -2
- package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/index.d.ts +2 -0
- package/dist/src/bitgo/wallet/index.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/index.js +8 -2
- package/dist/src/bitgo/wallet/psbt/PsbtOutputs.d.ts +50 -0
- package/dist/src/bitgo/wallet/psbt/PsbtOutputs.d.ts.map +1 -0
- package/dist/src/bitgo/wallet/psbt/PsbtOutputs.js +87 -0
- package/dist/src/bitgo/wallet/psbt/RootNodes.d.ts +32 -0
- package/dist/src/bitgo/wallet/psbt/RootNodes.d.ts.map +1 -0
- package/dist/src/bitgo/wallet/psbt/RootNodes.js +125 -0
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +8 -16
- package/dist/src/bitgo/zcash/ZcashTransaction.d.ts +1 -1
- package/dist/src/bitgo/zcash/ZcashTransaction.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/ZcashTransaction.js +15 -15
- package/dist/src/bitgo/zcash/ZcashTransactionBuilder.js +4 -4
- package/dist/src/bitgo/zcash/address.js +3 -3
- package/dist/src/bitgo/zcash/hashZip0244.d.ts +1 -1
- package/dist/src/bitgo/zcash/hashZip0244.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/hashZip0244.js +3 -3
- package/dist/src/bitgo/zcash/index.js +6 -2
- package/dist/src/index.js +6 -2
- package/dist/src/networks.d.ts +2 -2
- package/dist/src/networks.d.ts.map +1 -1
- package/dist/src/networks.js +47 -1
- package/dist/src/noble_ecc.d.ts +7 -7
- package/dist/src/noble_ecc.d.ts.map +1 -1
- package/dist/src/noble_ecc.js +4 -4
- package/dist/src/testutil/index.d.ts +1 -0
- package/dist/src/testutil/index.d.ts.map +1 -1
- package/dist/src/testutil/index.js +7 -2
- package/dist/src/testutil/keys.d.ts +4 -1
- package/dist/src/testutil/keys.d.ts.map +1 -1
- package/dist/src/testutil/keys.js +18 -3
- package/dist/src/testutil/mock.d.ts +2 -2
- package/dist/src/testutil/mock.d.ts.map +1 -1
- package/dist/src/testutil/mock.js +25 -17
- package/dist/src/testutil/psbt.d.ts +38 -16
- package/dist/src/testutil/psbt.d.ts.map +1 -1
- package/dist/src/testutil/psbt.js +42 -31
- package/dist/src/testutil/transaction.d.ts +18 -7
- package/dist/src/testutil/transaction.d.ts.map +1 -1
- package/dist/src/testutil/transaction.js +27 -20
- package/dist/src/transaction_builder.d.ts.map +1 -1
- package/dist/src/transaction_builder.js +12 -17
- package/package.json +8 -8
package/dist/src/bitgo/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTriple = exports.isTuple = void 0;
|
|
3
|
+
exports.isBufferArray = exports.isTriple = exports.isTuple = void 0;
|
|
4
4
|
function isTuple(arr) {
|
|
5
5
|
return arr.length === 2;
|
|
6
6
|
}
|
|
@@ -9,4 +9,13 @@ function isTriple(arr) {
|
|
|
9
9
|
return arr.length === 3;
|
|
10
10
|
}
|
|
11
11
|
exports.isTriple = isTriple;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the given value is an array of Buffer objects.
|
|
14
|
+
* @param v - The value to check.
|
|
15
|
+
* @returns A boolean indicating whether v is an array of Buffer objects.
|
|
16
|
+
*/
|
|
17
|
+
function isBufferArray(v) {
|
|
18
|
+
return Array.isArray(v) && v.every((e) => Buffer.isBuffer(e));
|
|
19
|
+
}
|
|
20
|
+
exports.isBufferArray = isBufferArray;
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9z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0aGUgZ2l2ZW4gdmFsdWUgaXMgYW4gYXJyYXkgb2YgQnVmZmVyIG9iamVjdHMuXG4gKiBAcGFyYW0gdiAtIFRoZSB2YWx1ZSB0byBjaGVjay5cbiAqIEByZXR1cm5zIEEgYm9vbGVhbiBpbmRpY2F0aW5nIHdoZXRoZXIgdiBpcyBhbiBhcnJheSBvZiBCdWZmZXIgb2JqZWN0cy5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzQnVmZmVyQXJyYXkodjogdW5rbm93bik6IHYgaXMgQnVmZmVyW10ge1xuICByZXR1cm4gQXJyYXkuaXNBcnJheSh2KSAmJiB2LmV2ZXJ5KChlKSA9PiBCdWZmZXIuaXNCdWZmZXIoZSkpO1xufVxuIl19
|
|
@@ -1,51 +1,58 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { PsbtInput } from 'bip174/src/lib/interfaces';
|
|
3
|
+
import { BIP32Interface } from 'bip32';
|
|
2
4
|
import { UtxoPsbt } from '../UtxoPsbt';
|
|
3
5
|
import { UtxoTransaction } from '../UtxoTransaction';
|
|
6
|
+
import { ScriptType2Of3 } from '../outputScripts';
|
|
4
7
|
import { RootWalletKeys } from './WalletKeys';
|
|
5
|
-
import { BIP32Interface } from 'bip32';
|
|
6
8
|
import { WalletUnspent } from './Unspent';
|
|
7
|
-
import { ParsedPubScriptP2ms, ParsedPubScriptTaprootScriptPath, ParsedPubScriptTaprootKeyPath, ParsedPubScriptP2shP2pk } from '../parseInput';
|
|
9
|
+
import { ParsedPubScriptP2ms, ParsedPubScriptTaprootScriptPath, ParsedPubScriptTaprootKeyPath, ParsedPubScriptP2shP2pk, ParsedScriptType, ParsedScriptType2Of3 } from '../parseInput';
|
|
10
|
+
import { Triple } from '../types';
|
|
8
11
|
import { TxInput } from 'bitcoinjs-lib';
|
|
9
|
-
|
|
12
|
+
type BaseSignatureContainer<T> = {
|
|
10
13
|
signatures: T;
|
|
11
14
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
type UnsignedSignatureContainer = BaseSignatureContainer<undefined>;
|
|
16
|
+
type HalfSignedSignatureContainer = BaseSignatureContainer<[Buffer]>;
|
|
17
|
+
type FullSignedSignatureContainer = BaseSignatureContainer<[Buffer, Buffer]>;
|
|
18
|
+
type SignatureContainer = UnsignedSignatureContainer | HalfSignedSignatureContainer | FullSignedSignatureContainer;
|
|
16
19
|
/**
|
|
17
20
|
* Contents of a pre-finalized PSBT Input for p2trMusig2 key path in the non-finalized state.
|
|
18
21
|
* T is [Buffer] for first signature, [Buffer, Buffer] for both signatures and `undefined` for no signatures.
|
|
19
22
|
*/
|
|
20
|
-
|
|
23
|
+
type BaseTaprootKeyPathSignatureContainer<T> = {
|
|
21
24
|
signatures: T;
|
|
22
25
|
/** Only contains participants that have added a signature */
|
|
23
26
|
participantPublicKeys: T;
|
|
24
27
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
type UnsignedTaprootKeyPathSignatureContainer = BaseTaprootKeyPathSignatureContainer<undefined>;
|
|
29
|
+
type HalfSignedTaprootKeyPathSignatureContainer = BaseTaprootKeyPathSignatureContainer<[Buffer]>;
|
|
30
|
+
type FullSignedTaprootKeyPathSignatureContainer = BaseTaprootKeyPathSignatureContainer<[Buffer, Buffer]>;
|
|
31
|
+
type TaprootKeyPathSignatureContainer = UnsignedTaprootKeyPathSignatureContainer | HalfSignedTaprootKeyPathSignatureContainer | FullSignedTaprootKeyPathSignatureContainer;
|
|
29
32
|
/**
|
|
30
33
|
* To hold parsed psbt data for p2ms based script types - p2sh, p2wsh, and p2shP2wsh
|
|
31
34
|
*/
|
|
32
|
-
export
|
|
35
|
+
export type ParsedPsbtP2ms = ParsedPubScriptP2ms & SignatureContainer;
|
|
33
36
|
/**
|
|
34
37
|
* To hold parsed psbt data for TaprootKeyPathSpend script type.
|
|
35
38
|
*/
|
|
36
|
-
export
|
|
39
|
+
export type ParsedPsbtTaprootKeyPath = ParsedPubScriptTaprootKeyPath & TaprootKeyPathSignatureContainer;
|
|
37
40
|
/**
|
|
38
41
|
* To hold parsed psbt data for TaprootScriptPathSpend script path script type.
|
|
39
42
|
*/
|
|
40
|
-
export
|
|
43
|
+
export type ParsedPsbtTaprootScriptPath = ParsedPubScriptTaprootScriptPath & SignatureContainer & {
|
|
41
44
|
controlBlock: Buffer;
|
|
42
45
|
leafVersion: number;
|
|
43
46
|
/** Indicates the level inside the taptree. */
|
|
44
47
|
scriptPathLevel: number;
|
|
45
48
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
export
|
|
49
|
+
export type ParsedPsbtTaproot = ParsedPsbtTaprootKeyPath | ParsedPsbtTaprootScriptPath;
|
|
50
|
+
type P2shP2pkSignatureContainer = UnsignedSignatureContainer | HalfSignedSignatureContainer;
|
|
51
|
+
export type ParsedPsbtP2shP2pk = ParsedPubScriptP2shP2pk & P2shP2pkSignatureContainer;
|
|
52
|
+
/**
|
|
53
|
+
* psbt input index and its user, backup, bitgo signatures status
|
|
54
|
+
*/
|
|
55
|
+
export type SignatureValidation = [index: number, sigTriple: Triple<boolean>];
|
|
49
56
|
/**
|
|
50
57
|
* @return PSBT filled with metatdata as per input params tx, unspents and rootWalletKeys.
|
|
51
58
|
* Unsigned PSBT for taproot input with witnessUtxo
|
|
@@ -62,6 +69,10 @@ export declare function toWalletPsbt(tx: UtxoTransaction<bigint>, unspents: Wall
|
|
|
62
69
|
* @return signed PSBT with signer's key for unspent
|
|
63
70
|
*/
|
|
64
71
|
export declare function signWalletPsbt(psbt: UtxoPsbt, inputIndex: number, signer: BIP32Interface, unspent: WalletUnspent<bigint>): void;
|
|
72
|
+
/**
|
|
73
|
+
* @returns script type of the input
|
|
74
|
+
*/
|
|
75
|
+
export declare function getPsbtInputScriptType(input: PsbtInput): ParsedScriptType;
|
|
65
76
|
/**
|
|
66
77
|
* @return psbt metadata are parsed as per below conditions.
|
|
67
78
|
* redeemScript/witnessScript/tapLeafScript matches BitGo.
|
|
@@ -74,18 +85,71 @@ export declare function signWalletPsbt(psbt: UtxoPsbt, inputIndex: number, signe
|
|
|
74
85
|
* scriptPathLevel, leafVersion, public keys, signatures.
|
|
75
86
|
* P2TR MUSIG2 kep path => scriptType (taprootKeyPathSpend), pubScript (scriptPubKey), participant pub keys (signer),
|
|
76
87
|
* public key (tapOutputkey), signatures (partial signer sigs).
|
|
77
|
-
* Any unsigned PSBT and without required metadata is returned with undefined.
|
|
78
88
|
*/
|
|
79
|
-
export declare function parsePsbtInput(
|
|
89
|
+
export declare function parsePsbtInput(input: PsbtInput): ParsedPsbtP2ms | ParsedPsbtTaproot | ParsedPsbtP2shP2pk;
|
|
90
|
+
/**
|
|
91
|
+
* Converts a parsed script type into an array of script types.
|
|
92
|
+
* @param parsedScriptType - The parsed script type.
|
|
93
|
+
* @returns An array of ScriptType2Of3 values corresponding to the parsed script type.
|
|
94
|
+
*/
|
|
95
|
+
export declare function toScriptType2Of3s(parsedScriptType: ParsedScriptType2Of3): ScriptType2Of3[];
|
|
96
|
+
/**
|
|
97
|
+
* @returns strictly parse the input and get signature count.
|
|
98
|
+
* unsigned(0), half-signed(1) or fully-signed(2)
|
|
99
|
+
*/
|
|
100
|
+
export declare function getStrictSignatureCount(input: TxInput | PsbtInput): 0 | 1 | 2;
|
|
80
101
|
/**
|
|
81
|
-
* @returns
|
|
82
|
-
*
|
|
102
|
+
* @returns strictly parse input and get signature count for all inputs.
|
|
103
|
+
* 0=unsigned, 1=half-signed or 2=fully-signed
|
|
83
104
|
*/
|
|
84
|
-
export declare function
|
|
105
|
+
export declare function getStrictSignatureCounts(tx: UtxoPsbt | UtxoTransaction<number | bigint> | PsbtInput[] | TxInput[]): (0 | 1 | 2)[];
|
|
85
106
|
/**
|
|
86
|
-
* @return true iff
|
|
87
|
-
* @param data byte array or hex string
|
|
107
|
+
* @return true iff inputs array is of PsbtInputType type
|
|
88
108
|
* */
|
|
89
|
-
export declare function
|
|
109
|
+
export declare function isPsbtInputArray(inputs: PsbtInput[] | TxInput[]): inputs is PsbtInput[];
|
|
110
|
+
/**
|
|
111
|
+
* @return true iff inputs array is of TxInput type
|
|
112
|
+
* */
|
|
113
|
+
export declare function isTxInputArray(inputs: PsbtInput[] | TxInput[]): inputs is TxInput[];
|
|
114
|
+
/**
|
|
115
|
+
* @returns true iff given psbt/transaction/tx-input-array/psbt-input-array contains at least one taproot key path spend input
|
|
116
|
+
*/
|
|
117
|
+
export declare function isTransactionWithKeyPathSpendInput(data: UtxoPsbt | UtxoTransaction<bigint | number> | PsbtInput[] | TxInput[]): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Set the RootWalletKeys as the globalXpubs on the psbt
|
|
120
|
+
*
|
|
121
|
+
* We do all the matching of the (tap)bip32Derivations masterFingerprint to the fingerprint of the
|
|
122
|
+
* extendedPubkey.
|
|
123
|
+
*/
|
|
124
|
+
export declare function addXpubsToPsbt(psbt: UtxoPsbt, rootWalletKeys: RootWalletKeys): void;
|
|
125
|
+
/**
|
|
126
|
+
* validates signatures for each 2 of 3 input against user, backup, bitgo keys derived from rootWalletKeys.
|
|
127
|
+
* @returns array of input index and its [is valid user sig exist, is valid backup sig exist, is valid user bitgo exist]
|
|
128
|
+
* For p2shP2pk input, [false, false, false] is returned since it is not a 2 of 3 sig input.
|
|
129
|
+
*/
|
|
130
|
+
export declare function getSignatureValidationArrayPsbt(psbt: UtxoPsbt, rootWalletKeys: RootWalletKeys): SignatureValidation[];
|
|
131
|
+
/**
|
|
132
|
+
* Extracts the half signed transaction from the psbt for p2ms based script types - p2sh, p2wsh, and p2shP2wsh.
|
|
133
|
+
* The purpose is to provide backward compatibility to keyternal (KRS) that only supports network transaction and p2ms script types.
|
|
134
|
+
*/
|
|
135
|
+
export declare function extractP2msOnlyHalfSignedTx(psbt: UtxoPsbt): UtxoTransaction<bigint>;
|
|
136
|
+
/**
|
|
137
|
+
* Clones the psbt without nonWitnessUtxo for non-segwit inputs and witnessUtxo is added instead.
|
|
138
|
+
* It is not BIP-174 compliant, so use it carefully.
|
|
139
|
+
*/
|
|
140
|
+
export declare function clonePsbtWithoutNonWitnessUtxo(psbt: UtxoPsbt): UtxoPsbt;
|
|
141
|
+
/**
|
|
142
|
+
* Returns true if there are non-segwit inputs in the PSBT that do not contain the
|
|
143
|
+
* nonWitnessUtxo.
|
|
144
|
+
*
|
|
145
|
+
* isPsbtLite(clonePsbtWithoutNonWitnessUtxo(psbt)) === true
|
|
146
|
+
*
|
|
147
|
+
* @param psbt
|
|
148
|
+
*/
|
|
149
|
+
export declare function isPsbtLite(psbt: UtxoPsbt): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Deletes witnessUtxo for non-segwit inputs to make the PSBT BIP-174 compliant.
|
|
152
|
+
*/
|
|
153
|
+
export declare function deleteWitnessUtxoForNonSegwitInputs(psbt: UtxoPsbt): void;
|
|
90
154
|
export {};
|
|
91
155
|
//# sourceMappingURL=Psbt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Psbt.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/wallet/Psbt.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Psbt.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/wallet/Psbt.ts"],"names":[],"mappings":";AAEA,OAAO,EAA0B,SAAS,EAAgB,MAAM,2BAA2B,CAAC;AAE5F,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAGL,cAAc,EAGf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAqB,cAAc,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAmB,aAAa,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAIL,mBAAmB,EACnB,gCAAgC,EAGhC,6BAA6B,EAE7B,uBAAuB,EACvB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