@meshsdk/core 1.5.16 → 1.6.0-alpha.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/common/utils/builder.d.ts +2 -2
- package/dist/common/utils/converter.d.ts +1 -1
- package/dist/common/utils/deserializer.d.ts +1 -1
- package/dist/core/CIP1852.d.ts +2 -2
- package/dist/core/CIP1853.d.ts +1 -1
- package/dist/core/CIP1855.d.ts +1 -1
- package/dist/core/{CPS-009.d.ts → CPS0009.d.ts} +1 -1
- package/dist/core/CSL.d.ts +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core.cjs +18 -8
- package/dist/core.js +19529 -2824
- package/dist/serializer/index.d.ts +1 -0
- package/dist/wallet/mina.service.d.ts +1 -1
- package/package.json +3 -4
- package/dist/common/constants.d.ts +0 -58
- package/dist/common/contracts/evaluator.d.ts +0 -4
- package/dist/common/contracts/fetcher.d.ts +0 -22
- package/dist/common/contracts/index.d.ts +0 -7
- package/dist/common/contracts/initiator.d.ts +0 -8
- package/dist/common/contracts/listener.d.ts +0 -3
- package/dist/common/contracts/signer.d.ts +0 -8
- package/dist/common/contracts/submitter.d.ts +0 -3
- package/dist/common/contracts/uploader.d.ts +0 -3
- package/dist/common/helpers/generateNonce.d.ts +0 -1
- package/dist/common/helpers/index.d.ts +0 -4
- package/dist/common/helpers/readPlutusData.d.ts +0 -2
- package/dist/common/helpers/readTransaction.d.ts +0 -2
- package/dist/common/types/Account.d.ts +0 -5
- package/dist/common/types/AccountInfo.d.ts +0 -7
- package/dist/common/types/Action.d.ts +0 -12
- package/dist/common/types/Asset.d.ts +0 -6
- package/dist/common/types/AssetExtended.d.ts +0 -8
- package/dist/common/types/AssetMetadata.d.ts +0 -24
- package/dist/common/types/BlockInfo.d.ts +0 -17
- package/dist/common/types/Data.d.ts +0 -4
- package/dist/common/types/DataSignature.d.ts +0 -4
- package/dist/common/types/Era.d.ts +0 -1
- package/dist/common/types/Mint.d.ts +0 -10
- package/dist/common/types/NativeScript.d.ts +0 -14
- package/dist/common/types/Network.d.ts +0 -4
- package/dist/common/types/PlutusScript.d.ts +0 -6
- package/dist/common/types/PoolParams.d.ts +0 -16
- package/dist/common/types/Protocol.d.ts +0 -22
- package/dist/common/types/Recipient.d.ts +0 -11
- package/dist/common/types/Relay.d.ts +0 -13
- package/dist/common/types/Token.d.ts +0 -2
- package/dist/common/types/TransactionInfo.d.ts +0 -11
- package/dist/common/types/UTxO.d.ts +0 -15
- package/dist/common/types/Wallet.d.ts +0 -5
- package/dist/common/types/index.d.ts +0 -22
- package/dist/common/utils/parser.d.ts +0 -5
- package/dist/common/utils/resolver.d.ts +0 -17
- package/dist/core/CIP2.d.ts +0 -4
- package/dist/core/CIP8.d.ts +0 -15
- package/dist/index.d.ts +0 -11
- package/dist/providers/blockfrost.provider.d.ts +0 -46
- package/dist/providers/index.d.ts +0 -6
- package/dist/providers/infura.provider.d.ts +0 -12
- package/dist/providers/koios.provider.d.ts +0 -27
- package/dist/providers/maestro.provider.d.ts +0 -35
- package/dist/providers/ogmios.provider.d.ts +0 -12
- package/dist/providers/tango.provider.d.ts +0 -25
- package/dist/scripts/forge.script.d.ts +0 -8
- package/dist/scripts/index.d.ts +0 -1
- package/dist/transaction/index.d.ts +0 -2
- package/dist/transaction/meshTxBuilder/index.d.ts +0 -2
- package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +0 -47
- package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +0 -320
- package/dist/transaction/meshTxBuilder/type.d.ts +0 -128
- package/dist/transaction/transaction.service.d.ts +0 -150
- package/dist/wallet/app.service.d.ts +0 -36
- package/dist/wallet/browser.service.d.ts +0 -75
- package/dist/wallet/embedded.service.d.ts +0 -20
- package/dist/wallet/index.d.ts +0 -3
- /package/dist/{common/helpers/mergeSignatures.d.ts → serializer/signatures.d.ts} +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { IInitiator } from '@mesh/common/contracts';
|
|
2
|
-
import type { Action, Asset, Data, Era, Mint, Protocol, PlutusScript, PoolParams, Recipient, Token, UTxO } from '@mesh/common/types';
|
|
3
|
-
export declare class Transaction {
|
|
4
|
-
private _changeAddress?;
|
|
5
|
-
private _txOutputs;
|
|
6
|
-
private _recipients;
|
|
7
|
-
private _totalBurns;
|
|
8
|
-
private _totalMints;
|
|
9
|
-
private readonly _era?;
|
|
10
|
-
private readonly _initiator?;
|
|
11
|
-
private readonly _mintBuilder;
|
|
12
|
-
private readonly _protocolParameters;
|
|
13
|
-
private readonly _txBuilder;
|
|
14
|
-
private readonly _txCertificates;
|
|
15
|
-
private readonly _txInputsBuilder;
|
|
16
|
-
private readonly _txWithdrawals;
|
|
17
|
-
constructor(options?: Partial<CreateTxOptions>);
|
|
18
|
-
static attachMetadata(cborTx: string, cborTxMetadata: string, era?: Era): string;
|
|
19
|
-
static deattachMetadata(cborTx: string): string;
|
|
20
|
-
static maskMetadata(cborTx: string, era?: Era): string;
|
|
21
|
-
static readMetadata(cborTx: string): string;
|
|
22
|
-
static writeMetadata(cborTx: string, cborTxMetadata: string, era?: Era): string;
|
|
23
|
-
get size(): number;
|
|
24
|
-
build(): Promise<string>;
|
|
25
|
-
burnAsset(forgeScript: string | PlutusScript | UTxO, asset: Asset, redeemer?: Partial<Action>): Transaction;
|
|
26
|
-
delegateStake(rewardAddress: string, poolId: string): Transaction;
|
|
27
|
-
deregisterStake(rewardAddress: string): Transaction;
|
|
28
|
-
mintAsset(forgeScript: string | PlutusScript | UTxO, mint: Mint, redeemer?: Partial<Action>): Transaction;
|
|
29
|
-
redeemValue(options: {
|
|
30
|
-
value: UTxO;
|
|
31
|
-
script: PlutusScript | UTxO;
|
|
32
|
-
datum?: Data | UTxO;
|
|
33
|
-
redeemer?: Action;
|
|
34
|
-
}): Transaction;
|
|
35
|
-
registerStake(rewardAddress: string): Transaction;
|
|
36
|
-
registerPool(params: PoolParams): Transaction;
|
|
37
|
-
retirePool(poolId: string, epochNo: number): Transaction;
|
|
38
|
-
/**
|
|
39
|
-
* Adds an output to the transaction.
|
|
40
|
-
*
|
|
41
|
-
* @param recipient The recipient of the output.
|
|
42
|
-
* @param assets The assets to send.
|
|
43
|
-
* @returns The transaction builder.
|
|
44
|
-
* @see {@link https://meshjs.dev/apis/transaction#sendAssets}
|
|
45
|
-
*/
|
|
46
|
-
sendAssets(recipient: Recipient, assets: Asset[]): Transaction;
|
|
47
|
-
/**
|
|
48
|
-
* Adds a transaction output to the transaction.
|
|
49
|
-
*
|
|
50
|
-
* @param {Recipient} recipient The recipient of the transaction.
|
|
51
|
-
* @param {string} lovelace The amount of lovelace to send.
|
|
52
|
-
* @returns {Transaction} The Transaction object.
|
|
53
|
-
* @see {@link https://meshjs.dev/apis/transaction#sendAda}
|
|
54
|
-
*/
|
|
55
|
-
sendLovelace(recipient: Recipient, lovelace: string): Transaction;
|
|
56
|
-
/**
|
|
57
|
-
* Adds stable coins transaction output to the transaction.
|
|
58
|
-
* @param {Recipient} recipient The recipient of the transaction.
|
|
59
|
-
* @param {Token} ticker The ticker of the token to send.
|
|
60
|
-
* @param {string} amount The amount of the token to send.
|
|
61
|
-
* @returns {Transaction} The Transaction object.
|
|
62
|
-
* @see {@link https://meshjs.dev/apis/transaction#sendToken}
|
|
63
|
-
*/
|
|
64
|
-
sendToken(recipient: Recipient, ticker: Token, amount: string): Transaction;
|
|
65
|
-
/**
|
|
66
|
-
* Adds an output to the transaction.
|
|
67
|
-
*
|
|
68
|
-
* @param {Recipient} recipient The recipient of the output.
|
|
69
|
-
* @param {UTxO} value The UTxO value of the output.
|
|
70
|
-
* @returns {Transaction} The Transaction object.
|
|
71
|
-
*/
|
|
72
|
-
sendValue(recipient: Recipient, value: UTxO): Transaction;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the change address for the transaction.
|
|
75
|
-
*
|
|
76
|
-
* @param {string} changeAddress The change address.
|
|
77
|
-
* @returns {Transaction} The Transaction object.
|
|
78
|
-
*/
|
|
79
|
-
setChangeAddress(changeAddress: string): Transaction;
|
|
80
|
-
/**
|
|
81
|
-
* Sets the collateral for the transaction.
|
|
82
|
-
*
|
|
83
|
-
* @param {UTxO[]} collateral - Set the UTxO for collateral.
|
|
84
|
-
* @returns {Transaction} The Transaction object.
|
|
85
|
-
*/
|
|
86
|
-
setCollateral(collateral: UTxO[]): Transaction;
|
|
87
|
-
/**
|
|
88
|
-
* Add a JSON metadata entry to the transaction.
|
|
89
|
-
*
|
|
90
|
-
* @param {number} key The key to use for the metadata entry.
|
|
91
|
-
* @param {unknown} value The value to use for the metadata entry.
|
|
92
|
-
* @returns {Transaction} The Transaction object.
|
|
93
|
-
* @see {@link https://meshjs.dev/apis/transaction#setMetadata}
|
|
94
|
-
*/
|
|
95
|
-
setMetadata(key: number, value: unknown): Transaction;
|
|
96
|
-
/**
|
|
97
|
-
* Sets the required signers for the transaction.
|
|
98
|
-
*
|
|
99
|
-
* @param {string[]} addresses The addresses of the required signers.
|
|
100
|
-
* @returns {Transaction} The Transaction object.
|
|
101
|
-
*/
|
|
102
|
-
setRequiredSigners(addresses: string[]): Transaction;
|
|
103
|
-
/**
|
|
104
|
-
* Sets the start slot for the transaction.
|
|
105
|
-
*
|
|
106
|
-
* @param {string} slot The start slot for the transaction.
|
|
107
|
-
* @returns {Transaction} The Transaction object.
|
|
108
|
-
* @see {@link https://meshjs.dev/apis/transaction#setTimeLimit}
|
|
109
|
-
*/
|
|
110
|
-
setTimeToStart(slot: string): Transaction;
|
|
111
|
-
/**
|
|
112
|
-
* Set the time to live for the transaction.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} slot The slot number to expire the transaction at.
|
|
115
|
-
* @returns {Transaction} The Transaction object.
|
|
116
|
-
* @see {@link https://meshjs.dev/apis/transaction#setTimeLimit}
|
|
117
|
-
*/
|
|
118
|
-
setTimeToExpire(slot: string): Transaction;
|
|
119
|
-
/**
|
|
120
|
-
* Sets the inputs for the transaction.
|
|
121
|
-
*
|
|
122
|
-
* @param {UTxO[]} inputs The inputs to set.
|
|
123
|
-
* @returns {Transaction} The transaction.
|
|
124
|
-
*/
|
|
125
|
-
setTxInputs(inputs: UTxO[]): Transaction;
|
|
126
|
-
/**
|
|
127
|
-
* Sets the reference inputs for the transaction.
|
|
128
|
-
*
|
|
129
|
-
* @param {UTxO[]} inputs The reference inputs to set.
|
|
130
|
-
* @returns {Transaction} The transaction.
|
|
131
|
-
*/
|
|
132
|
-
setTxRefInputs(inputs: UTxO[]): Transaction;
|
|
133
|
-
withdrawRewards(rewardAddress: string, lovelace: string): Transaction;
|
|
134
|
-
private addBurnInputsIfNeeded;
|
|
135
|
-
private addChangeAddress;
|
|
136
|
-
private addCollateralIfNeeded;
|
|
137
|
-
private addRequiredSignersIfNeeded;
|
|
138
|
-
private addTxInputsAsNeeded;
|
|
139
|
-
private forgeAssetsIfNeeded;
|
|
140
|
-
private filterAvailableUTxOs;
|
|
141
|
-
private addMintOutputs;
|
|
142
|
-
private notVisited;
|
|
143
|
-
private setTxOutput;
|
|
144
|
-
}
|
|
145
|
-
declare type CreateTxOptions = {
|
|
146
|
-
initiator: IInitiator;
|
|
147
|
-
parameters: Protocol;
|
|
148
|
-
era: Era;
|
|
149
|
-
};
|
|
150
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IFetcher, IInitiator, ISigner, ISubmitter } from '@mesh/common/contracts';
|
|
2
|
-
import type { Address, TransactionUnspentOutput } from '@mesh/core';
|
|
3
|
-
import type { DataSignature } from '@mesh/common/types';
|
|
4
|
-
export declare type CreateAppWalletOptions = {
|
|
5
|
-
networkId: number;
|
|
6
|
-
fetcher: IFetcher;
|
|
7
|
-
submitter: ISubmitter;
|
|
8
|
-
key: {
|
|
9
|
-
type: 'root';
|
|
10
|
-
bech32: string;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'cli';
|
|
13
|
-
payment: string;
|
|
14
|
-
stake?: string;
|
|
15
|
-
} | {
|
|
16
|
-
type: 'mnemonic';
|
|
17
|
-
words: string[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export declare class AppWallet implements IInitiator, ISigner, ISubmitter {
|
|
21
|
-
private readonly _fetcher;
|
|
22
|
-
private readonly _submitter;
|
|
23
|
-
private readonly _wallet;
|
|
24
|
-
constructor(options: CreateAppWalletOptions);
|
|
25
|
-
getBaseAddress(accountIndex?: number): string;
|
|
26
|
-
getPaymentAddress(accountIndex?: number): string;
|
|
27
|
-
getRewardAddress(accountIndex?: number): string;
|
|
28
|
-
getUsedAddress(accountIndex?: number): Address;
|
|
29
|
-
getUsedCollateral(_limit?: number): Promise<TransactionUnspentOutput[]>;
|
|
30
|
-
getUsedUTxOs(accountIndex?: number): Promise<TransactionUnspentOutput[]>;
|
|
31
|
-
signData(address: string, payload: string, accountIndex?: number): DataSignature;
|
|
32
|
-
signTx(unsignedTx: string, partialSign?: boolean, accountIndex?: number): Promise<string>;
|
|
33
|
-
signTxs(unsignedTxs: string[], partialSign: boolean): Promise<string[]>;
|
|
34
|
-
submitTx(tx: string): Promise<string>;
|
|
35
|
-
static brew(strength?: number): string[];
|
|
36
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { IInitiator, ISigner, ISubmitter } from '@mesh/common/contracts';
|
|
2
|
-
import type { Address, TransactionUnspentOutput } from '@mesh/core';
|
|
3
|
-
import type { Asset, AssetExtended, DataSignature, UTxO, Wallet } from '@mesh/common/types';
|
|
4
|
-
export declare class BrowserWallet implements IInitiator, ISigner, ISubmitter {
|
|
5
|
-
readonly _walletInstance: WalletInstance;
|
|
6
|
-
readonly _walletName: string;
|
|
7
|
-
walletInstance: WalletInstance;
|
|
8
|
-
private constructor();
|
|
9
|
-
static getInstalledWallets(): Wallet[];
|
|
10
|
-
static enable(walletName: string): Promise<BrowserWallet>;
|
|
11
|
-
getBalance(): Promise<Asset[]>;
|
|
12
|
-
getChangeAddress(): Promise<string>;
|
|
13
|
-
getCollateral(limit?: number): Promise<UTxO[]>;
|
|
14
|
-
getNetworkId(): Promise<number>;
|
|
15
|
-
getRewardAddresses(): Promise<string[]>;
|
|
16
|
-
getUnusedAddresses(): Promise<string[]>;
|
|
17
|
-
getUsedAddresses(): Promise<string[]>;
|
|
18
|
-
getUtxos(amount?: Asset[] | undefined): Promise<UTxO[]>;
|
|
19
|
-
signData(address: string, payload: string): Promise<DataSignature>;
|
|
20
|
-
signTx(unsignedTx: string, partialSign?: boolean): Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Experimental feature - sign multiple transactions at once (Supported wallet(s): Typhon)
|
|
23
|
-
* @param unsignedTxs - array of unsigned transactions in CborHex string
|
|
24
|
-
* @param partialSign - if the transactions are signed partially
|
|
25
|
-
* @returns array of signed transactions CborHex string
|
|
26
|
-
*/
|
|
27
|
-
signTxs(unsignedTxs: string[], partialSign?: boolean): Promise<string[]>;
|
|
28
|
-
submitTx(tx: string): Promise<string>;
|
|
29
|
-
getUsedAddress(): Promise<Address>;
|
|
30
|
-
getUsedCollateral(limit?: number): Promise<TransactionUnspentOutput[]>;
|
|
31
|
-
getUsedUTxOs(amount?: Asset[] | undefined): Promise<TransactionUnspentOutput[]>;
|
|
32
|
-
getAssets(): Promise<AssetExtended[]>;
|
|
33
|
-
getLovelace(): Promise<string>;
|
|
34
|
-
getPolicyIdAssets(policyId: string): Promise<AssetExtended[]>;
|
|
35
|
-
getPolicyIds(): Promise<string[]>;
|
|
36
|
-
private static resolveInstance;
|
|
37
|
-
}
|
|
38
|
-
declare global {
|
|
39
|
-
interface Window {
|
|
40
|
-
cardano: Cardano;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
declare type Cardano = {
|
|
44
|
-
[key: string]: {
|
|
45
|
-
name: string;
|
|
46
|
-
icon: string;
|
|
47
|
-
apiVersion: string;
|
|
48
|
-
enable: () => Promise<WalletInstance>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
declare type TransactionSignatureRequest = {
|
|
52
|
-
cbor: string;
|
|
53
|
-
partialSign: boolean;
|
|
54
|
-
};
|
|
55
|
-
declare type WalletInstance = {
|
|
56
|
-
experimental: ExperimentalFeatures;
|
|
57
|
-
getBalance(): Promise<string>;
|
|
58
|
-
getChangeAddress(): Promise<string>;
|
|
59
|
-
getNetworkId(): Promise<number>;
|
|
60
|
-
getRewardAddresses(): Promise<string[]>;
|
|
61
|
-
getUnusedAddresses(): Promise<string[]>;
|
|
62
|
-
getUsedAddresses(): Promise<string[]>;
|
|
63
|
-
getUtxos(amount: string | undefined): Promise<string[] | undefined>;
|
|
64
|
-
signData(address: string, payload: string): Promise<DataSignature>;
|
|
65
|
-
signTx(tx: string, partialSign: boolean): Promise<string>;
|
|
66
|
-
signTxs?(txs: TransactionSignatureRequest[]): Promise<string[]>;
|
|
67
|
-
signTxs?(txs: string[], partialSign: boolean): Promise<string[]>;
|
|
68
|
-
submitTx(tx: string): Promise<string>;
|
|
69
|
-
};
|
|
70
|
-
declare type ExperimentalFeatures = {
|
|
71
|
-
getCollateral(): Promise<string[] | undefined>;
|
|
72
|
-
signTxs?(txs: TransactionSignatureRequest[]): Promise<string[]>;
|
|
73
|
-
signTxs?(txs: string[], partialSign: boolean): Promise<string[]>;
|
|
74
|
-
};
|
|
75
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Vkeywitnesses } from '@mesh/core';
|
|
2
|
-
import type { Account, DataSignature, UTxO } from '@mesh/common/types';
|
|
3
|
-
export declare class EmbeddedWallet {
|
|
4
|
-
private readonly _networkId;
|
|
5
|
-
private readonly _encryptedSecret;
|
|
6
|
-
constructor(_networkId: number, _encryptedSecret: string | [string, string]);
|
|
7
|
-
getAccount(accountIndex: number, password: string): Account;
|
|
8
|
-
signData(accountIndex: number, password: string, address: string, payload: string): DataSignature;
|
|
9
|
-
signTx(accountIndex: number, password: string, utxos: UTxO[], unsignedTx: string, partialSign: boolean): Vkeywitnesses;
|
|
10
|
-
static encryptMnemonic(words: string[], password: string): string;
|
|
11
|
-
static encryptPrivateKey(bech32: string, password: string): string;
|
|
12
|
-
static encryptSigningKeys(cborPaymentKey: string, cborStakeKey: string, password: string): [string, string];
|
|
13
|
-
static generateMnemonic(strength?: number): string[];
|
|
14
|
-
private accountContext;
|
|
15
|
-
private static decrypt;
|
|
16
|
-
private static encrypt;
|
|
17
|
-
private static resolveAddress;
|
|
18
|
-
private static resolveKeys;
|
|
19
|
-
private static resolveSigners;
|
|
20
|
-
}
|
package/dist/wallet/index.d.ts
DELETED
|
File without changes
|