-
Notifications
You must be signed in to change notification settings - Fork 4
/
wallet.mschema.js
89 lines (88 loc) · 1.72 KB
/
wallet.mschema.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
var currency = {
"type": {
"type": "string",
"required": true
},
"amount": {
"type": "string",
"required": true
}
};
module['exports'] = {
"description": "provides a digital wallet API",
"type": "wallet",
"properties": {
"owner": "string",
"status": {
"type": "string",
"enum": ['new', 'active', 'disabled', 'locked'],
"default": "new"
},
"receivingAddresses": {
"type": "object",
"properties": {
"publicKey": {
"type": "string",
"required": true,
"minLength": 5
}
}
},
"currencies": {
"type": "object",
"properties": currency
}
},
"methods": {
"deposit": {
"input": {
"id": {
"type": "any",
"required": true
},
"currency": currency.type,
"amount": currency.amount
},
"output": {
"status": "function"
}
},
"withdraw": {
"input": {
"id": {
"type": "any",
"required": true
},
"currency": currency.type,
"amount": currency.amount
},
"output": "function"
},
"lock": {
"description": "locks wallet from any further withdrawls",
"input": "function",
"output": "function"
},
"unlock": {
"description": "unlocks wallet allowing withdrawls",
"input": "function",
"output": "function"
},
"generateAddress": {
"input": {
"id": {
"type": "any",
"required": true
},
"owner": {
"type": "string",
"required": true
},
"type": {
"type": "string",
"required": true
}
}
}
}
};