mirror of
https://github.com/planetmint/planetmint.git
synced 2025-06-07 06:36:38 +00:00
updated asset definition on v3.0 transaction types
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
d224877a97
commit
167d970511
@ -0,0 +1,51 @@
|
|||||||
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
# Planetmint and IPDB software contributors.
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
||||||
|
type: object
|
||||||
|
title: Chain Migration Election Schema - Propose a halt in block production to allow for a version change
|
||||||
|
required:
|
||||||
|
- operation
|
||||||
|
- assets
|
||||||
|
- outputs
|
||||||
|
properties:
|
||||||
|
operation:
|
||||||
|
type: string
|
||||||
|
value: "CHAIN_MIGRATION_ELECTION"
|
||||||
|
assets:
|
||||||
|
type: array
|
||||||
|
minItems: 1
|
||||||
|
maxItems: 1
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/asset"
|
||||||
|
outputs:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/output"
|
||||||
|
definitions:
|
||||||
|
asset:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
seed:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
output:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
condition:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- uri
|
||||||
|
properties:
|
||||||
|
uri:
|
||||||
|
type: string
|
||||||
|
pattern: "^ni:///sha-256;([a-zA-Z0-9_-]{0,86})[?]\
|
||||||
|
(fpt=ed25519-sha-256(&)?|cost=[0-9]+(&)?|\
|
||||||
|
subtypes=ed25519-sha-256(&)?){2,3}$"
|
@ -0,0 +1,42 @@
|
|||||||
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
# Planetmint and IPDB software contributors.
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
||||||
|
type: object
|
||||||
|
title: Transaction Schema - CREATE specific constraints
|
||||||
|
required:
|
||||||
|
- assets
|
||||||
|
- inputs
|
||||||
|
properties:
|
||||||
|
assets:
|
||||||
|
type: array
|
||||||
|
minItems: 1
|
||||||
|
maxItems: 1
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/asset"
|
||||||
|
inputs:
|
||||||
|
type: array
|
||||||
|
title: "Transaction inputs"
|
||||||
|
maxItems: 1
|
||||||
|
minItems: 1
|
||||||
|
items:
|
||||||
|
type: "object"
|
||||||
|
required:
|
||||||
|
- fulfills
|
||||||
|
properties:
|
||||||
|
fulfills:
|
||||||
|
type: "null"
|
||||||
|
definitions:
|
||||||
|
asset:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
anyOf:
|
||||||
|
- type: object
|
||||||
|
additionalProperties: true
|
||||||
|
- type: 'null'
|
||||||
|
required:
|
||||||
|
- data
|
@ -0,0 +1,39 @@
|
|||||||
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
# Planetmint and IPDB software contributors.
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
||||||
|
type: object
|
||||||
|
title: Transaction Schema - TRANSFER specific properties
|
||||||
|
required:
|
||||||
|
- assets
|
||||||
|
properties:
|
||||||
|
assets:
|
||||||
|
type: array
|
||||||
|
minItems: 1
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/asset"
|
||||||
|
inputs:
|
||||||
|
type: array
|
||||||
|
title: "Transaction inputs"
|
||||||
|
minItems: 1
|
||||||
|
items:
|
||||||
|
type: "object"
|
||||||
|
required:
|
||||||
|
- fulfills
|
||||||
|
properties:
|
||||||
|
fulfills:
|
||||||
|
type: "object"
|
||||||
|
definitions:
|
||||||
|
sha3_hexdigest:
|
||||||
|
pattern: "[0-9a-f]{64}"
|
||||||
|
type: string
|
||||||
|
asset:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
"$ref": "#/definitions/sha3_hexdigest"
|
||||||
|
required:
|
||||||
|
- id
|
@ -0,0 +1,74 @@
|
|||||||
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
# Planetmint and IPDB software contributors.
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
||||||
|
type: object
|
||||||
|
title: Validator Election Schema - Propose a change to validator set
|
||||||
|
required:
|
||||||
|
- operation
|
||||||
|
- assets
|
||||||
|
- outputs
|
||||||
|
properties:
|
||||||
|
operation:
|
||||||
|
type: string
|
||||||
|
value: "VALIDATOR_ELECTION"
|
||||||
|
assets:
|
||||||
|
type: array
|
||||||
|
minItems: 1
|
||||||
|
maxItems: 1
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/asset"
|
||||||
|
outputs:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/output"
|
||||||
|
definitions:
|
||||||
|
output:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
condition:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- uri
|
||||||
|
properties:
|
||||||
|
uri:
|
||||||
|
type: string
|
||||||
|
pattern: "^ni:///sha-256;([a-zA-Z0-9_-]{0,86})[?]\
|
||||||
|
(fpt=ed25519-sha-256(&)?|cost=[0-9]+(&)?|\
|
||||||
|
subtypes=ed25519-sha-256(&)?){2,3}$"
|
||||||
|
asset:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
node_id:
|
||||||
|
type: string
|
||||||
|
seed:
|
||||||
|
type: string
|
||||||
|
public_key:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- value
|
||||||
|
- type
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- ed25519-base16
|
||||||
|
- ed25519-base32
|
||||||
|
- ed25519-base64
|
||||||
|
power:
|
||||||
|
"$ref": "#/definitions/positiveInteger"
|
||||||
|
required:
|
||||||
|
- node_id
|
||||||
|
- public_key
|
||||||
|
- power
|
||||||
|
required:
|
||||||
|
- data
|
@ -0,0 +1,34 @@
|
|||||||
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
|
# Planetmint and IPDB software contributors.
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
||||||
|
type: object
|
||||||
|
title: Vote Schema - Vote on an election
|
||||||
|
required:
|
||||||
|
- operation
|
||||||
|
- outputs
|
||||||
|
properties:
|
||||||
|
operation:
|
||||||
|
type: string
|
||||||
|
value: "VOTE"
|
||||||
|
outputs:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
"$ref": "#/definitions/output"
|
||||||
|
definitions:
|
||||||
|
output:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
condition:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- uri
|
||||||
|
properties:
|
||||||
|
uri:
|
||||||
|
type: string
|
||||||
|
pattern: "^ni:///sha-256;([a-zA-Z0-9_-]{0,86})[?]\
|
||||||
|
(fpt=ed25519-sha-256(&)?|cost=[0-9]+(&)?|\
|
||||||
|
subtypes=ed25519-sha-256(&)?){2,3}$"
|
Loading…
x
Reference in New Issue
Block a user