@forgedevv/core 0.3.0 → 0.3.1
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/CHANGELOG.md +10 -0
- package/dist/jupiter-referral.js +2 -2
- package/dist/meteora-referral.js +2 -6
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to `@forge/core`. Versions follow semantic versioning. Consumers (the
|
|
4
4
|
launchpad template, the signer, the web app) pin an exact version, never a range.
|
|
5
5
|
|
|
6
|
+
## 0.3.1 — 2026-10-17
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Client sites failed to build with 0.3.0 (`node:crypto` in `jupiter-referral.js` and
|
|
11
|
+
`meteora-referral.js`, refused by the Next.js browser bundle). Both now hash with
|
|
12
|
+
`@noble/hashes` (new exact dependency 1.8.0, already used by `@solana/web3.js`); the
|
|
13
|
+
discriminators and derived addresses are unchanged. A test refuses any Node built-in
|
|
14
|
+
import in the package sources.
|
|
15
|
+
|
|
6
16
|
## 0.3.0 — 2026-10-17
|
|
7
17
|
|
|
8
18
|
Changes after 0.2.0. Publish `@forgedevv/shared` 0.3.0 with it (new kill switch `revenue_paused` in `FlagKey`).
|
package/dist/jupiter-referral.js
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* project with the revenue wallet as partner, and the v2 collection accounts of the currencies
|
|
38
38
|
* Jupiter collects in. Only the payer signs; the program facts are listed there.
|
|
39
39
|
*/
|
|
40
|
-
import {
|
|
40
|
+
import { sha256 } from '@noble/hashes/sha2';
|
|
41
41
|
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, createAssociatedTokenAccountIdempotentInstruction, getAssociatedTokenAddressSync, unpackAccount, } from '@solana/spl-token';
|
|
42
42
|
import { PublicKey, SystemProgram, Transaction, TransactionInstruction, } from '@solana/web3.js';
|
|
43
43
|
import { PaymentError, assertCluster } from './payments.js';
|
|
@@ -55,7 +55,7 @@ export const JUPITER_REFERRAL_PROGRAM_ID = new PublicKey('REFER4ZgmyYx9c6He5XfaT
|
|
|
55
55
|
*/
|
|
56
56
|
export const JUPITER_ULTRA_REFERRAL_PROJECT = new PublicKey('DkiqsTrw1u1bYFumumC7sCG2S8K25qc2vemJFHyW2wJc');
|
|
57
57
|
function anchorDiscriminator(name) {
|
|
58
|
-
return
|
|
58
|
+
return Buffer.from(sha256(new TextEncoder().encode(name))).subarray(0, 8);
|
|
59
59
|
}
|
|
60
60
|
export const JUPITER_REFERRAL_ACCOUNT_DISCRIMINATOR = anchorDiscriminator('account:ReferralAccount');
|
|
61
61
|
export const JUPITER_PROJECT_DISCRIMINATOR = anchorDiscriminator('account:Project');
|
package/dist/meteora-referral.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* network call is the optional `readMeteoraReferralAccount`. Any cluster: a WSOL token account
|
|
19
19
|
* exists on devnet too (the devnet proof of the revenue job uses one).
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
21
|
+
import { sha256 } from '@noble/hashes/sha2';
|
|
22
22
|
import { ACCOUNT_SIZE, NATIVE_MINT, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, unpackAccount, } from '@solana/spl-token';
|
|
23
23
|
import { PublicKey, SystemProgram, Transaction, TransactionInstruction, } from '@solana/web3.js';
|
|
24
24
|
import { priorityFeeInstructions } from './priority-fee.js';
|
|
@@ -70,11 +70,7 @@ export function assertMeteoraReferralSeed(seed) {
|
|
|
70
70
|
*/
|
|
71
71
|
export function deriveMeteoraReferralAccount(payer, seed = METEORA_REFERRAL_ACCOUNT_SEED) {
|
|
72
72
|
assertMeteoraReferralSeed(seed);
|
|
73
|
-
const digest =
|
|
74
|
-
.update(payer.toBuffer())
|
|
75
|
-
.update(Buffer.from(seed, 'utf8'))
|
|
76
|
-
.update(TOKEN_PROGRAM_ID.toBuffer())
|
|
77
|
-
.digest();
|
|
73
|
+
const digest = sha256(Buffer.concat([payer.toBuffer(), Buffer.from(seed, 'utf8'), TOKEN_PROGRAM_ID.toBuffer()]));
|
|
78
74
|
return new PublicKey(digest);
|
|
79
75
|
}
|
|
80
76
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgedevv/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "FORGE transaction core: Meteora Dynamic Bonding Curve configs, pools, swaps, claims and on-chain checks. Published on npm as @forgedevv/core.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@forge/shared": "npm:@forgedevv/shared@0.3.
|
|
50
|
+
"@forge/shared": "npm:@forgedevv/shared@0.3.1",
|
|
51
51
|
"@meteora-ag/cp-amm-sdk": "1.5.1",
|
|
52
52
|
"@meteora-ag/dynamic-bonding-curve-sdk": "1.5.13",
|
|
53
|
+
"@noble/hashes": "1.8.0",
|
|
53
54
|
"@solana/spl-token": "0.4.15",
|
|
54
55
|
"@solana/web3.js": "1.99.0",
|
|
55
56
|
"bn.js": "5.2.5"
|