@star-factory/sdk-vault 2.0.1 → 2.0.3
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.
- package/dist/core/idl/vault.json +182 -6
- package/dist/idl/vault.json +182 -6
- package/package.json +1 -1
package/dist/core/idl/vault.json
CHANGED
|
@@ -7,6 +7,161 @@
|
|
|
7
7
|
"description": "Created with Anchor"
|
|
8
8
|
},
|
|
9
9
|
"instructions": [
|
|
10
|
+
{
|
|
11
|
+
"name": "accept_and_calculate",
|
|
12
|
+
"docs": [
|
|
13
|
+
"Combined TGE accept + calculate allocations in one instruction.",
|
|
14
|
+
"Optimization for Launchpad flow: routes funds AND computes tier allocations atomically.",
|
|
15
|
+
"Requires: vault.status == TgeRequested, target_raise_amount > 0"
|
|
16
|
+
],
|
|
17
|
+
"discriminator": [
|
|
18
|
+
186,
|
|
19
|
+
89,
|
|
20
|
+
127,
|
|
21
|
+
178,
|
|
22
|
+
221,
|
|
23
|
+
203,
|
|
24
|
+
136,
|
|
25
|
+
5
|
|
26
|
+
],
|
|
27
|
+
"accounts": [
|
|
28
|
+
{
|
|
29
|
+
"name": "admin",
|
|
30
|
+
"writable": true,
|
|
31
|
+
"signer": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "vault",
|
|
35
|
+
"writable": true,
|
|
36
|
+
"pda": {
|
|
37
|
+
"seeds": [
|
|
38
|
+
{
|
|
39
|
+
"kind": "const",
|
|
40
|
+
"value": [
|
|
41
|
+
118,
|
|
42
|
+
97,
|
|
43
|
+
117,
|
|
44
|
+
108,
|
|
45
|
+
116
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "account",
|
|
50
|
+
"path": "vault.authority",
|
|
51
|
+
"account": "StarVault"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "arg",
|
|
55
|
+
"path": "seed"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "tge_config",
|
|
62
|
+
"writable": true,
|
|
63
|
+
"pda": {
|
|
64
|
+
"seeds": [
|
|
65
|
+
{
|
|
66
|
+
"kind": "const",
|
|
67
|
+
"value": [
|
|
68
|
+
116,
|
|
69
|
+
103,
|
|
70
|
+
101
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "account",
|
|
75
|
+
"path": "vault"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "quote_mint",
|
|
82
|
+
"docs": [
|
|
83
|
+
"The quote mint (wSOL or USDC, as configured at vault creation)"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "vault_ata",
|
|
88
|
+
"docs": [
|
|
89
|
+
"The vault's quote token ATA (source of funds)"
|
|
90
|
+
],
|
|
91
|
+
"writable": true,
|
|
92
|
+
"pda": {
|
|
93
|
+
"seeds": [
|
|
94
|
+
{
|
|
95
|
+
"kind": "account",
|
|
96
|
+
"path": "vault"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "account",
|
|
100
|
+
"path": "token_program"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"kind": "account",
|
|
104
|
+
"path": "quote_mint"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"program": {
|
|
108
|
+
"kind": "const",
|
|
109
|
+
"value": [
|
|
110
|
+
140,
|
|
111
|
+
151,
|
|
112
|
+
37,
|
|
113
|
+
143,
|
|
114
|
+
78,
|
|
115
|
+
36,
|
|
116
|
+
137,
|
|
117
|
+
241,
|
|
118
|
+
187,
|
|
119
|
+
61,
|
|
120
|
+
16,
|
|
121
|
+
41,
|
|
122
|
+
20,
|
|
123
|
+
142,
|
|
124
|
+
13,
|
|
125
|
+
131,
|
|
126
|
+
11,
|
|
127
|
+
90,
|
|
128
|
+
19,
|
|
129
|
+
153,
|
|
130
|
+
218,
|
|
131
|
+
255,
|
|
132
|
+
16,
|
|
133
|
+
132,
|
|
134
|
+
4,
|
|
135
|
+
142,
|
|
136
|
+
123,
|
|
137
|
+
216,
|
|
138
|
+
219,
|
|
139
|
+
233,
|
|
140
|
+
248,
|
|
141
|
+
89
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "destination_wallet",
|
|
148
|
+
"docs": [
|
|
149
|
+
"Destination wallet for the raised funds (e.g., launchpad's funds_vault).",
|
|
150
|
+
"SECURITY: Admin is responsible for ensuring this is correct."
|
|
151
|
+
],
|
|
152
|
+
"writable": true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "token_program"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"args": [
|
|
159
|
+
{
|
|
160
|
+
"name": "_seed",
|
|
161
|
+
"type": "u64"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
10
165
|
{
|
|
11
166
|
"name": "add_to_blacklist",
|
|
12
167
|
"discriminator": [
|
|
@@ -573,7 +728,7 @@
|
|
|
573
728
|
},
|
|
574
729
|
{
|
|
575
730
|
"name": "platform_admin",
|
|
576
|
-
"address": "
|
|
731
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
577
732
|
},
|
|
578
733
|
{
|
|
579
734
|
"name": "quote_token_program"
|
|
@@ -1727,12 +1882,12 @@
|
|
|
1727
1882
|
},
|
|
1728
1883
|
{
|
|
1729
1884
|
"name": "platform_admin",
|
|
1730
|
-
"address": "
|
|
1885
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
1731
1886
|
},
|
|
1732
1887
|
{
|
|
1733
1888
|
"name": "referrer",
|
|
1734
1889
|
"docs": [
|
|
1735
|
-
"Optional referrer - if provided, earns
|
|
1890
|
+
"Optional referrer - if provided, earns 13.5% of platform fee"
|
|
1736
1891
|
],
|
|
1737
1892
|
"optional": true
|
|
1738
1893
|
},
|
|
@@ -2873,7 +3028,7 @@
|
|
|
2873
3028
|
},
|
|
2874
3029
|
{
|
|
2875
3030
|
"name": "platform_admin",
|
|
2876
|
-
"address": "
|
|
3031
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
2877
3032
|
},
|
|
2878
3033
|
{
|
|
2879
3034
|
"name": "quote_token_program"
|
|
@@ -3024,8 +3179,8 @@
|
|
|
3024
3179
|
"name": "destination_wallet",
|
|
3025
3180
|
"docs": [
|
|
3026
3181
|
"Destination wallet for the raised funds.",
|
|
3027
|
-
"SECURITY:
|
|
3028
|
-
"
|
|
3182
|
+
"SECURITY: Admin is responsible for ensuring this is correct (Treasury or Launchpad).",
|
|
3183
|
+
"Removed strict TREASURY_AUTHORITY check to allow routing to Launchpad programs."
|
|
3029
3184
|
],
|
|
3030
3185
|
"writable": true
|
|
3031
3186
|
},
|
|
@@ -4404,6 +4559,15 @@
|
|
|
4404
4559
|
"name": "minimum_raise_target",
|
|
4405
4560
|
"type": "u64"
|
|
4406
4561
|
},
|
|
4562
|
+
{
|
|
4563
|
+
"name": "target_raise_amount",
|
|
4564
|
+
"docs": [
|
|
4565
|
+
"Target raise amount for oversubscription handling.",
|
|
4566
|
+
"Set at creation time so users know the cap before depositing.",
|
|
4567
|
+
"0 = no target set (legacy: admin calls set_target_raise later)"
|
|
4568
|
+
],
|
|
4569
|
+
"type": "u64"
|
|
4570
|
+
},
|
|
4407
4571
|
{
|
|
4408
4572
|
"name": "start_time",
|
|
4409
4573
|
"type": "i64"
|
|
@@ -4436,6 +4600,10 @@
|
|
|
4436
4600
|
"name": "minimum_raise_target",
|
|
4437
4601
|
"type": "u64"
|
|
4438
4602
|
},
|
|
4603
|
+
{
|
|
4604
|
+
"name": "target_raise_amount",
|
|
4605
|
+
"type": "u64"
|
|
4606
|
+
},
|
|
4439
4607
|
{
|
|
4440
4608
|
"name": "start_time",
|
|
4441
4609
|
"type": "i64"
|
|
@@ -4816,6 +4984,14 @@
|
|
|
4816
4984
|
]
|
|
4817
4985
|
}
|
|
4818
4986
|
},
|
|
4987
|
+
{
|
|
4988
|
+
"name": "total_allocated",
|
|
4989
|
+
"docs": [
|
|
4990
|
+
"Total amount allocated across all tiers (sum of tier_allocated)",
|
|
4991
|
+
"Used by Launchpad to compute user's share of the token distribution"
|
|
4992
|
+
],
|
|
4993
|
+
"type": "u64"
|
|
4994
|
+
},
|
|
4819
4995
|
{
|
|
4820
4996
|
"name": "tier_totals_at_allocation",
|
|
4821
4997
|
"docs": [
|
package/dist/idl/vault.json
CHANGED
|
@@ -7,6 +7,161 @@
|
|
|
7
7
|
"description": "Created with Anchor"
|
|
8
8
|
},
|
|
9
9
|
"instructions": [
|
|
10
|
+
{
|
|
11
|
+
"name": "accept_and_calculate",
|
|
12
|
+
"docs": [
|
|
13
|
+
"Combined TGE accept + calculate allocations in one instruction.",
|
|
14
|
+
"Optimization for Launchpad flow: routes funds AND computes tier allocations atomically.",
|
|
15
|
+
"Requires: vault.status == TgeRequested, target_raise_amount > 0"
|
|
16
|
+
],
|
|
17
|
+
"discriminator": [
|
|
18
|
+
186,
|
|
19
|
+
89,
|
|
20
|
+
127,
|
|
21
|
+
178,
|
|
22
|
+
221,
|
|
23
|
+
203,
|
|
24
|
+
136,
|
|
25
|
+
5
|
|
26
|
+
],
|
|
27
|
+
"accounts": [
|
|
28
|
+
{
|
|
29
|
+
"name": "admin",
|
|
30
|
+
"writable": true,
|
|
31
|
+
"signer": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "vault",
|
|
35
|
+
"writable": true,
|
|
36
|
+
"pda": {
|
|
37
|
+
"seeds": [
|
|
38
|
+
{
|
|
39
|
+
"kind": "const",
|
|
40
|
+
"value": [
|
|
41
|
+
118,
|
|
42
|
+
97,
|
|
43
|
+
117,
|
|
44
|
+
108,
|
|
45
|
+
116
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "account",
|
|
50
|
+
"path": "vault.authority",
|
|
51
|
+
"account": "StarVault"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "arg",
|
|
55
|
+
"path": "seed"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "tge_config",
|
|
62
|
+
"writable": true,
|
|
63
|
+
"pda": {
|
|
64
|
+
"seeds": [
|
|
65
|
+
{
|
|
66
|
+
"kind": "const",
|
|
67
|
+
"value": [
|
|
68
|
+
116,
|
|
69
|
+
103,
|
|
70
|
+
101
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "account",
|
|
75
|
+
"path": "vault"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "quote_mint",
|
|
82
|
+
"docs": [
|
|
83
|
+
"The quote mint (wSOL or USDC, as configured at vault creation)"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "vault_ata",
|
|
88
|
+
"docs": [
|
|
89
|
+
"The vault's quote token ATA (source of funds)"
|
|
90
|
+
],
|
|
91
|
+
"writable": true,
|
|
92
|
+
"pda": {
|
|
93
|
+
"seeds": [
|
|
94
|
+
{
|
|
95
|
+
"kind": "account",
|
|
96
|
+
"path": "vault"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "account",
|
|
100
|
+
"path": "token_program"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"kind": "account",
|
|
104
|
+
"path": "quote_mint"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"program": {
|
|
108
|
+
"kind": "const",
|
|
109
|
+
"value": [
|
|
110
|
+
140,
|
|
111
|
+
151,
|
|
112
|
+
37,
|
|
113
|
+
143,
|
|
114
|
+
78,
|
|
115
|
+
36,
|
|
116
|
+
137,
|
|
117
|
+
241,
|
|
118
|
+
187,
|
|
119
|
+
61,
|
|
120
|
+
16,
|
|
121
|
+
41,
|
|
122
|
+
20,
|
|
123
|
+
142,
|
|
124
|
+
13,
|
|
125
|
+
131,
|
|
126
|
+
11,
|
|
127
|
+
90,
|
|
128
|
+
19,
|
|
129
|
+
153,
|
|
130
|
+
218,
|
|
131
|
+
255,
|
|
132
|
+
16,
|
|
133
|
+
132,
|
|
134
|
+
4,
|
|
135
|
+
142,
|
|
136
|
+
123,
|
|
137
|
+
216,
|
|
138
|
+
219,
|
|
139
|
+
233,
|
|
140
|
+
248,
|
|
141
|
+
89
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "destination_wallet",
|
|
148
|
+
"docs": [
|
|
149
|
+
"Destination wallet for the raised funds (e.g., launchpad's funds_vault).",
|
|
150
|
+
"SECURITY: Admin is responsible for ensuring this is correct."
|
|
151
|
+
],
|
|
152
|
+
"writable": true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "token_program"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"args": [
|
|
159
|
+
{
|
|
160
|
+
"name": "_seed",
|
|
161
|
+
"type": "u64"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
10
165
|
{
|
|
11
166
|
"name": "add_to_blacklist",
|
|
12
167
|
"discriminator": [
|
|
@@ -573,7 +728,7 @@
|
|
|
573
728
|
},
|
|
574
729
|
{
|
|
575
730
|
"name": "platform_admin",
|
|
576
|
-
"address": "
|
|
731
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
577
732
|
},
|
|
578
733
|
{
|
|
579
734
|
"name": "quote_token_program"
|
|
@@ -1727,12 +1882,12 @@
|
|
|
1727
1882
|
},
|
|
1728
1883
|
{
|
|
1729
1884
|
"name": "platform_admin",
|
|
1730
|
-
"address": "
|
|
1885
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
1731
1886
|
},
|
|
1732
1887
|
{
|
|
1733
1888
|
"name": "referrer",
|
|
1734
1889
|
"docs": [
|
|
1735
|
-
"Optional referrer - if provided, earns
|
|
1890
|
+
"Optional referrer - if provided, earns 13.5% of platform fee"
|
|
1736
1891
|
],
|
|
1737
1892
|
"optional": true
|
|
1738
1893
|
},
|
|
@@ -2873,7 +3028,7 @@
|
|
|
2873
3028
|
},
|
|
2874
3029
|
{
|
|
2875
3030
|
"name": "platform_admin",
|
|
2876
|
-
"address": "
|
|
3031
|
+
"address": "8JHcTK5rJNfGLffWbWgmi8yAPjxVz7F4zFC4gUqnVnx6"
|
|
2877
3032
|
},
|
|
2878
3033
|
{
|
|
2879
3034
|
"name": "quote_token_program"
|
|
@@ -3024,8 +3179,8 @@
|
|
|
3024
3179
|
"name": "destination_wallet",
|
|
3025
3180
|
"docs": [
|
|
3026
3181
|
"Destination wallet for the raised funds.",
|
|
3027
|
-
"SECURITY:
|
|
3028
|
-
"
|
|
3182
|
+
"SECURITY: Admin is responsible for ensuring this is correct (Treasury or Launchpad).",
|
|
3183
|
+
"Removed strict TREASURY_AUTHORITY check to allow routing to Launchpad programs."
|
|
3029
3184
|
],
|
|
3030
3185
|
"writable": true
|
|
3031
3186
|
},
|
|
@@ -4404,6 +4559,15 @@
|
|
|
4404
4559
|
"name": "minimum_raise_target",
|
|
4405
4560
|
"type": "u64"
|
|
4406
4561
|
},
|
|
4562
|
+
{
|
|
4563
|
+
"name": "target_raise_amount",
|
|
4564
|
+
"docs": [
|
|
4565
|
+
"Target raise amount for oversubscription handling.",
|
|
4566
|
+
"Set at creation time so users know the cap before depositing.",
|
|
4567
|
+
"0 = no target set (legacy: admin calls set_target_raise later)"
|
|
4568
|
+
],
|
|
4569
|
+
"type": "u64"
|
|
4570
|
+
},
|
|
4407
4571
|
{
|
|
4408
4572
|
"name": "start_time",
|
|
4409
4573
|
"type": "i64"
|
|
@@ -4436,6 +4600,10 @@
|
|
|
4436
4600
|
"name": "minimum_raise_target",
|
|
4437
4601
|
"type": "u64"
|
|
4438
4602
|
},
|
|
4603
|
+
{
|
|
4604
|
+
"name": "target_raise_amount",
|
|
4605
|
+
"type": "u64"
|
|
4606
|
+
},
|
|
4439
4607
|
{
|
|
4440
4608
|
"name": "start_time",
|
|
4441
4609
|
"type": "i64"
|
|
@@ -4816,6 +4984,14 @@
|
|
|
4816
4984
|
]
|
|
4817
4985
|
}
|
|
4818
4986
|
},
|
|
4987
|
+
{
|
|
4988
|
+
"name": "total_allocated",
|
|
4989
|
+
"docs": [
|
|
4990
|
+
"Total amount allocated across all tiers (sum of tier_allocated)",
|
|
4991
|
+
"Used by Launchpad to compute user's share of the token distribution"
|
|
4992
|
+
],
|
|
4993
|
+
"type": "u64"
|
|
4994
|
+
},
|
|
4819
4995
|
{
|
|
4820
4996
|
"name": "tier_totals_at_allocation",
|
|
4821
4997
|
"docs": [
|