Developer Center

Developer Center

  • Getting Started
  • Built-in Features
  • REST API Endpoints
  • Guides
  • Cheat Sheet

›Account

Getting Started

  • What is Sirius Chain
  • Setting up your workstation
  • Writing your first application

Built-in Features

  • Account
  • Mosaic (SDA)
  • Namespace
  • Transfer Transaction
  • Aggregate Transaction
  • Multisig Account
  • Metadata
  • Account Restriction
  • Cross-Chain Swaps
  • Exchange Market
  • Decentralized Exchange Market
  • Liquidity Provider
  • Storage

Protocol

  • Node
  • Block
  • Cryptography
  • Transaction
  • Validating
  • Consensus Algorithms
  • Receipt
  • Inflation

REST API

  • Overview
  • Tools
  • Serialization
  • Websockets
  • Status Errors

SDKs

  • Overview
  • Architecture
  • Languages
  • Extending Sirius Chain Capabilities
  • SDK Development
  • SDK Documentation

Wallets & Explorers

  • Wallets & Explorers

Cheat Sheet

  • Sirius Chain Cheat Sheet

Guides

  • Overview
  • External Guides
  • Account

    • Creating and opening an account
    • Getting account information
    • Getting the amount of XPX sent to an account
    • Reading transactions from an account

    Account Restriction

    • Preventing spam attacks with account restrictions

    Aggregate Transaction

    • Sending payouts with aggregate-complete transaction
    • Creating an escrow with aggregate bonded transaction
    • Asking for mosaics with aggregate-bonded transaction
    • Signing announced aggregate-bonded transactions

    Block

    • Listening to New Blocks
    • Getting block by height

    Cross Chain Swaps

    • Atomic cross-chain swap between Sirius public and private chains

    Metadata

    • Account Metadata
    • Mosaic Metadata
    • Namespace Metadata
    • Account Metadata (Deprecated since 0.7.0 Sirius Chain release)
    • Mosaic Metadata (Deprecated since 0.7.0 Sirius Chain release)
    • Namespace Metadata (Deprecated since 0.7.0 Sirius Chain release)

    Monitoring

    • Monitor transaction

    Mosaic

    • Creating a mosaic (SDA)
    • Getting the mosaic information
    • Getting the asset identifier behind a namespace with receipts

    Mosaic Levy

    • Modifying Mosaic Supply

    Multisig Account

    • Converting an account to multisig
    • Modifying a multisig account
    • Creating a multi-level multisig-account
    • Sending a multisig transaction

    Namespace

    • Registering a namespace
    • Registering a subnamespace
    • Getting the Namespace information
    • Linking a namespace to a mosaic
    • Linking namespace to account

    Transfer Transaction

    • Transfer transaction
    • Sending an encrypted message

    Storage

    • Data Modification Cancel
    • Data Modification
    • Download Channel
    • Download Payment
    • Drive Closure
    • Finish Download Channel
    • Prepare Bc Drive
    • Replicator Offboarding
    • Replicator Onboarding
    • Storage Payment
    • Verification Payment

Storage

  • Overview
  • Participate
  • External Economy
  • Roles
  • Verification
  • Challenge
  • Rewards
  • Transaction Schemas
  • Built-In Features

    • Drive
    • Replicator
    • Verifier
    • Supercontracts

    Protocols

    • Cross-Block Protocol
    • Fair Streaming

    Storage User Application

    • Overview
    • Getting Started
    • Managing Drives
    • Managing Drive Files
    • Downloading Data

Creating and opening an account

This guide will help you create a new account and open it.

Prerequisites

  • Finish the getting started section.
  • Text editor or IDE.
  • XPX-Chain-SDK or XPX-Chain-CLI.

Getting into some code

An account is a key pair (private and public key) associated with a mutable state stored in the Sirius Chain.

Golang
TypeScript
JavaScript
Java
CLI
keyPair, _ := crypto.NewRandomKeyPair()

fmt.Printf("PublicKey:\t%x\n", keyPair.PublicKey.Raw)
fmt.Printf("PrivateKey:\t%x", keyPair.PrivateKey.Raw)
const account = Account.generateNewAccount(NetworkType.TEST_NET);

console.log('Address:', account.address.pretty());
console.log('PrivateKey:', account.privateKey);
console.log('PublicKey:', account.publicKey);
const account = Account.generateNewAccount(NetworkType.TEST_NET);

console.log('Address:', account.address.pretty());
console.log('PrivateKey:', account.privateKey);
console.log('PublicKey:', account.publicKey);
final Account account = Account.generateNewAccount(NetworkType.TEST_NET);

System.out.printf("Address: '%S' %n", account.getAddress());
System.out.printf("PrivateKey: '%S' %n", account.getPrivateKey());
System.out.printf("PublicKey: '%S' %n", account.getPublicKey());
xpx2-cli account generate --network TEST_NET

The private key uniquely identifies a Sirius Chain account and holds all of its power. It is a priority to ensure it is stored safely somewhere offline and not to share it with anyone.

The public key is cryptographically derived from the private key and safe to be shared. Nonetheless, it is preferable to share the address, which contains further information such as network and validity check.

If you already have a private key, it is not necessary to generate a new account:

Golang
TypeScript
JavaScript
Java
account, _ := sdk.NewAccountFromPrivateKey("...", sdk.TEST_NET)

fmt.Printf("Address:\t%v\n", account.Address)
fmt.Printf("PrivateKey:\t%x\n", account.KeyPair.PrivateKey.Raw)
fmt.Printf("PublicKey:\t%x", account.KeyPair.PublicKey.Raw)
// Replace with a private key
const privateKey = process.env.PRIVATE_KEY as string;

const account = Account.createFromPrivateKey(privateKey, NetworkType.TEST_NET);

console.log('Address:', account.address.pretty());
console.log('PrivateKey:', account.privateKey);
console.log('PublicKey:', account.publicKey);
// Replace with a private key
const privateKey = process.env.PRIVATE_KEY;

const account = Account.createFromPrivateKey(privateKey, NetworkType.TEST_NET);

console.log('Address:', account.address.pretty());
console.log('PrivateKey:', account.privateKey);
console.log('PublicKey:', account.publicKey);
    // Replace with a private key
final String privateKey = "<private_key>";

final Account account = Account.createFromPrivateKey(privateKey, NetworkType.TEST_NET);

System.out.printf("Address: '%S' %n", account.getAddress());
System.out.printf("PrivateKey: '%S' %n", account.getPrivateKey());
System.out.printf("PublicKey: '%S' %n", account.getPublicKey());

Using a Wallet

If the programming language of the SDK you are using allows client-side development, you can create a wallet.

A wallet enables you to store your account to sign transactions, encrypting your private key with a password.

TypeScript
JavaScript
const password = new Password('password');

const wallet = SimpleWallet.create('wallet-name', password, NetworkType.TEST_NET);

const account = wallet.open(password);

console.log('Your new account address is:', account.address.pretty(), 'and its private key', account.privateKey);
const password = new Password('password');

const wallet = SimpleWallet.create('wallet-name', password, NetworkType.TEST_NET);

const account = wallet.open(password);

console.log('Your new account address is:', account.address.pretty(), 'and its private key', account.privateKey);

Do you have a private key? You can create and open a wallet importing your private key.

TypeScript
JavaScript
const password = new Password('password');

// Replace with a private key
const privateKey = process.env.PRIVATE_KEY as string;

const wallet = SimpleWallet.createFromPrivateKey('wallet-name', password, privateKey, NetworkType.TEST_NET);

const account = wallet.open(password);

console.log('Your account address is:', account.address.pretty(), 'and its private key', account.privateKey);
const password = new Password('password');

// Replace with a private key
const privateKey = process.env.PRIVATE_KEY;

const wallet = SimpleWallet.createFromPrivateKey('wallet-name', password, privateKey, NetworkType.TEST_NET);

const account = wallet.open(password);

console.log('Your account address is:', account.address.pretty(), 'and its private key', account.privateKey);
← External GuidesGetting account information →
  • Prerequisites
  • Getting into some code
    • Using a Wallet
  • Follow our profile
  • Ask development questions
  • Join our Discord channel
  • Explore our Youtube channel
  • Explore Github
Protocol
BlockConsensus AlgorithmsCryptographyInflationNodeReceiptTransactionValidating
Built-in Features
AccountAggregate TransactionCross-Chain SwapsExchange MarketDecentralized Exchange MarketMetadataMosaicMultisig AccountNamespaceTransfer TransactionStorageLiquidity Provider
References
REST APISDKsCheat Sheet
Includes Documentation Forked from NEM
Copyright © 2025 Sirius Chain