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

xls-37d

v0.0.3-beta

Published

XRPF Standards Proposal - Improved Concise Transaction Identifier (CTIM)

Downloads

4

Readme

Abstract

This standard provides a way to locate a validated transaction on any XRP Ledger Protocol Chain using its ledger sequence number, transaction index, and network ID rather than its transaction hash.

This identifier is only applicable for validated transactions. Non-validated or unsubmitted transactions cannot be identified using a CTID.

Getting Started

NPM

In an existing project (with package.json), install xls-37d with:

npm install xls-37d

or with yarn:

yarn add xls-37d

Reference documentation available here. Please note, this is still a work-in-progress.

Encoding

An example encoding routine in typescript follows:

import xls37d from 'xls-37d';

const { ctid } = new xls37d.encode({
  networkId,
  lgrIndex,
  txnIndex,
});

Decoding

An example decoding routine in typescript follows:

import xls37d from 'xls-37d';

const { networkId, lgrIndex, txnIndex } = new xls37d.decode(ctid);

Background

Hashing

The XRP Ledger historically identifies ledgers and transactions (and other objects) using a namespace-biased 'SHA-512Half' hashing function, which results in a 64 hex nibble unique identifier.[1]

Since these hashes are derived from the contents of the data, each identifier is completely independent of consensus.

Example Transaction Hash (ID):

C4E284010276F8457C4BF96D0C534B7383087680C159F9B8C18D5EE876F7EFE7

Indexing

Ledgers and transactions can be identified by their sequenced position.

As new ledgers are validated on XRP Ledger Protocol Chains, they are assigned a sequence number, which is always the previous ledger sequence plus one. The first ledger sequence is the genesis ledger with a value of one.

Ledgers can therefore be uniquely identified by a ledger_index (sequence) [2] [3]. The only limitation is that the ledger needs to be closed before a sequence number can be used for identification.

Motivation

The XRP Ledger is poised to become (or depending on the time of reading: has already become) an ecosystem of cooperatively interconnected XRPL Protocol Chains. It is imperative that users of these chains can efficiently locate a specific transaction on a specific chain. Therefore a network-aware transaction identifier is necessary.

References

[1] https://xrpl.org/basic-data-types.html#hashes

[2] https://xrpl.org/basic-data-types.html#ledger-index

[3] https://xrpl.org/ledger-header.html

[4] https://xrpl.org/consensus.html

[5] https://xrpl.org/transaction-metadata.html

0015 XLS-15d - Concise Transaction Identifier

https://github.com/XRPLF/XRPL-Standards/discussions/34

0032 XLS-32d - Request URI Structure

https://github.com/XRPLF/XRPL-Standards/discussions/81