Skip to content

Commit 0e974c4

Browse files
authored
add templates for caip2 and 10 to /_template/ directory (#143)
2 parents 1a91b0e + 6da5340 commit 0e974c4

File tree

3 files changed

+260
-52
lines changed

3 files changed

+260
-52
lines changed

_template/caip10.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
namespace-identifier: <{name of folder}-caip10>
3+
title: <{namespace common name} [, aka ecosystem name] - Account ID Specification>
4+
author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 <[email protected]>"]>
5+
discussions-to: <URL of PR, mailing list, etc>
6+
status: Draft
7+
type: Informational
8+
created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
9+
requires (*optional): CAIP-2, CAIP-10
10+
---
11+
12+
<!--You can leave these HTML comments in your merged CAIP and delete the
13+
visible duplicate text guides, they will not appear and may be helpful to
14+
refer to if you edit it again. This is the suggested template for new CAIPs.
15+
Note that an CAIP number will be assigned by an editor. When opening a pull
16+
request to submit your EIP, please use an abbreviated title in the
17+
filename, `caipX.md`, all lowercase, no `-` between the CAIP and its
18+
number.-->
19+
20+
# CAIP-10
21+
22+
*For context, see the [CAIP-10][] specification.*
23+
24+
## Introduction
25+
26+
<!--"If you can't explain it simply, you don't understand it well enough."
27+
Provide a simplified and layman-accessible explanation of the identifier system
28+
used in this namespace, i.e., the system for addressing actors and/or accounts.
29+
Caveats or mental model differences from other common ID systems
30+
can be mentioned here upfront, but not implementation details like validation,
31+
confirmation from a live connection.-->
32+
33+
## Specification
34+
35+
### Semantics
36+
37+
<!-- Explain (and refer to/add links in the `## References` section) any inputs
38+
or namespace-specific constructs needed to generate or interpret the valid
39+
possible values of a CAIP-10 in this namespace. Assume your reader has already
40+
read the CAIP-2 profile and understands how to form a valid CAIP-2 segment. -->
41+
42+
### Syntax
43+
44+
<!-- Explain the actual algorithm or transformation needed to transform inputs
45+
(sometimes just a native address, other times additional context is needed) into
46+
a conformant and unique CAIP-10 deterministically. Consider including a regular
47+
expression for validation as well, as some consumers or toolmakers may want to
48+
support this CAIP-10 scheme without a deep understanding of any specifications,
49+
devdocs, or improvement proposals on which this specification depends. If there
50+
are canonicalization guarantees, checksums, or other assumptions in the native
51+
format, explain how they exist (or can be made to exist) in the CAIP-10
52+
equivalent as well. -->
53+
54+
### Resolution Mechanics
55+
56+
<!-- Many blockchain systems allow for transactions, asset-states, etc. to be
57+
validated against the chain they are targeting or depending to to avoid replay
58+
attacks or other unintended outcomes. This is often done by an API or RPC call
59+
to a node to validate the targetted chain or network. Include a sample
60+
request/response and add the relevant documentation to the `## References`
61+
section below if possible, as well as an explanation of any steps needed to
62+
validate the results, calculate checksums, persist session metadata or nonces,
63+
etc. -->
64+
65+
## Rationale
66+
67+
<!-- Explain here how the mapping or translation between native identifiers and
68+
CAIP-10 identifiers was arrived at, history and pre-history, etc.-->
69+
70+
### Backwards Compatibility
71+
72+
<!-- If earlier CAIPs or earlier stages in the governance of the namespace created
73+
legacy addresses that break or extend the specification above, please add a
74+
section for "Legacy" compatibility and an explanation of what contexts and/or
75+
what time-frames would require catching those cases.-->
76+
77+
## Test Cases
78+
79+
<!-- A list of manually-composed and validated examples is the **most important**
80+
section, and by far the most read! be sure to check often that this stays in sync
81+
with any changes or additions in the preceding sections. -->
82+
83+
## Additional Considerations (*OPTIONAL)
84+
85+
<!-- Future topics? Upcoming protocol upgrades that will require new specifications,
86+
in the namespace and/or in the CAIPs? -->
87+
88+
## References
89+
90+
<!-- Links to external resources that help understanding the namespace or the
91+
specification/applied-CAIP better in this context. This can also include links
92+
to existing implementations.
93+
94+
The preferred format, for browser-rendering and long-term maintenance, is a
95+
bulletted list of [Name][] links (rather than classical [Name](referent) links),
96+
followed by ` - ` and a summary or explanation of the content. In a separate
97+
section below, add the name-referent pairs in the `[Name]: https://{referent} `
98+
format-- this will be invisible in any Github-flavored Markdown rendering
99+
(including jekyll/github pages, aka github.io, but also docusaurus and many
100+
dev-docs rendering engines). -->
101+
102+
[CAIP-2 Profile]: ./caip2.md
103+
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2
104+
[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10
105+
106+
## Copyright
107+
108+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

_template/caip2.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
namespace-identifier: <{name of folder}-caip2>
3+
title: <{namespace common name} [, aka ecosystem name] - Blockchain ID Specification>
4+
author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 <[email protected]>"]>
5+
discussions-to: <URL of PR, mailing list, etc>
6+
status: Draft
7+
type: Informational
8+
created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
9+
requires (*optional): CAIP-2
10+
---
11+
12+
<!--You can leave these HTML comments in your merged CAIP and delete the
13+
visible duplicate text guides, they will not appear and may be helpful to
14+
refer to if you edit it again. This is the suggested template for new CAIPs.
15+
Note that an CAIP number will be assigned by an editor. When opening a pull
16+
request to submit your EIP, please use an abbreviated title in the
17+
filename, `caipX.md`, all lowercase, no `-` between the CAIP and its
18+
number.-->
19+
20+
# CAIP-2
21+
22+
*For context, see the [CAIP-2][] specification.*
23+
24+
## Introduction
25+
26+
<!--"If you can't explain it simply, you don't understand it well enough."
27+
Provide a simplified and layman-accessible explanation of the identifier system
28+
used in this namespace, i.e., the system for addressing and disambiguating
29+
individual chains or other stable corpuses of data (shards, regions, lineages,
30+
epochs, etc.). Caveats or mental model differences from other common ID systems
31+
can be mentioned here upfront, but not implementation details like validation,
32+
confirmation from a live connection.-->
33+
34+
## Specification
35+
36+
### Semantics
37+
38+
<!-- Explain (and refer to/add links in the `## References` section) any inputs
39+
or namespace-specific constructs needed to generate or interpret the valid
40+
possible values of a CAIP-2 in this namespace. -->
41+
42+
### Syntax
43+
44+
<!-- Explain the actual algorithm or transformation needed to transform inputs into a
45+
conformant and unique CAIP deterministically. Consider including a regular
46+
expression for validation as well, as some consumers or toolmakers may want to
47+
support this CAIP without a deep understanding of any specifications, devdocs,
48+
or improvement proposals on which this specification depends. If there are
49+
canonicalization guarantees, checksums, or other assumptions in the native format,
50+
explain how they exist (or can be made to exist) in the CAIP-2 equivalent as well. -->
51+
52+
### Resolution Mechanics
53+
54+
<!-- Many blockchain systems allow for transactions, asset-states, etc. to be
55+
validated against the chain they are targeting or depending to to avoid replay
56+
attacks or other unintended outcomes. This is often done by an API or RPC call
57+
to a node to validate the targetted chain or network. Include a sample
58+
request/response and add the relevant documentation to the `## References`
59+
section below if possible, as well as an explanation of any steps needed to
60+
validate the results, calculate checksums, persist session metadata or nonces,
61+
etc. -->
62+
63+
## Rationale
64+
65+
<!-- Explain here how the mapping or translation between native identifiers and
66+
CAIP-2 identifiers was arrived at, history and pre-history, etc.-->
67+
68+
### Backwards Compatibility
69+
70+
<!-- If earlier CAIPs or earlier stages in the governance of the namespace created
71+
legacy identifiers that break or extend the specification above, please add a
72+
section for "Legacy" compatibility and an explanation of what contexts and/or
73+
what time-frames would require catching those cases.-->
74+
75+
## Test Cases
76+
77+
<!-- A list of manually-composed and validated examples is the **most important**
78+
section, and by far the most read! be sure to check often that this stays in sync
79+
with any changes or additions in the preceding sections. -->
80+
81+
## Additional Considerations (*OPTIONAL)
82+
83+
<!-- Future topics? Upcoming protocol upgrades that will require new specifications,
84+
in the namespace and/or in the CAIPs? -->
85+
86+
## References
87+
88+
<!-- Links to external resources that help understanding the namespace or the
89+
specification/applied-CAIP better in this context. This can also include links
90+
to existing implementations.
91+
92+
The preferred format, for browser-rendering and long-term maintenance, is a
93+
bulletted list of [Name][] links (rather than classical [Name](referent) links),
94+
followed by ` - ` and a summary or explanation of the content. In a separate
95+
section below, add the name-referent pairs in the `[Name]: https://{referent} `
96+
format-- this will be invisible in any Github-flavored Markdown rendering
97+
(including jekyll/github pages, aka github.io, but also docusaurus and many
98+
dev-docs rendering engines). -->
99+
100+
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2
101+
102+
## Copyright
103+
104+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

_template/caipX.md

Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,89 +4,80 @@ title: <{namespace common name} [, aka ecosystem name] - {common name for type o
44
author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 <[email protected]>"]>
55
discussions-to: <URL of PR, mailing list, etc>
66
status: Draft
7-
type: <Standard | Meta | Informational>
7+
type: Informational
88
created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
99
requires (*optional): <["CAIP-X", "CAIP-Y"]>
1010
replaces (*optional): <CAIP-Z>
1111
---
1212

13-
<!--You can leave these HTML comments in your merged CAIP and delete the
14-
visible duplicate text guides, they will not appear and may be helpful to
15-
refer to if you edit it again. This is the suggested template for new CAIPs.
16-
Note that an CAIP number will be assigned by an editor. When opening a pull
17-
request to submit your EIP, please use an abbreviated title in the
18-
filename, `caipX.md`, all lowercase, no `-` between the CAIP and its
19-
number.-->
20-
This is the suggested template for new CAIPs.
13+
## Introduction
2114

22-
# CAIP-X
15+
<!--"If you can't explain it simply, you don't understand it well enough."
16+
Provide a simplified and layman-accessible explanation of how CAIP X applies
17+
to the relevant scheme used in this namespace (see other templates for a model).
18+
Caveats or mental model differences from equivalents in other namespaces
19+
can be mentioned here upfront, but not implementation details like validation,
20+
confirmation from a live connection.-->
2321

24-
*For context, see the [CAIP-X][] specification.*
22+
## Specification
2523

26-
<!--"If you can't explain it simply, you don't understand it well enough." Provide a simplified and layman-accessible explanation of the CAIP.-->
27-
As the old saying goes, "If you can't explain it simply, you don't understand it
28-
well enough." Here is where you can provide a simplified and layman-accessible
29-
explanation of what is particular to this namespace or how it differs from EVM
30-
chains, where the CAIPs are easiest to apply/understand, IN THE SPECIFIC CONTEXT
31-
OF THE CAIP YOU ARE APPLYING. Assume the reader has read the /README.md
32-
already.
24+
### Semantics
3325

34-
Note the `[CAIP-X][]` link above; this should be defined below in the `##
35-
References` section with a definition of the type: `[CAIP-X]:
36-
https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-X.md`
26+
<!-- Explain (and refer to/add links in the `## References` section) any inputs
27+
or namespace-specific constructs needed to generate or interpret the valid
28+
possible values of CAIP-X in this namespace. Assume your reader has already
29+
read any other CAIP profiles listed above in the "Requires" frontmatter field. -->
3730

38-
## Rationale
39-
<!--A short (~200 word) description of the technical issue being addressed.-->
40-
A short (~200 word) description of any technical issues being addressed by the
41-
application of this CAIP to this namespace. In particular, call out any
42-
relevant CAIP versioning such as not-yet-ratified changes to the applied CAIP
43-
that are required for what you are specifying here to conform, as the tooling
44-
relied upon by some interpreters may validate according to the CAIP as ratified,
45-
or an earlier CAIP replaced by it, etc.
46-
47-
## Semantics
48-
49-
Explain (and refer to/add links in the `## References` section) any inputs or
50-
namespace-specific constructs needed to generate or interpret this CAIP.
31+
### Syntax
5132

52-
## Syntax
53-
54-
Explain the actual algorithm or transformation needed to transform inputs into a
55-
conformant and unique CAIP deterministically. Consider including a regular
33+
<!-- Explain the actual algorithm or transformation needed to transform "inputs"
34+
from the native development enviroment and context into a conformant and unique
35+
CAIP-X token deterministically. Consider including (if applicable) a regular
5636
expression for validation as well, as some consumers or toolmakers may want to
57-
support this CAIP without a deep understanding of any specifications, devdocs,
58-
or improvement proposals on which this specification depends.
37+
support this CAIP-X scheme without a deep understanding of any specifications,
38+
devdocs, or improvement proposals on which this specification depends. If there
39+
are canonicalization guarantees, checksums, or other assumptions in the native
40+
format or protocol, explain how they exist (or can be made to exist) in the
41+
CAIP-X equivalent as well. -->
5942

6043
### Resolution Mechanics
6144

62-
Many blockchain systems allow for transactions, asset-states, etc. to be
45+
<!-- Many blockchain systems allow for transactions, asset-states, etc. to be
6346
validated against the chain they are targeting or depending to to avoid replay
6447
attacks or other unintended outcomes. This is often done by an API or RPC call
6548
to a node to validate the targetted chain or network. Include a sample
6649
request/response and add the relevant documentation to the `## References`
6750
section below if possible, as well as an explanation of any steps needed to
68-
validate the results, calculate checksums, etc.
51+
validate the results, calculate checksums, persist session metadata or nonces,
52+
etc. -->
53+
54+
## Rationale
55+
56+
<!-- Explain here how the mapping or translation between native identifiers or
57+
messages and CAIP-X identifiers or messages was arrived at, history and
58+
pre-history, etc.-->
6959

7060
### Backwards Compatibility
7161

72-
If earlier CAIPs or earlier stages in the governance of the namespace created
73-
legacy addresses that break or extend the specification above, please add a
62+
<!-- If earlier CAIPs or earlier stages in the governance of the namespace created
63+
legacy identifiers that break or extend the specification above, please add a
7464
section for "Legacy" compatibility and an explanation of what contexts and/or
75-
what time-frames would require catching those cases.
65+
what time-frames would require catching those cases.-->
7666

7767
## Test Cases
7868

79-
A list of manually-composed and validated examples is the most important
80-
section, and the most read!
69+
<!-- A list of manually-composed and validated examples is the **most important**
70+
section, and by far the most read! be sure to check often that this stays in sync
71+
with any changes or additions in the preceding sections. -->
8172

8273
## Additional Considerations (*OPTIONAL)
8374

84-
Future topics? Upcoming protocol upgrades that will require new specifications,
85-
in the namespace and/or in the CAIPs?
75+
<!-- Future topics? Upcoming protocol upgrades that will require new specifications,
76+
in the namespace and/or in the CAIPs? -->
8677

8778
## References
88-
<!--Links to external resources that help understanding the CAIP better. This can e.g. be links to existing implementations.-->
89-
Links to external resources that help understanding the namespace or the
79+
80+
<!-- Links to external resources that help understanding the namespace or the
9081
specification/applied-CAIP better in this context. This can also include links
9182
to existing implementations.
9283
@@ -96,7 +87,12 @@ followed by ` - ` and a summary or explanation of the content. In a separate
9687
section below, add the name-referent pairs in the `[Name]: https://{referent} `
9788
format-- this will be invisible in any Github-flavored Markdown rendering
9889
(including jekyll/github pages, aka github.io, but also docusaurus and many
99-
dev-docs rendering engines).
90+
dev-docs rendering engines). -->
91+
92+
[CAIP-2 Profile]: ./caip2.md
93+
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2
94+
[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10
10095

10196
## Copyright
97+
10298
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)