- Introduction
- Changelog
- Getting Started
- Common Usage Patterns
- Contributing
- License
- Contact and Support
Stardust-Custodial-SDK is a server side TypeScript-based SDK specifically crafted to enable seamless integration with Stardust custodial Wallets as a Service (WaaS). This SDK is designed for developers seeking to incorporate advanced wallet management features into their TypeScript applications with minimal effort - whether they're building a new project or enhancing an existing one.
- Added event emission module to profiles
- Immediate support for two new profile events: addIp addPurchaseable
- Added three new static social identifiers: twitch, epic, steam
Releases can be found here
For a detailed version history, see the full changelog.
This SDK is intended for use with TypeScript. Familiarity with TypeScript and modern JavaScript development practices using NodeJs is recommended.
You will need to create an application and grab your api key @ waas.stardust.gg
npm i @stardust-gg/stardust-custodial-sdk
import { StardustCustodialSDK } from '@stardust-gg/stardust-custodial-sdk';
const myApiKey = '<your-api-key-here>';
// connect to the api
const sdk = new StardustCustodialSDK(myApiKey);\
const profile = await sdk.createProfile();
const profileIdentifier = profile.id;
Note: Store these profile identifiers, they are unique to your players/users and are how you will manage them.
const duration = 600; // 10 mins
const clientJWT = await sdk.generateProfileJWT(profileId, duration);
Note: These JWTs will allow operation over the profile, and therefore have standardized ttls that are configurable on generation up to 24 hours
const profileId = <your-saved-profile-id>
const profile = await sdk.getProfile(walletId);
const { wallet } = profile
All common examples in their full form can be found under examples
If you are cloning the repo and wish to run the examples directly use yarn run-example <path-to-example>
Like so:
yarn run-example examples/sui/sui-sign-personal-message
const provider: JsonRpcProvider = new ethers.providers.JsonRpcProvider(<your-provider-url>)
const ethersV5Signer = await wallet.ethers.v5.getSigner().connect(provider)
Reference Ethers v5 documentation for usage of this signer.
const provider: JsonRpcProvider = new ethers.JsonRpcProvider(<your-provider-url>)
const ethersV6Signer = await wallet.ethers.v6.getSigner(provider)
Reference Ethers v6 documentation for usage of this signer.
const userEVMAddress = await wallet.evm.getAddress();
const userEVMPublicKey = await wallet.evm.getPublicKey();
const rawSignedDigest = await wallet.evm.signRaw('0x010203');
const eip191signedMessage = await wallet.evm.signMessage('Hello World!');
const starkSigner = await wallet.imx.getStarkSigner();
Reference IMX-Core-SDK documentation for usage of StarkSigner
const suiStardustSigner = await wallet.sui;
const builtTx: Uint8Array = <your-tx-object>;
const signedTransactionBlock = await wallet1.sui.signTransactionBlock(builtTx);
Reference sui typescript sdk documentation for usage of Sui.
Additionally, you can reference examples of use cases for Sui.
const userSOLAddress = await wallet.sol.getAddress();
const userSOLPublicKey = await wallet.sol.getPublicKey();
const rawSignedDigest = await wallet.sol.signRaw('0x010203');
const signedMessage = await wallet.sol.signMessage('Hello World!');
const userAptosAddress = await wallet.aptos.getAddress();
const userAptosPublicKey = await wallet.aptos.getPublicKey();
const rawSignedDigest = await wallet.aptos.signRaw('0x010203');
const signedMessage = await wallet.aptos.signMessage('Hello World!');
Please reference the example and aptos ts sdk in order to send transactions.
Feel free to open pull requests to propose changes or additions.
This project uses portions of ethers.js, developed by Richard Moore (@ricmoo), under the MIT License.
For support or feedback, please reach out to: