@pompafly/sdk 0.1.0 → 0.1.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/dist/index.js +9 -3
- package/dist/index.mjs +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,7 +49,6 @@ module.exports = __toCommonJS(index_exports);
|
|
|
49
49
|
var import_web32 = require("@solana/web3.js");
|
|
50
50
|
var import_spl_token2 = require("@solana/spl-token");
|
|
51
51
|
var import_bn = __toESM(require("bn.js"));
|
|
52
|
-
var import_crypto = require("crypto");
|
|
53
52
|
|
|
54
53
|
// src/types/index.ts
|
|
55
54
|
var DEVNET_CONFIG = {
|
|
@@ -110,9 +109,16 @@ var PROGRAM_CONSTANTS = {
|
|
|
110
109
|
};
|
|
111
110
|
|
|
112
111
|
// src/client/index.ts
|
|
112
|
+
var DISCRIMINATORS = {
|
|
113
|
+
"global:initialize_config": Buffer.from([208, 127, 21, 1, 194, 190, 196, 70]),
|
|
114
|
+
"global:initialize_pool": Buffer.from([95, 180, 10, 172, 84, 174, 232, 40]),
|
|
115
|
+
"global:buy": Buffer.from([102, 6, 61, 18, 1, 218, 235, 234]),
|
|
116
|
+
"global:sell": Buffer.from([51, 230, 133, 164, 1, 127, 131, 173]),
|
|
117
|
+
"global:collect_fees": Buffer.from([164, 152, 207, 99, 30, 186, 19, 182]),
|
|
118
|
+
"global:graduate": Buffer.from([45, 235, 225, 181, 17, 218, 64, 130])
|
|
119
|
+
};
|
|
113
120
|
function ixDiscriminator(namespace, name) {
|
|
114
|
-
|
|
115
|
-
return hash.subarray(0, 8);
|
|
121
|
+
return DISCRIMINATORS[`${namespace}:${name}`];
|
|
116
122
|
}
|
|
117
123
|
function encodeString(s) {
|
|
118
124
|
const strBytes = Buffer.from(s, "utf8");
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
getAssociatedTokenAddress as getAssociatedTokenAddress2
|
|
15
15
|
} from "@solana/spl-token";
|
|
16
16
|
import BN from "bn.js";
|
|
17
|
-
import { createHash } from "crypto";
|
|
18
17
|
|
|
19
18
|
// src/types/index.ts
|
|
20
19
|
var DEVNET_CONFIG = {
|
|
@@ -79,9 +78,16 @@ var PROGRAM_CONSTANTS = {
|
|
|
79
78
|
};
|
|
80
79
|
|
|
81
80
|
// src/client/index.ts
|
|
81
|
+
var DISCRIMINATORS = {
|
|
82
|
+
"global:initialize_config": Buffer.from([208, 127, 21, 1, 194, 190, 196, 70]),
|
|
83
|
+
"global:initialize_pool": Buffer.from([95, 180, 10, 172, 84, 174, 232, 40]),
|
|
84
|
+
"global:buy": Buffer.from([102, 6, 61, 18, 1, 218, 235, 234]),
|
|
85
|
+
"global:sell": Buffer.from([51, 230, 133, 164, 1, 127, 131, 173]),
|
|
86
|
+
"global:collect_fees": Buffer.from([164, 152, 207, 99, 30, 186, 19, 182]),
|
|
87
|
+
"global:graduate": Buffer.from([45, 235, 225, 181, 17, 218, 64, 130])
|
|
88
|
+
};
|
|
82
89
|
function ixDiscriminator(namespace, name) {
|
|
83
|
-
|
|
84
|
-
return hash.subarray(0, 8);
|
|
90
|
+
return DISCRIMINATORS[`${namespace}:${name}`];
|
|
85
91
|
}
|
|
86
92
|
function encodeString(s) {
|
|
87
93
|
const strBytes = Buffer.from(s, "utf8");
|