@bulletxyz/bullet-sdk 0.28.3-rc.0 → 0.29.0-rc.0
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/browser/index.js +148 -136
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +148 -136
- package/dist/node/index.js.map +2 -2
- package/dist/types/connection.d.ts +1 -0
- package/dist/types/constants.d.ts +0 -20
- package/dist/types/exchange.d.ts +4 -2
- package/dist/types/rollupTypes.d.ts +32 -3
- package/package.json +1 -1
|
@@ -8,4 +8,5 @@ export declare class BaseConnection {
|
|
|
8
8
|
export declare class Connection extends BaseConnection {
|
|
9
9
|
getTokenBalance(address: Address, token_id: TokenId): Promise<bigint>;
|
|
10
10
|
getTotalSupply(token_id: TokenId): Promise<bigint>;
|
|
11
|
+
getGasTokenAddress(): Promise<TokenId>;
|
|
11
12
|
}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
import type { Network } from "./types";
|
|
2
|
-
export declare const TOKEN_ADDRESSES: {
|
|
3
|
-
readonly GAS: "token_1nyl0e0yweragfsatygt24zmd8jrr2vqtvdfptzjhxkguz2xxx3vs0y07u7";
|
|
4
|
-
readonly USDC: "token_1zh04r2k3kk0jf3xzr8cfpcm6qntumxwdvglq75g2ynwcu7daca0qm9ccg3";
|
|
5
|
-
readonly SOL: "token_1djhak8xt5326dgq8urtean5xtsv6hawcn9cy9wvsdtptu2eqj40q0qjxr7";
|
|
6
|
-
readonly BTC: "token_1g09xywefypxxx5exvxuqy0v3c5a7jwpnq4kkl85wxu9pkhgnrtqszlm4n8";
|
|
7
|
-
readonly ETH: "token_1gxvm2vkwqw40q9d4djxhrk66mukgrhdtqljeq5qa7jm3ajyksmmqwervaa";
|
|
8
|
-
readonly DOGE: "token_1y0xpw76f4nlscy0g50j0n7vyt6cemza96p4gj7a3hj548a3tmcrspfjmr3";
|
|
9
|
-
readonly WIF: "token_1kwcvtrg0k4xllu8ylxukquckmlh273u8eufvqtx30e07gm8c3lpsuxv8j6";
|
|
10
|
-
readonly XRP: "token_1jezvz43ldt6vqgycch077qqa4m8e97enrqww93vzgqra7v7rhxpqz4j3rm";
|
|
11
|
-
readonly HYPE: "token_1caey4sxtejtmf3q0djxkuztx6up4f66dkudgmw2ev0slhafx09kqj9qxcf";
|
|
12
|
-
readonly ADA: "token_1xgppquwlmyxsp9ecrqtu2feucecjkcfryvm6uhxsegvqn494mywsm75spg";
|
|
13
|
-
readonly TRUMP: "token_1pmd3hja4m4jewfjfcxl3zt6vlmphyyh0nlr4cn3kfs0pkdqx4wwq76053k";
|
|
14
|
-
readonly SUI: "token_1kxyfvmf7mxr5256kx8cjrg6whvau54wpq30n5j805h64z0wyzzpswhmz36";
|
|
15
|
-
readonly JUP: "token_18saxwfuma39ks3gafmqtql5y57qpd6yh2r6s4uawak8c8pe6xrzspw5gtv";
|
|
16
|
-
readonly JTO: "token_1ecdw04ht4xh5hkhx37dshz7gpjgkrww56e53tqx4nkhmau55p5yswazeej";
|
|
17
|
-
readonly ENA: "token_120xgtxhl5uwp9p20k8yjd5plshr9fdvsn5afj7cqazh5csuduj8q9nmy42";
|
|
18
|
-
readonly BERA: "token_133zykxvsvq8u8eq2j67n63gc08dpc4zudrch9vl7028rahcvss3s42ywhs";
|
|
19
|
-
readonly TIA: "token_185jxgchq6kpxskn4eggjfeju3t4sjxxfxj5mx9dn6wgydud7mtys4glllf";
|
|
20
|
-
readonly ZEX: "token_1g3hhmzp0c358t0s2dxht8jqqrfnnrgerk423mgs4cxd96u8ux24stetj0c";
|
|
21
|
-
};
|
|
22
2
|
export interface Endpoints {
|
|
23
3
|
rest: string;
|
|
24
4
|
ws?: string;
|
package/dist/types/exchange.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import type { Address, AssetName, MarketMetadata, MarketName, Network, NewOrderA
|
|
|
7
7
|
import { type AccountAddresses, type AssetRegistry, type BorrowLendPools, type GlobalParameters, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type SpotMarket, type Tpsl, type TpslOrderIdsToExecute, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
8
8
|
export declare class ExchangeConnection extends BaseConnection {
|
|
9
9
|
private wsManager?;
|
|
10
|
-
private
|
|
11
|
-
private
|
|
10
|
+
private assetInfoRegistry?;
|
|
11
|
+
private assetInfoRegistryReverse?;
|
|
12
12
|
private marketRegistry?;
|
|
13
13
|
private marketRegistryReverse?;
|
|
14
14
|
private constructor();
|
|
@@ -26,6 +26,8 @@ export declare class ExchangeConnection extends BaseConnection {
|
|
|
26
26
|
private getMarketMapping;
|
|
27
27
|
getAssetId(asset: AssetName): number;
|
|
28
28
|
getAssetName(assetId: number): AssetName;
|
|
29
|
+
getTokenAddress(assetName: AssetName): string;
|
|
30
|
+
getTokenAddresses(): Record<string, string>;
|
|
29
31
|
getMarketId(market: MarketName): number;
|
|
30
32
|
getMarketMeta(market: MarketName): MarketMetadata;
|
|
31
33
|
getMarketName(marketId: number): string;
|
|
@@ -23,7 +23,7 @@ type BankCallMessage = {
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
type WarpCallMessage = {
|
|
26
|
-
|
|
26
|
+
Register: {
|
|
27
27
|
admin: {
|
|
28
28
|
InsecureOwner: Address;
|
|
29
29
|
};
|
|
@@ -46,15 +46,43 @@ type WarpCallMessage = {
|
|
|
46
46
|
outbound_transferrable_tokens_limit: string;
|
|
47
47
|
outbound_limit_replenishment_per_slot: string;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
EnrollRemoteRouter: {
|
|
50
50
|
warp_route: string;
|
|
51
51
|
remote_domain: number;
|
|
52
52
|
remote_router_address: string;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
UnEnrollRemoteRouter: {
|
|
55
55
|
warp_route: string;
|
|
56
56
|
remote_domain: number;
|
|
57
57
|
};
|
|
58
|
+
TransferRemote: {
|
|
59
|
+
amount: number;
|
|
60
|
+
destination_domain: number;
|
|
61
|
+
gas_payment_limit: number;
|
|
62
|
+
recipient: string;
|
|
63
|
+
relayer?: {
|
|
64
|
+
Standard?: string;
|
|
65
|
+
Vm?: string;
|
|
66
|
+
} | null;
|
|
67
|
+
warp_route: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
type InterchainGasPaymasterCallMessage = {
|
|
71
|
+
set_relayer_config: {
|
|
72
|
+
domain_oracle_data: {
|
|
73
|
+
domain: number;
|
|
74
|
+
data_value: {
|
|
75
|
+
gas_price: number;
|
|
76
|
+
token_exchange_rate: number;
|
|
77
|
+
};
|
|
78
|
+
}[];
|
|
79
|
+
domain_default_gas: {
|
|
80
|
+
domain: number;
|
|
81
|
+
default_gas: number;
|
|
82
|
+
}[];
|
|
83
|
+
default_gas: number;
|
|
84
|
+
beneficiary?: string;
|
|
85
|
+
};
|
|
58
86
|
};
|
|
59
87
|
type TriggerOrderArgs = {
|
|
60
88
|
order_price: number;
|
|
@@ -354,5 +382,6 @@ export type RuntimeCall = ExactlyOne<{
|
|
|
354
382
|
exchange: ExactlyOne<ExchangeCallMessage>;
|
|
355
383
|
bank: ExactlyOne<BankCallMessage>;
|
|
356
384
|
warp: ExactlyOne<WarpCallMessage>;
|
|
385
|
+
interchain_gas_paymaster: ExactlyOne<InterchainGasPaymasterCallMessage>;
|
|
357
386
|
}>;
|
|
358
387
|
export {};
|