@triadxyz/triad-protocol 3.2.9-beta → 3.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/claim.d.ts +1 -1
- package/dist/claim.js +11 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/swap.d.ts +1 -1
- package/dist/utils/swap.js +1 -1
- package/package.json +1 -1
package/dist/claim.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export default class Claim {
|
|
|
49
49
|
* @param claimVaultName - Claim vault name
|
|
50
50
|
* @param mint - Mint
|
|
51
51
|
*/
|
|
52
|
-
updateClaimVaultAmount({ amount, newUsers, claimVaultName, mint,
|
|
52
|
+
updateClaimVaultAmount({ amount, newUsers, claimVaultName, mint, claimData }: UpdateClaimVaultAmountArgs): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
53
53
|
/**
|
|
54
54
|
* Update Claim Vault End Ts
|
|
55
55
|
* @param endTs - End ts
|
package/dist/claim.js
CHANGED
|
@@ -94,7 +94,11 @@ class Claim {
|
|
|
94
94
|
*/
|
|
95
95
|
createClaimVault({ totalAmount, totalUsers, name, isFirstComeFirstServed, endTs, claimData, mint }) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
|
|
97
|
+
let merkleRoot = null;
|
|
98
|
+
if (claimData) {
|
|
99
|
+
const { merkleRoot: root } = (0, merkle_1.generateMerkleTree)(claimData);
|
|
100
|
+
merkleRoot = root;
|
|
101
|
+
}
|
|
98
102
|
const ixs = [
|
|
99
103
|
yield this.program.methods
|
|
100
104
|
.createClaimVault({
|
|
@@ -141,8 +145,13 @@ class Claim {
|
|
|
141
145
|
* @param claimVaultName - Claim vault name
|
|
142
146
|
* @param mint - Mint
|
|
143
147
|
*/
|
|
144
|
-
updateClaimVaultAmount({ amount, newUsers, claimVaultName, mint,
|
|
148
|
+
updateClaimVaultAmount({ amount, newUsers, claimVaultName, mint, claimData }) {
|
|
145
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
let merkleRoot = null;
|
|
151
|
+
if (claimData) {
|
|
152
|
+
const { merkleRoot: root } = (0, merkle_1.generateMerkleTree)(claimData);
|
|
153
|
+
merkleRoot = root;
|
|
154
|
+
}
|
|
146
155
|
const ixs = [
|
|
147
156
|
yield this.program.methods
|
|
148
157
|
.updateClaimVaultAmount({
|
package/dist/types/index.d.ts
CHANGED
package/dist/utils/swap.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const swap: ({ connection, wallet, inToken, outToken, amount, pay
|
|
|
9
9
|
}) => Promise<{
|
|
10
10
|
swapIxs: TransactionInstruction[];
|
|
11
11
|
addressLookupTableAccounts: AddressLookupTableAccount[];
|
|
12
|
-
setupInstructions:
|
|
12
|
+
setupInstructions: any[];
|
|
13
13
|
outAmount: any;
|
|
14
14
|
}>;
|
|
15
15
|
export declare const getPrice: (token: string) => Promise<any>;
|
package/dist/utils/swap.js
CHANGED
|
@@ -37,7 +37,7 @@ const swap = ({ connection, wallet, inToken, outToken, amount, payer }) => __awa
|
|
|
37
37
|
swapIxs: [deserializeInstruction(swapInstruction)],
|
|
38
38
|
addressLookupTableAccounts: yield getAddressLookupTableAccounts(connection, addressLookupTableAddresses),
|
|
39
39
|
setupInstructions: setupInstructions.length > 0
|
|
40
|
-
? [deserializeInstruction
|
|
40
|
+
? [...setupInstructions.map(deserializeInstruction)]
|
|
41
41
|
: [],
|
|
42
42
|
outAmount: quoteData.otherAmountThreshold
|
|
43
43
|
};
|