@rabby-wallet/hyperliquid-sdk 1.0.0-beta.11 → 1.0.0-beta.13

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.
@@ -470,18 +470,16 @@ class ExchangeClient {
470
470
  type: constants_1.ExchangeType.APPROVE_BUILDER_FEE,
471
471
  hyperliquidChain: this.isTestnet ? 'Testnet' : 'Mainnet',
472
472
  signatureChainId: this.isTestnet ? '0x66eee' : '0xa4b1',
473
+ maxFeeRate: params.maxFee || '0.1%',
473
474
  builder: params.builder.toLowerCase(),
474
- maxFee: params.maxFee || '0.1%',
475
475
  nonce,
476
476
  };
477
477
  const { domain, types, primaryType, message } = (0, signer_1.prepareMasterSignData)({
478
478
  action,
479
479
  payloadTypes: [
480
- { name: 'type', type: 'string' },
481
480
  { name: 'hyperliquidChain', type: 'string' },
482
- { name: 'signatureChainId', type: 'string' },
483
- { name: 'builder', type: 'string' },
484
- { name: 'maxFee', type: 'string' },
481
+ { name: 'maxFeeRate', type: 'string' },
482
+ { name: 'builder', type: 'address' },
485
483
  { name: 'nonce', type: 'uint64' },
486
484
  ],
487
485
  primaryType: 'HyperliquidTransaction:ApproveBuilderFee',
@@ -526,9 +524,7 @@ class ExchangeClient {
526
524
  const { domain, types, primaryType, message } = (0, signer_1.prepareMasterSignData)({
527
525
  action,
528
526
  payloadTypes: [
529
- { name: 'type', type: 'string' },
530
527
  { name: 'hyperliquidChain', type: 'string' },
531
- { name: 'signatureChainId', type: 'string' },
532
528
  { name: 'destination', type: 'string' },
533
529
  { name: 'amount', type: 'string' },
534
530
  { name: 'time', type: 'uint64' },
@@ -35,9 +35,9 @@ export declare class InfoClient {
35
35
  */
36
36
  candleSnapshot(coin: string, interval: string, startTime?: number, endTime?: number): Promise<CandleSnapshot>;
37
37
  /**
38
- * Check builder fee approval status
38
+ * Check max builder fee
39
39
  */
40
- checkBuilderFeeApproval(builder: string, address?: string): Promise<any>;
40
+ getMaxBuilderFee(builder: string, address?: string): Promise<number>;
41
41
  /**
42
42
  * Get user role
43
43
  */
@@ -129,12 +129,12 @@ class InfoClient {
129
129
  });
130
130
  }
131
131
  /**
132
- * Check builder fee approval status
132
+ * Check max builder fee
133
133
  */
134
- checkBuilderFeeApproval(builder, address) {
134
+ getMaxBuilderFee(builder, address) {
135
135
  return __awaiter(this, void 0, void 0, function* () {
136
136
  return this.httpClient.info({
137
- type: constants_1.InfoType.CHECK_BUILDER_FEE_APPROVAL,
137
+ type: constants_1.InfoType.MAX_BUILDER_FEE,
138
138
  user: address || this.masterAddress,
139
139
  builder,
140
140
  });
@@ -42,7 +42,7 @@ export declare enum InfoType {
42
42
  FRONTEND_OPEN_ORDERS = "frontendOpenOrders",
43
43
  PREDICTED_FUNDINGS = "predictedFundings",
44
44
  ACTIVE_ASSET_DATA = "activeAssetData",
45
- CHECK_BUILDER_FEE_APPROVAL = "checkBuilderFeeApproval",
45
+ MAX_BUILDER_FEE = "maxBuilderFee",
46
46
  USER_FEES = "userFees",
47
47
  USER_ROLE = "userRole",
48
48
  EXTRA_AGENTS = "extraAgents"
@@ -50,7 +50,7 @@ var InfoType;
50
50
  InfoType["FRONTEND_OPEN_ORDERS"] = "frontendOpenOrders";
51
51
  InfoType["PREDICTED_FUNDINGS"] = "predictedFundings";
52
52
  InfoType["ACTIVE_ASSET_DATA"] = "activeAssetData";
53
- InfoType["CHECK_BUILDER_FEE_APPROVAL"] = "checkBuilderFeeApproval";
53
+ InfoType["MAX_BUILDER_FEE"] = "maxBuilderFee";
54
54
  InfoType["USER_FEES"] = "userFees";
55
55
  InfoType["USER_ROLE"] = "userRole";
56
56
  InfoType["EXTRA_AGENTS"] = "extraAgents";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/hyperliquid-sdk",
3
- "version": "1.0.0-beta.11",
3
+ "version": "1.0.0-beta.13",
4
4
  "description": "Simplified Hyperliquid Perpetuals Trading SDK for Frontend Applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",