starknet 4.12.0 → 4.13.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/.eslintrc +1 -0
- package/CHANGELOG.md +14 -0
- package/__tests__/account.test.ts +0 -2
- package/dist/index.d.ts +2683 -24
- package/dist/index.global.js +22994 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +4713 -53
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4655 -0
- package/dist/index.mjs.map +1 -0
- package/index.d.ts +2683 -24
- package/index.global.js +22994 -0
- package/index.global.js.map +1 -0
- package/index.js +4713 -53
- package/index.js.map +1 -0
- package/index.mjs +4655 -0
- package/index.mjs.map +1 -0
- package/package.json +8 -2
- package/src/account/default.ts +43 -8
- package/src/account/interface.ts +25 -2
- package/src/constants.ts +0 -1
- package/src/provider/default.ts +3 -0
- package/src/provider/interface.ts +2 -0
- package/src/provider/rpc.ts +4 -4
- package/src/provider/sequencer.ts +4 -1
- package/src/types/lib.ts +1 -1
- package/src/types/provider.ts +5 -0
- package/src/utils/ellipticCurve.ts +3 -1
- package/src/utils/fetchPonyfill.ts +3 -2
- package/src/utils/hash.ts +3 -2
- package/src/utils/number.ts +2 -2
- package/tsup.config.ts +10 -0
- package/account/default.d.ts +0 -30
- package/account/default.js +0 -526
- package/account/index.d.ts +0 -2
- package/account/index.js +0 -18
- package/account/interface.d.ts +0 -161
- package/account/interface.js +0 -27
- package/constants.d.ts +0 -36
- package/constants.js +0 -2067
- package/contract/contractFactory.d.ts +0 -31
- package/contract/contractFactory.js +0 -102
- package/contract/default.d.ts +0 -108
- package/contract/default.js +0 -640
- package/contract/index.d.ts +0 -3
- package/contract/index.js +0 -19
- package/contract/interface.d.ts +0 -80
- package/contract/interface.js +0 -9
- package/dist/account/default.d.ts +0 -30
- package/dist/account/default.js +0 -526
- package/dist/account/index.d.ts +0 -2
- package/dist/account/index.js +0 -18
- package/dist/account/interface.d.ts +0 -161
- package/dist/account/interface.js +0 -27
- package/dist/constants.d.ts +0 -36
- package/dist/constants.js +0 -2067
- package/dist/contract/contractFactory.d.ts +0 -31
- package/dist/contract/contractFactory.js +0 -102
- package/dist/contract/default.d.ts +0 -108
- package/dist/contract/default.js +0 -640
- package/dist/contract/index.d.ts +0 -3
- package/dist/contract/index.js +0 -19
- package/dist/contract/interface.d.ts +0 -80
- package/dist/contract/interface.js +0 -9
- package/dist/provider/default.d.ts +0 -37
- package/dist/provider/default.js +0 -207
- package/dist/provider/errors.d.ts +0 -9
- package/dist/provider/errors.js +0 -40
- package/dist/provider/index.d.ts +0 -7
- package/dist/provider/index.js +0 -24
- package/dist/provider/interface.d.ts +0 -203
- package/dist/provider/interface.js +0 -9
- package/dist/provider/rpc.d.ts +0 -86
- package/dist/provider/rpc.js +0 -605
- package/dist/provider/sequencer.d.ts +0 -79
- package/dist/provider/sequencer.js +0 -575
- package/dist/provider/utils.d.ts +0 -30
- package/dist/provider/utils.js +0 -84
- package/dist/signer/default.d.ts +0 -13
- package/dist/signer/default.js +0 -102
- package/dist/signer/index.d.ts +0 -2
- package/dist/signer/index.js +0 -18
- package/dist/signer/interface.d.ts +0 -60
- package/dist/signer/interface.js +0 -9
- package/dist/types/account.d.ts +0 -11
- package/dist/types/account.js +0 -2
- package/dist/types/api/index.d.ts +0 -10
- package/dist/types/api/index.js +0 -18
- package/dist/types/api/openrpc.d.ts +0 -572
- package/dist/types/api/openrpc.js +0 -45
- package/dist/types/api/rpc.d.ts +0 -43
- package/dist/types/api/rpc.js +0 -2
- package/dist/types/api/sequencer.d.ts +0 -320
- package/dist/types/api/sequencer.js +0 -2
- package/dist/types/contract.d.ts +0 -5
- package/dist/types/contract.js +0 -2
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.js +0 -35
- package/dist/types/lib.d.ts +0 -120
- package/dist/types/lib.js +0 -8
- package/dist/types/provider.d.ts +0 -99
- package/dist/types/provider.js +0 -2
- package/dist/types/signer.d.ts +0 -19
- package/dist/types/signer.js +0 -2
- package/dist/utils/address.d.ts +0 -5
- package/dist/utils/address.js +0 -41
- package/dist/utils/ellipticCurve.d.ts +0 -29
- package/dist/utils/ellipticCurve.js +0 -132
- package/dist/utils/encode.d.ts +0 -15
- package/dist/utils/encode.js +0 -96
- package/dist/utils/fetchPonyfill.d.ts +0 -2
- package/dist/utils/fetchPonyfill.js +0 -6
- package/dist/utils/hash.d.ts +0 -37
- package/dist/utils/hash.js +0 -162
- package/dist/utils/json.d.ts +0 -16
- package/dist/utils/json.js +0 -19
- package/dist/utils/merkle.d.ts +0 -10
- package/dist/utils/merkle.js +0 -89
- package/dist/utils/number.d.ts +0 -16
- package/dist/utils/number.js +0 -112
- package/dist/utils/provider.d.ts +0 -4
- package/dist/utils/provider.js +0 -38
- package/dist/utils/responseParser/index.d.ts +0 -11
- package/dist/utils/responseParser/index.js +0 -9
- package/dist/utils/responseParser/rpc.d.ts +0 -20
- package/dist/utils/responseParser/rpc.js +0 -44
- package/dist/utils/responseParser/sequencer.d.ts +0 -17
- package/dist/utils/responseParser/sequencer.js +0 -99
- package/dist/utils/shortString.d.ts +0 -4
- package/dist/utils/shortString.js +0 -26
- package/dist/utils/stark.d.ts +0 -16
- package/dist/utils/stark.js +0 -91
- package/dist/utils/transaction.d.ts +0 -20
- package/dist/utils/transaction.js +0 -79
- package/dist/utils/typedData/index.d.ts +0 -72
- package/dist/utils/typedData/index.js +0 -239
- package/dist/utils/typedData/types.d.ts +0 -32
- package/dist/utils/typedData/types.js +0 -2
- package/dist/utils/typedData/utils.d.ts +0 -8
- package/dist/utils/typedData/utils.js +0 -16
- package/dist/utils/uint256.d.ts +0 -11
- package/dist/utils/uint256.js +0 -28
- package/dist/utils/url.d.ts +0 -7
- package/dist/utils/url.js +0 -49
- package/provider/default.d.ts +0 -37
- package/provider/default.js +0 -207
- package/provider/errors.d.ts +0 -9
- package/provider/errors.js +0 -40
- package/provider/index.d.ts +0 -7
- package/provider/index.js +0 -24
- package/provider/interface.d.ts +0 -203
- package/provider/interface.js +0 -9
- package/provider/rpc.d.ts +0 -86
- package/provider/rpc.js +0 -605
- package/provider/sequencer.d.ts +0 -79
- package/provider/sequencer.js +0 -575
- package/provider/utils.d.ts +0 -30
- package/provider/utils.js +0 -84
- package/signer/default.d.ts +0 -13
- package/signer/default.js +0 -102
- package/signer/index.d.ts +0 -2
- package/signer/index.js +0 -18
- package/signer/interface.d.ts +0 -60
- package/signer/interface.js +0 -9
- package/types/account.d.ts +0 -11
- package/types/account.js +0 -2
- package/types/api/index.d.ts +0 -10
- package/types/api/index.js +0 -18
- package/types/api/openrpc.d.ts +0 -572
- package/types/api/openrpc.js +0 -45
- package/types/api/rpc.d.ts +0 -43
- package/types/api/rpc.js +0 -2
- package/types/api/sequencer.d.ts +0 -320
- package/types/api/sequencer.js +0 -2
- package/types/contract.d.ts +0 -5
- package/types/contract.js +0 -2
- package/types/index.d.ts +0 -7
- package/types/index.js +0 -35
- package/types/lib.d.ts +0 -120
- package/types/lib.js +0 -8
- package/types/provider.d.ts +0 -99
- package/types/provider.js +0 -2
- package/types/signer.d.ts +0 -19
- package/types/signer.js +0 -2
- package/utils/address.d.ts +0 -5
- package/utils/address.js +0 -41
- package/utils/ellipticCurve.d.ts +0 -29
- package/utils/ellipticCurve.js +0 -132
- package/utils/encode.d.ts +0 -15
- package/utils/encode.js +0 -96
- package/utils/fetchPonyfill.d.ts +0 -2
- package/utils/fetchPonyfill.js +0 -6
- package/utils/hash.d.ts +0 -37
- package/utils/hash.js +0 -162
- package/utils/json.d.ts +0 -16
- package/utils/json.js +0 -19
- package/utils/merkle.d.ts +0 -10
- package/utils/merkle.js +0 -89
- package/utils/number.d.ts +0 -16
- package/utils/number.js +0 -112
- package/utils/provider.d.ts +0 -4
- package/utils/provider.js +0 -38
- package/utils/responseParser/index.d.ts +0 -11
- package/utils/responseParser/index.js +0 -9
- package/utils/responseParser/rpc.d.ts +0 -20
- package/utils/responseParser/rpc.js +0 -44
- package/utils/responseParser/sequencer.d.ts +0 -17
- package/utils/responseParser/sequencer.js +0 -99
- package/utils/shortString.d.ts +0 -4
- package/utils/shortString.js +0 -26
- package/utils/stark.d.ts +0 -16
- package/utils/stark.js +0 -91
- package/utils/transaction.d.ts +0 -20
- package/utils/transaction.js +0 -79
- package/utils/typedData/index.d.ts +0 -72
- package/utils/typedData/index.js +0 -239
- package/utils/typedData/types.d.ts +0 -32
- package/utils/typedData/types.js +0 -2
- package/utils/typedData/utils.d.ts +0 -8
- package/utils/typedData/utils.js +0 -16
- package/utils/uint256.d.ts +0 -11
- package/utils/uint256.js +0 -28
- package/utils/url.d.ts +0 -7
- package/utils/url.js +0 -49
package/provider/default.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Provider = void 0;
|
|
40
|
-
var rpc_1 = require("./rpc");
|
|
41
|
-
var sequencer_1 = require("./sequencer");
|
|
42
|
-
var Provider = /** @class */ (function () {
|
|
43
|
-
function Provider(providerOrOptions) {
|
|
44
|
-
if (providerOrOptions && 'chainId' in providerOrOptions) {
|
|
45
|
-
this.provider = providerOrOptions;
|
|
46
|
-
}
|
|
47
|
-
else if (providerOrOptions === null || providerOrOptions === void 0 ? void 0 : providerOrOptions.rpc) {
|
|
48
|
-
this.provider = new rpc_1.RpcProvider(providerOrOptions.rpc);
|
|
49
|
-
}
|
|
50
|
-
else if (providerOrOptions === null || providerOrOptions === void 0 ? void 0 : providerOrOptions.sequencer) {
|
|
51
|
-
this.provider = new sequencer_1.SequencerProvider(providerOrOptions.sequencer);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
this.provider = new sequencer_1.SequencerProvider();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
Object.defineProperty(Provider.prototype, "chainId", {
|
|
58
|
-
get: function () {
|
|
59
|
-
return this.provider.chainId;
|
|
60
|
-
},
|
|
61
|
-
enumerable: false,
|
|
62
|
-
configurable: true
|
|
63
|
-
});
|
|
64
|
-
Provider.prototype.getChainId = function () {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
return [2 /*return*/, this.provider.getChainId()];
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
Provider.prototype.getBlock = function (blockIdentifier) {
|
|
72
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/, this.provider.getBlock(blockIdentifier)];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
Provider.prototype.getClassAt = function (contractAddress, blockIdentifier) {
|
|
80
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
81
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
-
return __generator(this, function (_a) {
|
|
83
|
-
return [2 /*return*/, this.provider.getClassAt(contractAddress, blockIdentifier)];
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
Provider.prototype.getClassHashAt = function (contractAddress, blockIdentifier) {
|
|
88
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
89
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
-
return __generator(this, function (_a) {
|
|
91
|
-
return [2 /*return*/, this.provider.getClassHashAt(contractAddress, blockIdentifier)];
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
Provider.prototype.getClassByHash = function (classHash) {
|
|
96
|
-
return this.provider.getClassByHash(classHash);
|
|
97
|
-
};
|
|
98
|
-
Provider.prototype.getEstimateFee = function (invocationWithTxType, invocationDetails, blockIdentifier) {
|
|
99
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
100
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
return [2 /*return*/, this.provider.getEstimateFee(invocationWithTxType, invocationDetails, blockIdentifier)];
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
Provider.prototype.getInvokeEstimateFee = function (invocationWithTxType, invocationDetails, blockIdentifier) {
|
|
107
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
108
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
-
return __generator(this, function (_a) {
|
|
110
|
-
return [2 /*return*/, this.provider.getInvokeEstimateFee(invocationWithTxType, invocationDetails, blockIdentifier)];
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
Provider.prototype.getNonce = function (contractAddress, blockIdentifier) {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
return [2 /*return*/, this.provider.getNonce(contractAddress, blockIdentifier)];
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
Provider.prototype.getStorageAt = function (contractAddress, key, blockIdentifier) {
|
|
122
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
123
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
return __generator(this, function (_a) {
|
|
125
|
-
return [2 /*return*/, this.provider.getStorageAt(contractAddress, key, blockIdentifier)];
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
Provider.prototype.getTransaction = function (txHash) {
|
|
130
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
-
return __generator(this, function (_a) {
|
|
132
|
-
return [2 /*return*/, this.provider.getTransaction(txHash)];
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
Provider.prototype.getTransactionReceipt = function (txHash) {
|
|
137
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
-
return __generator(this, function (_a) {
|
|
139
|
-
return [2 /*return*/, this.provider.getTransactionReceipt(txHash)];
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
Provider.prototype.callContract = function (request, blockIdentifier) {
|
|
144
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
145
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
-
return __generator(this, function (_a) {
|
|
147
|
-
return [2 /*return*/, this.provider.callContract(request, blockIdentifier)];
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
Provider.prototype.invokeFunction = function (functionInvocation, details) {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
153
|
-
return __generator(this, function (_a) {
|
|
154
|
-
return [2 /*return*/, this.provider.invokeFunction(functionInvocation, details)];
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
Provider.prototype.deployContract = function (payload, details) {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
-
return __generator(this, function (_a) {
|
|
161
|
-
return [2 /*return*/, this.provider.deployContract(payload, details)];
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
Provider.prototype.deployAccountContract = function (payload, details) {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
return __generator(this, function (_a) {
|
|
168
|
-
return [2 /*return*/, this.provider.deployAccountContract(payload, details)];
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
Provider.prototype.declareContract = function (transaction, details) {
|
|
173
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
-
return __generator(this, function (_a) {
|
|
175
|
-
return [2 /*return*/, this.provider.declareContract(transaction, details)];
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
Provider.prototype.getDeclareEstimateFee = function (transaction, details, blockIdentifier) {
|
|
180
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
181
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
-
return __generator(this, function (_a) {
|
|
183
|
-
return [2 /*return*/, this.provider.getDeclareEstimateFee(transaction, details, blockIdentifier)];
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
};
|
|
187
|
-
Provider.prototype.getDeployAccountEstimateFee = function (transaction, details, blockIdentifier) {
|
|
188
|
-
if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
|
|
189
|
-
return this.provider.getDeployAccountEstimateFee(transaction, details, blockIdentifier);
|
|
190
|
-
};
|
|
191
|
-
Provider.prototype.getCode = function (contractAddress, blockIdentifier) {
|
|
192
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
-
return __generator(this, function (_a) {
|
|
194
|
-
return [2 /*return*/, this.provider.getCode(contractAddress, blockIdentifier)];
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
};
|
|
198
|
-
Provider.prototype.waitForTransaction = function (txHash, retryInterval) {
|
|
199
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
200
|
-
return __generator(this, function (_a) {
|
|
201
|
-
return [2 /*return*/, this.provider.waitForTransaction(txHash, retryInterval)];
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
return Provider;
|
|
206
|
-
}());
|
|
207
|
-
exports.Provider = Provider;
|
package/provider/errors.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export declare class GatewayError extends CustomError {
|
|
3
|
-
errorCode: string;
|
|
4
|
-
constructor(message: string, errorCode: string);
|
|
5
|
-
}
|
|
6
|
-
export declare class HttpError extends CustomError {
|
|
7
|
-
errorCode: number;
|
|
8
|
-
constructor(message: string, errorCode: number);
|
|
9
|
-
}
|
package/provider/errors.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.HttpError = exports.GatewayError = void 0;
|
|
19
|
-
/* eslint-disable max-classes-per-file */
|
|
20
|
-
var ts_custom_error_1 = require("ts-custom-error");
|
|
21
|
-
var GatewayError = /** @class */ (function (_super) {
|
|
22
|
-
__extends(GatewayError, _super);
|
|
23
|
-
function GatewayError(message, errorCode) {
|
|
24
|
-
var _this = _super.call(this, message) || this;
|
|
25
|
-
_this.errorCode = errorCode;
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
return GatewayError;
|
|
29
|
-
}(ts_custom_error_1.CustomError));
|
|
30
|
-
exports.GatewayError = GatewayError;
|
|
31
|
-
var HttpError = /** @class */ (function (_super) {
|
|
32
|
-
__extends(HttpError, _super);
|
|
33
|
-
function HttpError(message, errorCode) {
|
|
34
|
-
var _this = _super.call(this, message) || this;
|
|
35
|
-
_this.errorCode = errorCode;
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
return HttpError;
|
|
39
|
-
}(ts_custom_error_1.CustomError));
|
|
40
|
-
exports.HttpError = HttpError;
|
package/provider/index.d.ts
DELETED
package/provider/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.defaultProvider = void 0;
|
|
18
|
-
var default_1 = require("./default");
|
|
19
|
-
__exportStar(require("./default"), exports);
|
|
20
|
-
__exportStar(require("./errors"), exports);
|
|
21
|
-
__exportStar(require("./sequencer"), exports);
|
|
22
|
-
__exportStar(require("./interface"), exports);
|
|
23
|
-
__exportStar(require("./rpc"), exports);
|
|
24
|
-
exports.defaultProvider = new default_1.Provider();
|
package/provider/interface.d.ts
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { StarknetChainId } from '../constants';
|
|
2
|
-
import type { Call, CallContractResponse, ContractClass, DeclareContractResponse, DeployContractPayload, DeployContractResponse, EstimateFeeResponse, GetBlockResponse, GetCodeResponse, GetTransactionReceiptResponse, GetTransactionResponse, Invocation, InvocationsDetailsWithNonce, InvokeFunctionResponse } from '../types';
|
|
3
|
-
import { DeclareContractTransaction, DeployAccountContractPayload, DeployAccountContractTransaction, InvocationsDetails } from '../types/lib';
|
|
4
|
-
import type { BigNumberish } from '../utils/number';
|
|
5
|
-
import { BlockIdentifier } from './utils';
|
|
6
|
-
export declare abstract class ProviderInterface {
|
|
7
|
-
abstract chainId: StarknetChainId;
|
|
8
|
-
/**
|
|
9
|
-
* Gets the Starknet chain Id
|
|
10
|
-
*
|
|
11
|
-
* @returns the chain Id
|
|
12
|
-
*/
|
|
13
|
-
abstract getChainId(): Promise<StarknetChainId>;
|
|
14
|
-
/**
|
|
15
|
-
* Calls a function on the StarkNet contract.
|
|
16
|
-
*
|
|
17
|
-
* @param call transaction to be called
|
|
18
|
-
* @param blockIdentifier block identifier
|
|
19
|
-
* @returns the result of the function on the smart contract.
|
|
20
|
-
*/
|
|
21
|
-
abstract callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* Gets the block information
|
|
24
|
-
*
|
|
25
|
-
* @param blockIdentifier block identifier
|
|
26
|
-
* @returns the block object
|
|
27
|
-
*/
|
|
28
|
-
abstract getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse>;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated The method should not be used
|
|
31
|
-
*/
|
|
32
|
-
abstract getCode(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<GetCodeResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Gets the contract class of the deployed contract.
|
|
35
|
-
*
|
|
36
|
-
* @param contractAddress - contract address
|
|
37
|
-
* @param blockIdentifier - block identifier
|
|
38
|
-
* @returns Contract class of compiled contract
|
|
39
|
-
*/
|
|
40
|
-
abstract getClassAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<ContractClass>;
|
|
41
|
-
/**
|
|
42
|
-
* Returns the class hash deployed under the given address.
|
|
43
|
-
*
|
|
44
|
-
* @param contractAddress - contract address
|
|
45
|
-
* @param blockIdentifier - block identifier
|
|
46
|
-
* @returns Class hash
|
|
47
|
-
*/
|
|
48
|
-
abstract getClassHashAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the contract class deployed under the given class hash.
|
|
51
|
-
*
|
|
52
|
-
* @param classHash - class hash
|
|
53
|
-
* @returns Contract class of compiled contract
|
|
54
|
-
*/
|
|
55
|
-
abstract getClassByHash(classHash: string): Promise<ContractClass>;
|
|
56
|
-
/**
|
|
57
|
-
* Gets the nonce of a contract with respect to a specific block
|
|
58
|
-
*
|
|
59
|
-
* @param contractAddress - contract address
|
|
60
|
-
* @returns the hex nonce
|
|
61
|
-
*/
|
|
62
|
-
abstract getNonce(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
63
|
-
/**
|
|
64
|
-
* Gets the contract's storage variable at a specific key.
|
|
65
|
-
*
|
|
66
|
-
* @param contractAddress
|
|
67
|
-
* @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)
|
|
68
|
-
* @param blockIdentifier - block identifier
|
|
69
|
-
* @returns the value of the storage variable
|
|
70
|
-
*/
|
|
71
|
-
abstract getStorageAt(contractAddress: string, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
72
|
-
/**
|
|
73
|
-
* Gets the transaction information from a tx id.
|
|
74
|
-
*
|
|
75
|
-
* @param txHash
|
|
76
|
-
* @returns the transacton object { transaction_id, status, transaction, block_number?, block_number?, transaction_index?, transaction_failure_reason? }
|
|
77
|
-
*/
|
|
78
|
-
abstract getTransaction(transactionHash: BigNumberish): Promise<GetTransactionResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* Gets the transaction receipt from a tx hash.
|
|
81
|
-
*
|
|
82
|
-
* @param txHash
|
|
83
|
-
* @returns the transaction receipt object
|
|
84
|
-
*/
|
|
85
|
-
abstract getTransactionReceipt(transactionHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Deploys a given compiled contract (json) to starknet
|
|
88
|
-
*
|
|
89
|
-
* @param payload payload to be deployed containing:
|
|
90
|
-
* - compiled contract code
|
|
91
|
-
* - constructor calldata
|
|
92
|
-
* - address salt
|
|
93
|
-
* @returns a confirmation of sending a transaction on the starknet contract
|
|
94
|
-
*/
|
|
95
|
-
abstract deployContract(payload: DeployContractPayload, details?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
96
|
-
/**
|
|
97
|
-
* Deploys a given compiled Account contract (json) to starknet
|
|
98
|
-
*
|
|
99
|
-
* @param payload payload to be deployed containing:
|
|
100
|
-
* - compiled contract code
|
|
101
|
-
* - constructor calldata
|
|
102
|
-
* - address salt
|
|
103
|
-
* @returns a confirmation of sending a transaction on the starknet contract
|
|
104
|
-
*/
|
|
105
|
-
abstract deployAccountContract(payload: DeployAccountContractPayload, details: InvocationsDetailsWithNonce): Promise<DeployContractResponse>;
|
|
106
|
-
/**
|
|
107
|
-
* Invokes a function on starknet
|
|
108
|
-
* @deprecated This method wont be supported as soon as fees are mandatory
|
|
109
|
-
*
|
|
110
|
-
* @param invocation the invocation object containing:
|
|
111
|
-
* - contractAddress - the address of the contract
|
|
112
|
-
* - entrypoint - the entrypoint of the contract
|
|
113
|
-
* - calldata - (defaults to []) the calldata
|
|
114
|
-
* - signature - (defaults to []) the signature
|
|
115
|
-
* @param details - optional details containing:
|
|
116
|
-
* - nonce - optional nonce
|
|
117
|
-
* - version - optional version
|
|
118
|
-
* - maxFee - optional maxFee
|
|
119
|
-
* @returns response from addTransaction
|
|
120
|
-
*/
|
|
121
|
-
abstract invokeFunction(invocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokeFunctionResponse>;
|
|
122
|
-
/**
|
|
123
|
-
* Declares a given compiled contract (json) to starknet
|
|
124
|
-
* @param transaction transaction payload to be deployed containing:
|
|
125
|
-
* - compiled contract code
|
|
126
|
-
* - sender address
|
|
127
|
-
* - signature
|
|
128
|
-
* @param details Invocation Details containing:
|
|
129
|
-
* - nonce
|
|
130
|
-
* - optional version
|
|
131
|
-
* - optional maxFee
|
|
132
|
-
* @returns a confirmation of sending a transaction on the starknet contract
|
|
133
|
-
*/
|
|
134
|
-
abstract declareContract(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclareContractResponse>;
|
|
135
|
-
/**
|
|
136
|
-
* Estimates the fee for a given INVOKE transaction
|
|
137
|
-
* @deprecated Please use getInvokeEstimateFee or getDeclareEstimateFee instead
|
|
138
|
-
*
|
|
139
|
-
* @param invocation the invocation object containing:
|
|
140
|
-
* - contractAddress - the address of the contract
|
|
141
|
-
* - entrypoint - the entrypoint of the contract
|
|
142
|
-
* - calldata - (defaults to []) the calldata
|
|
143
|
-
* - signature - (defaults to []) the signature
|
|
144
|
-
* @param blockIdentifier - block identifier
|
|
145
|
-
* @param details - optional details containing:
|
|
146
|
-
* - nonce - optional nonce
|
|
147
|
-
* - version - optional version
|
|
148
|
-
* @returns the estimated fee
|
|
149
|
-
*/
|
|
150
|
-
abstract getEstimateFee(invocation: Invocation, details: InvocationsDetailsWithNonce, blockIdentifier: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
151
|
-
/**
|
|
152
|
-
* Estimates the fee for a given INVOKE transaction
|
|
153
|
-
*
|
|
154
|
-
* @param invocation the invocation object containing:
|
|
155
|
-
* - contractAddress - the address of the contract
|
|
156
|
-
* - entrypoint - the entrypoint of the contract
|
|
157
|
-
* - calldata - (defaults to []) the calldata
|
|
158
|
-
* - signature - (defaults to []) the signature
|
|
159
|
-
* @param blockIdentifier - block identifier
|
|
160
|
-
* @param details - optional details containing:
|
|
161
|
-
* - nonce - optional nonce
|
|
162
|
-
* - version - optional version
|
|
163
|
-
* @returns the estimated fee
|
|
164
|
-
*/
|
|
165
|
-
abstract getInvokeEstimateFee(invocation: Invocation, details: InvocationsDetailsWithNonce, blockIdentifier: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
166
|
-
/**
|
|
167
|
-
* Estimates the fee for a given DECLARE transaction
|
|
168
|
-
*
|
|
169
|
-
* @param transaction transaction payload to be declared containing:
|
|
170
|
-
* - compiled contract code
|
|
171
|
-
* - sender address
|
|
172
|
-
* - signature - (defaults to []) the signature
|
|
173
|
-
* @param details - optional details containing:
|
|
174
|
-
* - nonce
|
|
175
|
-
* - version - optional version
|
|
176
|
-
* - optional maxFee
|
|
177
|
-
* @param blockIdentifier - block identifier
|
|
178
|
-
* @returns the estimated fee
|
|
179
|
-
*/
|
|
180
|
-
abstract getDeclareEstimateFee(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
181
|
-
/**
|
|
182
|
-
* Estimates the fee for a given DEPLOY_ACCOUNT transaction
|
|
183
|
-
*
|
|
184
|
-
* @param transaction transaction payload to be deployed containing:
|
|
185
|
-
* - classHash
|
|
186
|
-
* - constructorCalldata
|
|
187
|
-
* - addressSalt
|
|
188
|
-
* - signature - (defaults to []) the signature
|
|
189
|
-
* @param details - optional details containing:
|
|
190
|
-
* - nonce
|
|
191
|
-
* - version - optional version
|
|
192
|
-
* - optional maxFee
|
|
193
|
-
* @param blockIdentifier - block identifier
|
|
194
|
-
* @returns the estimated fee
|
|
195
|
-
*/
|
|
196
|
-
abstract getDeployAccountEstimateFee(transaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
197
|
-
/**
|
|
198
|
-
* Wait for the transaction to be accepted
|
|
199
|
-
* @param txHash - transaction hash
|
|
200
|
-
* @param retryInterval - retry interval
|
|
201
|
-
*/
|
|
202
|
-
abstract waitForTransaction(txHash: BigNumberish, retryInterval?: number): Promise<void>;
|
|
203
|
-
}
|
package/provider/interface.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProviderInterface = void 0;
|
|
4
|
-
var ProviderInterface = /** @class */ (function () {
|
|
5
|
-
function ProviderInterface() {
|
|
6
|
-
}
|
|
7
|
-
return ProviderInterface;
|
|
8
|
-
}());
|
|
9
|
-
exports.ProviderInterface = ProviderInterface;
|
package/provider/rpc.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { StarknetChainId } from '../constants';
|
|
2
|
-
import { Call, CallContractResponse, DeclareContractResponse, DeployContractPayload, DeployContractResponse, EstimateFeeResponse, GetBlockResponse, GetCodeResponse, GetTransactionResponse, Invocation, InvocationsDetailsWithNonce, InvokeFunctionResponse } from '../types';
|
|
3
|
-
import { RPC } from '../types/api';
|
|
4
|
-
import { DeclareContractTransaction, DeployAccountContractTransaction, InvocationsDetails } from '../types/lib';
|
|
5
|
-
import { BigNumberish } from '../utils/number';
|
|
6
|
-
import { ProviderInterface } from './interface';
|
|
7
|
-
import { BlockIdentifier } from './utils';
|
|
8
|
-
export declare type RpcProviderOptions = {
|
|
9
|
-
nodeUrl: string;
|
|
10
|
-
retries?: number;
|
|
11
|
-
headers?: object;
|
|
12
|
-
};
|
|
13
|
-
export declare class RpcProvider implements ProviderInterface {
|
|
14
|
-
nodeUrl: string;
|
|
15
|
-
chainId: StarknetChainId;
|
|
16
|
-
headers: object;
|
|
17
|
-
private responseParser;
|
|
18
|
-
private retries;
|
|
19
|
-
constructor(optionsOrProvider: RpcProviderOptions);
|
|
20
|
-
fetch(method: any, params: any): Promise<any>;
|
|
21
|
-
protected errorHandler(error: any): void;
|
|
22
|
-
protected fetchEndpoint<T extends keyof RPC.Methods>(method: T, params?: RPC.Methods[T]['params']): Promise<RPC.Methods[T]['result']>;
|
|
23
|
-
getChainId(): Promise<any>;
|
|
24
|
-
getBlock(blockIdentifier?: BlockIdentifier): Promise<GetBlockResponse>;
|
|
25
|
-
getBlockHashAndNumber(): Promise<RPC.BlockHashAndNumber>;
|
|
26
|
-
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<RPC.GetBlockWithTxHashesResponse>;
|
|
27
|
-
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<RPC.GetBlockWithTxs>;
|
|
28
|
-
getClassHashAt(contractAddress: RPC.ContractAddress, blockIdentifier?: BlockIdentifier): Promise<RPC.Felt>;
|
|
29
|
-
getNonce(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<RPC.Nonce>;
|
|
30
|
-
getPendingTransactions(): Promise<RPC.PendingTransactions>;
|
|
31
|
-
getProtocolVersion(): Promise<Error>;
|
|
32
|
-
getStateUpdate(blockIdentifier?: BlockIdentifier): Promise<RPC.StateUpdate>;
|
|
33
|
-
getStorageAt(contractAddress: string, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
34
|
-
getTransaction(txHash: string): Promise<GetTransactionResponse>;
|
|
35
|
-
getTransactionByHash(txHash: string): Promise<RPC.GetTransactionByHashResponse>;
|
|
36
|
-
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<RPC.GetTransactionByBlockIdAndIndex>;
|
|
37
|
-
getTransactionReceipt(txHash: string): Promise<RPC.TransactionReceipt>;
|
|
38
|
-
getClassByHash(classHash: RPC.Felt): Promise<RPC.ContractClass>;
|
|
39
|
-
getClass(classHash: RPC.Felt, blockIdentifier?: BlockIdentifier): Promise<RPC.ContractClass>;
|
|
40
|
-
getClassAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<RPC.ContractClass>;
|
|
41
|
-
getCode(_contractAddress: string, _blockIdentifier?: BlockIdentifier): Promise<GetCodeResponse>;
|
|
42
|
-
getEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
43
|
-
getInvokeEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
44
|
-
getDeclareEstimateFee({ senderAddress, contractDefinition, signature }: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
45
|
-
getDeployAccountEstimateFee({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
46
|
-
declareContract({ contractDefinition, signature, senderAddress }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclareContractResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated This method wont be supported soon, use Account.deploy instead
|
|
49
|
-
*/
|
|
50
|
-
deployContract({ contract, constructorCalldata, addressSalt }: DeployContractPayload, details?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
51
|
-
deployAccountContract({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployContractResponse>;
|
|
52
|
-
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokeFunctionResponse>;
|
|
53
|
-
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
54
|
-
traceTransaction(transactionHash: RPC.TransactionHash): Promise<RPC.Trace>;
|
|
55
|
-
traceBlockTransactions(blockHash: RPC.BlockHash): Promise<RPC.Traces>;
|
|
56
|
-
waitForTransaction(txHash: string, retryInterval?: number): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Gets the transaction count from a block.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* @param blockIdentifier
|
|
62
|
-
* @returns Number of transactions
|
|
63
|
-
*/
|
|
64
|
-
getTransactionCount(blockIdentifier?: BlockIdentifier): Promise<RPC.GetTransactionCountResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* Gets the latest block number
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @returns Number of the latest block
|
|
70
|
-
*/
|
|
71
|
-
getBlockNumber(): Promise<RPC.GetBlockNumberResponse>;
|
|
72
|
-
/**
|
|
73
|
-
* Gets syncing status of the node
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* @returns Object with the stats data
|
|
77
|
-
*/
|
|
78
|
-
getSyncingStats(): Promise<RPC.GetSyncingStatsResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* Gets all the events filtered
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @returns events and the pagination of the events
|
|
84
|
-
*/
|
|
85
|
-
getEvents(eventFilter: RPC.EventFilter): Promise<RPC.GetEventsResponse>;
|
|
86
|
-
}
|