npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@stardust-gg/stardust-custodial-sdk

v2.6.1

Published

The Stardust Custodial Wallet SDK, written in TypeScript, is a versatile and user-friendly tool designed for integration with various blockchain platforms, including Immutable X (IMX), Sui, and evm-compatible networks. It streamlines the process of creati

Downloads

711

Readme

Stardust Custodial SDK

License standard-readme compliant

Table of Contents

Introduction

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.

Changelog

Latest Version: 2.6.1 [05/28/2024]

Features

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

Getting started

Prerequisites

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

Install

npm i @stardust-gg/stardust-custodial-sdk

Usage

import { StardustCustodialSDK } from '@stardust-gg/stardust-custodial-sdk';

const myApiKey = '<your-api-key-here>';

// connect to the api
const sdk = new StardustCustodialSDK(myApiKey);\
Creating a profile
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.

Generate Client JWTs for client side operations
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

Getting a Wallet
const profileId = <your-saved-profile-id>
const profile = await sdk.getProfile(walletId);
const { wallet } = profile

Common Usage

Examples

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

Ethers V5

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.

Ethers V6

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.

EVM

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!');

IMX

const starkSigner = await wallet.imx.getStarkSigner();

Reference IMX-Core-SDK documentation for usage of StarkSigner

SUI

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.

Solana

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!');

Aptos

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.

Contributing

Feel free to open pull requests to propose changes or additions.

License

Apache-2.0

This project uses portions of ethers.js, developed by Richard Moore (@ricmoo), under the MIT License.

Contact and Support

For support or feedback, please reach out to: