Skip to content

Commit 7509f0f

Browse files
committed
chore(domain): adds domain model, based on APIs, and various inputs
1 parent edabbe7 commit 7509f0f

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed

docs/domain/domain-model.gql

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
scalar Hash
2+
scalar MsFromPosixEpoch
3+
scalar Base64Url
4+
scalar Int64
5+
scalar BigInt
6+
scalar Base64UrlTransaction
7+
scalar Object
8+
9+
type Query {
10+
block: Block
11+
}
12+
13+
type Signature {
14+
sig: String
15+
}
16+
17+
type Block {
18+
creationTime: MsFromPosixEpoch
19+
parent: Block
20+
height: BigInt
21+
hash: Hash
22+
chainId: Int
23+
weight: Base64Url
24+
featureFlags: Int
25+
epochStart: MsFromPosixEpoch
26+
adjacents: [Block]
27+
payloadHash: Base64Url # fk BlockPayload
28+
chainwebVersion: ChainwebNetwork
29+
target: Base64Url
30+
nonce: Int64
31+
32+
payload: BlockPayload
33+
}
34+
35+
type BlockPayload {
36+
transactions: [Transaction] # pact realm
37+
minerData: Account
38+
transactionsHash: Base64Url
39+
outputsHash: Base64Url
40+
payloadHash: Base64Url
41+
coinbase: CoinbaseTransaction
42+
}
43+
44+
type CoinbaseTransaction {
45+
gas: Int
46+
result: CoinbaseTransactionResult
47+
reqKey: String
48+
logs: String
49+
events: [EventData]
50+
metaData: undefined
51+
continuation: undefined
52+
txId: number
53+
}
54+
55+
type CoinbaseTransactionResult {
56+
status: String
57+
data: String
58+
}
59+
60+
type Account {
61+
name: String
62+
guard: KeySet
63+
}
64+
65+
type EventData {
66+
67+
}
68+
69+
type Account {
70+
name: String
71+
guard: KeySet
72+
}
73+
74+
type KeySet {
75+
"""
76+
"keys-all" | "keys-any" | "keys-2"
77+
"""
78+
predicate: String
79+
pubKeys: [String]
80+
}
81+
82+
enum KeysetPredicateOptions {
83+
KeysAllPredicate
84+
KeysTwoPredicate
85+
KeysAnyPredicate
86+
}
87+
88+
type Transaction {
89+
command: TransactionCommand
90+
commandResult: TransactionCommandResult
91+
}
92+
93+
# Pact realm
94+
type TransactionCommand {
95+
hash: Hash
96+
cmd: TransactionCommandPayload # json "cmd" haskell "payload"
97+
sigs: [Signature]
98+
}
99+
100+
type TransactionCommandPayload {
101+
payload: TransactionCommandPayloadPayload
102+
nonce: String
103+
meta: TransactionCommandPayloadMeta
104+
signers: [TransactionSigner]
105+
networkId: String # chainweb || kuro
106+
}
107+
108+
type TransactionCommandPayloadMeta {
109+
# chainId: Int
110+
# creationTime: MsFromPosixEpoch
111+
# ttl: Int
112+
# gasLimit: Int
113+
# gasPrice: Int
114+
# sender: String
115+
# signer: String
116+
# nonce: String
117+
}
118+
119+
type TransactionCommandResult {
120+
}
121+
122+
type TransactionSigner {
123+
pubKey: String
124+
capabilities: [TransactionCapability]
125+
}
126+
127+
type TransactionCapability {
128+
name: String
129+
args: [String]
130+
}
131+
132+
union TransactionCommandPayloadPayload =
133+
TransactionCommandExecutionPayload
134+
| TransactionCommandContinuationPayload
135+
136+
type TransactionCommandExecutionPayload {
137+
exec: ExecutionPayload
138+
}
139+
140+
type ExecutionPayload {
141+
data: Object
142+
code: String
143+
}
144+
145+
type TransactionCommandContinuationPayload {
146+
cont: ContinuationPayload
147+
}
148+
149+
type ContinuationPayload {
150+
proof: String
151+
pactId: String
152+
rollback: Boolean # | null
153+
step: Int
154+
data: Object
155+
}
156+
157+
enum ChainwebNetwork {
158+
mainnet01
159+
testnet04
160+
}
161+
162+
type Cut {
163+
height: BigInt
164+
weight: Hash
165+
}

0 commit comments

Comments
 (0)