import { KeyClient, WalletClient } from "@shinami/clients/aptos";
const keyClient = new KeyClient(YOUR_API_KEY);
const walletClient = new WalletClient(YOUR_API_KEY);
const sessionToken = await keyClient.createSession(WALLET_SECRET_FOR_USER_123);
// Create a feePayer transaction (FEEPAYER_TX) representing an action for
// the user's wallet (e.g. they are leveling up an NFT representing their
// in-game character).
// Execute the transaction and cover the small gas fee for the user
// with your connected Shinami Gas Station account.
const tx_response = await walletClient.executeGaslessTransaction(
WALLET_ID_FOR_USER_123,
sessionToken,
FEEPAYER_TX
);
import { KeyClient, WalletClient } from "@shinami/clients/sui";
const keyClient = new KeyClient(YOUR_API_KEY);
const walletClient = new WalletClient(YOUR_API_KEY);
const sessionToken = await keyClient.createSession(WALLET_SECRET_FOR_USER_123);
// Create a transaction without gas info (GASLESS_TRANSACTION)
// representing an action for the user's wallet (e.g. they are
// leveling up an NFT representing their in-game character).
// Execute the transaction and cover the small gas fee for the user
// with your connected Shinami Gas Station account.
const tx_response = await walletClient.executeGaslessTransaction(
WALLET_ID_FOR_USER_123,
sessionToken,
GASLESS_TRANSACTION
);
import { ZkProverClient, ZkWalletClient } from "@shinami/clients/sui";
const zkWalletClient = new ZkWalletClient(YOUR_API_KEY);
const zkProverClient = new ZkProverClient(YOUR_API_KEY);
// Prepare a nonce according to the Sui zkLogin requirements. Obtain a valid
// JSON web token (JWT) with that nonce from a supported OpenID provider.
const { salt, address } = await zkWalletClient.getOrCreateZkLoginWallet(JWT);
const { zkProof } = await zkProverClient.createZkLoginProof(
JWT,
MAX_EPOCH,
EPHEMERAL_PUBLIC_KEY,
JWT_RANDOMNESS,
SALT
);
// Now you can sign transactions with the ephemeralPrivateKey
// and assemble the zkLogin signature using the zkProof.
Frictionless for your users
Eliminate Seed Phrases
Help your users manage wallet security and recovery.
Waive Gas Fees
Customize where and when to sponsor transactions for your users.