@meantjs/profile 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,6 +150,10 @@
150
150
  "abi": {
151
151
  "$ref": "#/$defs/evm_abi",
152
152
  "description": "An EVM pack (spec section 15, experimental): the functions it applies to. The pack applies to a contract that has each of them, with the same selector, outputs and kind of call."
153
+ },
154
+ "eip712": {
155
+ "$ref": "#/$defs/eip712",
156
+ "description": "An EVM pack's EIP-712 messages (spec section 15.9), beside its binds.abi."
153
157
  }
154
158
  },
155
159
  "oneOf": [
@@ -169,7 +173,12 @@
169
173
  "abi": true
170
174
  }
171
175
  }
172
- ]
176
+ ],
177
+ "dependentRequired": {
178
+ "eip712": [
179
+ "abi"
180
+ ]
181
+ }
173
182
  },
174
183
  "canister_binds": {
175
184
  "type": "object",
@@ -194,10 +203,7 @@
194
203
  },
195
204
  "contract_binds": {
196
205
  "type": "object",
197
- "description": "An EVM contract (spec section 15, experimental): its ABI, and where it is deployed.",
198
- "required": [
199
- "abi"
200
- ],
206
+ "description": "An EVM contract (spec section 15, experimental): its ABI, the EIP-712 messages it verifies (section 15.9), and where it is deployed.",
201
207
  "additionalProperties": false,
202
208
  "properties": {
203
209
  "abi": {
@@ -225,8 +231,29 @@
225
231
  }
226
232
  }
227
233
  }
234
+ },
235
+ "eip712": {
236
+ "$ref": "#/$defs/eip712"
228
237
  }
229
- }
238
+ },
239
+ "anyOf": [
240
+ {
241
+ "required": [
242
+ "abi"
243
+ ],
244
+ "properties": {
245
+ "abi": true
246
+ }
247
+ },
248
+ {
249
+ "required": [
250
+ "eip712"
251
+ ],
252
+ "properties": {
253
+ "eip712": true
254
+ }
255
+ }
256
+ ]
230
257
  },
231
258
  "evm_abi": {
232
259
  "type": "array",
@@ -259,6 +286,61 @@
259
286
  ]
260
287
  }
261
288
  },
289
+ "eip712": {
290
+ "type": "object",
291
+ "description": "EIP-712 typed messages (spec section 15.9, experimental): the struct types, in the JSON shape of an eth_signTypedData request without EIP712Domain, and the domain's name and version. A type whose name the profile tags with intent is a message; chainId and verifyingContract come from binds.deployments.",
292
+ "required": [
293
+ "types"
294
+ ],
295
+ "additionalProperties": false,
296
+ "properties": {
297
+ "domain": {
298
+ "type": "object",
299
+ "minProperties": 1,
300
+ "additionalProperties": false,
301
+ "description": "Each value must equal the request's domain value of the same name (ERC-7730 context.eip712.domain).",
302
+ "properties": {
303
+ "name": {
304
+ "type": "string",
305
+ "minLength": 1
306
+ },
307
+ "version": {
308
+ "type": "string",
309
+ "minLength": 1
310
+ }
311
+ }
312
+ },
313
+ "types": {
314
+ "type": "object",
315
+ "minProperties": 1,
316
+ "propertyNames": {
317
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
318
+ },
319
+ "additionalProperties": {
320
+ "type": "array",
321
+ "minItems": 1,
322
+ "items": {
323
+ "type": "object",
324
+ "required": [
325
+ "name",
326
+ "type"
327
+ ],
328
+ "additionalProperties": false,
329
+ "properties": {
330
+ "name": {
331
+ "type": "string",
332
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
333
+ },
334
+ "type": {
335
+ "type": "string",
336
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\[([1-9][0-9]*)?\\])*$"
337
+ }
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ },
262
344
  "value_address": {
263
345
  "type": "string",
264
346
  "description": "METHOD(i)path | METHOD->(i)path | type:DECL path. Paths: .label, .#id, [] (vec element). opt is transparent.",
@@ -746,9 +828,6 @@
746
828
  },
747
829
  "args_amount": {
748
830
  "type": "object",
749
- "required": [
750
- "decimals"
751
- ],
752
831
  "additionalProperties": false,
753
832
  "properties": {
754
833
  "decimals": {
@@ -775,6 +854,10 @@
775
854
  }
776
855
  ]
777
856
  },
857
+ "token": {
858
+ "$ref": "#/$defs/relpath",
859
+ "description": "An EVM amount in a token another field names (spec section 15.9): the relative path to that address, in the same array element as the amount. Its decimals and symbol are the token's, which the consumer supplies; decimals and symbol are then left out."
860
+ },
778
861
  "threshold": {
779
862
  "type": "string",
780
863
  "pattern": "^(0|[1-9][0-9]{0,77})$",
@@ -791,6 +874,32 @@
791
874
  "message": [
792
875
  "threshold"
793
876
  ]
877
+ },
878
+ "anyOf": [
879
+ {
880
+ "required": [
881
+ "decimals"
882
+ ],
883
+ "properties": {
884
+ "decimals": true
885
+ }
886
+ },
887
+ {
888
+ "required": [
889
+ "token"
890
+ ],
891
+ "properties": {
892
+ "token": true
893
+ }
894
+ }
895
+ ],
896
+ "dependentSchemas": {
897
+ "token": {
898
+ "properties": {
899
+ "decimals": false,
900
+ "symbol": false
901
+ }
902
+ }
794
903
  }
795
904
  },
796
905
  "args_timestamp": {
@@ -805,7 +914,40 @@
805
914
  },
806
915
  "epoch": {
807
916
  "const": "unix"
917
+ },
918
+ "threshold": {
919
+ "type": "string",
920
+ "pattern": "^(0|[1-9][0-9]{0,77})$",
921
+ "description": "Display only: a value at or above this (in the tagged unit, a decimal string) displays as `message`, for example \"Never\" for a deadline of uint256 max (spec section 15.9)."
922
+ },
923
+ "message": {
924
+ "type": "string",
925
+ "minLength": 1,
926
+ "maxLength": 32,
927
+ "description": "What a value at or above `threshold` displays as."
928
+ },
929
+ "labels": {
930
+ "type": "object",
931
+ "minProperties": 1,
932
+ "maxProperties": 16,
933
+ "propertyNames": {
934
+ "pattern": "^(0|[1-9][0-9]{0,77})$"
935
+ },
936
+ "additionalProperties": {
937
+ "type": "string",
938
+ "minLength": 1,
939
+ "maxLength": 32
940
+ },
941
+ "description": "Display only: words for exact values (in the tagged unit), for example { \"0\": \"Only in the block it is used\" } (spec section 15.9)."
808
942
  }
943
+ },
944
+ "dependentRequired": {
945
+ "message": [
946
+ "threshold"
947
+ ],
948
+ "threshold": [
949
+ "message"
950
+ ]
809
951
  }
810
952
  },
811
953
  "args_duration": {
@@ -998,9 +1140,62 @@
998
1140
  },
999
1141
  "replicated": {
1000
1142
  "type": "boolean"
1143
+ },
1144
+ "grant": {
1145
+ "$ref": "#/$defs/grant",
1146
+ "description": "What a transfer or approve lets someone take (spec section 5.3, D-056), for a check against terms the user confirmed."
1001
1147
  }
1002
1148
  }
1003
1149
  },
1150
+ "grant": {
1151
+ "type": "object",
1152
+ "description": "Who may take the tokens, how many and until when, as relative paths into the method's arguments (spec section 5.3, D-056). Exactly one of spender and to.",
1153
+ "required": [
1154
+ "amount"
1155
+ ],
1156
+ "additionalProperties": false,
1157
+ "properties": {
1158
+ "spender": {
1159
+ "$ref": "#/$defs/relpath",
1160
+ "description": "Who may take the tokens through an allowance, or with a signature someone else submits: an address, or a position with an account tag."
1161
+ },
1162
+ "to": {
1163
+ "$ref": "#/$defs/relpath",
1164
+ "description": "Who a transfer pays directly: an address, or a position with an account tag."
1165
+ },
1166
+ "amount": {
1167
+ "$ref": "#/$defs/relpath",
1168
+ "description": "A position with an amount tag, whose threshold means unlimited; or a bool, where true is unlimited and false grants nothing."
1169
+ },
1170
+ "ends": {
1171
+ "type": "array",
1172
+ "minItems": 1,
1173
+ "maxItems": 8,
1174
+ "items": {
1175
+ "$ref": "#/$defs/relpath"
1176
+ },
1177
+ "description": "Positions with a timestamp tag; the grant ends at the latest of them, and one at its threshold or left out means never. Without ends, an approve never ends and a transfer ends when it is done."
1178
+ }
1179
+ },
1180
+ "oneOf": [
1181
+ {
1182
+ "required": [
1183
+ "spender"
1184
+ ],
1185
+ "properties": {
1186
+ "spender": true
1187
+ }
1188
+ },
1189
+ {
1190
+ "required": [
1191
+ "to"
1192
+ ],
1193
+ "properties": {
1194
+ "to": true
1195
+ }
1196
+ }
1197
+ ]
1198
+ },
1004
1199
  "args_idempotency": {
1005
1200
  "type": "object",
1006
1201
  "required": [