Skip to content

Commit f58f153

Browse files
feat(contract): migrate from contract-intergration to new contract SDK
1 parent 877b383 commit f58f153

21 files changed

+6326
-0
lines changed

src/contract/README.md

Lines changed: 680 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
{
2+
"address": "BiE9vSdz9MidUiyjVYsu3PG4C1fbPZ8CVPADA9jRfXw7",
3+
"metadata": {
4+
"name": "default_policy",
5+
"version": "0.1.0",
6+
"spec": "0.1.0",
7+
"description": "Created with Anchor"
8+
},
9+
"instructions": [
10+
{
11+
"name": "check_policy",
12+
"discriminator": [
13+
28,
14+
88,
15+
170,
16+
179,
17+
239,
18+
136,
19+
25,
20+
35
21+
],
22+
"accounts": [
23+
{
24+
"name": "policy_signer",
25+
"signer": true
26+
},
27+
{
28+
"name": "smart_wallet"
29+
}
30+
],
31+
"args": [
32+
{
33+
"name": "wallet_id",
34+
"type": "u64"
35+
},
36+
{
37+
"name": "passkey_public_key",
38+
"type": {
39+
"array": [
40+
"u8",
41+
33
42+
]
43+
}
44+
},
45+
{
46+
"name": "credential_hash",
47+
"type": {
48+
"array": [
49+
"u8",
50+
32
51+
]
52+
}
53+
},
54+
{
55+
"name": "policy_data",
56+
"type": "bytes"
57+
}
58+
]
59+
},
60+
{
61+
"name": "init_policy",
62+
"discriminator": [
63+
45,
64+
234,
65+
110,
66+
100,
67+
209,
68+
146,
69+
191,
70+
86
71+
],
72+
"accounts": [
73+
{
74+
"name": "policy_signer",
75+
"signer": true
76+
},
77+
{
78+
"name": "smart_wallet",
79+
"writable": true
80+
},
81+
{
82+
"name": "wallet_state",
83+
"writable": true
84+
}
85+
],
86+
"args": [
87+
{
88+
"name": "wallet_id",
89+
"type": "u64"
90+
},
91+
{
92+
"name": "passkey_public_key",
93+
"type": {
94+
"array": [
95+
"u8",
96+
33
97+
]
98+
}
99+
},
100+
{
101+
"name": "credential_hash",
102+
"type": {
103+
"array": [
104+
"u8",
105+
32
106+
]
107+
}
108+
}
109+
],
110+
"returns": {
111+
"defined": {
112+
"name": "PolicyStruct"
113+
}
114+
}
115+
}
116+
],
117+
"errors": [
118+
{
119+
"code": 6000,
120+
"name": "InvalidPasskey",
121+
"msg": "Invalid passkey format"
122+
},
123+
{
124+
"code": 6001,
125+
"name": "Unauthorized",
126+
"msg": "Unauthorized to access smart wallet"
127+
}
128+
],
129+
"types": [
130+
{
131+
"name": "DeviceSlot",
132+
"type": {
133+
"kind": "struct",
134+
"fields": [
135+
{
136+
"name": "passkey_pubkey",
137+
"type": {
138+
"array": [
139+
"u8",
140+
33
141+
]
142+
}
143+
},
144+
{
145+
"name": "credential_hash",
146+
"type": {
147+
"array": [
148+
"u8",
149+
32
150+
]
151+
}
152+
}
153+
]
154+
}
155+
},
156+
{
157+
"name": "PolicyStruct",
158+
"type": {
159+
"kind": "struct",
160+
"fields": [
161+
{
162+
"name": "bump",
163+
"type": "u8"
164+
},
165+
{
166+
"name": "smart_wallet",
167+
"type": "pubkey"
168+
},
169+
{
170+
"name": "device_slots",
171+
"type": {
172+
"vec": {
173+
"defined": {
174+
"name": "DeviceSlot"
175+
}
176+
}
177+
}
178+
}
179+
]
180+
}
181+
}
182+
]
183+
}

0 commit comments

Comments
 (0)