Skip to content

Commit

Permalink
chore(dreps): update
Browse files Browse the repository at this point in the history
  • Loading branch information
1000101 committed Dec 8, 2023
1 parent 6d306d3 commit 0ad74fe
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 151 deletions.
85 changes: 38 additions & 47 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7590,56 +7590,28 @@
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Id"
},
"hash": {
"type": "string",
"description": "The raw bytes of the DRep."
},
"address": {
"drep_id": {
"type": "string",
"description": "The Bech32 encoding of the DRep hash."
},
"has_script": {
"type": "boolean",
"description": "Flag which shows if this DRep credentials are a script hash"
"description": "The Bech32 encoded DRep address"
},
"is_registered": {
"type": "boolean",
"description": "Flags which shows if the drep is registered or not"
},
"voting_power": {
"hex": {
"type": "string",
"description": "The total amount of voting power this DRep is delegated."
"description": "The raw bytes of the DRep"
}
},
"required": [
"id",
"hash",
"address",
"has_script",
"is_registered",
"voting_power"
"drep_id",
"hex"
]
},
"example": [
{
"id": "2",
"hash": "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b",
"address": "4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443",
"has_script": true,
"is_registered": true,
"voting_power": "100000000"
"drep_id": "drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn",
"hex": "db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23"
},
{
"id": "3",
"hash": "3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b",
"view": "2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v",
"has_script": false,
"is_registered": false,
"voting_power": "250000000"
"drep_id": "drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4",
"hex": "c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758"
}
]
},
Expand All @@ -7648,28 +7620,42 @@
"items": {
"type": "object",
"properties": {
"drep_id": {
"type": "string",
"description": "Bech32 encoded DRep address"
},
"hex": {
"type": "string",
"description": "The raw bytes of the DRep"
},
"amount": {
"type": "string",
"description": "The total amount of voting power this DRep is delegated."
},
"epoch": {
"type": "integer",
"description": "The epoch no this distribution is about."
"is_registered": {
"type": "boolean",
"description": "Flags which shows if the drep is registered or not"
},
"has_script": {
"type": "boolean",
"description": "Flag which shows if this DRep credentials are a script hash"
}
},
"required": [
"drep_id",
"hex",
"amount",
"epoch"
"is_registered",
"has_script"
]
},
"example": [
{
"drep_id": "drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc",
"hex": "a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d",
"amount": "2000000",
"epoch": 432
},
{
"amount": "300000000",
"epoch": 433
"is_registered": true,
"has_script": true
}
]
},
Expand All @@ -7685,6 +7671,11 @@
"epoch": {
"type": "integer",
"description": "The epoch no this distribution is about."
},
"active_until": {
"nullable": true,
"type": "integer",
"description": "The epoch no until this distribution is active."
}
},
"required": [
Expand Down
77 changes: 35 additions & 42 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5569,63 +5569,52 @@ components:
items:
type: object
properties:
id:
type: integer
description: Id
hash:
type: string
description: The raw bytes of the DRep.
address:
drep_id:
type: string
description: The Bech32 encoding of the DRep hash.
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
is_registered:
type: boolean
description: Flags which shows if the drep is registered or not
voting_power:
description: The Bech32 encoded DRep address
hex:
type: string
description: The total amount of voting power this DRep is delegated.
description: The raw bytes of the DRep
required:
- id
- hash
- address
- has_script
- is_registered
- voting_power
- drep_id
- hex
example:
- id: '2'
hash: 8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b
address: 4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443
has_script: true
is_registered: true
voting_power: '100000000'
- id: '3'
hash: 3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b
view: 2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v
has_script: false
is_registered: false
voting_power: '250000000'
- drep_id: drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn
hex: db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23
- drep_id: drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4
hex: c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758
drep_details_content:
type: array
items:
type: object
properties:
drep_id:
type: string
description: Bech32 encoded DRep address
hex:
type: string
description: The raw bytes of the DRep
amount:
type: string
description: The total amount of voting power this DRep is delegated.
epoch:
type: integer
description: The epoch no this distribution is about.
is_registered:
type: boolean
description: Flags which shows if the drep is registered or not
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
required:
- drep_id
- hex
- amount
- epoch
- is_registered
- has_script
example:
- amount: '2000000'
epoch: 432
- amount: '300000000'
epoch: 433
- drep_id: drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc
hex: a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d
amount: '2000000'
is_registered: true
has_script: true
drep_distribution_content:
type: array
items:
Expand All @@ -5637,6 +5626,10 @@ components:
epoch:
type: integer
description: The epoch no this distribution is about.
active_until:
nullable: true
type: integer
description: The epoch no until this distribution is active.
required:
- amount
- epoch
Expand Down
44 changes: 10 additions & 34 deletions src/schemas/governance/drep_content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,17 @@ type: array
items:
type: object
properties:
id:
type: integer
description: Id
hash:
drep_id:
type: string
description: The raw bytes of the DRep.
address:
description: The Bech32 encoded DRep address
hex:
type: string
description: The Bech32 encoding of the DRep hash.
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash
is_registered:
type: boolean
description: Flags which shows if the drep is registered or not
voting_power:
type: string
description: The total amount of voting power this DRep is delegated.
description: The raw bytes of the DRep
required:
- id
- hash
- address
- has_script
- is_registered
- voting_power
- drep_id
- hex
example:
- id: "2"
hash: "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b"
address: "4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c87443"
has_script: true
is_registered: true
voting_power: "100000000"
- id: "3"
hash: "3788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b"
view: "2ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744v"
has_script: false
is_registered: false
voting_power: "250000000"
- drep_id: "drep1mvdu8slennngja7w4un6knwezufra70887zuxpprd64jxfveahn"
hex: "db1bc3c3f99ce68977ceaf27ab4dd917123ef9e73f85c304236eab23"
- drep_id: "drep1cxayn4fgy27yaucvhamsvqj3v6835mh3tjjx6x8hdnr4"
hex: "c1ba49d52822bc4ef30cbf77060251668f1a6ef15ca46d18f76cc758"
20 changes: 20 additions & 0 deletions src/schemas/governance/drep_delegators.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type: array
items:
type: object
properties:
address:
type: string
description: Bech32 encoded stake addresses
amount:
type: string
description: Currently delegated amount
required:
- address
- amount
example:
- address: "stake1ux4vspfvwuus9uwyp5p3f0ky7a30jq5j80jxse0fr7pa56sgn8kha"
amount: "1137959159981411"
- address: "stake1uylayej7esmarzd4mk4aru37zh9yz0luj3g9fsvgpfaxulq564r5u"
amount: "16958865648"
- address: "stake1u8lr2pnrgf8f7vrs9lt79hc3sxm8s2w4rwvgpncks3axx6q93d4ck"
amount: "18605647"
30 changes: 22 additions & 8 deletions src/schemas/governance/drep_details_content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@ type: array
items:
type: object
properties:
drep_id:
type: string
description: Bech32 encoded DRep address
hex:
type: string
description: The raw bytes of the DRep
amount:
type: string
description: The total amount of voting power this DRep is delegated.
epoch:
type: integer
description: The epoch no this distribution is about.
is_registered:
type: boolean
description: Flags which shows if the drep is registered or not
has_script:
type: boolean
description: Flag which shows if this DRep credentials are a script hash

required:
- drep_id
- hex
- amount
- epoch
- is_registered
- has_script
example:
- amount: "2000000"
epoch: 432
- amount: "300000000"
epoch: 433
- drep_id: drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc
hex: a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d
amount: "2000000"
is_registered: true
has_script: true
4 changes: 4 additions & 0 deletions src/schemas/governance/drep_distribution_content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ items:
epoch:
type: integer
description: The epoch no this distribution is about.
active_until:
nullable: true
type: integer
description: The epoch no until this distribution is active.
required:
- amount
- epoch
Expand Down
31 changes: 31 additions & 0 deletions src/schemas/governance/drep_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
type: array
items:
type: object
properties:
drep_id:
type: string
description: Bech32 encoded addresses
hex:
type: string
description: The raw bytes of the DRep
url:
type: string
nullable: true
example: "https://stakenuts.com/drep.json"
description: URL to the drep metadata
hash:
type: string
nullable: true
example: 69c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c"
description: Hash of the metadata file

required:
- drep_id
- hex
- url
- hash
example:
- drep_id: drep15cfxz9exyn5rx0807zvxfrvslrjqfchrd4d47kv9e0f46uedqtc
hex: a61261172624e8333ceff098648d90f8e404e2e36d5b5f5985cbd35d
url: "https://stakenuts.com/drep.json"
hash: 69c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
Loading

0 comments on commit 0ad74fe

Please sign in to comment.