@triadxyz/triad-protocol 0.2.9-beta → 0.3.0-beta
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/stake.js +4 -0
- package/dist/test.js +1 -1
- package/dist/types/triad_protocol.d.ts +0 -172
- package/package.json +1 -1
package/dist/stake.js
CHANGED
|
@@ -293,6 +293,7 @@ class Stake {
|
|
|
293
293
|
const userPDA = (0, helpers_1.getUserAddressSync)(this.program.programId, wallet);
|
|
294
294
|
const FromAta = (0, helpers_1.getATASync)(stakeVaultPDA, mint);
|
|
295
295
|
const stakePDA = (0, helpers_1.getStakeAddressSync)(this.program.programId, wallet, name);
|
|
296
|
+
const ToAta = (0, helpers_1.getATASync)(wallet, mint);
|
|
296
297
|
const method = this.program.methods.withdrawStake().accounts({
|
|
297
298
|
signer: wallet,
|
|
298
299
|
fromAta: FromAta,
|
|
@@ -300,6 +301,7 @@ class Stake {
|
|
|
300
301
|
stakeVault: stakeVaultPDA,
|
|
301
302
|
admin: new web3_js_1.PublicKey('82ppCojm3yrEKgdpH8B5AmBJTU1r1uAWXFWhxvPs9UCR'),
|
|
302
303
|
mint: mint,
|
|
304
|
+
toAta: ToAta,
|
|
303
305
|
user: userPDA
|
|
304
306
|
});
|
|
305
307
|
if (options === null || options === void 0 ? void 0 : options.microLamports) {
|
|
@@ -355,10 +357,12 @@ class Stake {
|
|
|
355
357
|
const StakeVault = (0, helpers_1.getStakeVaultAddressSync)(this.program.programId, stakeVault);
|
|
356
358
|
const Stake = (0, helpers_1.getStakeAddressSync)(this.program.programId, wallet, nftName);
|
|
357
359
|
const FromAta = (0, helpers_1.getATASync)(StakeVault, mint);
|
|
360
|
+
const ToAta = (0, helpers_1.getATASync)(wallet, mint);
|
|
358
361
|
const method = this.program.methods.claimStake().accounts({
|
|
359
362
|
signer: wallet,
|
|
360
363
|
fromAta: FromAta,
|
|
361
364
|
mint: mint,
|
|
365
|
+
toAta: ToAta,
|
|
362
366
|
stake: Stake,
|
|
363
367
|
stakeVault: StakeVault
|
|
364
368
|
});
|
package/dist/test.js
CHANGED
|
@@ -40,92 +40,6 @@ export type TriadProtocol = {
|
|
|
40
40
|
{
|
|
41
41
|
name: 'toAta';
|
|
42
42
|
writable: true;
|
|
43
|
-
pda: {
|
|
44
|
-
seeds: [
|
|
45
|
-
{
|
|
46
|
-
kind: 'account';
|
|
47
|
-
path: 'signer';
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
kind: 'const';
|
|
51
|
-
value: [
|
|
52
|
-
6,
|
|
53
|
-
221,
|
|
54
|
-
246,
|
|
55
|
-
225,
|
|
56
|
-
215,
|
|
57
|
-
101,
|
|
58
|
-
161,
|
|
59
|
-
147,
|
|
60
|
-
217,
|
|
61
|
-
203,
|
|
62
|
-
225,
|
|
63
|
-
70,
|
|
64
|
-
206,
|
|
65
|
-
235,
|
|
66
|
-
121,
|
|
67
|
-
172,
|
|
68
|
-
28,
|
|
69
|
-
180,
|
|
70
|
-
133,
|
|
71
|
-
237,
|
|
72
|
-
95,
|
|
73
|
-
91,
|
|
74
|
-
55,
|
|
75
|
-
145,
|
|
76
|
-
58,
|
|
77
|
-
140,
|
|
78
|
-
245,
|
|
79
|
-
133,
|
|
80
|
-
126,
|
|
81
|
-
255,
|
|
82
|
-
0,
|
|
83
|
-
169
|
|
84
|
-
];
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
kind: 'account';
|
|
88
|
-
path: 'mint';
|
|
89
|
-
}
|
|
90
|
-
];
|
|
91
|
-
program: {
|
|
92
|
-
kind: 'const';
|
|
93
|
-
value: [
|
|
94
|
-
140,
|
|
95
|
-
151,
|
|
96
|
-
37,
|
|
97
|
-
143,
|
|
98
|
-
78,
|
|
99
|
-
36,
|
|
100
|
-
137,
|
|
101
|
-
241,
|
|
102
|
-
187,
|
|
103
|
-
61,
|
|
104
|
-
16,
|
|
105
|
-
41,
|
|
106
|
-
20,
|
|
107
|
-
142,
|
|
108
|
-
13,
|
|
109
|
-
131,
|
|
110
|
-
11,
|
|
111
|
-
90,
|
|
112
|
-
19,
|
|
113
|
-
153,
|
|
114
|
-
218,
|
|
115
|
-
255,
|
|
116
|
-
16,
|
|
117
|
-
132,
|
|
118
|
-
4,
|
|
119
|
-
142,
|
|
120
|
-
123,
|
|
121
|
-
216,
|
|
122
|
-
219,
|
|
123
|
-
233,
|
|
124
|
-
248,
|
|
125
|
-
89
|
|
126
|
-
];
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
43
|
},
|
|
130
44
|
{
|
|
131
45
|
name: 'tokenProgram';
|
|
@@ -955,92 +869,6 @@ export type TriadProtocol = {
|
|
|
955
869
|
{
|
|
956
870
|
name: 'toAta';
|
|
957
871
|
writable: true;
|
|
958
|
-
pda: {
|
|
959
|
-
seeds: [
|
|
960
|
-
{
|
|
961
|
-
kind: 'account';
|
|
962
|
-
path: 'signer';
|
|
963
|
-
},
|
|
964
|
-
{
|
|
965
|
-
kind: 'const';
|
|
966
|
-
value: [
|
|
967
|
-
6,
|
|
968
|
-
221,
|
|
969
|
-
246,
|
|
970
|
-
225,
|
|
971
|
-
215,
|
|
972
|
-
101,
|
|
973
|
-
161,
|
|
974
|
-
147,
|
|
975
|
-
217,
|
|
976
|
-
203,
|
|
977
|
-
225,
|
|
978
|
-
70,
|
|
979
|
-
206,
|
|
980
|
-
235,
|
|
981
|
-
121,
|
|
982
|
-
172,
|
|
983
|
-
28,
|
|
984
|
-
180,
|
|
985
|
-
133,
|
|
986
|
-
237,
|
|
987
|
-
95,
|
|
988
|
-
91,
|
|
989
|
-
55,
|
|
990
|
-
145,
|
|
991
|
-
58,
|
|
992
|
-
140,
|
|
993
|
-
245,
|
|
994
|
-
133,
|
|
995
|
-
126,
|
|
996
|
-
255,
|
|
997
|
-
0,
|
|
998
|
-
169
|
|
999
|
-
];
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
kind: 'account';
|
|
1003
|
-
path: 'mint';
|
|
1004
|
-
}
|
|
1005
|
-
];
|
|
1006
|
-
program: {
|
|
1007
|
-
kind: 'const';
|
|
1008
|
-
value: [
|
|
1009
|
-
140,
|
|
1010
|
-
151,
|
|
1011
|
-
37,
|
|
1012
|
-
143,
|
|
1013
|
-
78,
|
|
1014
|
-
36,
|
|
1015
|
-
137,
|
|
1016
|
-
241,
|
|
1017
|
-
187,
|
|
1018
|
-
61,
|
|
1019
|
-
16,
|
|
1020
|
-
41,
|
|
1021
|
-
20,
|
|
1022
|
-
142,
|
|
1023
|
-
13,
|
|
1024
|
-
131,
|
|
1025
|
-
11,
|
|
1026
|
-
90,
|
|
1027
|
-
19,
|
|
1028
|
-
153,
|
|
1029
|
-
218,
|
|
1030
|
-
255,
|
|
1031
|
-
16,
|
|
1032
|
-
132,
|
|
1033
|
-
4,
|
|
1034
|
-
142,
|
|
1035
|
-
123,
|
|
1036
|
-
216,
|
|
1037
|
-
219,
|
|
1038
|
-
233,
|
|
1039
|
-
248,
|
|
1040
|
-
89
|
|
1041
|
-
];
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1044
872
|
},
|
|
1045
873
|
{
|
|
1046
874
|
name: 'tokenProgram';
|