Gaming Integration Guide

Integrate web3 features into your game without sacrificing player experience.

This guide covers the products and functionality for games integrating with Shinami.

Shinami Products

Shinami has a suite of products for gaming:

  • Node Service: enterprise-grade infrastructure to read and write to the Sui blockchain
  • Gas Station: abstract gas fees from your player experience by sponsoring their transactions
  • Invisible Wallet: fully abstract web3 from your player experience (third-party wallet connections, gas fees, signing popups, seed phrases)

🚧

Pre-Integration:

Prior to integrating with Shinami, you should create and deploy Sui Move smart contracts to manage your on-chain assets (characters, items, etc.) and game logic.

Integration

Shinami’s APIs provide the functionality to manage invisible wallets (player accounts), sponsor transactions and read/write to the Sui blockchain. All APIs are protected by a Shinami access key, which you can create from your account dashboard.

Shinami’s invisible wallets allow players to interact with on-chain assets seamlessly. Invisible wallets are under the shared custody of your game and Shinami. Shinami has built a proprietary compute-only service with no state persistence and strict input/output policies to allow both parties to transact together securely.

  • shinami_key_createSession: for security purposes, you must generate a session token before you create a wallet, sign transactions, or execute transactions. Session tokens expire after 10 minutes.
  • shinami_wal_createWallet: programmatically generates a unique wallet for a player that is Sui network agnostic.
  • shinami_wal_getWallet: retrieve a player’s wallet address based on their id.
  • shinami_wal_signTransactionBlock: signs a transaction. This is a low level API - it requires integration with Gas Station API and Sui API for transaction sponsorship and execution. This method gives you more control over how you submit transactions to Sui.
  • shinami_wal_executeGaslessTransactionBlock: sponsors / signs / executes a gasless transaction from a wallet. This is a convenient end-to-end method for submitting sponsored transactions to the chain.

You can find more info on these methods in our Invisible Wallet API page.

Shinami’s Sui API is the easiest way to read and write to the Sui blockchain. Common methods for gaming use cases include:

Read API

  • suix_getOwnedObjects: return the list of objects owned by an invisible wallet address
  • sui_getObject: return object information for a specified object
  • sui_multiGetObjects: return object information for a list of objects

Sui Programmable Transaction Blocks

Programmable Transaction Blocks can be used to build transaction blocks that interact with your on-chain assets and smart contracts. Using Sui's SDK is recommended.

Available transactions include:

  • moveCall: call a specific function from your smart contract. This could include minting, merging or updating on-chain assets.
  • transferObjects: transfer an object or list of objects to a specified address. You can use this for Exports from invisible wallets.

Write API

  • sui_dryRunTransactionBlock: executes a dry run of a transaction without creating an actual transaction or consuming gas
  • sui_executeTransactionBlock: executes a signed transaction

📘

Note:

If you use the high-level shinami_wal_executeGaslessTransactionBlock from the Invisible Wallet API, you won’t need to interact with the transaction block builder or Sui API directly.

You can find more info on Sui API methods in our API Reference page.

  • suix_subscribeEvent: can be used to subscribe to real-time events for invisible wallets, such as Imports.

Shinami's gas station facilitates sponsored transactions. This is the primary method:

  • gas_sponsorTransactionBlock: sponsors a gasless transaction by attaching a gas object to it and signs the sponsored transaction with the gas owner's key.

📘

Note:

If you use the high-level shinami_wal_executeGaslessTransactionBlock from the Invisible Wallet API, you won’t need to interact with the Gas Station API directly.

You can find more info on these methods in our Gas Station API page.