@renegade-fi/renegade-sdk 0.1.7 → 0.1.8
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/bun.lock +80 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/src/client.d.ts +229 -0
- package/dist/src/client.js +496 -0
- package/dist/src/http.d.ts +84 -0
- package/dist/src/http.js +193 -0
- package/dist/src/types/fixedPoint.d.ts +12 -0
- package/dist/src/types/fixedPoint.js +31 -0
- package/dist/src/types/index.d.ts +125 -0
- package/dist/src/types/index.js +9 -0
- package/dist/src/types/malleableMatch.d.ts +198 -0
- package/dist/src/types/malleableMatch.js +304 -0
- package/dist/src/version.d.ts +6 -0
- package/dist/src/version.js +6 -0
- package/examples/supported_tokens.ts +44 -0
- package/package.json +2 -2
- package/src/client.ts +64 -5
- package/src/http.ts +13 -4
- package/src/types/index.ts +19 -0
- package/src/version.ts +2 -2
package/bun.lock
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 1,
|
|
3
|
+
"workspaces": {
|
|
4
|
+
"": {
|
|
5
|
+
"name": "renegade-sdk",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@noble/hashes": "^1.7.1",
|
|
8
|
+
"json-bigint": "^1.0.0",
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@biomejs/biome": "^1.9.4",
|
|
12
|
+
"@types/bun": "latest",
|
|
13
|
+
"@types/json-bigint": "^1.0.4",
|
|
14
|
+
"typescript": "^5",
|
|
15
|
+
"viem": "^2.23.15",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"packages": {
|
|
20
|
+
"@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="],
|
|
21
|
+
|
|
22
|
+
"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
|
|
23
|
+
|
|
24
|
+
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
|
|
25
|
+
|
|
26
|
+
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
|
|
27
|
+
|
|
28
|
+
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
|
|
29
|
+
|
|
30
|
+
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
|
|
31
|
+
|
|
32
|
+
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
|
|
33
|
+
|
|
34
|
+
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
|
|
35
|
+
|
|
36
|
+
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
|
|
37
|
+
|
|
38
|
+
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
|
|
39
|
+
|
|
40
|
+
"@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="],
|
|
41
|
+
|
|
42
|
+
"@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="],
|
|
43
|
+
|
|
44
|
+
"@scure/base": ["@scure/base@1.2.4", "", {}, "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ=="],
|
|
45
|
+
|
|
46
|
+
"@scure/bip32": ["@scure/bip32@1.6.2", "", { "dependencies": { "@noble/curves": "~1.8.1", "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.2" } }, "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw=="],
|
|
47
|
+
|
|
48
|
+
"@scure/bip39": ["@scure/bip39@1.5.4", "", { "dependencies": { "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.4" } }, "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA=="],
|
|
49
|
+
|
|
50
|
+
"@types/bun": ["@types/bun@1.2.6", "", { "dependencies": { "bun-types": "1.2.6" } }, "sha512-fY9CAmTdJH1Llx7rugB0FpgWK2RKuHCs3g2cFDYXUutIy1QGiPQxKkGY8owhfZ4MXWNfxwIbQLChgH5gDsY7vw=="],
|
|
51
|
+
|
|
52
|
+
"@types/json-bigint": ["@types/json-bigint@1.0.4", "", {}, "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag=="],
|
|
53
|
+
|
|
54
|
+
"@types/node": ["@types/node@22.13.13", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ=="],
|
|
55
|
+
|
|
56
|
+
"@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
|
|
57
|
+
|
|
58
|
+
"abitype": ["abitype@1.0.8", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="],
|
|
59
|
+
|
|
60
|
+
"bignumber.js": ["bignumber.js@9.1.2", "", {}, "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="],
|
|
61
|
+
|
|
62
|
+
"bun-types": ["bun-types@1.2.6", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-FbCKyr5KDiPULUzN/nm5oqQs9nXCHD8dVc64BArxJadCvbNzAI6lUWGh9fSJZWeDIRD38ikceBU8Kj/Uh+53oQ=="],
|
|
63
|
+
|
|
64
|
+
"eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="],
|
|
65
|
+
|
|
66
|
+
"isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="],
|
|
67
|
+
|
|
68
|
+
"json-bigint": ["json-bigint@1.0.0", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="],
|
|
69
|
+
|
|
70
|
+
"ox": ["ox@0.6.9", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-wi5ShvzE4eOcTwQVsIPdFr+8ycyX+5le/96iAJutaZAvCes1J0+RvpEPg5QDPDiaR0XQQAvZVl7AwqQcINuUug=="],
|
|
71
|
+
|
|
72
|
+
"typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
|
|
73
|
+
|
|
74
|
+
"undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
|
|
75
|
+
|
|
76
|
+
"viem": ["viem@2.23.15", "", { "dependencies": { "@noble/curves": "1.8.1", "@noble/hashes": "1.7.1", "@scure/bip32": "1.6.2", "@scure/bip39": "1.5.4", "abitype": "1.0.8", "isows": "1.0.6", "ox": "0.6.9", "ws": "8.18.1" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-2t9lROkSzj/ciEZ08NqAHZ6c+J1wKLwJ4qpUxcHdVHcLBt6GfO9+ycuZycTT05ckfJ6TbwnMXMa3bMonvhtUMw=="],
|
|
77
|
+
|
|
78
|
+
"ws": ["ws@8.18.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w=="],
|
|
79
|
+
}
|
|
80
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renegade External Match Client
|
|
3
|
+
* A TypeScript client for interacting with the Renegade Darkpool API.
|
|
4
|
+
*/
|
|
5
|
+
export { ExternalMatchClient, ExternalMatchClientError, RequestQuoteOptions, AssembleExternalMatchOptions, } from "./src/client";
|
|
6
|
+
export type { ApiExternalAssetTransfer, ApiTimestampedPrice, ApiExternalMatchResult, FeeTake, ExternalOrder, ApiExternalQuote, ApiSignedExternalQuote, GasSponsorshipInfo, SignedGasSponsorshipInfo, SignedExternalQuote, SettlementTransaction, AtomicMatchApiBundle, ExternalQuoteRequest, ExternalQuoteResponse, AssembleExternalMatchRequest, ExternalMatchResponse, } from "./src/types/index";
|
|
7
|
+
export { OrderSide } from "./src/types/index";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renegade External Match Client
|
|
3
|
+
* A TypeScript client for interacting with the Renegade Darkpool API.
|
|
4
|
+
*/
|
|
5
|
+
// Export main client
|
|
6
|
+
export { ExternalMatchClient, ExternalMatchClientError, RequestQuoteOptions, AssembleExternalMatchOptions, } from "./src/client";
|
|
7
|
+
// Export enums
|
|
8
|
+
export { OrderSide } from "./src/types/index";
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client for interacting with the Renegade external matching API.
|
|
3
|
+
*
|
|
4
|
+
* This client handles authentication and provides methods for requesting quotes,
|
|
5
|
+
* assembling matches, and executing trades.
|
|
6
|
+
*/
|
|
7
|
+
import { type ExternalMatchResponse, type ExternalOrder, MalleableExternalMatchResponse, type OrderBookDepth, type SignedExternalQuote, type SupportedTokensResponse, type TokenPricesResponse } from "./types/index";
|
|
8
|
+
/**
|
|
9
|
+
* Options for requesting a quote.
|
|
10
|
+
*/
|
|
11
|
+
export declare class RequestQuoteOptions {
|
|
12
|
+
disableGasSponsorship: boolean;
|
|
13
|
+
gasRefundAddress?: string;
|
|
14
|
+
refundNativeEth: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new instance of RequestQuoteOptions.
|
|
17
|
+
*/
|
|
18
|
+
static new(): RequestQuoteOptions;
|
|
19
|
+
/**
|
|
20
|
+
* Set whether gas sponsorship should be disabled.
|
|
21
|
+
*/
|
|
22
|
+
withGasSponsorshipDisabled(disableGasSponsorship: boolean): RequestQuoteOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Set the gas refund address.
|
|
25
|
+
*/
|
|
26
|
+
withGasRefundAddress(gasRefundAddress: string): RequestQuoteOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Set whether to refund in native ETH.
|
|
29
|
+
*/
|
|
30
|
+
withRefundNativeEth(refundNativeEth: boolean): RequestQuoteOptions;
|
|
31
|
+
/**
|
|
32
|
+
* Build the request path with query parameters.
|
|
33
|
+
*/
|
|
34
|
+
buildRequestPath(): string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options for assembling an external match.
|
|
38
|
+
*/
|
|
39
|
+
export declare class AssembleExternalMatchOptions {
|
|
40
|
+
doGasEstimation: boolean;
|
|
41
|
+
allowShared: boolean;
|
|
42
|
+
receiverAddress?: string;
|
|
43
|
+
updatedOrder?: ExternalOrder;
|
|
44
|
+
requestGasSponsorship: boolean;
|
|
45
|
+
gasRefundAddress?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Create a new instance of AssembleExternalMatchOptions.
|
|
48
|
+
*/
|
|
49
|
+
static new(): AssembleExternalMatchOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Set whether to do gas estimation.
|
|
52
|
+
*/
|
|
53
|
+
withGasEstimation(doGasEstimation: boolean): AssembleExternalMatchOptions;
|
|
54
|
+
/**
|
|
55
|
+
* Set whether to allow shared gas sponsorship.
|
|
56
|
+
*/
|
|
57
|
+
withAllowShared(allowShared: boolean): AssembleExternalMatchOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Set the receiver address.
|
|
60
|
+
*/
|
|
61
|
+
withReceiverAddress(receiverAddress: string): AssembleExternalMatchOptions;
|
|
62
|
+
/**
|
|
63
|
+
* Set the updated order.
|
|
64
|
+
*/
|
|
65
|
+
withUpdatedOrder(updatedOrder: ExternalOrder): AssembleExternalMatchOptions;
|
|
66
|
+
/**
|
|
67
|
+
* Set whether to request gas sponsorship.
|
|
68
|
+
* @deprecated Request gas sponsorship when requesting a quote instead
|
|
69
|
+
*/
|
|
70
|
+
withGasSponsorship(requestGasSponsorship: boolean): AssembleExternalMatchOptions;
|
|
71
|
+
/**
|
|
72
|
+
* Set the gas refund address.
|
|
73
|
+
* @deprecated Request gas sponsorship when requesting a quote instead
|
|
74
|
+
*/
|
|
75
|
+
withGasRefundAddress(gasRefundAddress: string): AssembleExternalMatchOptions;
|
|
76
|
+
/**
|
|
77
|
+
* Build the request path with query parameters.
|
|
78
|
+
*/
|
|
79
|
+
buildRequestPath(): string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Options for assembling a malleable external match.
|
|
83
|
+
*/
|
|
84
|
+
export declare class AssembleMalleableExternalMatchOptions extends AssembleExternalMatchOptions {
|
|
85
|
+
/**
|
|
86
|
+
* Create a new instance of AssembleExternalMatchOptions.
|
|
87
|
+
*/
|
|
88
|
+
static new(): AssembleMalleableExternalMatchOptions;
|
|
89
|
+
/**
|
|
90
|
+
* Build the request path with query parameters.
|
|
91
|
+
*/
|
|
92
|
+
buildRequestPath(): string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Error thrown by the ExternalMatchClient.
|
|
96
|
+
*/
|
|
97
|
+
export declare class ExternalMatchClientError extends Error {
|
|
98
|
+
statusCode?: number;
|
|
99
|
+
constructor(message: string, statusCode?: number);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Client for interacting with the Renegade external matching API.
|
|
103
|
+
*/
|
|
104
|
+
export declare class ExternalMatchClient {
|
|
105
|
+
private apiKey;
|
|
106
|
+
private httpClient;
|
|
107
|
+
private relayerHttpClient;
|
|
108
|
+
/**
|
|
109
|
+
* Initialize a new ExternalMatchClient.
|
|
110
|
+
*
|
|
111
|
+
* @param apiKey The API key for authentication
|
|
112
|
+
* @param apiSecret The API secret for request signing
|
|
113
|
+
* @param baseUrl The base URL of the Renegade API
|
|
114
|
+
*/
|
|
115
|
+
constructor(apiKey: string, apiSecret: string, baseUrl: string, relayerUrl: string);
|
|
116
|
+
/**
|
|
117
|
+
* Create a new client configured for the Arbitrum Sepolia testnet.
|
|
118
|
+
*
|
|
119
|
+
* @deprecated Use {@link ExternalMatchClient.newArbitrumSepoliaClient} instead
|
|
120
|
+
*/
|
|
121
|
+
static newSepoliaClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
122
|
+
/**
|
|
123
|
+
* Create a new client configured for the Arbitrum Sepolia testnet.
|
|
124
|
+
*
|
|
125
|
+
* @param apiKey The API key for authentication
|
|
126
|
+
* @param apiSecret The API secret for request signing
|
|
127
|
+
* @param relayerUrl The relayer URL for the client
|
|
128
|
+
* @returns A new ExternalMatchClient configured for Sepolia
|
|
129
|
+
*/
|
|
130
|
+
static newArbitrumSepoliaClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
131
|
+
/**
|
|
132
|
+
* Create a new client configured for the Base Sepolia testnet.
|
|
133
|
+
*
|
|
134
|
+
* @param apiKey The API key for authentication
|
|
135
|
+
* @param apiSecret The API secret for request signing
|
|
136
|
+
* @returns A new ExternalMatchClient configured for Sepolia
|
|
137
|
+
*/
|
|
138
|
+
static newBaseSepoliaClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
139
|
+
/**
|
|
140
|
+
* Create a new client configured for the Arbitrum One mainnet.
|
|
141
|
+
*
|
|
142
|
+
* @deprecated Use {@link ExternalMatchClient.newArbitrumOneClient} instead
|
|
143
|
+
*/
|
|
144
|
+
static newMainnetClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
145
|
+
/**
|
|
146
|
+
* Create a new client configured for the Arbitrum One mainnet.
|
|
147
|
+
*
|
|
148
|
+
* @param apiKey The API key for authentication
|
|
149
|
+
* @param apiSecret The API secret for request signing
|
|
150
|
+
* @returns A new ExternalMatchClient configured for mainnet
|
|
151
|
+
*/
|
|
152
|
+
static newArbitrumOneClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
153
|
+
/**
|
|
154
|
+
* Create a new client configured for the Base mainnet.
|
|
155
|
+
*
|
|
156
|
+
* @param apiKey The API key for authentication
|
|
157
|
+
* @param apiSecret The API secret for request signing
|
|
158
|
+
* @returns A new ExternalMatchClient configured for mainnet
|
|
159
|
+
*/
|
|
160
|
+
static newBaseMainnetClient(apiKey: string, apiSecret: string): ExternalMatchClient;
|
|
161
|
+
/**
|
|
162
|
+
* Request a quote for the given order.
|
|
163
|
+
*
|
|
164
|
+
* @param order The order to request a quote for
|
|
165
|
+
* @returns A promise that resolves to a signed quote if one is available, null otherwise
|
|
166
|
+
* @throws ExternalMatchClientError if the request fails
|
|
167
|
+
*/
|
|
168
|
+
requestQuote(order: ExternalOrder): Promise<SignedExternalQuote | null>;
|
|
169
|
+
/**
|
|
170
|
+
* Request a quote for the given order with custom options.
|
|
171
|
+
*
|
|
172
|
+
* @param order The order to request a quote for
|
|
173
|
+
* @param options Custom options for the quote request
|
|
174
|
+
* @returns A promise that resolves to a signed quote if one is available, null otherwise
|
|
175
|
+
* @throws ExternalMatchClientError if the request fails
|
|
176
|
+
*/
|
|
177
|
+
requestQuoteWithOptions(order: ExternalOrder, options: RequestQuoteOptions): Promise<SignedExternalQuote | null>;
|
|
178
|
+
/**
|
|
179
|
+
* Assemble a quote into a match bundle with default options.
|
|
180
|
+
*
|
|
181
|
+
* @param quote The signed quote to assemble
|
|
182
|
+
* @returns A promise that resolves to a match response if assembly succeeds, null otherwise
|
|
183
|
+
* @throws ExternalMatchClientError if the request fails
|
|
184
|
+
*/
|
|
185
|
+
assembleQuote(quote: SignedExternalQuote): Promise<ExternalMatchResponse | null>;
|
|
186
|
+
/**
|
|
187
|
+
* Assemble a quote into a match bundle with custom options.
|
|
188
|
+
*
|
|
189
|
+
* @param quote The signed quote to assemble
|
|
190
|
+
* @param options Custom options for quote assembly
|
|
191
|
+
* @returns A promise that resolves to a match response if assembly succeeds, null otherwise
|
|
192
|
+
* @throws ExternalMatchClientError if the request fails
|
|
193
|
+
*/
|
|
194
|
+
assembleQuoteWithOptions(quote: SignedExternalQuote, options: AssembleExternalMatchOptions): Promise<ExternalMatchResponse | null>;
|
|
195
|
+
/**
|
|
196
|
+
* Assemble a quote into a malleable match bundle with default options.
|
|
197
|
+
*
|
|
198
|
+
* @param quote The signed quote to assemble
|
|
199
|
+
* @returns A promise that resolves to a match response if assembly succeeds, null otherwise
|
|
200
|
+
* @throws ExternalMatchClientError if the request fails
|
|
201
|
+
*/
|
|
202
|
+
assembleMalleableQuote(quote: SignedExternalQuote): Promise<MalleableExternalMatchResponse | null>;
|
|
203
|
+
/**
|
|
204
|
+
* Assemble a quote into a malleable match bundle with custom options.
|
|
205
|
+
*/
|
|
206
|
+
assembleMalleableQuoteWithOptions(quote: SignedExternalQuote, options: AssembleMalleableExternalMatchOptions): Promise<MalleableExternalMatchResponse | null>;
|
|
207
|
+
/**
|
|
208
|
+
* Get order book depth for a given base token mint.
|
|
209
|
+
*
|
|
210
|
+
* @param mint The base token mint address
|
|
211
|
+
* @returns A promise that resolves to the order book depth
|
|
212
|
+
* @throws ExternalMatchClientError if the request fails
|
|
213
|
+
*/
|
|
214
|
+
getOrderBookDepth(mint: string): Promise<OrderBookDepth>;
|
|
215
|
+
/**
|
|
216
|
+
* Get a list of supported tokens for external matches
|
|
217
|
+
*/
|
|
218
|
+
getSupportedTokens(): Promise<SupportedTokensResponse>;
|
|
219
|
+
/**
|
|
220
|
+
* Get a list of token prices
|
|
221
|
+
*/
|
|
222
|
+
getTokenPrices(): Promise<TokenPricesResponse>;
|
|
223
|
+
/**
|
|
224
|
+
* Get the headers required for API requests.
|
|
225
|
+
*
|
|
226
|
+
* @returns Headers containing the API key and SDK version
|
|
227
|
+
*/
|
|
228
|
+
private getHeaders;
|
|
229
|
+
}
|