diff --git a/.env b/.env index e856462..062d5a8 100644 --- a/.env +++ b/.env @@ -1,3 +1,4 @@ -VITE_FAUCET_URL=https://faucet.testnet-babbage.linera.net -VITE_COUNTER_APP_ID= -VITE_FUNGIBLE_APP_ID= +VITE_FAUCET_URL=https://faucet.devnet-2025-06-27.linera.net/ +VITE_FUNGIBLE_APP_ID=bca9f0d106dadea4d7e879a729a3882a2c094ef1a0300596f64c5ce640f8cf10 +VITE_COUNTER_APP_ID=ef1977bfc2291069044a0650c73895d1ef8f8b1a850a5d8320c8da50b0c083c3 + diff --git a/examples/hosted-counter-metamask/.env b/examples/hosted-counter-metamask/.env new file mode 120000 index 0000000..c7360fb --- /dev/null +++ b/examples/hosted-counter-metamask/.env @@ -0,0 +1 @@ +../../.env \ No newline at end of file diff --git a/examples/hosted-counter-metamask/index.html b/examples/hosted-counter-metamask/index.html index 71d6f37..0cb0d3b 100644 --- a/examples/hosted-counter-metamask/index.html +++ b/examples/hosted-counter-metamask/index.html @@ -66,7 +66,7 @@
requesting chain…
async function run() {
await linera.default();
const faucet = await new linera.Faucet(import.meta.env.VITE_FAUCET_URL);
- const signer = await new linera_signer.MetaMaskEIP191Signer();
+ const signer = await new linera_signer.MetaMask();
const wallet = await faucet.createWallet();
const owner = await signer.address();
document.getElementById('owner').innerText = owner;
diff --git a/examples/hosted-fungible/index.html b/examples/hosted-fungible/index.html
index 22e1ab8..a29e49f 100644
--- a/examples/hosted-fungible/index.html
+++ b/examples/hosted-fungible/index.html
@@ -163,7 +163,7 @@ requesting a new microchai
const response = JSON.parse(await application.query(gql(`query { tickerSymbol, accounts { entries { key value } } }`)));
console.debug('application response:', response);
document.querySelector('#ticker-symbol').textContent = response.data.tickerSymbol;
- document.querySelector('#balance').textContent = (+(response?.data?.accounts?.entries?.[0] || 0)).toFixed(2);
+ document.querySelector('#balance').textContent = (+(response?.data?.accounts?.entries?.[0]?.value || 0)).toFixed(2);
}
async function transfer(application, donor, amount, recipient) {
@@ -174,7 +174,7 @@ Chain history for requesting a new microchai
let errors = [];
try {
- const match = recipient.match(/^(0x[0-9a-f]{64})@([0-9a-f]{64})$/);
+ const match = recipient.match(/^(0x[0-9a-f]{40})@([0-9a-f]{64})$/);
if (!match) throw new Error('Invalid recipient address: expected `owner@chain_id`');
const query = gql(`mutation(
@@ -232,6 +232,8 @@ Chain history for requesting a new microchai
const application = await client.frontend().application(FUNGIBLE_APP_ID);
+ await updateBalance(application);
+
client.onNotification(notification => {
let newBlock = notification.reason.NewBlock;
if (!newBlock) return;
diff --git a/linera-protocol b/linera-protocol
index b4c4b90..b83776d 160000
--- a/linera-protocol
+++ b/linera-protocol
@@ -1 +1 @@
-Subproject commit b4c4b90458afb35e6163193b8b5226241a2402a5
+Subproject commit b83776d0e9b9347f73dc64ef73dd0a411b58f84f
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fe8c975..8f9dc36 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -117,7 +117,7 @@ importers:
dependencies:
'@apollo/client':
specifier: ^3.7.10
- version: 3.13.8(@types/react@18.3.23)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.13.8(@types/react@19.1.8)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
graphql:
specifier: ^16.6.0
version: 16.11.0
@@ -209,7 +209,7 @@ importers:
dependencies:
'@apollo/client':
specifier: ^3.7.10
- version: 3.13.8(@types/react@18.3.23)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.13.8(@types/react@19.1.8)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
antd:
specifier: ^5.15.2
version: 5.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -246,7 +246,7 @@ importers:
dependencies:
'@apollo/client':
specifier: ^3.7.10
- version: 3.13.8(@types/react@18.3.23)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.13.8(@types/react@19.1.8)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@chatscope/chat-ui-kit-react':
specifier: ^2.0.3
version: 2.1.1(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -286,7 +286,7 @@ importers:
dependencies:
'@apollo/client':
specifier: ^3.7.10
- version: 3.13.8(@types/react@18.3.23)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.13.8(@types/react@19.1.8)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
antd:
specifier: ^5.15.2
version: 5.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -426,11 +426,16 @@ importers:
specifier: ^8.16.4
version: 8.45.0
+ linera-protocol/linera-explorer/pkg: {}
+
linera-protocol/linera-web:
devDependencies:
prettier:
specifier: 3.5.3
version: 3.5.3
+ typedoc:
+ specifier: ^0.28.5
+ version: 0.28.5(typescript@5.8.3)
linera-protocol/linera-web/signer:
dependencies:
@@ -1872,6 +1877,9 @@ packages:
'@fortawesome/fontawesome-svg-core': ~1 || ~6
react: '>=16.3'
+ '@gerrit0/mini-shiki@3.7.0':
+ resolution: {integrity: sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==}
+
'@graphql-codegen/add@5.0.3':
resolution: {integrity: sha512-SxXPmramkth8XtBlAHu4H4jYcYXM/o3p01+psU+0NADQowA8jtYkK6MW5rV6T+CxkEaNZItfSmZRPgIuypcqnA==}
peerDependencies:
@@ -2799,6 +2807,21 @@ packages:
'@scure/bip39@1.3.0':
resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==}
+ '@shikijs/engine-oniguruma@3.7.0':
+ resolution: {integrity: sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==}
+
+ '@shikijs/langs@3.7.0':
+ resolution: {integrity: sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==}
+
+ '@shikijs/themes@3.7.0':
+ resolution: {integrity: sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==}
+
+ '@shikijs/types@3.7.0':
+ resolution: {integrity: sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==}
+
+ '@shikijs/vscode-textmate@10.0.2':
+ resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
+
'@shoelace-style/animations@1.2.0':
resolution: {integrity: sha512-avvo1xxkLbv2dgtabdewBbqcJfV0e0zCwFqkPMnHFGbJbBHorRFfMAHh1NG9ymmXn0jW95ibUVH03E1NYXD6Gw==}
@@ -2998,6 +3021,9 @@ packages:
'@types/har-format@1.2.16':
resolution: {integrity: sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==}
+ '@types/hast@3.0.4':
+ resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
+
'@types/html-minifier-terser@6.1.0':
resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==}
@@ -3117,6 +3143,9 @@ packages:
'@types/trusted-types@2.0.7':
resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
+ '@types/unist@3.0.3':
+ resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
+
'@types/webextension-polyfill@0.8.3':
resolution: {integrity: sha512-GN+Hjzy9mXjWoXKmaicTegv3FJ0WFZ3aYz77Wk8TMp1IY3vEzvzj1vnsa0ggV7vMI1i+PUxe4qqnIJKCzf9aTg==}
@@ -6412,6 +6441,9 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
listenercount@1.0.1:
resolution: {integrity: sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==}
@@ -6533,6 +6565,9 @@ packages:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
+ lunr@2.3.9:
+ resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
+
magic-string@0.25.9:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
@@ -6557,6 +6592,10 @@ packages:
resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==}
engines: {node: '>=0.10.0'}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
math-intrinsics@1.1.0:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -6567,6 +6606,9 @@ packages:
mdn-data@2.0.4:
resolution: {integrity: sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
media-typer@0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
@@ -7611,6 +7653,10 @@ packages:
pump@3.0.3:
resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==}
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -9005,6 +9051,13 @@ packages:
typedarray-to-buffer@3.1.5:
resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==}
+ typedoc@0.28.5:
+ resolution: {integrity: sha512-5PzUddaA9FbaarUzIsEc4wNXCiO4Ot3bJNeMF2qKpYlTmM9TTaSHQ7162w756ERCkXER/+o2purRG6YOAv6EMA==}
+ engines: {node: '>= 18', pnpm: '>= 10'}
+ hasBin: true
+ peerDependencies:
+ typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x
+
typescript@4.9.5:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
@@ -9023,6 +9076,9 @@ packages:
resolution: {integrity: sha512-z6PJ8Lml+v3ichVojCiB8toQJBuwR42ySM4ezjXIqXK3M0HczmKQ3LF4rhU55PfD99KEEXQG6yb7iOMyvYuHew==}
hasBin: true
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
ufo@1.6.1:
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
@@ -9822,6 +9878,29 @@ snapshots:
transitivePeerDependencies:
- '@types/react'
+ '@apollo/client@3.13.8(@types/react@19.1.8)(graphql-ws@5.16.2(graphql@16.11.0))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ dependencies:
+ '@graphql-typed-document-node/core': 3.2.0(graphql@16.11.0)
+ '@wry/caches': 1.0.1
+ '@wry/equality': 0.5.7
+ '@wry/trie': 0.5.0
+ graphql: 16.11.0
+ graphql-tag: 2.12.6(graphql@16.11.0)
+ hoist-non-react-statics: 3.3.2
+ optimism: 0.18.1
+ prop-types: 15.8.1
+ rehackt: 0.1.0(@types/react@19.1.8)(react@18.3.1)
+ symbol-observable: 4.0.0
+ ts-invariant: 0.10.3
+ tslib: 2.7.0
+ zen-observable-ts: 1.2.5
+ optionalDependencies:
+ graphql-ws: 5.16.2(graphql@16.11.0)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+ transitivePeerDependencies:
+ - '@types/react'
+
'@ardatan/relay-compiler@12.0.3(graphql@16.11.0)':
dependencies:
'@babel/generator': 7.27.5
@@ -11132,6 +11211,14 @@ snapshots:
prop-types: 15.8.1
react: 18.3.1
+ '@gerrit0/mini-shiki@3.7.0':
+ dependencies:
+ '@shikijs/engine-oniguruma': 3.7.0
+ '@shikijs/langs': 3.7.0
+ '@shikijs/themes': 3.7.0
+ '@shikijs/types': 3.7.0
+ '@shikijs/vscode-textmate': 10.0.2
+
'@graphql-codegen/add@5.0.3(graphql@16.11.0)':
dependencies:
'@graphql-codegen/plugin-helpers': 5.1.1(graphql@16.11.0)
@@ -12749,6 +12836,26 @@ snapshots:
'@noble/hashes': 1.4.0
'@scure/base': 1.1.9
+ '@shikijs/engine-oniguruma@3.7.0':
+ dependencies:
+ '@shikijs/types': 3.7.0
+ '@shikijs/vscode-textmate': 10.0.2
+
+ '@shikijs/langs@3.7.0':
+ dependencies:
+ '@shikijs/types': 3.7.0
+
+ '@shikijs/themes@3.7.0':
+ dependencies:
+ '@shikijs/types': 3.7.0
+
+ '@shikijs/types@3.7.0':
+ dependencies:
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.4
+
+ '@shikijs/vscode-textmate@10.0.2': {}
+
'@shoelace-style/animations@1.2.0': {}
'@shoelace-style/localize@3.2.1': {}
@@ -12996,6 +13103,10 @@ snapshots:
'@types/har-format@1.2.16': {}
+ '@types/hast@3.0.4':
+ dependencies:
+ '@types/unist': 3.0.3
+
'@types/html-minifier-terser@6.1.0': {}
'@types/http-cache-semantics@4.0.4': {}
@@ -13113,6 +13224,8 @@ snapshots:
'@types/trusted-types@2.0.7': {}
+ '@types/unist@3.0.3': {}
+
'@types/webextension-polyfill@0.8.3': {}
'@types/which@2.0.2': {}
@@ -17792,6 +17905,10 @@ snapshots:
lines-and-columns@1.2.4: {}
+ linkify-it@5.0.0:
+ dependencies:
+ uc.micro: 2.1.0
+
listenercount@1.0.1: {}
listr2@4.0.5:
@@ -17912,6 +18029,8 @@ snapshots:
lru-cache@7.18.3: {}
+ lunr@2.3.9: {}
+
magic-string@0.25.9:
dependencies:
sourcemap-codec: 1.4.8
@@ -17936,12 +18055,23 @@ snapshots:
map-cache@0.2.2: {}
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
math-intrinsics@1.1.0: {}
mdn-data@2.0.14: {}
mdn-data@2.0.4: {}
+ mdurl@2.0.0: {}
+
media-typer@0.3.0: {}
memfs@3.5.3:
@@ -18972,6 +19102,8 @@ snapshots:
end-of-stream: 1.4.5
once: 1.4.0
+ punycode.js@2.3.1: {}
+
punycode@2.3.1: {}
puppeteer-core@21.11.0:
@@ -19748,6 +19880,11 @@ snapshots:
'@types/react': 18.3.23
react: 18.3.1
+ rehackt@0.1.0(@types/react@19.1.8)(react@18.3.1):
+ optionalDependencies:
+ '@types/react': 19.1.8
+ react: 18.3.1
+
relateurl@0.2.7: {}
relay-runtime@12.0.0:
@@ -20903,6 +21040,15 @@ snapshots:
dependencies:
is-typedarray: 1.0.0
+ typedoc@0.28.5(typescript@5.8.3):
+ dependencies:
+ '@gerrit0/mini-shiki': 3.7.0
+ lunr: 2.3.9
+ markdown-it: 14.1.0
+ minimatch: 9.0.5
+ typescript: 5.8.3
+ yaml: 2.8.0
+
typescript@4.9.5: {}
typescript@5.8.3: {}
@@ -20911,6 +21057,8 @@ snapshots:
ua-parser-js@1.0.40: {}
+ uc.micro@2.1.0: {}
+
ufo@1.6.1: {}
unbox-primitive@1.1.0: