(
- "http://localhost:8080/api/v1/",
+ "https://yaci-node.meshjs.dev/api/v1/",
);
async function runDemo() {
diff --git a/apps/playground/src/pages/yaci/transactions/provider.tsx b/apps/playground/src/pages/yaci/transactions/provider.tsx
index a692f0e7..75bbbf6e 100644
--- a/apps/playground/src/pages/yaci/transactions/provider.tsx
+++ b/apps/playground/src/pages/yaci/transactions/provider.tsx
@@ -31,7 +31,7 @@ function Left() {
/>
By default, the YaciProvider
will use the default URL,{" "}
- http://localhost:8080/api/v1/
. If you want to use a custom
+ https://yaci-node.meshjs.dev/api/v1/
. If you want to use a custom
URL, you can pass it as a parameter.
@@ -54,7 +54,7 @@ function Right() {
demoAddresses.testnetPayment,
);
const [userInput2, setUserInput2] = useState(
- "http://localhost:8080/api/v1/",
+ "https://yaci-node.meshjs.dev/api/v1/",
);
async function runDemo() {
diff --git a/package-lock.json b/package-lock.json
index e72935cf..c277b7ce 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6857,14 +6857,14 @@
}
},
"node_modules/@sidan-lab/sidan-csl-rs-browser": {
- "version": "0.7.5",
- "resolved": "https://registry.npmjs.org/@sidan-lab/sidan-csl-rs-browser/-/sidan-csl-rs-browser-0.7.5.tgz",
- "integrity": "sha512-ME/n158D65IpnOOkQS5XCyoRc77FiHknYaMwrzosE3ziu5qXWJ7gkkQ3K1DdHFfLATwZfcKVUC/sUvTjFAmbnQ=="
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@sidan-lab/sidan-csl-rs-browser/-/sidan-csl-rs-browser-0.8.0.tgz",
+ "integrity": "sha512-U3Qj9NOdqHR/sMBc3MVoMCZ2EodOZGBZQYJqErn52qJeDQA/ySqjKKL2ql3s+7UVNUiQw+Qj3ZjdxCN2UxV4nw=="
},
"node_modules/@sidan-lab/sidan-csl-rs-nodejs": {
- "version": "0.7.5",
- "resolved": "https://registry.npmjs.org/@sidan-lab/sidan-csl-rs-nodejs/-/sidan-csl-rs-nodejs-0.7.5.tgz",
- "integrity": "sha512-8IC7WsbrWrq/z/isvh/ceJljNuMOhPJSoRXuZO6GpKm0YLVShy6qWHzJ9JFsrTelWaAfElw4FsZjmZ6N9f5TGQ=="
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@sidan-lab/sidan-csl-rs-nodejs/-/sidan-csl-rs-nodejs-0.8.0.tgz",
+ "integrity": "sha512-bIinZwje1a79tmnsQq22AmZCl1H13uxlGtCsLN+9SCY0IiWI+jVhWVceaHoiyL6dYvLrQh+GbecfeZiMg90UJQ=="
},
"node_modules/@sinclair/typebox": {
"version": "0.27.8",
@@ -9334,6 +9334,7 @@
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
"integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true,
"funding": [
{
"type": "github",
@@ -12665,7 +12666,8 @@
"node_modules/hosted-git-info": {
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
+ "dev": true
},
"node_modules/html-escaper": {
"version": "2.0.2",
@@ -15506,6 +15508,7 @@
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
"integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",
+ "dev": true,
"engines": {
"node": ">=8"
}
@@ -15736,6 +15739,7 @@
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
"dependencies": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
@@ -15747,6 +15751,7 @@
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+ "dev": true,
"bin": {
"semver": "bin/semver"
}
@@ -20106,6 +20111,7 @@
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
"integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
+ "dev": true,
"dependencies": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
@@ -20114,12 +20120,14 @@
"node_modules/spdx-exceptions": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
- "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
+ "dev": true
},
"node_modules/spdx-expression-parse": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+ "dev": true,
"dependencies": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
@@ -20128,7 +20136,8 @@
"node_modules/spdx-license-ids": {
"version": "3.0.20",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz",
- "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw=="
+ "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==",
+ "dev": true
},
"node_modules/split-ca": {
"version": "1.0.1",
@@ -21795,6 +21804,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dev": true,
"dependencies": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
@@ -22148,6 +22158,7 @@
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
"integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
+ "dev": true,
"dependencies": {
"imurmurhash": "^0.1.4",
"signal-exit": "^3.0.7"
@@ -22159,7 +22170,8 @@
"node_modules/write-file-atomic/node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
},
"node_modules/ws": {
"version": "7.5.10",
@@ -22352,7 +22364,7 @@
},
"packages/mesh-common": {
"name": "@meshsdk/common",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
"bech32": "^2.0.0",
@@ -22369,14 +22381,14 @@
},
"packages/mesh-contract": {
"name": "@meshsdk/contract",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/transaction": "*"
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/core": "1.6.14",
+ "@meshsdk/core-csl": "1.6.14",
+ "@meshsdk/core-cst": "1.6.14",
+ "@meshsdk/transaction": "1.6.14"
},
"devDependencies": {
"@meshsdk/configs": "*",
@@ -22387,16 +22399,16 @@
},
"packages/mesh-core": {
"name": "@meshsdk/core",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/provider": "*",
- "@meshsdk/react": "*",
- "@meshsdk/transaction": "*",
- "@meshsdk/wallet": "*"
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/core-csl": "1.6.14",
+ "@meshsdk/core-cst": "1.6.14",
+ "@meshsdk/provider": "1.6.14",
+ "@meshsdk/react": "1.6.14",
+ "@meshsdk/transaction": "1.6.14",
+ "@meshsdk/wallet": "1.6.14"
},
"devDependencies": {
"@meshsdk/configs": "*",
@@ -22407,12 +22419,12 @@
},
"packages/mesh-core-csl": {
"name": "@meshsdk/core-csl",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@sidan-lab/sidan-csl-rs-browser": "0.7.5",
- "@sidan-lab/sidan-csl-rs-nodejs": "0.7.5",
+ "@meshsdk/common": "1.6.14",
+ "@sidan-lab/sidan-csl-rs-browser": "0.8.0",
+ "@sidan-lab/sidan-csl-rs-nodejs": "0.8.0",
"json-bigint": "^1.0.0"
},
"devDependencies": {
@@ -22426,7 +22438,7 @@
},
"packages/mesh-core-cst": {
"name": "@meshsdk/core-cst",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
"@cardano-sdk/core": "^0.35.4",
@@ -22435,7 +22447,7 @@
"@harmoniclabs/cbor": "1.3.0",
"@harmoniclabs/plutus-data": "1.2.4",
"@harmoniclabs/uplc": "1.2.4",
- "@meshsdk/common": "*",
+ "@meshsdk/common": "1.6.14",
"@stricahq/bip32ed25519": "^1.1.0",
"@stricahq/cbors": "^1.0.0",
"pbkdf2": "^3.1.2"
@@ -22452,11 +22464,11 @@
},
"packages/mesh-provider": {
"name": "@meshsdk/provider",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-cst": "*",
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/core-cst": "1.6.14",
"axios": "^1.7.2"
},
"devDependencies": {
@@ -22468,12 +22480,12 @@
},
"packages/mesh-react": {
"name": "@meshsdk/react",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/transaction": "*",
- "@meshsdk/wallet": "*",
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/transaction": "1.6.14",
+ "@meshsdk/wallet": "1.6.14",
"react": "^18.2.0"
},
"devDependencies": {
@@ -22488,12 +22500,12 @@
},
"packages/mesh-transaction": {
"name": "@meshsdk/transaction",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/core-csl": "1.6.14",
+ "@meshsdk/core-cst": "1.6.14",
"json-bigint": "^1.0.0"
},
"devDependencies": {
@@ -22506,13 +22518,13 @@
},
"packages/mesh-wallet": {
"name": "@meshsdk/wallet",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/transaction": "*",
+ "@meshsdk/common": "1.6.14",
+ "@meshsdk/core-csl": "1.6.14",
+ "@meshsdk/core-cst": "1.6.14",
+ "@meshsdk/transaction": "1.6.14",
"@nufi/dapp-client-cardano": "^0.3.1",
"@nufi/dapp-client-core": "^0.3.1"
},
@@ -22526,7 +22538,7 @@
},
"scripts/mesh-cli": {
"name": "meshjs",
- "version": "1.6.13",
+ "version": "1.6.14",
"license": "Apache-2.0",
"dependencies": {
"chalk": "5.3.0",
diff --git a/packages/mesh-common/package.json b/packages/mesh-common/package.json
index 46465204..92ed88a4 100644
--- a/packages/mesh-common/package.json
+++ b/packages/mesh-common/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/common",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
diff --git a/packages/mesh-common/src/types/transaction-builder/output.ts b/packages/mesh-common/src/types/transaction-builder/output.ts
index 1772d1ce..c58959b6 100644
--- a/packages/mesh-common/src/types/transaction-builder/output.ts
+++ b/packages/mesh-common/src/types/transaction-builder/output.ts
@@ -5,7 +5,7 @@ export type Output = {
address: string;
amount: Asset[];
datum?: {
- type: "Hash" | "Inline";
+ type: "Hash" | "Inline" | "Embedded";
data: BuilderData;
};
referenceScript?: PlutusScript;
diff --git a/packages/mesh-contract/package.json b/packages/mesh-contract/package.json
index a4119d74..fb6d0586 100644
--- a/packages/mesh-contract/package.json
+++ b/packages/mesh-contract/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/contract",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -33,11 +33,11 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/transaction": "*"
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/core": "1.7.0",
+ "@meshsdk/core-csl": "1.7.0",
+ "@meshsdk/core-cst": "1.7.0",
+ "@meshsdk/transaction": "1.7.0"
},
"prettier": "@meshsdk/configs/prettier",
"publishConfig": {
diff --git a/packages/mesh-core-csl/package.json b/packages/mesh-core-csl/package.json
index 2ccc53f9..5f6f49a6 100644
--- a/packages/mesh-core-csl/package.json
+++ b/packages/mesh-core-csl/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core-csl",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -38,9 +38,9 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@sidan-lab/sidan-csl-rs-browser": "0.7.5",
- "@sidan-lab/sidan-csl-rs-nodejs": "0.7.5",
+ "@meshsdk/common": "1.7.0",
+ "@sidan-lab/sidan-csl-rs-browser": "0.8.0",
+ "@sidan-lab/sidan-csl-rs-nodejs": "0.8.0",
"json-bigint": "^1.0.0"
},
"prettier": "@meshsdk/configs/prettier",
diff --git a/packages/mesh-core-csl/src/core/adaptor/output.ts b/packages/mesh-core-csl/src/core/adaptor/output.ts
index 7866ae06..733e82ba 100644
--- a/packages/mesh-core-csl/src/core/adaptor/output.ts
+++ b/packages/mesh-core-csl/src/core/adaptor/output.ts
@@ -12,6 +12,9 @@ export const outputToObj = (output: Output): object => {
case "Hash":
datum = { hash: builderDataToCbor(output.datum.data) };
break;
+ case "Embedded":
+ datum = { embedded: builderDataToCbor(output.datum.data) };
+ break;
}
}
diff --git a/packages/mesh-core-cst/package.json b/packages/mesh-core-cst/package.json
index 10039cc7..c25426ad 100644
--- a/packages/mesh-core-cst/package.json
+++ b/packages/mesh-core-cst/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core-cst",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -41,7 +41,7 @@
"@harmoniclabs/cbor": "1.3.0",
"@harmoniclabs/plutus-data": "1.2.4",
"@harmoniclabs/uplc": "1.2.4",
- "@meshsdk/common": "*",
+ "@meshsdk/common": "1.7.0",
"@stricahq/bip32ed25519": "^1.1.0",
"@stricahq/cbors": "^1.0.0",
"pbkdf2": "^3.1.2"
diff --git a/packages/mesh-core/package.json b/packages/mesh-core/package.json
index 449e3518..3d1b4642 100644
--- a/packages/mesh-core/package.json
+++ b/packages/mesh-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -32,13 +32,13 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/provider": "*",
- "@meshsdk/react": "*",
- "@meshsdk/transaction": "*",
- "@meshsdk/wallet": "*"
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/core-csl": "1.7.0",
+ "@meshsdk/core-cst": "1.7.0",
+ "@meshsdk/provider": "1.7.0",
+ "@meshsdk/react": "1.7.0",
+ "@meshsdk/transaction": "1.7.0",
+ "@meshsdk/wallet": "1.7.0"
},
"prettier": "@meshsdk/configs/prettier",
"publishConfig": {
diff --git a/packages/mesh-provider/package.json b/packages/mesh-provider/package.json
index ccdad98f..31ff9999 100644
--- a/packages/mesh-provider/package.json
+++ b/packages/mesh-provider/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/provider",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -33,8 +33,8 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-cst": "*",
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/core-cst": "1.7.0",
"axios": "^1.7.2"
},
"prettier": "@meshsdk/configs/prettier",
diff --git a/packages/mesh-provider/src/yaci.ts b/packages/mesh-provider/src/yaci.ts
index 044d7986..ae2d779e 100644
--- a/packages/mesh-provider/src/yaci.ts
+++ b/packages/mesh-provider/src/yaci.ts
@@ -35,7 +35,7 @@ export class YaciProvider
* Set the URL of the instance.
* @param baseUrl The base URL of the instance.
*/
- constructor(baseUrl = "http://localhost:8080/api/v1/") {
+ constructor(baseUrl = "https://yaci-node.meshjs.dev/api/v1/") {
this._axiosInstance = axios.create({
baseURL: baseUrl,
});
diff --git a/packages/mesh-provider/test/yaci/evaluator.test.ts b/packages/mesh-provider/test/yaci/evaluator.test.ts
index 2e0a90d5..b628a2ec 100644
--- a/packages/mesh-provider/test/yaci/evaluator.test.ts
+++ b/packages/mesh-provider/test/yaci/evaluator.test.ts
@@ -1,6 +1,6 @@
import { YaciProvider } from "@meshsdk/provider";
-const provider = new YaciProvider("http://localhost:8080/api/v1/");
+const provider = new YaciProvider("https://yaci-node.meshjs.dev/api/v1/");
const successTx =
"84a60081825820ab11b83c9d46edf3e4f0124eccaec9c3469c4aa8bba47885991ea33f76f92d32000182825839005867c3b8e27840f556ac268b781578b14c5661fc63ee720dbeab663f9d4dcd7e454d2434164f4efb8edeb358d86a1dad9ec6224cfcbce3e6821a00111958a1581c9026ea35a0b0ca28e304ef94cc5a31c9e850db14a32dc3c69969fe83a14001825839005867c3b8e27840f556ac268b781578b14c5661fc63ee720dbeab663f9d4dcd7e454d2434164f4efb8edeb358d86a1dad9ec6224cfcbce3e61a3b89b0a8020009a1581c9026ea35a0b0ca28e304ef94cc5a31c9e850db14a32dc3c69969fe83a140010b5820df2de8c102f948422412af199867e5d472b9ff700473b2841e63209041b0e7df0d81825820ab11b83c9d46edf3e4f0124eccaec9c3469c4aa8bba47885991ea33f76f92d3200a20681590288590285010000332323232323232323232223232322533300832323232533300c3007300e3754002264a66601a6010601e6ea802454ccc034c020c03cdd519198008009bac30143011375400844a666026002298103d87a80001323253330113375e01e601260286ea80084cdd2a40006602c00497ae01330040040013017002301500114a229404c8cc004004c8cc004004c8cc004004dd5980b180b980b980b980b98099baa00622533301500114bd6f7b630099191919299980a99b9148900002153330153371e9101000021003100513301a337606ea4008dd3000998030030019bab3017003375c602a0046032004602e00244a666028002297ae0132333222323300100100322533301a00110031323301c374e660386ea4018cc070c064004cc070c0680052f5c066006006603c00460380026eb8c04c004dd5980a00099801801980c001180b0009129998098008a5113253330103253330113371e6eb8c0240040144cdc41bad301730183018001480005289bac301600213300300300114a0602c0026eb8c048c03cdd50008a50301130120023010001300c37540044601e0022930a99804a491856616c696461746f722072657475726e65642066616c7365001365632533300730020011533300b300a37540062930a998040030b0a99980399b874800800454ccc02cc028dd50018a4c2a6601000c2c2a6601000c2c60106ea8008dc3a4000a66666601800220022a6600a0062c2a6600a0062c2a6600a0062c2a6600a0062c92011672656465656d65723a204d696e74506f6c6172697479005734ae7155ceaab9e5573eae815d0aba257489812bd8799fd8799f5820ab11b83c9d46edf3e4f0124eccaec9c3469c4aa8bba47885991ea33f76f92d32ff00ff00010581840100d87980821a006acfc01ab2d05e00f5f6";
diff --git a/packages/mesh-react/package.json b/packages/mesh-react/package.json
index 54984a53..5cd6c872 100644
--- a/packages/mesh-react/package.json
+++ b/packages/mesh-react/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/react",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -29,9 +29,9 @@
},
"dependencies": {
"react": "^18.2.0",
- "@meshsdk/common": "*",
- "@meshsdk/transaction": "*",
- "@meshsdk/wallet": "*"
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/transaction": "1.7.0",
+ "@meshsdk/wallet": "1.7.0"
},
"devDependencies": {
"@meshsdk/configs": "*",
diff --git a/packages/mesh-transaction/package.json b/packages/mesh-transaction/package.json
index 97c56bf9..94e33376 100644
--- a/packages/mesh-transaction/package.json
+++ b/packages/mesh-transaction/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/transaction",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -34,9 +34,9 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/core-csl": "1.7.0",
+ "@meshsdk/core-cst": "1.7.0",
"json-bigint": "^1.0.0"
},
"prettier": "@meshsdk/configs/prettier",
diff --git a/packages/mesh-transaction/src/mesh-tx-builder/tx-builder-core.ts b/packages/mesh-transaction/src/mesh-tx-builder/tx-builder-core.ts
index d2e4c882..ccd9032f 100644
--- a/packages/mesh-transaction/src/mesh-tx-builder/tx-builder-core.ts
+++ b/packages/mesh-transaction/src/mesh-tx-builder/tx-builder-core.ts
@@ -346,6 +346,43 @@ export class MeshTxBuilderCore {
return this;
};
+ /**
+ * Set the output embed datum for transaction
+ * @param datum The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
+ * @param type The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
+ * @returns The MeshTxBuilder instance
+ */
+
+ txOutDatumEmbedValue = (
+ datum: BuilderData["content"],
+ type: BuilderData["type"] = "Mesh",
+ ) => {
+ let content = datum;
+ if (this.txOutput) {
+ if (type === "Mesh") {
+ this.txOutput.datum = {
+ type: "Embedded",
+ data: {
+ type,
+ content: content as Data,
+ },
+ };
+ return this;
+ }
+ if (type === "JSON") {
+ content = this.castRawDataToJsonString(datum as object | string);
+ }
+ this.txOutput.datum = {
+ type: "Embedded",
+ data: {
+ type,
+ content: content as string,
+ },
+ };
+ }
+ return this;
+ };
+
/**
* Set the reference script to be attached with the output
* @param scriptCbor The CBOR hex of the script to be attached to UTxO as reference script
diff --git a/packages/mesh-transaction/test/mesh-tx-builder/tx.test.ts b/packages/mesh-transaction/test/mesh-tx-builder/tx.test.ts
new file mode 100644
index 00000000..8361843b
--- /dev/null
+++ b/packages/mesh-transaction/test/mesh-tx-builder/tx.test.ts
@@ -0,0 +1,32 @@
+import { MeshTxBuilder } from "@meshsdk/transaction";
+
+describe("MeshTxBuilder transactions", () => {
+ it("Adding embedded datum should produce correct tx cbor", () => {
+ let mesh = new MeshTxBuilder({ verbose: true });
+
+ let txHex = mesh
+ .txIn(
+ "2cb57168ee66b68bd04a0d595060b546edf30c04ae1031b883c9ac797967dd85",
+ 3,
+ [{ unit: "lovelace", quantity: "9891607895" }],
+ "addr_test1vru4e2un2tq50q4rv6qzk7t8w34gjdtw3y2uzuqxzj0ldrqqactxh",
+ )
+ .txOut(
+ "addr_test1vru4e2un2tq50q4rv6qzk7t8w34gjdtw3y2uzuqxzj0ldrqqactxh",
+ [{ unit: "lovelace", quantity: "2000000" }],
+ )
+ .txOutDatumEmbedValue(
+ {
+ constructor: 0,
+ fields: [],
+ },
+ "JSON",
+ )
+ .changeAddress(
+ "addr_test1vru4e2un2tq50q4rv6qzk7t8w34gjdtw3y2uzuqxzj0ldrqqactxh",
+ )
+ .completeSync();
+
+ expect(txHex).toBe("84a400818258202cb57168ee66b68bd04a0d595060b546edf30c04ae1031b883c9ac797967dd8503018283581d60f95cab9352c14782a366802b7967746a89356e8915c17006149ff68c1a001e84805820923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec82581d60f95cab9352c14782a366802b7967746a89356e8915c17006149ff68c1b000000024d74dc6e021a000294690b582015dd0a3ac1244430aacc7e95c2734b51f1a8cf2aaf05e5d6e8124cb78ab54cc9a1049fd87980fff5f6");
+ });
+});
diff --git a/packages/mesh-transaction/test/transaction/sendAssets.test.ts b/packages/mesh-transaction/test/transaction/sendAssets.test.ts
new file mode 100644
index 00000000..e9613bb7
--- /dev/null
+++ b/packages/mesh-transaction/test/transaction/sendAssets.test.ts
@@ -0,0 +1,84 @@
+import { Asset, Recipient } from "@meshsdk/common";
+import { MeshTxBuilder, Transaction } from "@meshsdk/transaction";
+import { MeshWallet } from "@meshsdk/wallet";
+
+jest.mock("@meshsdk/transaction", () => {
+ const txBuilderMock = {
+ txOut: jest.fn(),
+ txOutDatumHashValue: jest.fn(),
+ txOutInlineDatumValue: jest.fn(),
+ };
+
+ return {
+ MeshTxBuilder: jest.fn(() => txBuilderMock),
+ Transaction: jest.requireActual("@meshsdk/transaction").Transaction,
+ };
+});
+
+describe("Transaction", () => {
+ let wallet: MeshWallet;
+ let transaction: Transaction;
+ let txBuilderMock: jest.Mocked;
+
+ beforeEach(() => {
+ wallet = new MeshWallet({
+ key: {
+ type: "mnemonic",
+ words: MeshWallet.brew() as string[],
+ },
+ networkId: 0,
+ });
+ txBuilderMock = new MeshTxBuilder({}) as jest.Mocked;
+ transaction = new Transaction({
+ initiator: wallet,
+ });
+ transaction.txBuilder = txBuilderMock;
+ });
+
+ it("should trigger txOutDatumHashValue when recipient has datum with inline set to false", () => {
+ const address = wallet.getUsedAddresses()[0];
+ const recipient: Recipient = {
+ address: address as string,
+ datum: {
+ inline: false,
+ value: "datum-value",
+ },
+ };
+ const assets: Asset[] = [
+ {
+ unit: "lovelace",
+ quantity: "1000",
+ },
+ ];
+
+ transaction.sendAssets(recipient, assets);
+
+ expect(txBuilderMock.txOut).toHaveBeenCalledWith(address, assets);
+ expect(txBuilderMock.txOutDatumHashValue).toHaveBeenCalledWith(
+ "datum-value",
+ );
+ });
+ it("should trigger txOutInlineDatumValue when recipient has datum with inline set to false", () => {
+ const address = wallet.getUsedAddresses()[0];
+ const recipient: Recipient = {
+ address: address as string,
+ datum: {
+ inline: true,
+ value: "datum-value",
+ },
+ };
+ const assets: Asset[] = [
+ {
+ unit: "lovelace",
+ quantity: "1000",
+ },
+ ];
+
+ transaction.sendAssets(recipient, assets);
+
+ expect(txBuilderMock.txOut).toHaveBeenCalledWith(address, assets);
+ expect(txBuilderMock.txOutInlineDatumValue).toHaveBeenCalledWith(
+ "datum-value",
+ );
+ });
+});
diff --git a/packages/mesh-wallet/package.json b/packages/mesh-wallet/package.json
index 78cd7c80..61cc80a0 100644
--- a/packages/mesh-wallet/package.json
+++ b/packages/mesh-wallet/package.json
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/wallet",
- "version": "1.6.13",
+ "version": "1.7.0",
"description": "",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -34,10 +34,10 @@
"typescript": "^5.3.3"
},
"dependencies": {
- "@meshsdk/common": "*",
- "@meshsdk/core-csl": "*",
- "@meshsdk/core-cst": "*",
- "@meshsdk/transaction": "*",
+ "@meshsdk/common": "1.7.0",
+ "@meshsdk/core-csl": "1.7.0",
+ "@meshsdk/core-cst": "1.7.0",
+ "@meshsdk/transaction": "1.7.0",
"@nufi/dapp-client-cardano": "^0.3.1",
"@nufi/dapp-client-core": "^0.3.1"
},
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
index c1ecc3ae..32e90496 100644
--- a/scripts/bump-version.sh
+++ b/scripts/bump-version.sh
@@ -26,6 +26,18 @@ FILES=(
for FILE in "${FILES[@]}"; do
if [ -f "$FILE" ]; then
sed -i '' -e "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" "$FILE"
+
+ # Update @meshsdk dependencies to the latest version
+ sed -i '' -e "s/\"@meshsdk\/common\": \".*\"/\"@meshsdk\/common\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/contract\": \".*\"/\"@meshsdk\/contract\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/core\": \".*\"/\"@meshsdk\/core\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/core-csl\": \".*\"/\"@meshsdk\/core-csl\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/core-cst\": \".*\"/\"@meshsdk\/core-cst\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/provider\": \".*\"/\"@meshsdk\/provider\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/react\": \".*\"/\"@meshsdk\/react\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/transaction\": \".*\"/\"@meshsdk\/transaction\": \"$VERSION\"/" "$FILE"
+ sed -i '' -e "s/\"@meshsdk\/wallet\": \".*\"/\"@meshsdk\/wallet\": \"$VERSION\"/" "$FILE"
+
echo "Updated version in $FILE"
else
echo "File not found: $FILE"
diff --git a/scripts/mesh-cli/package.json b/scripts/mesh-cli/package.json
index aac4e67b..f8c2225d 100644
--- a/scripts/mesh-cli/package.json
+++ b/scripts/mesh-cli/package.json
@@ -3,7 +3,7 @@
"description": "A quick and easy way to bootstrap your dApps on Cardano using Mesh.",
"homepage": "https://meshjs.dev",
"author": "MeshJS",
- "version": "1.6.13",
+ "version": "1.7.0",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/index.cjs",