Coder Social home page Coder Social logo

Comments (8)

hodkov avatar hodkov commented on August 22, 2024 3

Here is the IPFS file format for TCR items (in particular for TCR of TCRs) to the review.

IPFS file format for TCR of TCRs items

File type: JSON.

{
  "address": "0x81e1269708582ae17560b6acc0f45d0416df8d68",
  "name": "My TCR",
  "fields": [],
  "localization": {},
  "customization": {},
}
  • address - TCR contract address, required
  • name - human-readable TCR name,
  • fields - list of TCR item properties’ description (Field),
  • localization - localization config,
  • customization - ui customization config

Field format

{
  "name": "myProp",
  "type": "String",
  "default": "My property",
  "required": true
}
  • name - property name, string;
  • type - property type, one of: String, Number, Boolean, Any or JSON object with Array or Object description (ObjectType or ArrayType format);
  • default - default property value;
  • required - boolean, is property required?

ObjectType format

{
  "fields": []
}
  • fields - list of properties’ description - Field format

ArrayType format

{
  "type": {
    "fields": [
      {
        "name": "myProp",
        "type": "String",
        "default": "My property",
        "required": true
      }
    ]
  }
}
  • type - property type, one of: String, Number, Boolean, Any or JSON object with Array or Object description (ObjectType or ArrayType format);

Localization format

{
  "en": {
    "registryName": "My Super TCR",
    "apply": "Apply",
    "buy": "Buy",
    "candidate": "Candidate",
    "applicant": "Applicant",
    "tokenHolder": "Token holder",
  },
  "de": {
    ...
  },
  ...
}

Object with properties - language codes. Every property contains key-value pairs of localized strings.

Open question: should we store localization config file to IPFS? Or should it be a link to a third-party service? IPFS over IPNS?

Custiomization format

{
  "defaultTextColor": "#000",
  "defaultFont": "Arial",
  "headerColor": "#FFF",
  ...
}

An object with key-value pairs of ui properties.

Open question: should we store UIconfig to IPFS file? Or should it be a link to a third-party service?

from tcr.

Kmoneal avatar Kmoneal commented on August 22, 2024 1

https://github.com/kangarang/tcr-ui/blob/master/docs/IPFS.md#prospect-park-ipfs-conventions

from tcr.

shrugs avatar shrugs commented on August 22, 2024

Making the identifier constant id would be helpful.

What's that multiurl spec that can use used to standardizing strings that include the information "if you support ipfs, here's the ipfs hash, otherwise here's a web url that responds in json" mutli-url? multi-schema? something like that

from tcr.

kangarang avatar kangarang commented on August 22, 2024

@shrugs @skmgoldin i prefer identifier over id only because it likely will not be a number. unless im missing something!

@hodkov thank you for posting those ipfs file formats. it's much larger than the scope of this issue; however this is still really great. i've been learning ipfs recently so it's nice to see it in the context of what i'm currently working on.

from tcr.

kangarang avatar kangarang commented on August 22, 2024

@shrugs i've been looking all over for what you mentioned, but still am not sure about it. was it multiplexing?

from tcr.

kangarang avatar kangarang commented on August 22, 2024

@hodkov, i like the localization config. i dont think we need to store ui config data in ipfs. frontend apps can manage that in their build. the Field part is still a bit hazy to me. could you expand on that please? are fields the transaction arguments?

from tcr.

shrugs avatar shrugs commented on August 22, 2024

@kangarang honestly can't remember the name, it's very infuriating 😢

I'm not partial to id vs identifier, just as long as everything gets a guid of some sort

from tcr.

kangarang avatar kangarang commented on August 22, 2024

i just realized i was way overthinking the implementation, trying to fix problems that weren't even there hahah

from tcr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.