Installation

Install the Realm SDK for your preferred programming language or generate clients from our protobuf definitions.

TypeScript / JavaScript

The official TypeScript SDK with 100% API coverage:

bash
# npm
npm install @empyrealm/sdk
# yarn
yarn add @empyrealm/sdk
# pnpm
pnpm add @empyrealm/sdk

Verify the installation:

test.tstypescript
import { RealmClient } from '@empyrealm/sdk';
const client = new RealmClient('https://api.realm.software');
const pong = await client.ping();
console.log('Connected! Server time:', pong.serverTime);

Browser Support

The SDK works in both Node.js and browsers. In browsers, it automatically uses gRPC-Web via our Envoy proxy.

Python

Beta — Full coverage coming soon

bash
pip install empyrealm
test.pypython
from empyrealm import RealmClient
client = RealmClient('https://api.realm.software')
pong = client.ping()
print(f'Connected! Server time: {pong.server_time}')

Go

Beta — Full coverage coming soon

bash
go get github.com/realm-exchange/sdk-go
main.gogo
package main
import (
"fmt"
realm "github.com/realm-exchange/sdk-go"
)
func main() {
client := realm.NewClient("https://api.realm.software")
pong, _ := client.Ping()
fmt.Printf("Connected! Server time: %d\n", pong.ServerTime)
}

Generate from Protobuf

For other languages, generate clients directly from our protobuf definitions. We support any language with gRPC bindings.

bash
# Clone the proto definitions
git clone https://github.com/realm-exchange/chain.git
cd chain/proto
# Generate for your language
protoc --go_out=. realm_api.proto # Go
protoc --python_out=. realm_api.proto # Python
protoc --cpp_out=. realm_api.proto # C++

Proto Location

The canonical protobuf definitions are at chain/proto/realm_api.proto in our GitHub repository.

System Requirements

SDKMinimum VersionNotes
TypeScriptNode.js 18+ESM and CommonJS supported
PythonPython 3.10+Async/await support required
GoGo 1.21+Generics used internally

Next Steps