LNP/BP Standards
  • List of specifications
  • Commitment schemes
    • LNPBP-1: Public keys
    • LNPBP-2: Script
    • LNPBP-3: Tx output
    • LNPBP-4: Multi-protocol
    • LNPBP-6: PayTweak
    • LNPBP-12: TapRet
    • LNPBP-8: Single-use-seals
    • LNPBP-10: TxO seals
    • LNPBP-81: Tagged Merkle trees
  • Bitcoin Protocol
    • LNPBP-5: Short tx ids
  • RGB
    • LNPBP-13: RGB consensus
    • RGB-20: Fungible assets
    • RGB-21: NFT collectibles
    • RGB-22: Digital identity
    • RGB-23: Audit logs
    • RGB-24: Domain names
    • LNPBP-31: Standard contractum lib
    • LNPBP-37: Invoices (rejected)
  • Lightning network protocol
    • LNPBP-46: LN derivations
    • LNPBP-50: Bifrost P2P
    • LNPBP-51: Bifrost channels
    • LNPBP-53: Multipeer channels
    • LNPBP-55: Bifrost HTLCs
Powered by GitBook
On this page
  • Abstract
  • Background
  • Motivation
  • Design
  • Specification
  • Compatibility
  • Rationale
  • Reference implementation
  • Acknowledgements
  • References
  • Copyright
Edit on GitHub
Export as PDF
  1. RGB

RGB-24: Domain names

PreviousRGB-23: Audit logsNextLNPBP-31: Standard contractum lib

Last updated 1 year ago

LNPBP: 0024
Aliases: RGB24
Vertical: Smart contracts
Title: RGB decentralized global name system (RGB-24)
Authors: Dr Maxim Orlovsky <orlovsky@lnp-bp.org>
Comments-URI: <https://github.com/LNP-BP/LNPBPs/discussions>
Status: Draft
Type: Standards Track
Created: 2020-09-10
Updated: 2023-07-24
Finalized: ~
License: GPL-3.0

Abstract

Background

Motivation

Design

Specification

Interface specification is the following Contractum code:

-- Defined by LNPBP-31 standard in `RGBContract.sty` file
import urn:ubideco:stl:6vbr9ZrtsD9aBjo5qRQ36QEZPVucqvRRjKCPqE8yPeJr#choice-little-boxer as RGBContract

import urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ#justice-rocket-type as Std

interface RGB24
    global root :: RGBContract.ContractId?
    global name :: Std.Ident
    global {registry} :: Record

    global created :: RGBContract.Timestamp

    owned registar

    op Register :: registar, {registry ^ 1..0xFFFF} -> registar
                !! noRoot |
                   invalidRoot |
                   incompleteRegistry

data Hostname :: [Std.AlphaNumDash ^ 1..63]
data DomainName :: [Hostname ^ 1..0xFF]

data Record :: host Hostname, entry Entry
data Entry :: a IPv4 | aaaa IPv6 | cname DomainName | sub RGBContract.ContractId

Compatibility

Rationale

Reference implementation

schema BaseRegistry implements RGB24
    op Register :: registar, entries {registry+} -> registar
                !! RegistrationError
        self.root => root -> (
            let parent = (root.contract !! noRoot).registry
            parent.isFullyKnown !! incompleteRoot
            let myself = parent.registry.get self.Name !! unregisteredName
            myself: Resolve.subdomain(contract) =>
                contract =? self.contractId !! selfNotRegistered
        )
        let registry := self.registry.isFullyKnown !! incompleteRegistry
        entries =|> self.registry.has !! repeatedEntry
        -- the above is the same as
        -- entries => entry -> self.registry.has entry !! repeatedEntry

data RegistrationError ::
    noRoot |
    unregisteredName |
    incompleteRoot |
    incompleteRegistry |
    selfNotRegistered

Acknowledgements

References

Copyright

This document is licensed under the GPL-3.0 license.

Abstract
Background
Motivation
Design
Specification
Compatibility
Rationale
Reference implementation
Acknowledgements
References
Copyright