create-miden-app 1.0.3 → 1.0.4
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/package.json +1 -6
- package/template/package.json +1 -1
- package/template/src/miden/lib/demo.ts +7 -6
- package/template/vite.config.ts +1 -1
- package/template/yarn.lock +260 -540
package/package.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-miden-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A Miden Project Scaffold Template",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-miden-app": "cli.js"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"setup-v12": "./setup-v12.sh",
|
|
11
|
-
"update-v12": "./update-v12.sh",
|
|
12
|
-
"check-v12": "./check-v12-compatibility.sh"
|
|
13
|
-
},
|
|
14
9
|
"files": [
|
|
15
10
|
"cli.js",
|
|
16
11
|
"template/"
|
package/template/package.json
CHANGED
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
NoteType,
|
|
5
5
|
ConsumableNoteRecord,
|
|
6
6
|
AccountId,
|
|
7
|
-
|
|
7
|
+
AuthScheme,
|
|
8
|
+
} from "@miden-sdk/miden-sdk";
|
|
8
9
|
|
|
9
10
|
export async function demo() {
|
|
10
11
|
// Initialize client to connect with the Miden Testnet.
|
|
@@ -17,7 +18,7 @@ export async function demo() {
|
|
|
17
18
|
await client.syncState();
|
|
18
19
|
|
|
19
20
|
// Creating Alice's account
|
|
20
|
-
const alice = await client.newWallet(AccountStorageMode.public(), true,
|
|
21
|
+
const alice = await client.newWallet(AccountStorageMode.public(), true, AuthScheme.AuthRpoFalcon512);
|
|
21
22
|
console.log("Alice's account ID:", alice.id().toString());
|
|
22
23
|
|
|
23
24
|
// Creating a faucet account
|
|
@@ -30,7 +31,7 @@ export async function demo() {
|
|
|
30
31
|
symbol, // Symbol of the token
|
|
31
32
|
decimals, // Number of decimals
|
|
32
33
|
initialSupply, // Initial supply of tokens
|
|
33
|
-
|
|
34
|
+
AuthScheme.AuthRpoFalcon512 // Authentication scheme
|
|
34
35
|
);
|
|
35
36
|
console.log("Faucet account ID:", faucet.id().toString());
|
|
36
37
|
|
|
@@ -62,13 +63,13 @@ export async function demo() {
|
|
|
62
63
|
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
const
|
|
66
|
-
note.inputNoteRecord().
|
|
66
|
+
const notes = consumableNotes.map((note) =>
|
|
67
|
+
note.inputNoteRecord().toNote()
|
|
67
68
|
);
|
|
68
69
|
|
|
69
70
|
// Create transaction request to consume notes
|
|
70
71
|
// NOTE: This transaction will consume the notes and add the fungible asset to Alice's vault
|
|
71
|
-
const consumeTxRequest = client.newConsumeTransactionRequest(
|
|
72
|
+
const consumeTxRequest = client.newConsumeTransactionRequest(notes);
|
|
72
73
|
const consumeTxId = await client.submitNewTransaction(
|
|
73
74
|
alice.id(),
|
|
74
75
|
consumeTxRequest
|