@@ -34,94 +34,3 @@ export interface ITransactionExt {
3434 description ?: string ;
3535 instructions : IInstructionExt [ ] ;
3636}
37-
38- // TODO add required fields for validation
39- export const JSON_SCHEMA = {
40- type : "object" ,
41- properties : {
42- name : { type : "string" } ,
43- description : { type : "string" } ,
44- instructions : {
45- type : "array" ,
46- items : {
47- type : "object" ,
48- properties : {
49- name : { type : "string" } ,
50- description : { type : "string" } ,
51- programId : { type : "string" } ,
52- accounts : {
53- type : "array" ,
54- items : {
55- type : "object" ,
56- properties : {
57- name : { type : "string" } ,
58- description : { type : "string" } ,
59- pubkey : { type : "string" } ,
60- isWritable : { type : "boolean" } ,
61- isSigner : { type : "boolean" } ,
62- } ,
63- } ,
64- } ,
65- data : {
66- type : "object" ,
67- properties : {
68- format : {
69- type : "string" ,
70- enum : [ "raw" , "bufferLayout" , "borsh" ] ,
71- } ,
72- value : {
73- anyOf : [
74- { type : "string" } ,
75- {
76- type : "array" ,
77- items : {
78- type : "object" ,
79- properties : {
80- name : { type : "string" } ,
81- description : { type : "string" } ,
82- type : {
83- type : "string" ,
84- enum : [
85- "string" ,
86- "u8" ,
87- "i8" ,
88- "u16" ,
89- "i16" ,
90- "u32" ,
91- "i32" ,
92- "u64" ,
93- "i64" ,
94- "bool" ,
95- "publicKey" ,
96- ] ,
97- } ,
98- value : { } , // match any
99- } ,
100- } ,
101- } ,
102- ] ,
103- } ,
104- } ,
105- } ,
106- anchorMethod : {
107- type : "string" ,
108- } ,
109- anchorAccounts : {
110- type : "array" ,
111- // TODO code duplication with the above
112- items : {
113- type : "object" ,
114- properties : {
115- name : { type : "string" } ,
116- description : { type : "string" } ,
117- pubkey : { type : "string" } ,
118- isWritable : { type : "boolean" } ,
119- isSigner : { type : "boolean" } ,
120- } ,
121- } ,
122- } ,
123- } ,
124- } ,
125- } ,
126- } ,
127- } ;
0 commit comments