@drift-labs/sdk 2.104.0-beta.4 → 2.104.0-beta.6
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/VERSION +1 -1
- package/lib/browser/constants/perpMarkets.js +11 -0
- package/lib/browser/isomorphic/grpc.d.ts +1 -1
- package/lib/node/constants/perpMarkets.js +11 -0
- package/lib/node/isomorphic/grpc.d.ts +5 -1
- package/package.json +1 -1
- package/scripts/postbuild.js +51 -28
- package/src/constants/perpMarkets.ts +12 -0
- package/lib/browser/isomorphic/grpc.node.d.ts +0 -5
- package/lib/node/isomorphic/grpc.browser.d.ts +0 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.104.0-beta.
|
|
1
|
+
2.104.0-beta.6
|
|
@@ -979,6 +979,17 @@ exports.MainnetPerpMarkets = [
|
|
|
979
979
|
oracleSource: __1.OracleSource.PYTH_PULL,
|
|
980
980
|
pythFeedId: '0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54',
|
|
981
981
|
},
|
|
982
|
+
{
|
|
983
|
+
fullName: 'Magic Eden',
|
|
984
|
+
category: ['DEX'],
|
|
985
|
+
symbol: 'ME-PERP',
|
|
986
|
+
baseAssetSymbol: 'ME',
|
|
987
|
+
marketIndex: 61,
|
|
988
|
+
oracle: new web3_js_1.PublicKey('FLQjrmEPGwbCKRYZ1eYM5FPccHBrCv2cN4GBu3mWfmPH'),
|
|
989
|
+
launchTs: 1733839936000,
|
|
990
|
+
oracleSource: __1.OracleSource.PYTH_PULL,
|
|
991
|
+
pythFeedId: '0x91519e3e48571e1232a85a938e714da19fe5ce05107f3eebb8a870b2e8020169',
|
|
992
|
+
},
|
|
982
993
|
];
|
|
983
994
|
exports.PerpMarkets = {
|
|
984
995
|
devnet: exports.DevnetPerpMarkets,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function createClient(..._args: any): void;
|
|
@@ -979,6 +979,17 @@ exports.MainnetPerpMarkets = [
|
|
|
979
979
|
oracleSource: __1.OracleSource.PYTH_PULL,
|
|
980
980
|
pythFeedId: '0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54',
|
|
981
981
|
},
|
|
982
|
+
{
|
|
983
|
+
fullName: 'Magic Eden',
|
|
984
|
+
category: ['DEX'],
|
|
985
|
+
symbol: 'ME-PERP',
|
|
986
|
+
baseAssetSymbol: 'ME',
|
|
987
|
+
marketIndex: 61,
|
|
988
|
+
oracle: new web3_js_1.PublicKey('FLQjrmEPGwbCKRYZ1eYM5FPccHBrCv2cN4GBu3mWfmPH'),
|
|
989
|
+
launchTs: 1733839936000,
|
|
990
|
+
oracleSource: __1.OracleSource.PYTH_PULL,
|
|
991
|
+
pythFeedId: '0x91519e3e48571e1232a85a938e714da19fe5ce05107f3eebb8a870b2e8020169',
|
|
992
|
+
},
|
|
982
993
|
];
|
|
983
994
|
exports.PerpMarkets = {
|
|
984
995
|
devnet: exports.DevnetPerpMarkets,
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import Client from '@triton-one/yellowstone-grpc';
|
|
2
|
+
import { SubscribeRequest, SubscribeUpdate, CommitmentLevel } from '@triton-one/yellowstone-grpc';
|
|
3
|
+
import { ClientDuplexStream, ChannelOptions } from '@grpc/grpc-js';
|
|
4
|
+
export { ClientDuplexStream, ChannelOptions, SubscribeRequest, SubscribeUpdate, CommitmentLevel, Client, };
|
|
5
|
+
export declare function createClient(...args: ConstructorParameters<typeof Client>): Client;
|
package/package.json
CHANGED
package/scripts/postbuild.js
CHANGED
|
@@ -20,52 +20,75 @@ environments.forEach((environment) => {
|
|
|
20
20
|
console.log(``);
|
|
21
21
|
|
|
22
22
|
isomorphicPackages.forEach((package) => {
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
// We want to overwrite the base isomorphic files (the "target" files) with the concrete implementation code and definition files (the "source" files).
|
|
25
|
+
|
|
26
|
+
const isomorphicFolderPath = path.join(
|
|
24
27
|
__dirname,
|
|
25
28
|
'..',
|
|
26
29
|
'lib',
|
|
27
30
|
environment,
|
|
28
|
-
'isomorphic'
|
|
29
|
-
package + '.js'
|
|
31
|
+
'isomorphic'
|
|
30
32
|
);
|
|
31
33
|
|
|
32
34
|
const targetEnv = forceEnv ? forceEnv : environment;
|
|
33
35
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
const filesToSwap = [
|
|
37
|
+
{
|
|
38
|
+
source: `${package}.${targetEnv}.js`,
|
|
39
|
+
target: `${package}.js`,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
source: `${package}.${targetEnv}.d.ts`,
|
|
43
|
+
target: `${package}.d.ts`,
|
|
44
|
+
},
|
|
45
|
+
];
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
console.error(
|
|
48
|
-
`Error processing isomophic package : ${package} :: ${error.message}`
|
|
47
|
+
for (const file of filesToSwap) {
|
|
48
|
+
const sourcePath = path.join(
|
|
49
|
+
isomorphicFolderPath,
|
|
50
|
+
file.source
|
|
49
51
|
);
|
|
52
|
+
|
|
53
|
+
const targetPath = path.join(
|
|
54
|
+
isomorphicFolderPath,
|
|
55
|
+
file.target
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
const sourceContent = fs.readFileSync(sourcePath, 'utf8');
|
|
60
|
+
fs.writeFileSync(targetPath, sourceContent);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(
|
|
63
|
+
`Error processing isomophic package : ${package} :: ${error.message}`
|
|
64
|
+
);
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
67
|
|
|
52
68
|
// Delete other environment files for safety
|
|
53
69
|
environments.forEach((otherEnvironment) => {
|
|
54
|
-
if (otherEnvironment ===
|
|
70
|
+
if (otherEnvironment === targetEnv) {
|
|
55
71
|
return;
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
74
|
+
const otherTargetFiles = [
|
|
75
|
+
`${package}.${otherEnvironment}.js`,
|
|
76
|
+
`${package}.${otherEnvironment}.d.ts`,
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
for (const otherTargetFile of otherTargetFiles) {
|
|
80
|
+
const otherTargetPath = path.join(
|
|
81
|
+
__dirname,
|
|
82
|
+
'..',
|
|
83
|
+
'lib',
|
|
84
|
+
environment,
|
|
85
|
+
'isomorphic',
|
|
86
|
+
otherTargetFile
|
|
87
|
+
);
|
|
66
88
|
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
if (fs.existsSync(otherTargetPath)) {
|
|
90
|
+
fs.unlinkSync(otherTargetPath);
|
|
91
|
+
}
|
|
69
92
|
}
|
|
70
93
|
});
|
|
71
94
|
});
|
|
@@ -1064,6 +1064,18 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
|
|
|
1064
1064
|
pythFeedId:
|
|
1065
1065
|
'0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54',
|
|
1066
1066
|
},
|
|
1067
|
+
{
|
|
1068
|
+
fullName: 'Magic Eden',
|
|
1069
|
+
category: ['DEX'],
|
|
1070
|
+
symbol: 'ME-PERP',
|
|
1071
|
+
baseAssetSymbol: 'ME',
|
|
1072
|
+
marketIndex: 61,
|
|
1073
|
+
oracle: new PublicKey('FLQjrmEPGwbCKRYZ1eYM5FPccHBrCv2cN4GBu3mWfmPH'),
|
|
1074
|
+
launchTs: 1733839936000,
|
|
1075
|
+
oracleSource: OracleSource.PYTH_PULL,
|
|
1076
|
+
pythFeedId:
|
|
1077
|
+
'0x91519e3e48571e1232a85a938e714da19fe5ce05107f3eebb8a870b2e8020169',
|
|
1078
|
+
},
|
|
1067
1079
|
];
|
|
1068
1080
|
|
|
1069
1081
|
export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Client from '@triton-one/yellowstone-grpc';
|
|
2
|
-
import { SubscribeRequest, SubscribeUpdate, CommitmentLevel } from '@triton-one/yellowstone-grpc';
|
|
3
|
-
import { ClientDuplexStream, ChannelOptions } from '@grpc/grpc-js';
|
|
4
|
-
export { ClientDuplexStream, ChannelOptions, SubscribeRequest, SubscribeUpdate, CommitmentLevel, Client, };
|
|
5
|
-
export declare function createClient(...args: ConstructorParameters<typeof Client>): Client;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createClient(..._args: any): void;
|