@mnee/ts-sdk 1.1.1 → 1.1.2
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +80 -2
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/mnee.types.d.ts +14 -0
- package/dist/mneeService.d.ts +17 -5
- package/package.json +1 -1
package/dist/mnee.types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Transaction } from "@bsv/sdk";
|
|
1
2
|
export type Environment = 'production' | 'sandbox';
|
|
2
3
|
export type SdkConfig = {
|
|
3
4
|
environment: Environment;
|
|
@@ -254,3 +255,16 @@ export interface TxOutputResponse {
|
|
|
254
255
|
environment?: Environment;
|
|
255
256
|
type?: TxOperation;
|
|
256
257
|
}
|
|
258
|
+
export interface UnsignedTransactionResult {
|
|
259
|
+
transaction: Transaction;
|
|
260
|
+
sigRequests: SignatureRequest[];
|
|
261
|
+
sourceTransactions: Map<number, Transaction>;
|
|
262
|
+
}
|
|
263
|
+
export interface MultisigBuildOptions {
|
|
264
|
+
inputs: Array<{
|
|
265
|
+
txid: string;
|
|
266
|
+
vout: number;
|
|
267
|
+
}>;
|
|
268
|
+
recipients: SendMNEE[];
|
|
269
|
+
changeAddress?: string | SendMNEE[];
|
|
270
|
+
}
|
package/dist/mneeService.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Script } from '@bsv/sdk';
|
|
2
|
-
import { MNEEBalance, MNEEConfig, SdkConfig, MNEEUtxo, ParseTxResponse, ParseTxExtendedResponse, ParseOptions, SendMNEE, TransferMultiOptions, TxHistoryResponse, AddressHistoryParams, TransferResponse, TransferStatus, TransferOptions } from './mnee.types.js';
|
|
1
|
+
import { PrivateKey, Script, Transaction } from '@bsv/sdk';
|
|
2
|
+
import { GetSignatures, MNEEBalance, MNEEConfig, SdkConfig, MNEEUtxo, ParseTxResponse, ParseTxExtendedResponse, ParseOptions, SendMNEE, TransferMultiOptions, SignatureRequest, SignatureResponse, TxHistoryResponse, AddressHistoryParams, TransferResponse, TransferStatus, TransferOptions, MultisigBuildOptions, UnsignedTransactionResult } from './mnee.types.js';
|
|
3
3
|
export declare class MNEEService {
|
|
4
4
|
private mneeApiKey;
|
|
5
5
|
private mneeConfig;
|
|
@@ -8,10 +8,19 @@ export declare class MNEEService {
|
|
|
8
8
|
getCosignerConfig(): Promise<MNEEConfig>;
|
|
9
9
|
toAtomicAmount(amount: number): number;
|
|
10
10
|
fromAtomicAmount(amount: number): number;
|
|
11
|
-
|
|
11
|
+
createInscription(recipient: string, amount: number, config: MNEEConfig): Promise<{
|
|
12
|
+
lockingScript: Script;
|
|
13
|
+
satoshis: number;
|
|
14
|
+
}>;
|
|
12
15
|
getUtxos(address: string | string[], page?: number, size?: number, order?: 'asc' | 'desc'): Promise<MNEEUtxo[]>;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
fetchRawTx(txid: string, retries?: number): Promise<Transaction | undefined>;
|
|
17
|
+
getSignatures(request: GetSignatures, privateKey: PrivateKey): Promise<{
|
|
18
|
+
sigResponses?: SignatureResponse[];
|
|
19
|
+
error?: {
|
|
20
|
+
message: string;
|
|
21
|
+
cause?: any;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
15
24
|
getEnoughUtxos(address: string, totalAtomicTokenAmount: number): Promise<MNEEUtxo[]>;
|
|
16
25
|
getAllUtxos(address: string): Promise<MNEEUtxo[]>;
|
|
17
26
|
transfer(request: SendMNEE[], wif: string, transferOptions?: TransferOptions): Promise<TransferResponse>;
|
|
@@ -45,7 +54,10 @@ export declare class MNEEService {
|
|
|
45
54
|
private addInputsToTransaction;
|
|
46
55
|
private calculateTransferMultiFee;
|
|
47
56
|
private addChangeOutputs;
|
|
57
|
+
createSignatureRequests(tx: Transaction): SignatureRequest[];
|
|
48
58
|
private signAllInputs;
|
|
59
|
+
applySignatures(tx: Transaction, signatures: SignatureResponse[]): Transaction;
|
|
60
|
+
buildUnsignedMneeTransaction(options: MultisigBuildOptions): Promise<UnsignedTransactionResult>;
|
|
49
61
|
private validateTokenConservation;
|
|
50
62
|
transferMulti(options: TransferMultiOptions, transferOptions?: TransferOptions): Promise<TransferResponse>;
|
|
51
63
|
}
|