소스 정보
- 저장소
- dojoengine/dojo.js
- 최근 소스 활동
- 2026년 1월 23일 08:57
- 감지된 SKILL.md 언어
- 영어
- 스타
- 37
- 포크
- 53
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/dojoengine/dojo.js --skill update-grpc-proto명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | update-grpc-proto |
| description | Update @dojoengine/grpc proto files from Torii repository |
| triggers | ["update grpc proto","update proto files","sync torii proto","grpc proto update","torii proto sync"] |
Update the @dojoengine/grpc package with the latest proto files from the Torii repository.
Use this skill when:
cd packages/grpc && bun run update:proto
This downloads the latest proto files from:
https://raw.githubusercontent.com/dojoengine/torii/main/crates/proto/proto/git diff packages/grpc/proto/
Document what changed:
cd packages/grpc && bun run build:proto
This generates TypeScript from proto files using protobuf-ts.
Compare src/generated/world.client.ts with src/torii-client.ts:
// Generated client interface - IWorldClient
interface IWorldClient {
subscribeContracts(...): ServerStreamingCall<...>;
worlds(...): UnaryCall<...>;
// ... all RPC methods
}
Check which methods in IWorldClient are not yet wrapped in ToriiGrpcClient.
For each new RPC, follow these patterns:
export function createRetrieveNewThingRequest(
query: NewThingQuery
): RetrieveNewThingRequest {
return {
query: {
// Map SDK types to proto types
field: query.field,
pagination: mapPagination(query.pagination),
},
};
}
export function mapNewThingResponse(
response: RetrieveNewThingResponse
): NewThingPage {
return {
items: response.items.map(mapNewThing),
nextCursor: response.next_cursor || undefined,
};
}
export function mapNewThing(thing: ProtoNewThing): NewThingView {
return {
id: thing.id,
// Map proto fields to SDK types
address: bufferToHex(thing.address),
};
}
export interface NewThingView {
id: string;
address: string;
}
export interface NewThingPage {
items: NewThingView[];
nextCursor?: string;
}
For query methods:
async getNewThings(query: NewThingQuery): Promise<NewThingPage> {
const request = createRetrieveNewThingRequest(query);
const response = await this.client.worldClient.retrieveNewThings(request).response;
return this.mappers.newThingsResponse(response);
}
For subscription methods:
async onNewThingUpdated(
filters: string[] | null | undefined,
callback: Function
): Promise<Subscription> {
return this.createStreamSubscription({
createStream: () =>
this.client.worldClient.subscribeNewThings({
filters: filters?.map(hexToBuffer) || [],
}),
onMessage: (response: SubscribeNewThingsResponse) => {
if (response.thing) {
callback(
this.mappers.newThing(response.thing),
response.subscription_id
);
}
},
});
}
For update subscription methods:
async updateNewThingSubscription(
subscription: Subscription,
filters: string[]
): Promise<void> {
const grpcSubscription = this.findSubscription(subscription);
if (!grpcSubscription) {
throw new Error("Subscription not found");
}
await this.client.worldClient.updateNewThingsSubscription({
subscription_id: BigInt(grpcSubscription.id),
filters: filters.map(hexToBuffer),
}).response;
}
export type { NewThingView, NewThingPage } from "./types";
cd packages/grpc && bun run test
Add new tests for new methods if needed.
cd packages/grpc && bun run lint && bun run format
cd packages/grpc && bun run build
bun run changeset
Select @dojoengine/grpc and describe the proto updates.
| File | Purpose |
|---|---|
packages/grpc/scripts/update-proto.sh | Downloads proto from Torii |
packages/grpc/scripts/build-proto.sh | Generates TypeScript |
packages/grpc/proto/*.proto | Proto definitions |
packages/grpc/src/generated/world.client.ts | Generated gRPC client |
packages/grpc/src/torii-client.ts | SDK client implementation |
packages/grpc/src/mappings/query.ts | Request mappers |
packages/grpc/src/mappings/types.ts | Response mappers |
packages/grpc/src/types.ts | SDK type definitions |
packages/grpc/src/index.ts | Package exports |
Check network connectivity and verify Torii repo URL is correct.
Check for breaking changes in proto definitions. May need to update mappers.
Re-run bun run build:proto to regenerate. Check protobuf-ts version compatibility.
Update tests to match new proto structure. Check mapper implementations.