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.
Files changed (224) hide show
  1. package/.eslintrc +1 -0
  2. package/CHANGELOG.md +14 -0
  3. package/__tests__/account.test.ts +0 -2
  4. package/dist/index.d.ts +2683 -24
  5. package/dist/index.global.js +22994 -0
  6. package/dist/index.global.js.map +1 -0
  7. package/dist/index.js +4713 -53
  8. package/dist/index.js.map +1 -0
  9. package/dist/index.mjs +4655 -0
  10. package/dist/index.mjs.map +1 -0
  11. package/index.d.ts +2683 -24
  12. package/index.global.js +22994 -0
  13. package/index.global.js.map +1 -0
  14. package/index.js +4713 -53
  15. package/index.js.map +1 -0
  16. package/index.mjs +4655 -0
  17. package/index.mjs.map +1 -0
  18. package/package.json +8 -2
  19. package/src/account/default.ts +43 -8
  20. package/src/account/interface.ts +25 -2
  21. package/src/constants.ts +0 -1
  22. package/src/provider/default.ts +3 -0
  23. package/src/provider/interface.ts +2 -0
  24. package/src/provider/rpc.ts +4 -4
  25. package/src/provider/sequencer.ts +4 -1
  26. package/src/types/lib.ts +1 -1
  27. package/src/types/provider.ts +5 -0
  28. package/src/utils/ellipticCurve.ts +3 -1
  29. package/src/utils/fetchPonyfill.ts +3 -2
  30. package/src/utils/hash.ts +3 -2
  31. package/src/utils/number.ts +2 -2
  32. package/tsup.config.ts +10 -0
  33. package/account/default.d.ts +0 -30
  34. package/account/default.js +0 -526
  35. package/account/index.d.ts +0 -2
  36. package/account/index.js +0 -18
  37. package/account/interface.d.ts +0 -161
  38. package/account/interface.js +0 -27
  39. package/constants.d.ts +0 -36
  40. package/constants.js +0 -2067
  41. package/contract/contractFactory.d.ts +0 -31
  42. package/contract/contractFactory.js +0 -102
  43. package/contract/default.d.ts +0 -108
  44. package/contract/default.js +0 -640
  45. package/contract/index.d.ts +0 -3
  46. package/contract/index.js +0 -19
  47. package/contract/interface.d.ts +0 -80
  48. package/contract/interface.js +0 -9
  49. package/dist/account/default.d.ts +0 -30
  50. package/dist/account/default.js +0 -526
  51. package/dist/account/index.d.ts +0 -2
  52. package/dist/account/index.js +0 -18
  53. package/dist/account/interface.d.ts +0 -161
  54. package/dist/account/interface.js +0 -27
  55. package/dist/constants.d.ts +0 -36
  56. package/dist/constants.js +0 -2067
  57. package/dist/contract/contractFactory.d.ts +0 -31
  58. package/dist/contract/contractFactory.js +0 -102
  59. package/dist/contract/default.d.ts +0 -108
  60. package/dist/contract/default.js +0 -640
  61. package/dist/contract/index.d.ts +0 -3
  62. package/dist/contract/index.js +0 -19
  63. package/dist/contract/interface.d.ts +0 -80
  64. package/dist/contract/interface.js +0 -9
  65. package/dist/provider/default.d.ts +0 -37
  66. package/dist/provider/default.js +0 -207
  67. package/dist/provider/errors.d.ts +0 -9
  68. package/dist/provider/errors.js +0 -40
  69. package/dist/provider/index.d.ts +0 -7
  70. package/dist/provider/index.js +0 -24
  71. package/dist/provider/interface.d.ts +0 -203
  72. package/dist/provider/interface.js +0 -9
  73. package/dist/provider/rpc.d.ts +0 -86
  74. package/dist/provider/rpc.js +0 -605
  75. package/dist/provider/sequencer.d.ts +0 -79
  76. package/dist/provider/sequencer.js +0 -575
  77. package/dist/provider/utils.d.ts +0 -30
  78. package/dist/provider/utils.js +0 -84
  79. package/dist/signer/default.d.ts +0 -13
  80. package/dist/signer/default.js +0 -102
  81. package/dist/signer/index.d.ts +0 -2
  82. package/dist/signer/index.js +0 -18
  83. package/dist/signer/interface.d.ts +0 -60
  84. package/dist/signer/interface.js +0 -9
  85. package/dist/types/account.d.ts +0 -11
  86. package/dist/types/account.js +0 -2
  87. package/dist/types/api/index.d.ts +0 -10
  88. package/dist/types/api/index.js +0 -18
  89. package/dist/types/api/openrpc.d.ts +0 -572
  90. package/dist/types/api/openrpc.js +0 -45
  91. package/dist/types/api/rpc.d.ts +0 -43
  92. package/dist/types/api/rpc.js +0 -2
  93. package/dist/types/api/sequencer.d.ts +0 -320
  94. package/dist/types/api/sequencer.js +0 -2
  95. package/dist/types/contract.d.ts +0 -5
  96. package/dist/types/contract.js +0 -2
  97. package/dist/types/index.d.ts +0 -7
  98. package/dist/types/index.js +0 -35
  99. package/dist/types/lib.d.ts +0 -120
  100. package/dist/types/lib.js +0 -8
  101. package/dist/types/provider.d.ts +0 -99
  102. package/dist/types/provider.js +0 -2
  103. package/dist/types/signer.d.ts +0 -19
  104. package/dist/types/signer.js +0 -2
  105. package/dist/utils/address.d.ts +0 -5
  106. package/dist/utils/address.js +0 -41
  107. package/dist/utils/ellipticCurve.d.ts +0 -29
  108. package/dist/utils/ellipticCurve.js +0 -132
  109. package/dist/utils/encode.d.ts +0 -15
  110. package/dist/utils/encode.js +0 -96
  111. package/dist/utils/fetchPonyfill.d.ts +0 -2
  112. package/dist/utils/fetchPonyfill.js +0 -6
  113. package/dist/utils/hash.d.ts +0 -37
  114. package/dist/utils/hash.js +0 -162
  115. package/dist/utils/json.d.ts +0 -16
  116. package/dist/utils/json.js +0 -19
  117. package/dist/utils/merkle.d.ts +0 -10
  118. package/dist/utils/merkle.js +0 -89
  119. package/dist/utils/number.d.ts +0 -16
  120. package/dist/utils/number.js +0 -112
  121. package/dist/utils/provider.d.ts +0 -4
  122. package/dist/utils/provider.js +0 -38
  123. package/dist/utils/responseParser/index.d.ts +0 -11
  124. package/dist/utils/responseParser/index.js +0 -9
  125. package/dist/utils/responseParser/rpc.d.ts +0 -20
  126. package/dist/utils/responseParser/rpc.js +0 -44
  127. package/dist/utils/responseParser/sequencer.d.ts +0 -17
  128. package/dist/utils/responseParser/sequencer.js +0 -99
  129. package/dist/utils/shortString.d.ts +0 -4
  130. package/dist/utils/shortString.js +0 -26
  131. package/dist/utils/stark.d.ts +0 -16
  132. package/dist/utils/stark.js +0 -91
  133. package/dist/utils/transaction.d.ts +0 -20
  134. package/dist/utils/transaction.js +0 -79
  135. package/dist/utils/typedData/index.d.ts +0 -72
  136. package/dist/utils/typedData/index.js +0 -239
  137. package/dist/utils/typedData/types.d.ts +0 -32
  138. package/dist/utils/typedData/types.js +0 -2
  139. package/dist/utils/typedData/utils.d.ts +0 -8
  140. package/dist/utils/typedData/utils.js +0 -16
  141. package/dist/utils/uint256.d.ts +0 -11
  142. package/dist/utils/uint256.js +0 -28
  143. package/dist/utils/url.d.ts +0 -7
  144. package/dist/utils/url.js +0 -49
  145. package/provider/default.d.ts +0 -37
  146. package/provider/default.js +0 -207
  147. package/provider/errors.d.ts +0 -9
  148. package/provider/errors.js +0 -40
  149. package/provider/index.d.ts +0 -7
  150. package/provider/index.js +0 -24
  151. package/provider/interface.d.ts +0 -203
  152. package/provider/interface.js +0 -9
  153. package/provider/rpc.d.ts +0 -86
  154. package/provider/rpc.js +0 -605
  155. package/provider/sequencer.d.ts +0 -79
  156. package/provider/sequencer.js +0 -575
  157. package/provider/utils.d.ts +0 -30
  158. package/provider/utils.js +0 -84
  159. package/signer/default.d.ts +0 -13
  160. package/signer/default.js +0 -102
  161. package/signer/index.d.ts +0 -2
  162. package/signer/index.js +0 -18
  163. package/signer/interface.d.ts +0 -60
  164. package/signer/interface.js +0 -9
  165. package/types/account.d.ts +0 -11
  166. package/types/account.js +0 -2
  167. package/types/api/index.d.ts +0 -10
  168. package/types/api/index.js +0 -18
  169. package/types/api/openrpc.d.ts +0 -572
  170. package/types/api/openrpc.js +0 -45
  171. package/types/api/rpc.d.ts +0 -43
  172. package/types/api/rpc.js +0 -2
  173. package/types/api/sequencer.d.ts +0 -320
  174. package/types/api/sequencer.js +0 -2
  175. package/types/contract.d.ts +0 -5
  176. package/types/contract.js +0 -2
  177. package/types/index.d.ts +0 -7
  178. package/types/index.js +0 -35
  179. package/types/lib.d.ts +0 -120
  180. package/types/lib.js +0 -8
  181. package/types/provider.d.ts +0 -99
  182. package/types/provider.js +0 -2
  183. package/types/signer.d.ts +0 -19
  184. package/types/signer.js +0 -2
  185. package/utils/address.d.ts +0 -5
  186. package/utils/address.js +0 -41
  187. package/utils/ellipticCurve.d.ts +0 -29
  188. package/utils/ellipticCurve.js +0 -132
  189. package/utils/encode.d.ts +0 -15
  190. package/utils/encode.js +0 -96
  191. package/utils/fetchPonyfill.d.ts +0 -2
  192. package/utils/fetchPonyfill.js +0 -6
  193. package/utils/hash.d.ts +0 -37
  194. package/utils/hash.js +0 -162
  195. package/utils/json.d.ts +0 -16
  196. package/utils/json.js +0 -19
  197. package/utils/merkle.d.ts +0 -10
  198. package/utils/merkle.js +0 -89
  199. package/utils/number.d.ts +0 -16
  200. package/utils/number.js +0 -112
  201. package/utils/provider.d.ts +0 -4
  202. package/utils/provider.js +0 -38
  203. package/utils/responseParser/index.d.ts +0 -11
  204. package/utils/responseParser/index.js +0 -9
  205. package/utils/responseParser/rpc.d.ts +0 -20
  206. package/utils/responseParser/rpc.js +0 -44
  207. package/utils/responseParser/sequencer.d.ts +0 -17
  208. package/utils/responseParser/sequencer.js +0 -99
  209. package/utils/shortString.d.ts +0 -4
  210. package/utils/shortString.js +0 -26
  211. package/utils/stark.d.ts +0 -16
  212. package/utils/stark.js +0 -91
  213. package/utils/transaction.d.ts +0 -20
  214. package/utils/transaction.js +0 -79
  215. package/utils/typedData/index.d.ts +0 -72
  216. package/utils/typedData/index.js +0 -239
  217. package/utils/typedData/types.d.ts +0 -32
  218. package/utils/typedData/types.js +0 -2
  219. package/utils/typedData/utils.d.ts +0 -8
  220. package/utils/typedData/utils.js +0 -16
  221. package/utils/uint256.d.ts +0 -11
  222. package/utils/uint256.js +0 -28
  223. package/utils/url.d.ts +0 -7
  224. package/utils/url.js +0 -49
@@ -1,79 +0,0 @@
1
- import { StarknetChainId } from '../constants';
2
- import { Call, CallContractResponse, ContractClass, DeclareContractResponse, DeployContractPayload, DeployContractResponse, EstimateFeeResponse, GetBlockResponse, GetTransactionReceiptResponse, GetTransactionResponse, Invocation, InvocationsDetailsWithNonce, InvokeFunctionResponse } from '../types';
3
- import { CallL1Handler, GetContractAddressesResponse, GetTransactionStatusResponse, GetTransactionTraceResponse, Sequencer } from '../types/api';
4
- import { DeclareContractTransaction, DeployAccountContractTransaction } from '../types/lib';
5
- import { BigNumberish } from '../utils/number';
6
- import { ProviderInterface } from './interface';
7
- import { BlockIdentifier } from './utils';
8
- declare type NetworkName = 'mainnet-alpha' | 'goerli-alpha' | 'goerli-alpha-2';
9
- export declare type SequencerProviderOptions = {
10
- network: NetworkName;
11
- } | {
12
- baseUrl: string;
13
- feederGatewayUrl?: string;
14
- gatewayUrl?: string;
15
- chainId?: StarknetChainId;
16
- headers?: object;
17
- };
18
- export declare class SequencerProvider implements ProviderInterface {
19
- baseUrl: string;
20
- feederGatewayUrl: string;
21
- gatewayUrl: string;
22
- chainId: StarknetChainId;
23
- headers: object | undefined;
24
- private responseParser;
25
- constructor(optionsOrProvider?: SequencerProviderOptions);
26
- protected static getNetworkFromName(name: NetworkName): "https://alpha-mainnet.starknet.io" | "https://alpha4.starknet.io" | "https://alpha4-2.starknet.io";
27
- protected static getChainIdFromBaseUrl(baseUrl: string): StarknetChainId;
28
- private getFetchUrl;
29
- private getFetchMethod;
30
- private getQueryString;
31
- private getHeaders;
32
- protected fetchEndpoint<T extends keyof Sequencer.Endpoints>(endpoint: T, ...[query, request]: Sequencer.Endpoints[T]['QUERY'] extends never ? Sequencer.Endpoints[T]['REQUEST'] extends never ? [] : [undefined, Sequencer.Endpoints[T]['REQUEST']] : Sequencer.Endpoints[T]['REQUEST'] extends never ? [Sequencer.Endpoints[T]['QUERY']] : [Sequencer.Endpoints[T]['QUERY'], Sequencer.Endpoints[T]['REQUEST']]): Promise<Sequencer.Endpoints[T]['RESPONSE']>;
33
- getChainId(): Promise<StarknetChainId>;
34
- callContract({ contractAddress, entrypoint: entryPointSelector, calldata }: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
35
- getBlock(blockIdentifier?: BlockIdentifier): Promise<GetBlockResponse>;
36
- getNonce(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
37
- getStorageAt(contractAddress: string, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
38
- getTransaction(txHash: BigNumberish): Promise<GetTransactionResponse>;
39
- getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
40
- getClassAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<ContractClass>;
41
- getClassHashAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<string>;
42
- getClassByHash(classHash: string): Promise<ContractClass>;
43
- invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokeFunctionResponse>;
44
- deployContract({ contract, constructorCalldata, addressSalt, }: DeployContractPayload): Promise<DeployContractResponse>;
45
- deployAccountContract({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployContractResponse>;
46
- declareContract({ senderAddress, contractDefinition, signature }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclareContractResponse>;
47
- getEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
48
- getInvokeEstimateFee(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
49
- getDeclareEstimateFee({ senderAddress, contractDefinition, signature }: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
50
- getDeployAccountEstimateFee({ classHash, addressSalt, constructorCalldata, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
51
- getCode(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<Sequencer.GetCodeResponse>;
52
- waitForTransaction(txHash: BigNumberish, retryInterval?: number): Promise<void>;
53
- /**
54
- * Gets the status of a transaction.
55
- *
56
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
57
- *
58
- * @param txHash
59
- * @returns the transaction status object { block_number, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN }
60
- */
61
- getTransactionStatus(txHash: BigNumberish): Promise<GetTransactionStatusResponse>;
62
- /**
63
- * Gets the smart contract address on the goerli testnet.
64
- *
65
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L13-L15)
66
- * @returns starknet smart contract addresses
67
- */
68
- getContractAddresses(): Promise<GetContractAddressesResponse>;
69
- /**
70
- * Gets the transaction trace from a tx id.
71
- *
72
- *
73
- * @param txHash
74
- * @returns the transaction trace
75
- */
76
- getTransactionTrace(txHash: BigNumberish): Promise<GetTransactionTraceResponse>;
77
- estimateMessageFee({ from_address, to_address, entry_point_selector, payload }: CallL1Handler, blockIdentifier?: BlockIdentifier): Promise<Sequencer.EstimateFeeResponse>;
78
- }
79
- export {};
@@ -1,575 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
- return new (P || (P = Promise))(function (resolve, reject) {
16
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
- step((generator = generator.apply(thisArg, _arguments || [])).next());
20
- });
21
- };
22
- var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
- function verb(n) { return function (v) { return step([n, v]); }; }
26
- function step(op) {
27
- if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
29
- 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;
30
- if (y = 0, t) op = [op[0] & 2, t.value];
31
- switch (op[0]) {
32
- case 0: case 1: t = op; break;
33
- case 4: _.label++; return { value: op[1], done: false };
34
- case 5: _.label++; y = op[1]; op = [0]; continue;
35
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
- default:
37
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
- if (t[2]) _.ops.pop();
42
- _.trys.pop(); continue;
43
- }
44
- op = body.call(thisArg, _);
45
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
- }
48
- };
49
- var __read = (this && this.__read) || function (o, n) {
50
- var m = typeof Symbol === "function" && o[Symbol.iterator];
51
- if (!m) return o;
52
- var i = m.call(o), r, ar = [], e;
53
- try {
54
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
- }
56
- catch (error) { e = { error: error }; }
57
- finally {
58
- try {
59
- if (r && !r.done && (m = i["return"])) m.call(i);
60
- }
61
- finally { if (e) throw e.error; }
62
- }
63
- return ar;
64
- };
65
- var __importDefault = (this && this.__importDefault) || function (mod) {
66
- return (mod && mod.__esModule) ? mod : { "default": mod };
67
- };
68
- Object.defineProperty(exports, "__esModule", { value: true });
69
- exports.SequencerProvider = void 0;
70
- var url_join_1 = __importDefault(require("url-join"));
71
- var constants_1 = require("../constants");
72
- var fetchPonyfill_1 = __importDefault(require("../utils/fetchPonyfill"));
73
- var hash_1 = require("../utils/hash");
74
- var json_1 = require("../utils/json");
75
- var number_1 = require("../utils/number");
76
- var provider_1 = require("../utils/provider");
77
- var sequencer_1 = require("../utils/responseParser/sequencer");
78
- var stark_1 = require("../utils/stark");
79
- var url_1 = require("../utils/url");
80
- var errors_1 = require("./errors");
81
- var utils_1 = require("./utils");
82
- function isEmptyQueryObject(obj) {
83
- return (obj === undefined ||
84
- Object.keys(obj).length === 0 ||
85
- (Object.keys(obj).length === 1 &&
86
- Object.entries(obj).every(function (_a) {
87
- var _b = __read(_a, 2), k = _b[0], v = _b[1];
88
- return k === 'blockIdentifier' && v === null;
89
- })));
90
- }
91
- var SequencerProvider = /** @class */ (function () {
92
- function SequencerProvider(optionsOrProvider) {
93
- if (optionsOrProvider === void 0) { optionsOrProvider = { network: 'goerli-alpha-2' }; }
94
- var _a;
95
- this.responseParser = new sequencer_1.SequencerAPIResponseParser();
96
- if ('network' in optionsOrProvider) {
97
- this.baseUrl = SequencerProvider.getNetworkFromName(optionsOrProvider.network);
98
- this.chainId = SequencerProvider.getChainIdFromBaseUrl(this.baseUrl);
99
- this.feederGatewayUrl = (0, url_join_1.default)(this.baseUrl, 'feeder_gateway');
100
- this.gatewayUrl = (0, url_join_1.default)(this.baseUrl, 'gateway');
101
- }
102
- else {
103
- this.baseUrl = optionsOrProvider.baseUrl;
104
- this.feederGatewayUrl = (0, url_1.buildUrl)(this.baseUrl, 'feeder_gateway', optionsOrProvider.feederGatewayUrl);
105
- this.gatewayUrl = (0, url_1.buildUrl)(this.baseUrl, 'gateway', optionsOrProvider.gatewayUrl);
106
- this.chainId =
107
- (_a = optionsOrProvider.chainId) !== null && _a !== void 0 ? _a : SequencerProvider.getChainIdFromBaseUrl(optionsOrProvider.baseUrl);
108
- this.headers = optionsOrProvider === null || optionsOrProvider === void 0 ? void 0 : optionsOrProvider.headers;
109
- }
110
- }
111
- SequencerProvider.getNetworkFromName = function (name) {
112
- switch (name) {
113
- case 'mainnet-alpha':
114
- return 'https://alpha-mainnet.starknet.io';
115
- case 'goerli-alpha':
116
- return 'https://alpha4.starknet.io';
117
- case 'goerli-alpha-2':
118
- return 'https://alpha4-2.starknet.io';
119
- default:
120
- return 'https://alpha4.starknet.io';
121
- }
122
- };
123
- SequencerProvider.getChainIdFromBaseUrl = function (baseUrl) {
124
- try {
125
- var url = new URL(baseUrl);
126
- if (url.host.includes('mainnet.starknet.io')) {
127
- return constants_1.StarknetChainId.MAINNET;
128
- }
129
- }
130
- catch (_a) {
131
- // eslint-disable-next-line no-console
132
- console.error("Could not parse baseUrl: ".concat(baseUrl));
133
- }
134
- return constants_1.StarknetChainId.TESTNET;
135
- };
136
- SequencerProvider.prototype.getFetchUrl = function (endpoint) {
137
- var gatewayUrlEndpoints = ['add_transaction'];
138
- return gatewayUrlEndpoints.includes(endpoint) ? this.gatewayUrl : this.feederGatewayUrl;
139
- };
140
- SequencerProvider.prototype.getFetchMethod = function (endpoint) {
141
- var postMethodEndpoints = [
142
- 'add_transaction',
143
- 'call_contract',
144
- 'estimate_fee',
145
- 'estimate_message_fee',
146
- ];
147
- return postMethodEndpoints.includes(endpoint) ? 'POST' : 'GET';
148
- };
149
- SequencerProvider.prototype.getQueryString = function (query) {
150
- if (isEmptyQueryObject(query)) {
151
- return '';
152
- }
153
- var queryString = Object.entries(query)
154
- .map(function (_a) {
155
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
156
- if (key === 'blockIdentifier') {
157
- var block = new utils_1.Block(value);
158
- return "".concat(block.queryIdentifier);
159
- }
160
- return "".concat(key, "=").concat(value);
161
- })
162
- .join('&');
163
- return "?".concat(queryString);
164
- };
165
- SequencerProvider.prototype.getHeaders = function (method) {
166
- if (method === 'POST') {
167
- return __assign({ 'Content-Type': 'application/json' }, this.headers);
168
- }
169
- return this.headers;
170
- };
171
- // typesafe fetch
172
- SequencerProvider.prototype.fetchEndpoint = function (endpoint) {
173
- // typescript type magic to create a nice fitting function interface
174
- var _a = []; // when both query and request are needed, we cant omit anything
175
- for (
176
- // typescript type magic to create a nice fitting function interface
177
- var _i = 1 // when both query and request are needed, we cant omit anything
178
- ;
179
- // typescript type magic to create a nice fitting function interface
180
- _i < arguments.length // when both query and request are needed, we cant omit anything
181
- ;
182
- // typescript type magic to create a nice fitting function interface
183
- _i++ // when both query and request are needed, we cant omit anything
184
- ) {
185
- // typescript type magic to create a nice fitting function interface
186
- _a[_i - 1] = arguments[_i]; // when both query and request are needed, we cant omit anything
187
- }
188
- // typescript type magic to create a nice fitting function interface
189
- var _b = __read(_a, 2), query = _b[0], request = _b[1]; // when both query and request are needed, we cant omit anything
190
- return __awaiter(this, void 0, void 0, function () {
191
- var baseUrl, method, queryString, headers, url, res, textResponse, responseBody, errorCode, err_1;
192
- return __generator(this, function (_c) {
193
- switch (_c.label) {
194
- case 0:
195
- baseUrl = this.getFetchUrl(endpoint);
196
- method = this.getFetchMethod(endpoint);
197
- queryString = this.getQueryString(query);
198
- headers = this.getHeaders(method);
199
- url = (0, url_join_1.default)(baseUrl, endpoint, queryString);
200
- _c.label = 1;
201
- case 1:
202
- _c.trys.push([1, 4, , 5]);
203
- return [4 /*yield*/, (0, fetchPonyfill_1.default)(url, {
204
- method: method,
205
- body: (0, json_1.stringify)(request),
206
- headers: headers,
207
- })];
208
- case 2:
209
- res = _c.sent();
210
- return [4 /*yield*/, res.text()];
211
- case 3:
212
- textResponse = _c.sent();
213
- if (!res.ok) {
214
- responseBody = void 0;
215
- try {
216
- responseBody = (0, json_1.parse)(textResponse);
217
- }
218
- catch (_d) {
219
- // if error parsing fails, return an http error
220
- throw new errors_1.HttpError(res.statusText, res.status);
221
- }
222
- errorCode = responseBody.code || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.status_code);
223
- throw new errors_1.GatewayError(responseBody.message, errorCode); // Caught locally, and re-thrown for the user
224
- }
225
- if (endpoint === 'estimate_fee') {
226
- return [2 /*return*/, (0, json_1.parseAlwaysAsBig)(textResponse, function (_, v) {
227
- if (v && typeof v === 'bigint') {
228
- return (0, number_1.toBN)(v.toString());
229
- }
230
- return v;
231
- })];
232
- }
233
- return [2 /*return*/, (0, json_1.parse)(textResponse)];
234
- case 4:
235
- err_1 = _c.sent();
236
- // rethrow custom errors
237
- if (err_1 instanceof errors_1.GatewayError || err_1 instanceof errors_1.HttpError) {
238
- throw err_1;
239
- }
240
- if (err_1 instanceof Error) {
241
- throw Error("Could not ".concat(method, " from endpoint `").concat(url, "`: ").concat(err_1.message));
242
- }
243
- throw err_1;
244
- case 5: return [2 /*return*/];
245
- }
246
- });
247
- });
248
- };
249
- SequencerProvider.prototype.getChainId = function () {
250
- return __awaiter(this, void 0, void 0, function () {
251
- return __generator(this, function (_a) {
252
- return [2 /*return*/, Promise.resolve(this.chainId)];
253
- });
254
- });
255
- };
256
- SequencerProvider.prototype.callContract = function (_a, blockIdentifier) {
257
- var contractAddress = _a.contractAddress, entryPointSelector = _a.entrypoint, _b = _a.calldata, calldata = _b === void 0 ? [] : _b;
258
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
259
- return __awaiter(this, void 0, void 0, function () {
260
- return __generator(this, function (_c) {
261
- return [2 /*return*/, this.fetchEndpoint('call_contract', { blockIdentifier: blockIdentifier }, {
262
- signature: [],
263
- contract_address: contractAddress,
264
- entry_point_selector: (0, hash_1.getSelectorFromName)(entryPointSelector),
265
- calldata: calldata,
266
- }).then(this.responseParser.parseCallContractResponse)];
267
- });
268
- });
269
- };
270
- SequencerProvider.prototype.getBlock = function (blockIdentifier) {
271
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
272
- return __awaiter(this, void 0, void 0, function () {
273
- return __generator(this, function (_a) {
274
- return [2 /*return*/, this.fetchEndpoint('get_block', { blockIdentifier: blockIdentifier }).then(this.responseParser.parseGetBlockResponse)];
275
- });
276
- });
277
- };
278
- SequencerProvider.prototype.getNonce = function (contractAddress, blockIdentifier) {
279
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
280
- return __awaiter(this, void 0, void 0, function () {
281
- return __generator(this, function (_a) {
282
- return [2 /*return*/, this.fetchEndpoint('get_nonce', { contractAddress: contractAddress, blockIdentifier: blockIdentifier })];
283
- });
284
- });
285
- };
286
- SequencerProvider.prototype.getStorageAt = function (contractAddress, key, blockIdentifier) {
287
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
288
- return __awaiter(this, void 0, void 0, function () {
289
- var parsedKey;
290
- return __generator(this, function (_a) {
291
- parsedKey = (0, number_1.toBN)(key).toString(10);
292
- return [2 /*return*/, this.fetchEndpoint('get_storage_at', {
293
- blockIdentifier: blockIdentifier,
294
- contractAddress: contractAddress,
295
- key: parsedKey,
296
- })];
297
- });
298
- });
299
- };
300
- SequencerProvider.prototype.getTransaction = function (txHash) {
301
- return __awaiter(this, void 0, void 0, function () {
302
- var txHashHex;
303
- var _this = this;
304
- return __generator(this, function (_a) {
305
- txHashHex = (0, number_1.toHex)((0, number_1.toBN)(txHash));
306
- return [2 /*return*/, this.fetchEndpoint('get_transaction', { transactionHash: txHashHex }).then(function (value) {
307
- return _this.responseParser.parseGetTransactionResponse(value);
308
- })];
309
- });
310
- });
311
- };
312
- SequencerProvider.prototype.getTransactionReceipt = function (txHash) {
313
- return __awaiter(this, void 0, void 0, function () {
314
- var txHashHex;
315
- return __generator(this, function (_a) {
316
- txHashHex = (0, number_1.toHex)((0, number_1.toBN)(txHash));
317
- return [2 /*return*/, this.fetchEndpoint('get_transaction_receipt', { transactionHash: txHashHex }).then(this.responseParser.parseGetTransactionReceiptResponse)];
318
- });
319
- });
320
- };
321
- SequencerProvider.prototype.getClassAt = function (contractAddress, blockIdentifier) {
322
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
323
- return __awaiter(this, void 0, void 0, function () {
324
- return __generator(this, function (_a) {
325
- return [2 /*return*/, this.fetchEndpoint('get_full_contract', { blockIdentifier: blockIdentifier, contractAddress: contractAddress }).then(provider_1.parseContract)];
326
- });
327
- });
328
- };
329
- SequencerProvider.prototype.getClassHashAt = function (contractAddress, blockIdentifier) {
330
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
331
- return __awaiter(this, void 0, void 0, function () {
332
- return __generator(this, function (_a) {
333
- return [2 /*return*/, this.fetchEndpoint('get_class_hash_at', { blockIdentifier: blockIdentifier, contractAddress: contractAddress })];
334
- });
335
- });
336
- };
337
- SequencerProvider.prototype.getClassByHash = function (classHash) {
338
- return __awaiter(this, void 0, void 0, function () {
339
- return __generator(this, function (_a) {
340
- return [2 /*return*/, this.fetchEndpoint('get_class_by_hash', { classHash: classHash }).then(provider_1.parseContract)];
341
- });
342
- });
343
- };
344
- SequencerProvider.prototype.invokeFunction = function (functionInvocation, details) {
345
- var _a, _b;
346
- return __awaiter(this, void 0, void 0, function () {
347
- return __generator(this, function (_c) {
348
- return [2 /*return*/, this.fetchEndpoint('add_transaction', undefined, {
349
- type: 'INVOKE_FUNCTION',
350
- contract_address: functionInvocation.contractAddress,
351
- calldata: (0, number_1.bigNumberishArrayToDecimalStringArray)((_a = functionInvocation.calldata) !== null && _a !== void 0 ? _a : []),
352
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)((_b = functionInvocation.signature) !== null && _b !== void 0 ? _b : []),
353
- nonce: (0, number_1.toHex)((0, number_1.toBN)(details.nonce)),
354
- max_fee: (0, number_1.toHex)((0, number_1.toBN)(details.maxFee || 0)),
355
- version: (0, number_1.toHex)((0, number_1.toBN)(details.version || 1)),
356
- }).then(this.responseParser.parseInvokeFunctionResponse)];
357
- });
358
- });
359
- };
360
- SequencerProvider.prototype.deployContract = function (_a) {
361
- var contract = _a.contract, constructorCalldata = _a.constructorCalldata, addressSalt = _a.addressSalt;
362
- return __awaiter(this, void 0, void 0, function () {
363
- var contractDefinition;
364
- return __generator(this, function (_b) {
365
- contractDefinition = (0, provider_1.parseContract)(contract);
366
- return [2 /*return*/, this.fetchEndpoint('add_transaction', undefined, {
367
- type: 'DEPLOY',
368
- contract_address_salt: addressSalt !== null && addressSalt !== void 0 ? addressSalt : (0, stark_1.randomAddress)(),
369
- constructor_calldata: (0, number_1.bigNumberishArrayToDecimalStringArray)(constructorCalldata !== null && constructorCalldata !== void 0 ? constructorCalldata : []),
370
- contract_definition: contractDefinition,
371
- }).then(this.responseParser.parseDeployContractResponse)];
372
- });
373
- });
374
- };
375
- SequencerProvider.prototype.deployAccountContract = function (_a, details) {
376
- var classHash = _a.classHash, constructorCalldata = _a.constructorCalldata, addressSalt = _a.addressSalt, signature = _a.signature;
377
- return __awaiter(this, void 0, void 0, function () {
378
- return __generator(this, function (_b) {
379
- return [2 /*return*/, this.fetchEndpoint('add_transaction', undefined, {
380
- type: 'DEPLOY_ACCOUNT',
381
- contract_address_salt: addressSalt !== null && addressSalt !== void 0 ? addressSalt : (0, stark_1.randomAddress)(),
382
- constructor_calldata: (0, number_1.bigNumberishArrayToDecimalStringArray)(constructorCalldata !== null && constructorCalldata !== void 0 ? constructorCalldata : []),
383
- class_hash: (0, number_1.toHex)((0, number_1.toBN)(classHash)),
384
- max_fee: (0, number_1.toHex)((0, number_1.toBN)(details.maxFee || 0)),
385
- version: (0, number_1.toHex)((0, number_1.toBN)(details.version || 0)),
386
- nonce: (0, number_1.toHex)((0, number_1.toBN)(details.nonce)),
387
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)(signature || []),
388
- }).then(this.responseParser.parseDeployContractResponse)];
389
- });
390
- });
391
- };
392
- SequencerProvider.prototype.declareContract = function (_a, details) {
393
- var senderAddress = _a.senderAddress, contractDefinition = _a.contractDefinition, signature = _a.signature;
394
- return __awaiter(this, void 0, void 0, function () {
395
- return __generator(this, function (_b) {
396
- return [2 /*return*/, this.fetchEndpoint('add_transaction', undefined, {
397
- type: 'DECLARE',
398
- contract_class: contractDefinition,
399
- nonce: (0, number_1.toHex)((0, number_1.toBN)(details.nonce)),
400
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)(signature || []),
401
- sender_address: senderAddress,
402
- max_fee: (0, number_1.toHex)((0, number_1.toBN)(details.maxFee || 0)),
403
- version: (0, number_1.toHex)((0, number_1.toBN)(details.version || 1)),
404
- }).then(this.responseParser.parseDeclareContractResponse)];
405
- });
406
- });
407
- };
408
- SequencerProvider.prototype.getEstimateFee = function (invocation, invocationDetails, blockIdentifier) {
409
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
410
- return __awaiter(this, void 0, void 0, function () {
411
- return __generator(this, function (_a) {
412
- return [2 /*return*/, this.getInvokeEstimateFee(invocation, invocationDetails, blockIdentifier)];
413
- });
414
- });
415
- };
416
- SequencerProvider.prototype.getInvokeEstimateFee = function (invocation, invocationDetails, blockIdentifier) {
417
- var _a;
418
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
419
- return __awaiter(this, void 0, void 0, function () {
420
- return __generator(this, function (_b) {
421
- return [2 /*return*/, this.fetchEndpoint('estimate_fee', { blockIdentifier: blockIdentifier }, {
422
- type: 'INVOKE_FUNCTION',
423
- contract_address: invocation.contractAddress,
424
- calldata: (_a = invocation.calldata) !== null && _a !== void 0 ? _a : [],
425
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)(invocation.signature || []),
426
- version: (0, number_1.toHex)((0, number_1.toBN)((invocationDetails === null || invocationDetails === void 0 ? void 0 : invocationDetails.version) || 1)),
427
- nonce: (0, number_1.toHex)((0, number_1.toBN)(invocationDetails.nonce)),
428
- }).then(this.responseParser.parseFeeEstimateResponse)];
429
- });
430
- });
431
- };
432
- SequencerProvider.prototype.getDeclareEstimateFee = function (_a, details, blockIdentifier) {
433
- var senderAddress = _a.senderAddress, contractDefinition = _a.contractDefinition, signature = _a.signature;
434
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
435
- return __awaiter(this, void 0, void 0, function () {
436
- return __generator(this, function (_b) {
437
- return [2 /*return*/, this.fetchEndpoint('estimate_fee', { blockIdentifier: blockIdentifier }, {
438
- type: 'DECLARE',
439
- sender_address: senderAddress,
440
- contract_class: contractDefinition,
441
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)(signature || []),
442
- version: (0, number_1.toHex)((0, number_1.toBN)((details === null || details === void 0 ? void 0 : details.version) || 1)),
443
- nonce: (0, number_1.toHex)((0, number_1.toBN)(details.nonce)),
444
- }).then(this.responseParser.parseFeeEstimateResponse)];
445
- });
446
- });
447
- };
448
- SequencerProvider.prototype.getDeployAccountEstimateFee = function (_a, details, blockIdentifier) {
449
- var classHash = _a.classHash, addressSalt = _a.addressSalt, constructorCalldata = _a.constructorCalldata, signature = _a.signature;
450
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
451
- return __awaiter(this, void 0, void 0, function () {
452
- return __generator(this, function (_b) {
453
- return [2 /*return*/, this.fetchEndpoint('estimate_fee', { blockIdentifier: blockIdentifier }, {
454
- type: 'DEPLOY_ACCOUNT',
455
- class_hash: (0, number_1.toHex)((0, number_1.toBN)(classHash)),
456
- constructor_calldata: (0, number_1.bigNumberishArrayToDecimalStringArray)(constructorCalldata || []),
457
- contract_address_salt: (0, number_1.toHex)((0, number_1.toBN)(addressSalt || 0)),
458
- signature: (0, number_1.bigNumberishArrayToDecimalStringArray)(signature || []),
459
- version: (0, number_1.toHex)((0, number_1.toBN)((details === null || details === void 0 ? void 0 : details.version) || 0)),
460
- nonce: (0, number_1.toHex)((0, number_1.toBN)(details.nonce)),
461
- }).then(this.responseParser.parseFeeEstimateResponse)];
462
- });
463
- });
464
- };
465
- SequencerProvider.prototype.getCode = function (contractAddress, blockIdentifier) {
466
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
467
- return __awaiter(this, void 0, void 0, function () {
468
- return __generator(this, function (_a) {
469
- return [2 /*return*/, this.fetchEndpoint('get_code', { contractAddress: contractAddress, blockIdentifier: blockIdentifier })];
470
- });
471
- });
472
- };
473
- SequencerProvider.prototype.waitForTransaction = function (txHash, retryInterval) {
474
- if (retryInterval === void 0) { retryInterval = 8000; }
475
- return __awaiter(this, void 0, void 0, function () {
476
- var onchain, res, successStates, errorStates, message, error;
477
- return __generator(this, function (_a) {
478
- switch (_a.label) {
479
- case 0:
480
- onchain = false;
481
- _a.label = 1;
482
- case 1:
483
- if (!!onchain) return [3 /*break*/, 4];
484
- // eslint-disable-next-line no-await-in-loop
485
- return [4 /*yield*/, (0, provider_1.wait)(retryInterval)];
486
- case 2:
487
- // eslint-disable-next-line no-await-in-loop
488
- _a.sent();
489
- return [4 /*yield*/, this.getTransactionStatus(txHash)];
490
- case 3:
491
- res = _a.sent();
492
- successStates = ['ACCEPTED_ON_L1', 'ACCEPTED_ON_L2', 'PENDING'];
493
- errorStates = ['REJECTED', 'NOT_RECEIVED'];
494
- if (successStates.includes(res.tx_status)) {
495
- onchain = true;
496
- }
497
- else if (errorStates.includes(res.tx_status)) {
498
- message = res.tx_failure_reason
499
- ? "".concat(res.tx_status, ": ").concat(res.tx_failure_reason.code, "\n").concat(res.tx_failure_reason.error_message)
500
- : res.tx_status;
501
- error = new Error(message);
502
- error.response = res;
503
- throw error;
504
- }
505
- return [3 /*break*/, 1];
506
- case 4: return [2 /*return*/];
507
- }
508
- });
509
- });
510
- };
511
- /**
512
- * Gets the status of a transaction.
513
- *
514
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
515
- *
516
- * @param txHash
517
- * @returns the transaction status object { block_number, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN }
518
- */
519
- SequencerProvider.prototype.getTransactionStatus = function (txHash) {
520
- return __awaiter(this, void 0, void 0, function () {
521
- var txHashHex;
522
- return __generator(this, function (_a) {
523
- txHashHex = (0, number_1.toHex)((0, number_1.toBN)(txHash));
524
- return [2 /*return*/, this.fetchEndpoint('get_transaction_status', { transactionHash: txHashHex })];
525
- });
526
- });
527
- };
528
- /**
529
- * Gets the smart contract address on the goerli testnet.
530
- *
531
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L13-L15)
532
- * @returns starknet smart contract addresses
533
- */
534
- SequencerProvider.prototype.getContractAddresses = function () {
535
- return __awaiter(this, void 0, void 0, function () {
536
- return __generator(this, function (_a) {
537
- return [2 /*return*/, this.fetchEndpoint('get_contract_addresses')];
538
- });
539
- });
540
- };
541
- /**
542
- * Gets the transaction trace from a tx id.
543
- *
544
- *
545
- * @param txHash
546
- * @returns the transaction trace
547
- */
548
- SequencerProvider.prototype.getTransactionTrace = function (txHash) {
549
- return __awaiter(this, void 0, void 0, function () {
550
- var txHashHex;
551
- return __generator(this, function (_a) {
552
- txHashHex = (0, number_1.toHex)((0, number_1.toBN)(txHash));
553
- return [2 /*return*/, this.fetchEndpoint('get_transaction_trace', { transactionHash: txHashHex })];
554
- });
555
- });
556
- };
557
- SequencerProvider.prototype.estimateMessageFee = function (_a, blockIdentifier) {
558
- var from_address = _a.from_address, to_address = _a.to_address, entry_point_selector = _a.entry_point_selector, payload = _a.payload;
559
- if (blockIdentifier === void 0) { blockIdentifier = 'pending'; }
560
- return __awaiter(this, void 0, void 0, function () {
561
- var validCallL1Handler;
562
- return __generator(this, function (_b) {
563
- validCallL1Handler = {
564
- from_address: (0, number_1.getDecimalString)(from_address),
565
- to_address: (0, number_1.getHexString)(to_address),
566
- entry_point_selector: (0, hash_1.getSelector)(entry_point_selector),
567
- payload: (0, number_1.getHexStringArray)(payload),
568
- };
569
- return [2 /*return*/, this.fetchEndpoint('estimate_message_fee', { blockIdentifier: blockIdentifier }, validCallL1Handler)];
570
- });
571
- });
572
- };
573
- return SequencerProvider;
574
- }());
575
- exports.SequencerProvider = SequencerProvider;