Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIP: Add README(db) to each address #4159

Closed
bingryan opened this issue Dec 31, 2024 · 0 comments
Closed

OIP: Add README(db) to each address #4159

bingryan opened this issue Dec 31, 2024 · 0 comments

Comments

@bingryan
Copy link
Contributor

Abstract

Add README(db) to each address

Motivation

Ord can mint various formats of inscriptions for an address but there is no way to give an address a state to enable others to call or view it . For example -> request:https://ordinals.com/address/<address>/readme to get the readme information for that address.

Description

Assuming that each address has a readme markdown document. A markdown document contains metadata and content :

---
date: 2025-01-01
tags: [markdown, metadata]
categories: [readme, ord]
author: bingryan
extends: 
  - address1/readme
  - address2/readme
eth:
  - address: address1
    token: [readme, ord]
  - address: address2
    token: [readme, ord]
public_key_rsa: |
  -----BEGIN PUBLIC KEY-----
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy8Db69rQ9xWJz743
  hPJV8Yl6OD/7iy+a/h+P8p1X+g9p7/0q+n+3f+78/f+g/p/x/y/z/w/v/u/
  t/s/r/q/p/o/n/m/l/k/j/i/h/g/f/e/d/c/b/a/9876543210zyxwvuts
  rqponmlkjihgfedcba`
  -----END PUBLIC KEY-----
public_key_gpg: xxx
description: This post demonstrates how to include metadata in Markdown files using YAML front matter.
keywords: markdown, metadata, YAML
---

# Content

here is content 

Benefits

  • Enhanced proof of identity and ownership: By the public key in the "readme", the address can be more clearly associated with a specific identity. This helps prove the ownership of a certain address, especially in scenarios involving disputes or the need to verify identity

  • Improve user experience : The display data in the "readme" can be used to provide additional information about an address, such as its purpose (e.g., donation address, exchange hot wallet), the name of the owner or organization, or even a link to relevant websites or social media profiles. This can make Bitcoin transactions more context-rich and improve the user experience.

  • Promote decentralized applications (DApps) : Attaching about 4m readme data to addresses can provide useful information for DApps built on Bitcoin. For example, it can be used to store state information or links to other protocols.

  • The ability to Onchain Game : Provides design possibilities

Implementation

add README tag.

#[derive(Copy, Clone)]
#[repr(u8)]
pub(crate) enum Tag {
  // add 
  README = 0,
}

add tag field for Envelope to record Tag

pub struct Envelope<T> {
  pub input: u32,
  pub offset: u32,
  pub payload: T,
  pub pushnum: bool,
  pub stutter: bool,
  // add tag field
  pub tag: Tag
}
// go through all inscriptions in this input
while let Some(inscription) = envelopes.peek() {
  // add case match by tag and insert/update redb 
}
# db info : (address -> readme rawData pointer)

define_multimap_table! { ADDRESS_TO_SEQUENCE_NUMBER, &ByteAddressValue, u32 }

command cli

ord wallet push --fee-rate 16 --file README.md

Discussion

I'm just using README as an example, or it could be "json: https://ordinals.com/address/address1/json", or "db: https://ordinals.com/address/address2/db"

Let's talk about this :)

@bingryan bingryan closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant