@xchainjs/xchain-monero 0.2.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 +66 -0
- package/lib/client.d.ts +76 -0
- package/lib/const.d.ts +15 -0
- package/lib/crypto/address.d.ts +15 -0
- package/lib/crypto/base58monero.d.ts +13 -0
- package/lib/crypto/bulletproofsPlus.d.ts +23 -0
- package/lib/crypto/clsag.d.ts +31 -0
- package/lib/crypto/ecdh.d.ts +33 -0
- package/lib/crypto/hashToPoint.d.ts +15 -0
- package/lib/crypto/keyImage.d.ts +12 -0
- package/lib/crypto/keys.d.ts +19 -0
- package/lib/crypto/pedersen.d.ts +22 -0
- package/lib/crypto/stealth.d.ts +49 -0
- package/lib/daemon.d.ts +96 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.esm.js +2525 -0
- package/lib/index.js +2538 -0
- package/lib/lws.d.ts +88 -0
- package/lib/scanner.d.ts +51 -0
- package/lib/tx/builder.d.ts +45 -0
- package/lib/tx/decoySelection.d.ts +29 -0
- package/lib/tx/serialize.d.ts +43 -0
- package/lib/tx/types.d.ts +56 -0
- package/lib/types.d.ts +24 -0
- package/lib/utils.d.ts +52 -0
- package/package.json +47 -0
package/lib/lws.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyMonero-compatible Light Wallet Server (LWS) REST API client.
|
|
3
|
+
* LWS accepts private view keys and returns pre-decoded balances/transactions,
|
|
4
|
+
* avoiding the need for client-side blockchain scanning.
|
|
5
|
+
*/
|
|
6
|
+
export interface LWSLoginResponse {
|
|
7
|
+
new_address: boolean;
|
|
8
|
+
generated_locally: boolean;
|
|
9
|
+
start_height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LWSSpentOutput {
|
|
12
|
+
amount: string;
|
|
13
|
+
key_image: string;
|
|
14
|
+
tx_pub_key: string;
|
|
15
|
+
out_index: number;
|
|
16
|
+
mixin: number;
|
|
17
|
+
}
|
|
18
|
+
export interface LWSAddressInfoResponse {
|
|
19
|
+
locked_funds: string;
|
|
20
|
+
total_received: string;
|
|
21
|
+
total_sent: string;
|
|
22
|
+
scanned_height: number;
|
|
23
|
+
scanned_block_height: number;
|
|
24
|
+
start_height: number;
|
|
25
|
+
transaction_height: number;
|
|
26
|
+
blockchain_height: number;
|
|
27
|
+
spent_outputs: LWSSpentOutput[];
|
|
28
|
+
}
|
|
29
|
+
export interface LWSTxInfo {
|
|
30
|
+
id: number;
|
|
31
|
+
hash: string;
|
|
32
|
+
timestamp: string;
|
|
33
|
+
total_received: string;
|
|
34
|
+
total_sent: string;
|
|
35
|
+
height: number;
|
|
36
|
+
spent_outputs: LWSSpentOutput[];
|
|
37
|
+
payment_id: string;
|
|
38
|
+
coinbase: boolean;
|
|
39
|
+
mempool: boolean;
|
|
40
|
+
mixin: number;
|
|
41
|
+
}
|
|
42
|
+
export interface LWSAddressTxsResponse {
|
|
43
|
+
total_received: string;
|
|
44
|
+
scanned_height: number;
|
|
45
|
+
scanned_block_height: number;
|
|
46
|
+
start_height: number;
|
|
47
|
+
blockchain_height: number;
|
|
48
|
+
transactions: LWSTxInfo[];
|
|
49
|
+
}
|
|
50
|
+
export interface LWSUnspentOutput {
|
|
51
|
+
amount: string;
|
|
52
|
+
public_key: string;
|
|
53
|
+
index: number;
|
|
54
|
+
global_index: number;
|
|
55
|
+
tx_id: number;
|
|
56
|
+
tx_hash: string;
|
|
57
|
+
tx_prefix_hash: string;
|
|
58
|
+
tx_pub_key: string;
|
|
59
|
+
timestamp: string;
|
|
60
|
+
height: number;
|
|
61
|
+
rct: string;
|
|
62
|
+
}
|
|
63
|
+
export interface LWSUnspentOutsResponse {
|
|
64
|
+
amount: string;
|
|
65
|
+
outputs: LWSUnspentOutput[];
|
|
66
|
+
per_byte_fee: number;
|
|
67
|
+
fee_mask: number;
|
|
68
|
+
fork_version: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Register wallet address with LWS for scanning.
|
|
72
|
+
* Must be called before other endpoints will return data.
|
|
73
|
+
*/
|
|
74
|
+
export declare const login: (url: string, address: string, viewKeyHex: string) => Promise<LWSLoginResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Get balance summary for an address.
|
|
77
|
+
* Returns total received/sent in piconero strings.
|
|
78
|
+
*/
|
|
79
|
+
export declare const getAddressInfo: (url: string, address: string, viewKeyHex: string) => Promise<LWSAddressInfoResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Get transaction history for an address.
|
|
82
|
+
* Returns transactions with per-tx received/sent amounts.
|
|
83
|
+
*/
|
|
84
|
+
export declare const getAddressTxs: (url: string, address: string, viewKeyHex: string) => Promise<LWSAddressTxsResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Get unspent outputs for transaction building.
|
|
87
|
+
*/
|
|
88
|
+
export declare const getUnspentOuts: (url: string, address: string, viewKeyHex: string, amount?: string) => Promise<LWSUnspentOutsResponse>;
|
package/lib/scanner.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daemon-based blockchain scanner for Monero.
|
|
3
|
+
* Scans blocks using the view key to find owned outputs and detect spent outputs.
|
|
4
|
+
* Used as fallback when no LWS (Light Wallet Server) is available.
|
|
5
|
+
*
|
|
6
|
+
* This is intentionally slow — scanning the full chain from genesis is impractical.
|
|
7
|
+
* Use a restore height close to when the wallet was created.
|
|
8
|
+
*/
|
|
9
|
+
export interface OwnedOutput {
|
|
10
|
+
txHash: string;
|
|
11
|
+
outputIndex: number;
|
|
12
|
+
amount: bigint;
|
|
13
|
+
globalIndex: number;
|
|
14
|
+
publicKey: Uint8Array;
|
|
15
|
+
txPubKey: Uint8Array;
|
|
16
|
+
keyImage: string;
|
|
17
|
+
height: number;
|
|
18
|
+
timestamp: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ScanState {
|
|
21
|
+
/** Last fully scanned block height */
|
|
22
|
+
lastHeight: number;
|
|
23
|
+
/** Owned unspent outputs */
|
|
24
|
+
ownedOutputs: OwnedOutput[];
|
|
25
|
+
/** Set of spent key images */
|
|
26
|
+
spentKeyImages: Set<string>;
|
|
27
|
+
}
|
|
28
|
+
interface ScanProgress {
|
|
29
|
+
currentHeight: number;
|
|
30
|
+
totalHeight: number;
|
|
31
|
+
outputsFound: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Scan a range of blocks for owned outputs.
|
|
35
|
+
* Uses batched RPC calls: fetches block tx hashes in parallel, then
|
|
36
|
+
* fetches all transactions in a single get_transactions call per batch.
|
|
37
|
+
*/
|
|
38
|
+
export declare function scanBlocks(daemonUrl: string, privViewKey: Uint8Array, pubSpendKey: Uint8Array, privSpendKey: Uint8Array, fromHeight: number, toHeight: number, onProgress?: (progress: ScanProgress) => void): Promise<{
|
|
39
|
+
ownedOutputs: OwnedOutput[];
|
|
40
|
+
spentKeyImages: Set<string>;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Compute balance from scan results.
|
|
44
|
+
* Balance = sum of owned outputs whose key images are NOT in the spent set.
|
|
45
|
+
*/
|
|
46
|
+
export declare function computeBalance(ownedOutputs: OwnedOutput[], spentKeyImages: Set<string>): bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Get unspent outputs from scan results.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getUnspentOutputs(ownedOutputs: OwnedOutput[], spentKeyImages: Set<string>): OwnedOutput[];
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monero transaction builder.
|
|
3
|
+
* Orchestrates: stealth addresses, Pedersen commitments, ECDH encryption,
|
|
4
|
+
* CLSAG signatures, Bulletproofs+ range proofs, and serialization.
|
|
5
|
+
*
|
|
6
|
+
* Reference: monero/src/wallet/wallet2.cpp (create_transactions_2)
|
|
7
|
+
*/
|
|
8
|
+
import type { MoneroTransaction } from './types';
|
|
9
|
+
/** Input to spend */
|
|
10
|
+
export interface SpendableOutput {
|
|
11
|
+
globalIndex: number;
|
|
12
|
+
amount: bigint;
|
|
13
|
+
mask: Uint8Array;
|
|
14
|
+
txPubKey: Uint8Array;
|
|
15
|
+
outputIndex: number;
|
|
16
|
+
publicKey: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
/** Destination output */
|
|
19
|
+
export interface Destination {
|
|
20
|
+
pubViewKey: Uint8Array;
|
|
21
|
+
pubSpendKey: Uint8Array;
|
|
22
|
+
amount: bigint;
|
|
23
|
+
}
|
|
24
|
+
/** Result of building a transaction */
|
|
25
|
+
export interface BuiltTransaction {
|
|
26
|
+
tx: MoneroTransaction;
|
|
27
|
+
txHex: string;
|
|
28
|
+
txHash: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build a complete Monero RingCT transaction.
|
|
32
|
+
*
|
|
33
|
+
* @param inputs - Spendable outputs to use as inputs
|
|
34
|
+
* @param destinations - Recipients + amounts
|
|
35
|
+
* @param changeDestination - Change address keys (pubView, pubSpend)
|
|
36
|
+
* @param fee - Transaction fee in piconero
|
|
37
|
+
* @param privViewKey - Sender's private view key
|
|
38
|
+
* @param privSpendKey - Sender's private spend key
|
|
39
|
+
* @param daemonUrl - Daemon RPC URL for decoy selection
|
|
40
|
+
* @returns Built transaction ready for broadcast
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildTransaction(inputs: SpendableOutput[], destinations: Destination[], changeDestination: {
|
|
43
|
+
pubViewKey: Uint8Array;
|
|
44
|
+
pubSpendKey: Uint8Array;
|
|
45
|
+
}, fee: bigint, privViewKey: Uint8Array, privSpendKey: Uint8Array, daemonUrl: string): Promise<BuiltTransaction>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decoy output selection for Monero ring signatures.
|
|
3
|
+
* Uses gamma distribution (shape=19.28, scale=1/1.61) matching Monero's wallet2.
|
|
4
|
+
*
|
|
5
|
+
* Reference: monero/src/wallet/wallet2.cpp (get_outs)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Select decoy global output indices for ring signature construction.
|
|
9
|
+
*
|
|
10
|
+
* @param realGlobalIndex - Global output index of the real input
|
|
11
|
+
* @param numOutputs - Total number of outputs on chain
|
|
12
|
+
* @param newestHeight - Current blockchain height
|
|
13
|
+
* @param outputDistribution - Cumulative output distribution per block
|
|
14
|
+
* @param distStartHeight - Start height of distribution data
|
|
15
|
+
* @returns Array of RING_SIZE - 1 decoy global indices (excluding the real one)
|
|
16
|
+
*/
|
|
17
|
+
export declare function selectDecoys(realGlobalIndex: number, numOutputs: number, newestHeight: number, outputDistribution: number[], distStartHeight: number): number[];
|
|
18
|
+
/**
|
|
19
|
+
* Build sorted ring with real index.
|
|
20
|
+
* Returns the ring indices (sorted) and the position of the real input.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildRingIndices(realGlobalIndex: number, decoys: number[]): {
|
|
23
|
+
indices: number[];
|
|
24
|
+
realIndex: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Convert absolute global indices to relative offsets (as stored in tx).
|
|
28
|
+
*/
|
|
29
|
+
export declare function toRelativeOffsets(sortedIndices: number[]): bigint[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monero transaction binary serialization.
|
|
3
|
+
* Reference: monero/src/cryptonote_basic/cryptonote_format_utils.cpp
|
|
4
|
+
*/
|
|
5
|
+
import type { MoneroTransaction, RctSignatures, ClsagSig, BPPlusProof } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Encode a number as a Monero varint (7 bits per byte, MSB = continuation flag).
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeVarint(n: bigint | number): Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* Serialize the transaction prefix (everything except RingCT signatures).
|
|
12
|
+
*/
|
|
13
|
+
export declare function serializeTxPrefix(tx: MoneroTransaction): Uint8Array;
|
|
14
|
+
/**
|
|
15
|
+
* Compute the transaction prefix hash (keccak256 of serialized prefix).
|
|
16
|
+
* This is the message signed by CLSAG.
|
|
17
|
+
*/
|
|
18
|
+
export declare function txPrefixHash(tx: MoneroTransaction): Uint8Array;
|
|
19
|
+
/**
|
|
20
|
+
* Serialize the RCT signature base (type, fee, encrypted amounts, output commitments).
|
|
21
|
+
*/
|
|
22
|
+
export declare function serializeRctBase(rct: RctSignatures): Uint8Array;
|
|
23
|
+
/**
|
|
24
|
+
* Serialize a CLSAG signature.
|
|
25
|
+
*/
|
|
26
|
+
export declare function serializeClsag(sig: ClsagSig): Uint8Array;
|
|
27
|
+
/**
|
|
28
|
+
* Serialize a Bulletproofs+ proof.
|
|
29
|
+
*/
|
|
30
|
+
export declare function serializeBPPlus(proof: BPPlusProof): Uint8Array;
|
|
31
|
+
/**
|
|
32
|
+
* Serialize the prunable RCT data (pseudo-outputs, CLSAGs, BP+ proofs).
|
|
33
|
+
*/
|
|
34
|
+
export declare function serializeRctPrunable(rct: RctSignatures): Uint8Array;
|
|
35
|
+
/**
|
|
36
|
+
* Compute the RCT signature hash (message for CLSAG signing).
|
|
37
|
+
* hash = keccak256(prefixHash || keccak256(rctBase) || keccak256(rctPrunable))
|
|
38
|
+
*/
|
|
39
|
+
export declare function rctSigHash(prefixHash: Uint8Array, rctBase: Uint8Array, rctPrunable: Uint8Array): Uint8Array;
|
|
40
|
+
/**
|
|
41
|
+
* Serialize a complete transaction.
|
|
42
|
+
*/
|
|
43
|
+
export declare function serializeTransaction(tx: MoneroTransaction): Uint8Array;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monero transaction types for RCTTypeCLSAG transactions.
|
|
3
|
+
*/
|
|
4
|
+
/** A transaction input (key input) */
|
|
5
|
+
export interface TxInput {
|
|
6
|
+
amount: bigint;
|
|
7
|
+
keyOffsets: bigint[];
|
|
8
|
+
keyImage: Uint8Array;
|
|
9
|
+
}
|
|
10
|
+
/** A transaction output */
|
|
11
|
+
export interface TxOutput {
|
|
12
|
+
amount: bigint;
|
|
13
|
+
key: Uint8Array;
|
|
14
|
+
viewTag: number;
|
|
15
|
+
}
|
|
16
|
+
/** CLSAG signature for one input */
|
|
17
|
+
export interface ClsagSig {
|
|
18
|
+
s: Uint8Array[];
|
|
19
|
+
c1: Uint8Array;
|
|
20
|
+
D: Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
/** Bulletproofs+ range proof */
|
|
23
|
+
export interface BPPlusProof {
|
|
24
|
+
A: Uint8Array;
|
|
25
|
+
A1: Uint8Array;
|
|
26
|
+
B: Uint8Array;
|
|
27
|
+
r1: Uint8Array;
|
|
28
|
+
s1: Uint8Array;
|
|
29
|
+
d1: Uint8Array;
|
|
30
|
+
L: Uint8Array[];
|
|
31
|
+
R: Uint8Array[];
|
|
32
|
+
}
|
|
33
|
+
/** RingCT signatures (type 6 = RCTTypeBulletproofPlus) */
|
|
34
|
+
export interface RctSignatures {
|
|
35
|
+
type: number;
|
|
36
|
+
txnFee: bigint;
|
|
37
|
+
ecdhInfo: Uint8Array[];
|
|
38
|
+
outPk: Uint8Array[];
|
|
39
|
+
pseudoOuts: Uint8Array[];
|
|
40
|
+
clsags: ClsagSig[];
|
|
41
|
+
bppProofs: BPPlusProof[];
|
|
42
|
+
}
|
|
43
|
+
/** Complete Monero transaction */
|
|
44
|
+
export interface MoneroTransaction {
|
|
45
|
+
version: number;
|
|
46
|
+
unlockTime: bigint;
|
|
47
|
+
inputs: TxInput[];
|
|
48
|
+
outputs: TxOutput[];
|
|
49
|
+
extra: Uint8Array;
|
|
50
|
+
rctSignatures: RctSignatures;
|
|
51
|
+
}
|
|
52
|
+
/** Ring member (decoy or real) with public key and commitment */
|
|
53
|
+
export interface RingMember {
|
|
54
|
+
dest: Uint8Array;
|
|
55
|
+
mask: Uint8Array;
|
|
56
|
+
}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Balance as BaseBalance, ExplorerProviders, Network, Tx as BaseTx, TxParams as BaseTxParams, TxsPage as BaseTxsPage, XChainClientParams } from '@xchainjs/xchain-client';
|
|
2
|
+
import { Asset } from '@xchainjs/xchain-util';
|
|
3
|
+
/**
|
|
4
|
+
* Monero client params
|
|
5
|
+
*/
|
|
6
|
+
export type XMRClientParams = XChainClientParams & {
|
|
7
|
+
explorerProviders: ExplorerProviders;
|
|
8
|
+
daemonUrls?: Record<Network, string[]>;
|
|
9
|
+
lwsUrls?: Record<Network, string[]>;
|
|
10
|
+
/** Block height to start scanning from when using daemon fallback (no LWS). Set to wallet creation height to avoid full chain scan. */
|
|
11
|
+
restoreHeight?: number;
|
|
12
|
+
};
|
|
13
|
+
export type Balance = BaseBalance & {
|
|
14
|
+
asset: Asset;
|
|
15
|
+
};
|
|
16
|
+
export type TxParams = BaseTxParams & {
|
|
17
|
+
asset?: Asset;
|
|
18
|
+
};
|
|
19
|
+
export type Tx = BaseTx & {
|
|
20
|
+
asset: Asset;
|
|
21
|
+
};
|
|
22
|
+
export type TxsPage = BaseTxsPage & {
|
|
23
|
+
txs: Tx[];
|
|
24
|
+
};
|
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Network } from '@xchainjs/xchain-client';
|
|
2
|
+
/**
|
|
3
|
+
* Monero network type values matching monero-ts MoneroNetworkType enum
|
|
4
|
+
*/
|
|
5
|
+
export declare const MoneroNetworkType: {
|
|
6
|
+
readonly MAINNET: 0;
|
|
7
|
+
readonly TESTNET: 1;
|
|
8
|
+
readonly STAGENET: 2;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Maps XChainJS Network to Monero network type
|
|
12
|
+
*/
|
|
13
|
+
export declare const getMoneroNetworkType: (network: Network) => number;
|
|
14
|
+
/**
|
|
15
|
+
* Validates a Monero address format.
|
|
16
|
+
* Standard addresses are 95 chars, integrated addresses are 106 chars.
|
|
17
|
+
* Uses base58 character set and prefix validation.
|
|
18
|
+
*/
|
|
19
|
+
export declare const validateMoneroAddress: (address: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Reduces a 32-byte value modulo the ed25519 group order.
|
|
22
|
+
* Required to produce valid Monero private keys from arbitrary 32-byte seeds.
|
|
23
|
+
*/
|
|
24
|
+
export declare const scReduce32: (bytes: Uint8Array) => Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* Converts a Uint8Array to hex string
|
|
27
|
+
*/
|
|
28
|
+
export declare const bytesToHex: (bytes: Uint8Array) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Converts a hex string to Uint8Array
|
|
31
|
+
*/
|
|
32
|
+
export declare const hexToBytes: (hex: string) => Uint8Array;
|
|
33
|
+
/**
|
|
34
|
+
* Scalar multiplication: (a * b) mod l
|
|
35
|
+
*/
|
|
36
|
+
export declare function scMul(a: Uint8Array, b: Uint8Array): Uint8Array;
|
|
37
|
+
/**
|
|
38
|
+
* Scalar multiply-add: (a * b + c) mod l
|
|
39
|
+
*/
|
|
40
|
+
export declare function scMulAdd(a: Uint8Array, b: Uint8Array, c: Uint8Array): Uint8Array;
|
|
41
|
+
/**
|
|
42
|
+
* Scalar multiply-subtract: (c - a * b) mod l
|
|
43
|
+
*/
|
|
44
|
+
export declare function scMulSub(a: Uint8Array, b: Uint8Array, c: Uint8Array): Uint8Array;
|
|
45
|
+
/**
|
|
46
|
+
* Hash to scalar: keccak256(data) reduced mod l
|
|
47
|
+
*/
|
|
48
|
+
export declare function hashToScalar(data: Uint8Array): Uint8Array;
|
|
49
|
+
/**
|
|
50
|
+
* Concatenate multiple Uint8Arrays
|
|
51
|
+
*/
|
|
52
|
+
export declare function concatBytes(...arrays: Uint8Array[]): Uint8Array;
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xchainjs/xchain-monero",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Monero (XMR) client for XChainJS",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Monero",
|
|
7
|
+
"XMR",
|
|
8
|
+
"XChain"
|
|
9
|
+
],
|
|
10
|
+
"author": "THORChain",
|
|
11
|
+
"homepage": "https://github.com/xchainjs/xchainjs-lib",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"module": "lib/index.esm.js",
|
|
15
|
+
"typings": "lib/index.d.ts",
|
|
16
|
+
"directories": {
|
|
17
|
+
"lib": "lib",
|
|
18
|
+
"test": "__tests__"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git@github.com:xchainjs/xchainjs-lib.git"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"clean": "rm -rf .turbo && rm -rf lib",
|
|
29
|
+
"build": "yarn clean && rollup -c --bundleConfigAsCjs",
|
|
30
|
+
"build:release": "yarn exec rm -rf release && yarn pack && yarn exec \"mkdir release && tar zxvf package.tgz --directory release && rm package.tgz\"",
|
|
31
|
+
"test": "jest",
|
|
32
|
+
"e2e": "jest --config jest.config.e2e.mjs",
|
|
33
|
+
"lint": "eslint --config ../../eslint.config.mjs \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@noble/curves": "^1.8.1",
|
|
37
|
+
"@noble/hashes": "^1.7.1",
|
|
38
|
+
"@xchainjs/xchain-client": "2.0.11",
|
|
39
|
+
"@xchainjs/xchain-crypto": "1.0.6",
|
|
40
|
+
"@xchainjs/xchain-util": "2.0.6",
|
|
41
|
+
"micro-key-producer": "^0.7.6"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"directory": "release/package"
|
|
46
|
+
}
|
|
47
|
+
}
|