-
Notifications
You must be signed in to change notification settings - Fork 54
chore: bump dojo.c to get latest publishMessage endpoint #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update removes the Changes
Sequence Diagram(s)sequenceDiagram
participant UserApp as User App
participant SDK as Dojo SDK
participant Client as Client (Torii)
participant DojoC as dojo.c
UserApp->>SDK: init({ toriiUrl, worldAddress })
SDK->>Client: createClient({ toriiUrl, worldAddress })
UserApp->>SDK: sendMessage(data, account?)
SDK->>Client: publishMessage(data, signature)
Client->>DojoC: publishMessage endpoint
DojoC-->>Client: response (string)
Client-->>SDK: Result<string, string>
SDK-->>UserApp: Result<string, string>
Possibly related PRs
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (2)
packages/sdk/src/web/index.ts (1)
204-215
: 🛠️ Refactor suggestionDoc-comment return type is stale
The JSDoc still advertises
Promise<void>
while the implementation now returnsResult<string,string>
.- * @returns {Promise<void>} - A promise that resolves when the message is sent successfully. + * @returns {Promise<Result<string,string>>} - Result containing the message ID or error.packages/sdk/src/node/index.ts (1)
184-196
: 🛠️ Refactor suggestionOut-of-date JSDoc & unused parameter
- JSDoc still says
Promise<void>
; should reflectResult<string,string>
.- The
_account
parameter is unused—either use it or drop it to avoid confusion.- * @returns {Promise<void>} - A promise that resolves when the message is sent successfully. + * @returns {Promise<Result<string,string>>} - Result containing the message ID or error.If the account will never be used in the node context, consider removing it:
- sendMessage: async (data: TypedData, _account?: Account) + sendMessage: async (data: TypedData)
🧹 Nitpick comments (3)
.changeset/wild-trees-admire.md (1)
15-15
: Missing determiner in the changeset headlineNit-level grammar: add “the” before latest for smoother reading.
-chore: bump dojo.c to get latest publishMessage endpoint +chore: bump dojo.c to get the latest publishMessage endpoint🧰 Tools
🪛 LanguageTool
[uncategorized] ~15-~15: You might be missing the article “the” here.
Context: ...": patch --- chore: bump dojo.c to get latest publishMessage endpoint(AI_EN_LECTOR_MISSING_DETERMINER_THE)
readme.md (2)
197-199
: Minor formatting glitches in bullet itemThere’s an errant space before the colon and the sentence casing is inconsistent with neighbouring bullets.
- - Try out a specific example : + - Try out a specific example:
208-210
: Inconsistent casing in headingConsider capitalising “Docker” to match common convention.
- **With docker**: + **With Docker**:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
examples/example-vite-react-phaser-recs/src/dojo/generated/setup.ts
is excluded by!**/generated/**
examples/example-vite-react-pwa-recs/src/dojo/generated/setup.ts
is excluded by!**/generated/**
examples/example-vite-react-threejs-recs/src/dojo/generated/setup.ts
is excluded by!**/generated/**
examples/example-vue-app-recs/src/dojo/generated/setup.ts
is excluded by!**/generated/**
📒 Files selected for processing (18)
.changeset/wild-trees-admire.md
(1 hunks)examples/example-node-worker/main.ts
(0 hunks)examples/example-vanillajs-phaser-recs/src/dojo/setup.ts
(0 hunks)examples/example-vite-experimental-sdk/src/main.ts
(0 hunks)examples/example-vite-grpc-playground/src/main.tsx
(0 hunks)examples/example-vite-kitchen-sink/src/main.tsx
(0 hunks)examples/example-vite-phaser-sdk/src/main.ts
(0 hunks)examples/example-vite-react-app-recs/src/dojo/setup.ts
(0 hunks)examples/example-vite-react-sql/src/main.tsx
(0 hunks)examples/example-vite-svelte-recs/src/dojo/setup.ts
(0 hunks)packages/core/src/config/index.ts
(0 hunks)packages/sdk/src/__example__/index.ts
(0 hunks)packages/sdk/src/__tests__/generateTypedData.test.ts
(0 hunks)packages/sdk/src/internal/types.ts
(1 hunks)packages/sdk/src/node/index.ts
(1 hunks)packages/sdk/src/web/index.ts
(1 hunks)packages/torii-wasm/dojo.c
(1 hunks)readme.md
(1 hunks)
💤 Files with no reviewable changes (12)
- examples/example-vite-react-app-recs/src/dojo/setup.ts
- examples/example-vite-kitchen-sink/src/main.tsx
- examples/example-vite-react-sql/src/main.tsx
- packages/sdk/src/example/index.ts
- examples/example-vite-experimental-sdk/src/main.ts
- packages/sdk/src/tests/generateTypedData.test.ts
- examples/example-vite-svelte-recs/src/dojo/setup.ts
- examples/example-node-worker/main.ts
- examples/example-vite-grpc-playground/src/main.tsx
- examples/example-vanillajs-phaser-recs/src/dojo/setup.ts
- examples/example-vite-phaser-sdk/src/main.ts
- packages/core/src/config/index.ts
🧰 Additional context used
🪛 LanguageTool
.changeset/wild-trees-admire.md
[uncategorized] ~15-~15: You might be missing the article “the” here.
Context: ...": patch --- chore: bump dojo.c to get latest publishMessage endpoint
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: check
🔇 Additional comments (4)
packages/torii-wasm/dojo.c (1)
1-1
: Submodule pointer updated to latest commit
Thedojo.c
submodule reference has been correctly bumped to commitc9764dd0efd637932a86e24945ba22580e2892a4
, aligning with the goal to incorporate the newpublishMessage
endpoint.packages/sdk/src/internal/types.ts (1)
378-382
:✅ Verification successful
Breaking-change alert:
sendMessage
now returnsResult<string, string>
Good to see the type aligned with the new
publishMessage
endpoint.
Please double-check that every consumer ofSDK.sendMessage
across the repo (examples, docs, downstream packages) is updated to handle thestring
payload instead ofUint8Array
.
🏁 Script executed:
#!/bin/bash # Find all usages of `sendMessage(` that still expect a Uint8Array rg -n --context 2 $'sendMessage\\(' | grep -E "Uint8Array"Length of output: 56
Confirmed:
sendMessage
consumers updated for string returnI searched all
sendMessage(
usages for any remainingUint8Array
references and found none. Consumers across the repo are now handling thestring
payload correctly. No further action required.packages/sdk/src/web/index.ts (1)
53-55
:relayUrl
removed – verify config migration
defaultClientConfig
now contains onlytoriiUrl
.
Make sure:
- No lingering references to
relayUrl
remain ininit()
or downstream examples.- Migration notes are added to the changelog / README so integrators aren’t surprised.
packages/sdk/src/node/index.ts (1)
40-42
:relayUrl
field dropped – update migration docsSame concern as the web build: confirm all Node examples & tests removed
relayUrl
, and communicate the breaking config change.
Closes #
Introduced changes
Checklist
Summary by CodeRabbit
Bug Fixes
relayUrl
property from all client configuration options across SDKs, examples, and documentation.sendMessage
method to return a string instead of a byte array.Documentation
relayUrl
property and improved formatting.Chores