-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOUTBOX.ts
More file actions
44 lines (37 loc) · 1.63 KB
/
Copy pathOUTBOX.ts
File metadata and controls
44 lines (37 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
type ArweaveWallet = string // 43 base64url characters
type ArweaveTxId = string // 43 base64url characters
type AoModuleId = ArweaveTxId
type AoProcessId = ArweaveTxId
type AoMessageId = ArweaveTxId
type Tag = { name: string, value: string }
type Assignment = {
Message: AoMessageId | ArweaveTxId // can be any Arweave transaction
Processes: Array<AoProcessId> // preferably valid process ids
}
type Message = {
Anchor: string // MUST be 32 bytes
Target: string | undefined // technically optional
Data: string | undefined // MU will coalesce `undefined` to ' '
Tags: Array<Tag>
// Tags MUST include { name: 'Data-Protocol', value: 'ao' }
// Tags MUST include { name: 'Type' , value: 'Message' }
}
type Spawn = {
Anchor: string // MUST be 32 bytes
Target: string | undefined // probably SHOULD NOT be defined
Data: string | undefined // MAY contain data for the new process to use
Tags: Array<Tag>
// Tags MUST include { name: 'Data-Protocol', value: 'ao' }
// Tags MUST include { name: 'Type' , value: 'Process' }
// Tags MUST include { name: 'Module' , value: AoModuleId }
// Tags MAY include { name: 'Scheduler' , value: ArweaveWallet }
// Tags MAY include { name: 'On-Boot' , value: 'Data' | ArweaveTxId }
}
export type Outbox = {
Assignments: Array<Assignment>
Error: string | undefined
Messages: Array<Message>
Output: any | undefined
Patches: Array<unknown> // this is novel and not well understood
Spawns: Array<Spawn>
}