Skip to content

Commit 7ed5f76

Browse files
committed
merge main
Signed-off-by: Alex Matson <alex.matson@digitalasset.com>
2 parents c0b1151 + bb09052 commit 7ed5f76

File tree

121 files changed

+4010
-2168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4010
-2168
lines changed

.github/workflows/build.yml

Lines changed: 98 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -105,104 +105,110 @@ jobs:
105105
- name: Run unit tests
106106
run: yarn test:all
107107

108-
## TODO: Re-enable kernel-e2e later
109108
test-kernel-e2e:
110109
runs-on: ubuntu-latest
111110
needs: build
112111
steps:
113112
- name: Checkout
114113
uses: actions/checkout@v4
115-
# - uses: ./.github/actions/setup_yarn
116-
117-
# - name: Download Canton
118-
# run: yarn script:fetch:canton
119-
120-
# - name: Start Canton
121-
# run: |
122-
# set -e
123-
# timeout 5m bash -c '
124-
# LOGFILE=canton_start.log
125-
# yarn start:canton > "$LOGFILE" 2>&1 &
126-
# pid=$!
127-
# for i in {1..60}; do
128-
# if grep -q "Bootstrap script successfully executed." "$LOGFILE"; then
129-
# echo "Canton started successfully."
130-
# exit 0
131-
# fi
132-
# if ! kill -0 $pid 2>/dev/null; then
133-
# echo "Canton process exited unexpectedly."
134-
# cat "$LOGFILE"
135-
# exit 1
136-
# fi
137-
# sleep 5
138-
# done
139-
# echo "Timeout: 'Bootstrap script successfully executed.' not found in 5 minutes."
140-
# cat "$LOGFILE"
141-
# exit 1
142-
# '
143-
144-
# - name: Start remote WK
145-
# run: yarn nx run @canton-network/wallet-gateway-remote:start &
146-
147-
# - run: yarn nx run @canton-network/example-ping:dev &
148-
149-
# - run: yarn nx run @canton-network/mock-oauth2:start &
150-
151-
# # Figures out the version of playwright that's installed.
152-
# # 1. Because we don't know what version yarn will resolve it to, we have
153-
# # to use `yarn why` to get the actually installed version.
154-
# # 2. Because we're in a workspace, we need to make sure we get the version
155-
# # for the root and not any children, hence the `grep`. If not using
156-
# # workspaces, this can be skipped.
157-
# # 3. jq comes pre-installed in the Ubuntu runner, so we use that to get
158-
# # the correct version string.
159-
# # 4. Finally, we use sed to extract just the version number (eg; '1.22.0')
160-
# # The result is stored in steps.playwright-version.outputs.version
161-
# - name: Get installed Playwright version
162-
# id: playwright-version
163-
# run: echo "::set-output name=version::$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://')"
164-
165-
# # Attempt to restore the correct Playwright browser binaries based on the
166-
# # currently installed version of Playwright (The browser binary versions
167-
# # may change with Playwright versions).
168-
# # Note: Playwright's cache directory is hard coded because that's what it
169-
# # says to do in the docs. There doesn't appear to be a command that prints
170-
# # it out for us.
171-
# - name: Load Playwright browser cache
172-
# uses: actions/cache@v4
173-
# id: playwright-cache
174-
# with:
175-
# path: '~/.cache/ms-playwright'
176-
# key: '${{ runner.os }}-0-playwright-${{ steps.playwright-version.outputs.version }}'
177-
# # As a fallback, if the Playwright version has changed, try use the
178-
# # most recently cached version. There's a good chance that at least one
179-
# # of the browser binary versions haven't been updated, so Playwright can
180-
# # skip installing that in the next step.
181-
# # Note: When falling back to an old cache, `cache-hit` (used below)
182-
# # will be `false`. This allows us to restore the potentially out of
183-
# # date cache, but still let Playwright decide if it needs to download
184-
# # new binaries or not.
185-
# restore-keys: |
186-
# ${{ runner.os }}-0-playwright-
187-
188-
# # If the Playwright browser binaries weren't able to be restored, we tell
189-
# # playwright to install everything for us.
190-
# - name: Install Playwright's dependencies
191-
# if: steps.playwright-cache.outputs.cache-hit != 'true'
192-
# run: yarn workspace @canton-network/example-ping run playwright install --with-deps
193-
194-
# - name: Build project
195-
# run: yarn build:all
196-
197-
# - name: Run example e2e
198-
# run: yarn nx playwright:e2e @canton-network/example-ping
199-
200-
# - uses: actions/upload-artifact@v4
201-
# if: ${{ !cancelled() }}
202-
# with:
203-
# name: playwright-report
204-
# path: examples/ping/playwright-report/
205-
# retention-days: 30
114+
- uses: ./.github/actions/setup_yarn
115+
116+
- name: Download Canton
117+
run: yarn script:fetch:canton
118+
119+
- name: Start Canton
120+
run: |
121+
set -e
122+
timeout 5m bash -c '
123+
LOGFILE=canton_start.log
124+
yarn start:canton > "$LOGFILE" 2>&1 &
125+
pid=$!
126+
for i in {1..60}; do
127+
if grep -q "Bootstrap script successfully executed." "$LOGFILE"; then
128+
echo "Canton started successfully."
129+
exit 0
130+
fi
131+
if ! kill -0 $pid 2>/dev/null; then
132+
echo "Canton process exited unexpectedly."
133+
cat "$LOGFILE"
134+
exit 1
135+
fi
136+
sleep 5
137+
done
138+
echo "Timeout: 'Bootstrap script successfully executed.' not found in 5 minutes."
139+
cat "$LOGFILE"
140+
exit 1
141+
'
142+
143+
- name: Start remote WK
144+
run: yarn nx run @canton-network/wallet-gateway-remote:start &
145+
146+
- run: yarn nx run @canton-network/example-ping:dev > "example-ping.log" 2>&1 &
147+
148+
- run: yarn nx run @canton-network/mock-oauth2:start &
149+
150+
# Figures out the version of playwright that's installed.
151+
# 1. Because we don't know what version yarn will resolve it to, we have
152+
# to use `yarn why` to get the actually installed version.
153+
# 2. Because we're in a workspace, we need to make sure we get the version
154+
# for the root and not any children, hence the `grep`. If not using
155+
# workspaces, this can be skipped.
156+
# 3. jq comes pre-installed in the Ubuntu runner, so we use that to get
157+
# the correct version string.
158+
# 4. Finally, we use sed to extract just the version number (eg; '1.22.0')
159+
# The result is stored in steps.playwright-version.outputs.version
160+
- name: Get installed Playwright version
161+
id: playwright-version
162+
run: echo "::set-output name=version::$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://')"
163+
164+
# Attempt to restore the correct Playwright browser binaries based on the
165+
# currently installed version of Playwright (The browser binary versions
166+
# may change with Playwright versions).
167+
# Note: Playwright's cache directory is hard coded because that's what it
168+
# says to do in the docs. There doesn't appear to be a command that prints
169+
# it out for us.
170+
- name: Load Playwright browser cache
171+
uses: actions/cache@v4
172+
id: playwright-cache
173+
with:
174+
path: '~/.cache/ms-playwright'
175+
key: '${{ runner.os }}-0-playwright-${{ steps.playwright-version.outputs.version }}'
176+
# As a fallback, if the Playwright version has changed, try use the
177+
# most recently cached version. There's a good chance that at least one
178+
# of the browser binary versions haven't been updated, so Playwright can
179+
# skip installing that in the next step.
180+
# Note: When falling back to an old cache, `cache-hit` (used below)
181+
# will be `false`. This allows us to restore the potentially out of
182+
# date cache, but still let Playwright decide if it needs to download
183+
# new binaries or not.
184+
restore-keys: |
185+
${{ runner.os }}-0-playwright-
186+
187+
# If the Playwright browser binaries weren't able to be restored, we tell
188+
# playwright to install everything for us.
189+
- name: Install Playwright's dependencies
190+
if: steps.playwright-cache.outputs.cache-hit != 'true'
191+
run: yarn workspace @canton-network/example-ping run playwright install --with-deps
192+
193+
- name: Build project
194+
run: yarn build:all
195+
196+
- name: Run example e2e
197+
run: yarn nx playwright:e2e @canton-network/example-ping
198+
199+
- uses: actions/upload-artifact@v4
200+
if: ${{ !cancelled() }}
201+
with:
202+
name: playwright-report
203+
path: examples/ping/playwright-report/
204+
retention-days: 5
205+
206+
- uses: actions/upload-artifact@v4
207+
if: ${{ failure() }}
208+
with:
209+
name: example-ping-logs
210+
path: example-ping.log
211+
retention-days: 5
206212

207213
sdk-e2e:
208214
name: sdk-e2e (${{ matrix.network }})

api-specs/openrpc-dapp-remote-api.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
{
3232
"type": "object",
33+
"title": "ConnectResult",
3334
"properties": {
3435
"userUrl": {
3536
"$ref": "api-specs/openrpc-dapp-api.json#/components/schemas/UserUrl"

api-specs/openrpc-signing-api.json

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@
2525
"type": "string",
2626
"description": "Hash of the prepared transaction that will be signed."
2727
},
28-
"publicKey": {
29-
"title": "publicKey",
30-
"type": "string",
31-
"description": "Public key to use to sign the transaction."
28+
"keyIdentifier": {
29+
"$ref": "#/components/schemas/KeyIdentifier",
30+
"description": "Identifier for the key to use for signing. At least one of publicKey or id must be provided."
3231
},
3332
"internalTxId": {
3433
"title": "internalTxId",
3534
"type": "string",
3635
"description": "Internal txId used by the Wallet Gateway to store the transaction."
3736
}
3837
},
39-
"required": ["tx", "txHash", "publicKey"]
38+
"required": ["tx", "txHash", "keyIdentifier"]
4039
}
4140
}
4241
],
@@ -135,6 +134,7 @@
135134
},
136135
{
137136
"type": "object",
137+
"title": "TransactionsResult",
138138
"properties": {
139139
"transactions": {
140140
"title": "transactions",
@@ -279,6 +279,54 @@
279279
"type": "null",
280280
"description": "Represents a null value, used in responses where no data is returned."
281281
},
282+
"KeyIdentifierWithPublicKey": {
283+
"title": "KeyIdentifierWithPublicKey",
284+
"type": "object",
285+
"properties": {
286+
"publicKey": {
287+
"title": "publicKey",
288+
"type": "string",
289+
"description": "Public key to use to sign the transaction."
290+
},
291+
"id": {
292+
"title": "id",
293+
"type": "string",
294+
"description": "Unique identifier for the key"
295+
}
296+
},
297+
"required": ["publicKey"],
298+
"description": "Key identifier with publicKey (id is optional)."
299+
},
300+
"KeyIdentifierWithId": {
301+
"title": "KeyIdentifierWithId",
302+
"type": "object",
303+
"properties": {
304+
"publicKey": {
305+
"title": "publicKey",
306+
"type": "string",
307+
"description": "Public key to use to sign the transaction."
308+
},
309+
"id": {
310+
"title": "id",
311+
"type": "string",
312+
"description": "Unique identifier for the key"
313+
}
314+
},
315+
"required": ["id"],
316+
"description": "Key identifier with id (publicKey is optional)."
317+
},
318+
"KeyIdentifier": {
319+
"title": "KeyIdentifier",
320+
"oneOf": [
321+
{
322+
"$ref": "#/components/schemas/KeyIdentifierWithPublicKey"
323+
},
324+
{
325+
"$ref": "#/components/schemas/KeyIdentifierWithId"
326+
}
327+
],
328+
"description": "Identifier for a key. At least one of publicKey or id must be provided (both can also be provided)."
329+
},
282330
"Key": {
283331
"title": "Key",
284332
"type": "object",

core/ledger-client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canton-network/core-ledger-client",
3-
"version": "0.23.0",
3+
"version": "0.23.1",
44
"type": "module",
55
"description": "Provides a TypeScript Canton Network ledger client, generated by the OpenAPI spec",
66
"license": "Apache-2.0",
@@ -26,13 +26,13 @@
2626
},
2727
"devDependencies": {
2828
"@jest/globals": "^30.2.0",
29-
"@swc/core": "^1.15.3",
29+
"@swc/core": "^1.15.8",
3030
"@swc/jest": "^0.2.39",
3131
"@types/jest": "^30.0.0",
32-
"@types/node": "^24.10.1",
32+
"@types/node": "^24.10.4",
3333
"jest": "^30.2.0",
3434
"openapi-typescript": "^7.10.1",
35-
"ts-jest": "^29.4.5",
35+
"ts-jest": "^29.4.6",
3636
"ts-jest-resolver": "^2.0.1",
3737
"tsup": "^8.5.1",
3838
"typescript": "^5.9.3"

core/ledger-proto/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canton-network/core-ledger-proto",
3-
"version": "0.16.0",
3+
"version": "0.16.1",
44
"type": "module",
55
"description": "Provides TypeScript protobuf bindings for Canton",
66
"license": "Apache-2.0",
@@ -24,8 +24,8 @@
2424
"clean": "tsc -b --clean; rm -rf dist"
2525
},
2626
"devDependencies": {
27-
"@swc/core": "^1.15.3",
28-
"@types/node": "^24.10.1",
27+
"@swc/core": "^1.15.8",
28+
"@types/node": "^24.10.4",
2929
"esbuild-plugin-replace": "^1.4.0",
3030
"tsup": "^8.5.1",
3131
"typescript": "^5.9.3"

core/rpc-errors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@canton-network/core-rpc-errors",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"type": "module",
55
"description": "Wrapper for JSON-RPC error objects",
66
"author": "Alex Matson <alex.matson@digitalasset.com>",

core/rpc-generator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"@open-rpc/generator": "^2.1.1",
1212
"@open-rpc/meta-schema": "^1.14.9",
1313
"@open-rpc/typings": "^1.13.0",
14-
"fs-extra": "^11.3.2",
14+
"fs-extra": "^11.3.3",
1515
"lodash": "^4.17.21"
1616
},
1717
"devDependencies": {
1818
"@types/fs-extra": "^11.0.4",
1919
"@types/lodash": "^4.17.21",
20-
"@types/node": "^24.10.1",
20+
"@types/node": "^24.10.4",
2121
"typescript": "^5.9.3"
2222
}
2323
}

core/rpc-generator/src/components/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const tsTemplate = template(`
1616
// Code generated by @open-rpc/generator DO NOT EDIT.
1717
import _ from "lodash";
1818
19-
import { RequestPayload, RpcTransport } from '@canton-network/core-types'
19+
import { RequestPayload } from '@canton-network/core-types'
20+
import { RpcTransport } from '@canton-network/core-rpc-transport'
2021
2122
<%= methodTypings.toString("typescript").replace(/export type AnyOf[A-Za-z0-9]+ =(?:[\\r\\n]|.)*?;/gm, "") %>
2223

core/rpc-generator/templates/client/typescript/_package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"access": "public"
2828
},
2929
"dependencies": {
30+
"@canton-network/core-rpc-transport": "workspace:^",
3031
"@canton-network/core-types": "workspace:^",
3132
"lodash": "^4.17.21"
3233
},

0 commit comments

Comments
 (0)