Sirius Chain Developer Center 0.2.6

Sirius Chain Developer Center 0.2.6

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

›Namespace

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

Monitoring

  • Monitor transaction

Mosaic

  • Creating a mosaic
  • Getting the mosaic information
  • Getting the asset identifier behind a namespace with receipts
  • 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

Getting the Namespace information

Get the ownership and duration for a given namespace identifier.

Prerequisites

  • XPX-Chain-SDK or XPX-Chain-CLI
  • A text editor or IDE
  • Have registered one namespace
  • Have namespace with name foo

Getting into some code

Call getNamespace function, passing the namespace identifier you want to check as a parameter.

Golang
TypeScript
JavaScript
CLI
conf, err := sdk.NewConfig(context.Background(), []string{"http://localhost:3000"})
if err != nil {
panic(err)
}

// Use the default http client
client := sdk.NewClient(nil, conf)

// Generate Id from namespaceName
namespaceId, _ := sdk.NewNamespaceIdFromName("foo")

namespace, err := client.Namespace.GetNamespaceInfo(context.Background(), namespaceId)
if err != nil {
panic(err)
}
fmt.Printf("%s\n", namespace.String())
const namespaceHttp = new NamespaceHttp('http://localhost:3000');
const namespaceId = new NamespaceId('foo');

namespaceHttp
.getNamespace(namespaceId)
.subscribe(namespaceInfo => console.log(namespaceInfo), err => console.error(err));
const namespaceHttp = new NamespaceHttp('http://localhost:3000');
const namespaceId = new NamespaceId('foo');

namespaceHttp
.getNamespace(namespaceId)
.subscribe(namespaceInfo => console.log(namespaceInfo), err => console.error(err));
xpx2-cli namespace info --name foo

You can search subnamespace with the same way, by passing the subnamespace such as foo.bar.

← Registering a subnamespaceLinking a namespace to a mosaic →
  • Prerequisites
  • Getting into some code
  • Join #general discussion
  • Ask development questions
  • Follow the dev updates
  • Explore Github
Protocol
BlockConsensus AlgorithmsCryptographyInflationNodeReceiptTransactionValidating
Built-in Features
AccountAccount FilterAggregate TransactionCross-Chain SwapsExchange MarketMetadataMosaicMultisig AccountNamespaceSuper contractTransfer Transaction
References
REST APISDKsXPX-Chain-CLICheat Sheet
Documentation Forked From NEM
Copyright © 2020 ProximaX