In-App Wallet API

Seamless in-app wallets for your users

🚧

Coming Soon...

This is a sneak peak. Stay tuned for more details!

Shinami’s in-app wallets abstract away web3-specific elements like seed phrases, third-party wallet connections, gas fees, and signing popups. They are backend wallets under the shared custody of your app 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.

The In-App Wallet API integrates with Shinami's Gas Station and Node Service for gasless transaction execution. This sections details the JSON-RPC methods for managing in-app wallets.

shinami_key_createSession

Description
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.

Params

  • secret: <string>. Used to encrypt a user's wallet private key. Typically, this would tie to your app's registration and authentication.
curl https://api.shinami.com/wallet/v1/<<WalletapiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"shinami_key_createSession", "params":["{{secret}}"], "id":1}'

Result
SessionToken: <string>. Used to create a wallet, sign transactions or execute transactions.

shinami_wal_createWallet

Description
Programmatically generates a unique wallet for a user.

Params

  • wallet_id: <string>. An arbitrary and unique ID for the wallet. Can be based on your internal IDs.
  • session_token: <string>
curl https://api.shinami.com/wallet/v1/<<WalletapiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"shinami_wal_createWallet",
      "params":["{{wallet_id}}",
                "{{session_token}}"],          
      "id":1}'

Result
WalletAddress: <string>. Sui blockchain wallet address created for the user.

shinami_wal_getWallet

Description
Retrieve a user's wallet address based on their ID.

Params

  • wallet_id: <string>
curl https://api.shinami.com/wallet/v1/<<WalletapiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"shinami_wal_getWallet", "params":["{{wallet_id}}"], "id":1}'

Result
WalletAddress: <string>

shinami_wal_executeGaslessTransaction

Description
Sponsors / signs / executes a gasless transaction from a wallet. This is a convenient end-to-end method for submitting transactions to the chain.

Params

  • wallet_id: <string>
  • session_token: <string>
  • tx_bytes : <Base64> - transaction data bytes, as base-64 encoded string
  • gas_budget : <uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
  • request_type : <ExecuteTransactionRequestType> - the request type (WaitForEffectsCert or WaitForLocalExecution)
curl https://api.shinami.com/wallet/v1/<<WalletapiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"shinami_wal_executeGaslessTransaction",
      "params":["{{wallet_id}}",
                "{{session_token}}", 
                "{{tx_bytes}}",             
                {{gas_budget}},
                "{{request_type}}"],
      "id":1}'

Result
SuiTransactionResponse : <SuiTransactionResponse>

shinami_wal_signTransaction

Description
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 want to submit your transactions to Sui.

Params

  • wallet_id: <string>
  • session_token: <string>
  • tx_bytes : <Base64> - transaction data bytes, as base-64 encoded string
curl https://api.shinami.com/wallet/v1/<<WalletapiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"shinami_wal_signTransaction",
      "params":["{{wallet_id}}",
                "{{session_token}}", 
                "{{tx_bytes}}"],
      "id":1}'

Result
Signature : <Base64>