@meshsdk/core 1.4.1 → 1.5.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/dist/common/constants.d.ts +30 -0
- package/dist/common/contracts/fetcher.d.ts +5 -1
- package/dist/common/types/Token.d.ts +2 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/core/CIP2.d.ts +4 -3
- package/dist/core.cjs +1 -1
- package/dist/core.js +880 -775
- package/dist/providers/blockfrost.provider.d.ts +5 -1
- package/dist/providers/koios.provider.d.ts +5 -1
- package/dist/providers/tango.provider.d.ts +5 -1
- package/dist/transaction/transaction.service.d.ts +12 -2
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts';
|
|
2
|
-
import type { AccountInfo, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
2
|
+
import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
3
3
|
export declare class BlockfrostProvider implements IFetcher, IListener, ISubmitter {
|
|
4
4
|
private readonly _axiosInstance;
|
|
5
5
|
constructor(baseUrl: string);
|
|
@@ -12,6 +12,10 @@ export declare class BlockfrostProvider implements IFetcher, IListener, ISubmitt
|
|
|
12
12
|
}[]>;
|
|
13
13
|
fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
|
|
14
14
|
fetchBlockInfo(hash: string): Promise<BlockInfo>;
|
|
15
|
+
fetchCollectionAssets(policyId: string, cursor?: number): Promise<{
|
|
16
|
+
assets: Asset[];
|
|
17
|
+
next: string | number | null;
|
|
18
|
+
}>;
|
|
15
19
|
fetchHandleAddress(handle: string): Promise<string>;
|
|
16
20
|
fetchProtocolParameters(epoch?: number): Promise<Protocol>;
|
|
17
21
|
fetchTxInfo(hash: string): Promise<TransactionInfo>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts';
|
|
2
|
-
import type { AccountInfo, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
2
|
+
import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
3
3
|
export declare class KoiosProvider implements IFetcher, IListener, ISubmitter {
|
|
4
4
|
private readonly _axiosInstance;
|
|
5
5
|
constructor(baseUrl: string);
|
|
@@ -12,6 +12,10 @@ export declare class KoiosProvider implements IFetcher, IListener, ISubmitter {
|
|
|
12
12
|
}[]>;
|
|
13
13
|
fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
|
|
14
14
|
fetchBlockInfo(hash: string): Promise<BlockInfo>;
|
|
15
|
+
fetchCollectionAssets(policyId: string, cursor?: number): Promise<{
|
|
16
|
+
assets: Asset[];
|
|
17
|
+
next: string | number | null;
|
|
18
|
+
}>;
|
|
15
19
|
fetchHandleAddress(handle: string): Promise<string>;
|
|
16
20
|
fetchProtocolParameters(epoch: number): Promise<Protocol>;
|
|
17
21
|
fetchTxInfo(hash: string): Promise<TransactionInfo>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IEvaluator, IFetcher, IListener, ISubmitter } from '@mesh/common/contracts';
|
|
2
|
-
import type { AccountInfo, Action, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
2
|
+
import type { AccountInfo, Action, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
|
|
3
3
|
export declare class TangoProvider implements IEvaluator, IFetcher, IListener, ISubmitter {
|
|
4
4
|
private readonly _axiosInstance;
|
|
5
5
|
constructor(network: 'mainnet' | 'testnet', appId: string, appKey: string, version?: number);
|
|
@@ -12,6 +12,10 @@ export declare class TangoProvider implements IEvaluator, IFetcher, IListener, I
|
|
|
12
12
|
}[]>;
|
|
13
13
|
fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
|
|
14
14
|
fetchBlockInfo(hash: string): Promise<BlockInfo>;
|
|
15
|
+
fetchCollectionAssets(policyId: string, cursor?: string): Promise<{
|
|
16
|
+
assets: Asset[];
|
|
17
|
+
next: string | number | null;
|
|
18
|
+
}>;
|
|
15
19
|
fetchHandleAddress(handle: string): Promise<string>;
|
|
16
20
|
fetchProtocolParameters(epoch: number): Promise<Protocol>;
|
|
17
21
|
fetchTxInfo(hash: string): Promise<TransactionInfo>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IInitiator } from '@mesh/common/contracts';
|
|
2
|
-
import type { Action, Asset, Data, Era, Mint, Protocol, PlutusScript, Recipient,
|
|
2
|
+
import type { Action, Asset, Data, Era, Mint, Protocol, PlutusScript, PoolParams, Recipient, Token, UTxO } from '@mesh/common/types';
|
|
3
3
|
export declare class Transaction {
|
|
4
4
|
private _changeAddress?;
|
|
5
|
+
private _txOutputs;
|
|
5
6
|
private _recipients;
|
|
6
7
|
private _totalBurns;
|
|
7
8
|
private _totalMints;
|
|
@@ -50,6 +51,15 @@ export declare class Transaction {
|
|
|
50
51
|
* @see {@link https://meshjs.dev/apis/transaction#sendAda}
|
|
51
52
|
*/
|
|
52
53
|
sendLovelace(recipient: Recipient, lovelace: string): Transaction;
|
|
54
|
+
/**
|
|
55
|
+
* Adds stable coins transaction output to the transaction.
|
|
56
|
+
* @param {Recipient} recipient The recipient of the transaction.
|
|
57
|
+
* @param {Token} ticker The ticker of the token to send.
|
|
58
|
+
* @param {string} amount The amount of the token to send.
|
|
59
|
+
* @returns {Transaction} The Transaction object.
|
|
60
|
+
* @see {@link https://meshjs.dev/apis/transaction#sendToken}
|
|
61
|
+
*/
|
|
62
|
+
sendToken(recipient: Recipient, ticker: Token, amount: string): Transaction;
|
|
53
63
|
/**
|
|
54
64
|
* Adds an output to the transaction.
|
|
55
65
|
*
|
|
@@ -119,9 +129,9 @@ export declare class Transaction {
|
|
|
119
129
|
private addTxInputsAsNeeded;
|
|
120
130
|
private forgeAssetsIfNeeded;
|
|
121
131
|
private filterAvailableUTxOs;
|
|
122
|
-
private selectLovelaceUTxOs;
|
|
123
132
|
private addMintOutputs;
|
|
124
133
|
private notVisited;
|
|
134
|
+
private setTxOutput;
|
|
125
135
|
}
|
|
126
136
|
declare type CreateTxOptions = {
|
|
127
137
|
initiator: IInitiator;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Rapidly build Web3 apps on the Cardano Blockchain.",
|
|
4
4
|
"homepage": "https://meshjs.dev",
|
|
5
5
|
"author": "MeshJS",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.5.0",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"repository": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@emurgo/cardano-message-signing-browser": "1.0.1",
|
|
68
68
|
"@emurgo/cardano-message-signing-nodejs": "1.0.1",
|
|
69
|
-
"@emurgo/cardano-serialization-lib-browser": "11.
|
|
70
|
-
"@emurgo/cardano-serialization-lib-nodejs": "11.
|
|
69
|
+
"@emurgo/cardano-serialization-lib-browser": "11.3.0",
|
|
70
|
+
"@emurgo/cardano-serialization-lib-nodejs": "11.3.0",
|
|
71
71
|
"@emurgo/cip14-js": "3.0.1",
|
|
72
72
|
"axios": "0.27.2",
|
|
73
73
|
"bip39": "3.0.4",
|