forked from Sovereign-Labs/sovereign-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sov-bank.json
227 lines (227 loc) · 5.74 KB
/
sov-bank.json
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CallMessage",
"description": "This enumeration represents the available call messages for interacting with the sov-bank module.",
"oneOf": [
{
"description": "Creates a new token with the specified name and initial balance.",
"type": "object",
"required": [
"CreateToken"
],
"properties": {
"CreateToken": {
"type": "object",
"required": [
"authorized_minters",
"initial_balance",
"minter_address",
"salt",
"token_name"
],
"properties": {
"authorized_minters": {
"description": "Authorized minter list.",
"type": "array",
"items": {
"$ref": "#/definitions/Address"
}
},
"initial_balance": {
"description": "The initial balance of the new token.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"minter_address": {
"description": "The address of the account that the new tokens are minted to.",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
},
"salt": {
"description": "Random value use to create a unique token address.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"token_name": {
"description": "The name of the new token.",
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "Transfers a specified amount of tokens to the specified address.",
"type": "object",
"required": [
"Transfer"
],
"properties": {
"Transfer": {
"type": "object",
"required": [
"coins",
"to"
],
"properties": {
"coins": {
"description": "The amount of tokens to transfer.",
"allOf": [
{
"$ref": "#/definitions/Coins"
}
]
},
"to": {
"description": "The address to which the tokens will be transferred.",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
}
}
}
},
"additionalProperties": false
},
{
"description": "Burns a specified amount of tokens.",
"type": "object",
"required": [
"Burn"
],
"properties": {
"Burn": {
"type": "object",
"required": [
"coins"
],
"properties": {
"coins": {
"description": "The amount of tokens to burn.",
"allOf": [
{
"$ref": "#/definitions/Coins"
}
]
}
}
}
},
"additionalProperties": false
},
{
"description": "Mints a specified amount of tokens.",
"type": "object",
"required": [
"Mint"
],
"properties": {
"Mint": {
"type": "object",
"required": [
"coins",
"minter_address"
],
"properties": {
"coins": {
"description": "The amount of tokens to mint.",
"allOf": [
{
"$ref": "#/definitions/Coins"
}
]
},
"minter_address": {
"description": "Address to mint tokens to",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
}
}
}
},
"additionalProperties": false
},
{
"description": "Freezes a token so that the supply is frozen",
"type": "object",
"required": [
"Freeze"
],
"properties": {
"Freeze": {
"type": "object",
"required": [
"token_address"
],
"properties": {
"token_address": {
"description": "Address of the token to be frozen",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
}
}
}
},
"additionalProperties": false
}
],
"definitions": {
"Address": {
"description": "Module address representation",
"type": "object",
"required": [
"addr"
],
"properties": {
"addr": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"maxItems": 32,
"minItems": 32
}
}
},
"Coins": {
"description": "Structure that stores information specifying a given `amount` (type [`Amount`]) of coins stored at a `token_address` (type [`sov_modules_api::Spec::Address`]).",
"type": "object",
"required": [
"amount",
"token_address"
],
"properties": {
"amount": {
"description": "An `amount` of coins stored.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"token_address": {
"description": "The address where the tokens are stored.",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
}
}
}
}
}