@d8x/perpetuals-sdk 0.1.10 → 0.1.11
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/bundle.js
CHANGED
|
@@ -6810,7 +6810,7 @@ exports.containsFlag = containsFlag;
|
|
|
6810
6810
|
|
|
6811
6811
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6812
6812
|
exports.D8X_SDK_VERSION = void 0;
|
|
6813
|
-
exports.D8X_SDK_VERSION = "0.1.
|
|
6813
|
+
exports.D8X_SDK_VERSION = "0.1.11";
|
|
6814
6814
|
//# sourceMappingURL=version.js.map
|
|
6815
6815
|
|
|
6816
6816
|
/***/ }),
|
|
@@ -6901,7 +6901,6 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
6901
6901
|
_this.traderAddr = "";
|
|
6902
6902
|
_this.signer = null;
|
|
6903
6903
|
_this.gasLimit = 15000000;
|
|
6904
|
-
_this.chainId = 0;
|
|
6905
6904
|
if (privateKey) {
|
|
6906
6905
|
_this.privateKey = privateKey;
|
|
6907
6906
|
}
|
|
@@ -6924,9 +6923,9 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
6924
6923
|
*/
|
|
6925
6924
|
WriteAccessHandler.prototype.createProxyInstance = function (provider) {
|
|
6926
6925
|
return __awaiter(this, void 0, void 0, function () {
|
|
6927
|
-
var wallet, _a
|
|
6928
|
-
return __generator(this, function (
|
|
6929
|
-
switch (
|
|
6926
|
+
var wallet, _a;
|
|
6927
|
+
return __generator(this, function (_b) {
|
|
6928
|
+
switch (_b.label) {
|
|
6930
6929
|
case 0:
|
|
6931
6930
|
if (provider == undefined) {
|
|
6932
6931
|
this.provider = new ethers_1.ethers.providers.JsonRpcBatchProvider(this.nodeURL);
|
|
@@ -6940,15 +6939,11 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
6940
6939
|
}
|
|
6941
6940
|
return [4 /*yield*/, this.initContractsAndData(this.signer)];
|
|
6942
6941
|
case 1:
|
|
6943
|
-
|
|
6942
|
+
_b.sent();
|
|
6944
6943
|
_a = this;
|
|
6945
6944
|
return [4 /*yield*/, this.signer.getAddress()];
|
|
6946
6945
|
case 2:
|
|
6947
|
-
_a.traderAddr =
|
|
6948
|
-
_b = this;
|
|
6949
|
-
return [4 /*yield*/, this.provider.getNetwork()];
|
|
6950
|
-
case 3:
|
|
6951
|
-
_b.chainId = (_c.sent()).chainId;
|
|
6946
|
+
_a.traderAddr = _b.sent();
|
|
6952
6947
|
return [2 /*return*/];
|
|
6953
6948
|
}
|
|
6954
6949
|
});
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const D8X_SDK_VERSION = "0.1.
|
|
1
|
+
export declare const D8X_SDK_VERSION = "0.1.11";
|
package/dist/src/version.js
CHANGED
|
@@ -13,7 +13,6 @@ export default class WriteAccessHandler extends PerpetualDataHandler {
|
|
|
13
13
|
protected traderAddr: string;
|
|
14
14
|
protected signer: ethers.Signer | null;
|
|
15
15
|
protected gasLimit: number;
|
|
16
|
-
protected chainId: number;
|
|
17
16
|
/**
|
|
18
17
|
* Constructor
|
|
19
18
|
* @param {NodeSDKConfig} config configuration
|
|
@@ -77,7 +77,6 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
77
77
|
_this.traderAddr = "";
|
|
78
78
|
_this.signer = null;
|
|
79
79
|
_this.gasLimit = 15000000;
|
|
80
|
-
_this.chainId = 0;
|
|
81
80
|
if (privateKey) {
|
|
82
81
|
_this.privateKey = privateKey;
|
|
83
82
|
}
|
|
@@ -100,9 +99,9 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
100
99
|
*/
|
|
101
100
|
WriteAccessHandler.prototype.createProxyInstance = function (provider) {
|
|
102
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
var wallet, _a
|
|
104
|
-
return __generator(this, function (
|
|
105
|
-
switch (
|
|
102
|
+
var wallet, _a;
|
|
103
|
+
return __generator(this, function (_b) {
|
|
104
|
+
switch (_b.label) {
|
|
106
105
|
case 0:
|
|
107
106
|
if (provider == undefined) {
|
|
108
107
|
this.provider = new ethers_1.ethers.providers.JsonRpcBatchProvider(this.nodeURL);
|
|
@@ -116,15 +115,11 @@ var WriteAccessHandler = /** @class */ (function (_super) {
|
|
|
116
115
|
}
|
|
117
116
|
return [4 /*yield*/, this.initContractsAndData(this.signer)];
|
|
118
117
|
case 1:
|
|
119
|
-
|
|
118
|
+
_b.sent();
|
|
120
119
|
_a = this;
|
|
121
120
|
return [4 /*yield*/, this.signer.getAddress()];
|
|
122
121
|
case 2:
|
|
123
|
-
_a.traderAddr =
|
|
124
|
-
_b = this;
|
|
125
|
-
return [4 /*yield*/, this.provider.getNetwork()];
|
|
126
|
-
case 3:
|
|
127
|
-
_b.chainId = (_c.sent()).chainId;
|
|
122
|
+
_a.traderAddr = _b.sent();
|
|
128
123
|
return [2 /*return*/];
|
|
129
124
|
}
|
|
130
125
|
});
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const D8X_SDK_VERSION = "0.1.
|
|
1
|
+
export const D8X_SDK_VERSION = "0.1.11";
|
|
@@ -15,7 +15,6 @@ export default class WriteAccessHandler extends PerpetualDataHandler {
|
|
|
15
15
|
protected traderAddr: string = "";
|
|
16
16
|
protected signer: ethers.Signer | null = null;
|
|
17
17
|
protected gasLimit: number = 15_000_000;
|
|
18
|
-
protected chainId: number = 0;
|
|
19
18
|
/**
|
|
20
19
|
* Constructor
|
|
21
20
|
* @param {NodeSDKConfig} config configuration
|
|
@@ -53,7 +52,6 @@ export default class WriteAccessHandler extends PerpetualDataHandler {
|
|
|
53
52
|
}
|
|
54
53
|
await this.initContractsAndData(this.signer);
|
|
55
54
|
this.traderAddr = await this.signer.getAddress();
|
|
56
|
-
this.chainId = (await this.provider.getNetwork()).chainId;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
/**
|