Skip to content

Commit 0fbadfb

Browse files
committed
update examples for swift refactor
1 parent 49abb1d commit 0fbadfb

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "lib/index.js",
66
"license": "Apache-2.0",
77
"dependencies": {
8-
"@drift-labs/jit-proxy": "0.12.13",
9-
"@drift-labs/sdk": "2.104.0-beta.23",
8+
"@drift-labs/jit-proxy": "0.12.14",
9+
"@drift-labs/sdk": "2.104.0-beta.27",
1010
"@opentelemetry/api": "1.7.0",
1111
"@opentelemetry/auto-instrumentations-node": "0.31.2",
1212
"@opentelemetry/exporter-prometheus": "0.31.0",

src/experimental-bots/swift/makerExample.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ export class SwiftMaker {
147147
}
148148

149149
const ixs = await this.driftClient.getPlaceAndMakeSwiftPerpOrderIxs(
150-
Buffer.from(order['swift_message'], 'base64'),
151-
Buffer.from(order['swift_signature'], 'base64'),
152150
swiftOrderParamsBuf,
153151
Buffer.from(order['order_signature'], 'base64'),
154152
decodeUTF8(order['uuid']),

src/experimental-bots/swift/takerExample.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {
66
MarketType,
77
PositionDirection,
88
digestSignature,
9+
generateSwiftUuid,
10+
BN,
911
} from '@drift-labs/sdk';
1012
import { RuntimeSpec } from 'src/metrics';
1113
import * as axios from 'axios';
@@ -63,6 +65,8 @@ export class SwiftTaker {
6365
auctionDuration: 30,
6466
}),
6567
subAccountId: 0,
68+
slot: new BN(slot),
69+
uuid: generateSwiftUuid(),
6670
stopLossOrderParams: null,
6771
takeProfitOrderParams: null,
6872
};

yarn.lock

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,19 @@
168168
enabled "2.0.x"
169169
kuler "^2.0.0"
170170

171-
"@drift-labs/[email protected].13":
172-
version "0.12.13"
173-
resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.12.13.tgz#5b728e12b523350b89db710498c32ee4a12b2443"
174-
integrity sha512-iXtZ5/Ln7SVHi8gS+NAVY4y394jvynb7ueccEAbru38OTfsrB4J/ejepAQrs7x3dz8bjARoHpmZod5lD18YQAw==
171+
"@drift-labs/[email protected].14":
172+
version "0.12.14"
173+
resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.12.14.tgz#32960ae671cf54c96edc4889d73a41385ea76803"
174+
integrity sha512-0WpbZiKOdU9H+J2js50/kGxkzfFVu8Gs+beEeKNwKOmBzWdwO6cMxeuqg29Yk+EHcXBYbqT9gvMan17t9wBYpA==
175175
dependencies:
176176
"@coral-xyz/anchor" "0.26.0"
177-
"@drift-labs/sdk" "2.104.0-beta.23"
177+
"@drift-labs/sdk" "2.104.0-beta.27"
178178
"@solana/web3.js" "1.91.7"
179179

180-
"@drift-labs/[email protected].23":
181-
version "2.104.0-beta.23"
182-
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.104.0-beta.23.tgz#7d20bde8079aafcfa42448aaa6f88b9de40751d4"
183-
integrity sha512-1xok0cxi6v63Y6jD4i3TDJ1SH7TNbaFvdSmGylNaa8b50B04Q3oPI64jKOJoy9ECdyWt2wDkOxEvw6YusGGwJA==
180+
"@drift-labs/[email protected].27":
181+
version "2.104.0-beta.27"
182+
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.104.0-beta.27.tgz#2d018171b76599096467902f14e780b8b90ca17e"
183+
integrity sha512-USZQzxjcc1iIx/TN3dEVV4/g32BcFkliilKhg5rufmGWUjbxqDjvsvQes2o5DCZMicYtEJw461wLdJdzq1GJWQ==
184184
dependencies:
185185
"@coral-xyz/anchor" "0.29.0"
186186
"@coral-xyz/anchor-30" "npm:@coral-xyz/[email protected]"
@@ -196,6 +196,7 @@
196196
"@switchboard-xyz/on-demand" "1.2.42"
197197
"@triton-one/yellowstone-grpc" "1.3.0"
198198
anchor-bankrun "0.3.0"
199+
nanoid "3.3.4"
199200
node-cache "5.1.2"
200201
rpc-websockets "7.5.1"
201202
solana-bankrun "0.3.1"
@@ -4047,6 +4048,11 @@ [email protected]:
40474048
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
40484049
integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==
40494050

4051+
4052+
version "3.3.4"
4053+
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
4054+
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
4055+
40504056
natural-compare-lite@^1.4.0:
40514057
version "1.4.0"
40524058
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"

0 commit comments

Comments
 (0)