Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions schemas/taip-0/AddAgent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/AddAgent.json",
"title": "AddAgent",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need a RemoveAgent (and maybe UpdateAgent). There was an UpdateAgents message in the original proposal but I'm concerned that it was overwriting the entire agents array (especially now that it contains policies).

@pelle how would we go about ensuring that agents don't overwrite other agents policies? e.g. either using UpdateAgents or RemoveAgent and then AddAgent with new policies set?

"description": "Represents the request of an agent to add an agent",
"type": "object",
"required": [],
"properties": {
"transactionId": {
"description": "An identitifer for the transaction",
"type": "string"
},
"agent": {
"$ref": "https://tap.rspv/schemas/Agent.json"
}
}
}
17 changes: 17 additions & 0 deletions schemas/taip-0/Agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/Agent.json",
"title": "Agent",
"description": "A transaction agent",
"type": "object",
"required": ["@id", "policies"],
"properties": {
"@id": {
"$ref": "https://tap.rspv/schemas/DID.json"
},
"policies": {
"description": "An array of policies",
"type": "array"
}
}
}
12 changes: 12 additions & 0 deletions schemas/taip-0/Caip19.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/Caip19.json",
"title": "CAIP19",
"description": "A CAIP 19 asset representation. See: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md",
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(/[-.%a-zA-Z0-9]{1,78})?$",
"examples": [
"eip155:1/slip44:60",
"bip122:000000000019d6689c085ae165831e93/slip44:0"
]
}
8 changes: 8 additions & 0 deletions schemas/taip-0/DID.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/DID.json",
"title": "DID",
"description": "A decentralized identity",
"type": "string",
"pattern": "^did:[a-zA-Z0-9]*:.*$"
}
66 changes: 66 additions & 0 deletions schemas/taip-0/DepositRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/DepositRequest.json",
"title": "DepositRequest",
"description": "A deposit request",
"type": "object",
"required": [
"transactionId",
"amount",
"asset",
"originators",
"beneficiaries",
"agents",
"settlementInfo"
],
"properties": {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've omitted the originatorVP and beneficaryVP from the proposal here in favor of some of the newer methods for exchanging PII e.g. WACI, Selective Disclosure

"transactionId": {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if perhaps this should also be a nested JSON-LD { "@id": "" } structure.

"description": "An identitifer for the transaction",
"type": "string"
},
"amount": {
"description": "Amount for the transaction",
"type": "string",
"pattern": "[0-9]+"
},
"asset": {
"$ref": "https://tap.rspv/schemas/Caip19.json"
},
"originators": {
"description": "An ordered array of originator DIDs",
"type": "array",
"items": {
"type": "object",
"required": ["@id"],
"properties": {
"@id": {
"$ref": "https://tap.rspv/schemas/DID.json"
}
}
}
},
"beneficiaries": {
"description": "An ordered array of beneficiary DIDs",
"type": "array",
"items": {
"type": "object",
"required": ["@id"],
"properties": {
"@id": {
"$ref": "https://tap.rspv/schemas/DID.json"
}
}
}
},
"agents": {
"description": "An ordered array of participant agents in a transaction",
"type": "array",
"items": {
"$ref": "https://tap.rspv/schemas/Agent.json"
}
},
"settlementInfo": {
"$ref": "https://tap.rspv/schemas/SettlementInfo.json"
}
}
}
18 changes: 18 additions & 0 deletions schemas/taip-0/Resolution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/Resolution.json",
"title": "Resolution",
"description": "A resolution of a transaction by an agent",
"type": "object",
"required": ["did", "resolution"],
"properties": {
"did": {
"$ref": "https://tap.rspv/schemas/DID.json"
},
"resolution": {
"description": "Resolution for the transaction",
"type": "string",
"enum": ["APPROVE", "REJECT", "NON_APPLICABLE"]
}
}
}
21 changes: 21 additions & 0 deletions schemas/taip-0/SettlementInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/SettlementInfo.json",
"title": "Settlement Info",
"description": "Transaction settlement information",
"type": "object",
"properties": {
"originatorAddress": {
"description": "The crypto address of the originator",
"type": "string"
},
"beneficiaryAddress": {
"description": "The crypto address of the beneficiary",
"type": "string"
},
"txHash": {
"description": "The transaction hash",
"type": "string"
}
}
}
17 changes: 17 additions & 0 deletions schemas/taip-0/UpdateResolution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/UpdateResolution.json",
"title": "UpdateResolution",
"description": "Represents the request of an agent to signal the approval or rejection of a transaction",
"type": "object",
"required": ["transactionId", "resolution"],
"properties": {
"transactionId": {
"description": "An identitifer for the transaction",
"type": "string"
},
"resolution": {
"$ref": "https://tap.rspv/schemas/Resolution.json"
}
}
}
17 changes: 17 additions & 0 deletions schemas/taip-0/UpdateSettlementInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tap.rspv/schemas/UpdateResolution.json",
"title": "UpdateResolution",
"description": "Represents the request of an agent to signal the approval or rejection of a transaction",
"type": "object",
"required": ["transactionId", "resolution"],
"properties": {
"transactionId": {
"description": "An identitifer for the transaction",
"type": "string"
},
"settlementInfo": {
"$ref": "https://tap.rspv/schemas/SettlementInfo.json"
}
}
}