Update schema.md
This commit is contained in:
parent
3d93117df8
commit
da905ba9e3
1 changed files with 106 additions and 93 deletions
|
@ -3,7 +3,8 @@
|
|||
## [Claim](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/claim.proto)
|
||||
Claims have the encompassing schema:
|
||||
|
||||
message Claim {
|
||||
```protobuf
|
||||
message Claim {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -18,14 +19,16 @@ Claims have the encompassing schema:
|
|||
optional Stream stream = 3;
|
||||
optional Certificate certificate = 4;
|
||||
optional Signature publisherSignature = 5;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## [Stream](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/stream.proto)
|
||||
Claims of streamType have a `stream`:
|
||||
|
||||
message Stream {
|
||||
```protobuf
|
||||
message Stream {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -33,12 +36,14 @@ Claims of streamType have a `stream`:
|
|||
required Version version = 1;
|
||||
required Metadata metadata = 2;
|
||||
required Source source = 3;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## [Metadata](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/metadata.proto)
|
||||
Streams have `metadata` describing their content:
|
||||
|
||||
message Metadata {
|
||||
```protobuf
|
||||
message Metadata {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -62,12 +67,14 @@ Streams have `metadata` describing their content:
|
|||
optional string thumbnail = 9;
|
||||
optional string preview = 10;
|
||||
optional string licenseUrl = 11;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## [Fee](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/fee.proto)
|
||||
Metadata may include a fee to access the decryption key:
|
||||
|
||||
message Fee {
|
||||
```protobuf
|
||||
message Fee {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -82,12 +89,14 @@ Metadata may include a fee to access the decryption key:
|
|||
required Currency currency = 2;
|
||||
required bytes address = 3;
|
||||
required float amount = 4;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## [Source](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/source.proto)
|
||||
Streams have a `source` to download:
|
||||
|
||||
message Source {
|
||||
```protobuf
|
||||
message Source {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -100,14 +109,15 @@ Streams have a `source` to download:
|
|||
required SourceTypes sourceType = 2;
|
||||
required bytes source = 3;
|
||||
required string contentType = 4;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## [Certificate](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/certificate.proto)
|
||||
Claims of certificateType have a `certificate`:
|
||||
|
||||
message Certificate {
|
||||
```protobuf
|
||||
message Certificate {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -115,12 +125,14 @@ Claims of certificateType have a `certificate`:
|
|||
required Version version = 1;
|
||||
required KeyType keyType = 2;
|
||||
required bytes publicKey = 4;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## [Signature](https://github.com/lbryio/lbryschema/blob/master/lbryschema/proto/signature.proto)
|
||||
Claims may be signed using the private key to a Certificate public key:
|
||||
|
||||
message Signature {
|
||||
```protobuf
|
||||
message Signature {
|
||||
enum Version {
|
||||
UNKNOWN_VERSION = 0;
|
||||
_0_0_1 = 1;
|
||||
|
@ -129,4 +141,5 @@ Claims may be signed using the private key to a Certificate public key:
|
|||
required KeyType signatureType = 2;
|
||||
required bytes signature = 3;
|
||||
required bytes certificateId = 4;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue