@solana/web3.js 1.78.2 → 1.78.4
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/lib/index.browser.cjs.js +224 -228
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +222 -227
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +257 -473
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +255 -471
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +566 -179
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +9 -8
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +224 -228
- package/lib/index.native.js.map +1 -1
- package/package.json +15 -15
package/lib/index.native.js
CHANGED
|
@@ -4,11 +4,11 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
|
4
4
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
5
5
|
var buffer = require('buffer');
|
|
6
6
|
var ed25519 = require('@noble/curves/ed25519');
|
|
7
|
-
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
8
7
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
9
8
|
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
10
9
|
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
11
10
|
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
11
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
12
12
|
var BN = require('bn.js');
|
|
13
13
|
var bs58 = require('bs58');
|
|
14
14
|
var sha256 = require('@noble/hashes/sha256');
|
|
@@ -18,6 +18,7 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
|
18
18
|
var bigintBuffer = require('bigint-buffer');
|
|
19
19
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
20
20
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
21
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
21
22
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
22
23
|
var superstruct = require('superstruct');
|
|
23
24
|
var RpcClient = require('jayson/lib/client/browser');
|
|
@@ -50,17 +51,18 @@ function _interopNamespaceCompat(e) {
|
|
|
50
51
|
|
|
51
52
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultCompat(_classCallCheck);
|
|
52
53
|
var _createClass__default = /*#__PURE__*/_interopDefaultCompat(_createClass);
|
|
53
|
-
var _typeof__default = /*#__PURE__*/_interopDefaultCompat(_typeof);
|
|
54
54
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultCompat(_asyncToGenerator);
|
|
55
55
|
var _inherits__default = /*#__PURE__*/_interopDefaultCompat(_inherits);
|
|
56
56
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultCompat(_possibleConstructorReturn);
|
|
57
57
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultCompat(_getPrototypeOf);
|
|
58
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultCompat(_regeneratorRuntime);
|
|
58
59
|
var BN__default = /*#__PURE__*/_interopDefaultCompat(BN);
|
|
59
60
|
var bs58__default = /*#__PURE__*/_interopDefaultCompat(bs58);
|
|
60
61
|
var BufferLayout__namespace = /*#__PURE__*/_interopNamespaceCompat(BufferLayout);
|
|
61
62
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
62
63
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
63
64
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultCompat(_toConsumableArray);
|
|
65
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultCompat(_typeof);
|
|
64
66
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
|
|
65
67
|
var RpcClient__default = /*#__PURE__*/_interopDefaultCompat(RpcClient);
|
|
66
68
|
var _wrapNativeSuper__default = /*#__PURE__*/_interopDefaultCompat(_wrapNativeSuper);
|
|
@@ -165,7 +167,6 @@ var Enum = /*#__PURE__*/function (_Struct) {
|
|
|
165
167
|
var SOLANA_SCHEMA = new Map();
|
|
166
168
|
|
|
167
169
|
var _Symbol$toStringTag;
|
|
168
|
-
function _regeneratorRuntime$5() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$5 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
169
170
|
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf__default.default(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default.default(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default.default(this, result); }; }
|
|
170
171
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
171
172
|
|
|
@@ -318,9 +319,9 @@ var PublicKey = /*#__PURE__*/function (_Struct) {
|
|
|
318
319
|
}, {
|
|
319
320
|
key: "createWithSeed",
|
|
320
321
|
value: function () {
|
|
321
|
-
var _createWithSeed = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
322
|
+
var _createWithSeed = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(fromPublicKey, seed, programId) {
|
|
322
323
|
var buffer$1, publicKeyBytes;
|
|
323
|
-
return
|
|
324
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
324
325
|
while (1) switch (_context.prev = _context.next) {
|
|
325
326
|
case 0:
|
|
326
327
|
buffer$1 = buffer.Buffer.concat([fromPublicKey.toBuffer(), buffer.Buffer.from(seed), programId.toBuffer()]);
|
|
@@ -369,8 +370,8 @@ var PublicKey = /*#__PURE__*/function (_Struct) {
|
|
|
369
370
|
}, {
|
|
370
371
|
key: "createProgramAddress",
|
|
371
372
|
value: function () {
|
|
372
|
-
var _createProgramAddress = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
373
|
-
return
|
|
373
|
+
var _createProgramAddress = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee2(seeds, programId) {
|
|
374
|
+
return _regeneratorRuntime__default.default.wrap(function _callee2$(_context2) {
|
|
374
375
|
while (1) switch (_context2.prev = _context2.next) {
|
|
375
376
|
case 0:
|
|
376
377
|
return _context2.abrupt("return", this.createProgramAddressSync(seeds, programId));
|
|
@@ -422,8 +423,8 @@ var PublicKey = /*#__PURE__*/function (_Struct) {
|
|
|
422
423
|
}, {
|
|
423
424
|
key: "findProgramAddress",
|
|
424
425
|
value: function () {
|
|
425
|
-
var _findProgramAddress = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
426
|
-
return
|
|
426
|
+
var _findProgramAddress = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee3(seeds, programId) {
|
|
427
|
+
return _regeneratorRuntime__default.default.wrap(function _callee3$(_context3) {
|
|
427
428
|
while (1) switch (_context3.prev = _context3.next) {
|
|
428
429
|
case 0:
|
|
429
430
|
return _context3.abrupt("return", this.findProgramAddressSync(seeds, programId));
|
|
@@ -1575,7 +1576,6 @@ var VersionedMessage = {
|
|
|
1575
1576
|
}
|
|
1576
1577
|
};
|
|
1577
1578
|
|
|
1578
|
-
function _regeneratorRuntime$4() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$4 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1579
1579
|
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
1580
1580
|
function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
1581
1581
|
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -2079,8 +2079,8 @@ var Transaction = /*#__PURE__*/function () {
|
|
|
2079
2079
|
}, {
|
|
2080
2080
|
key: "getEstimatedFee",
|
|
2081
2081
|
value: function () {
|
|
2082
|
-
var _getEstimatedFee = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
2083
|
-
return
|
|
2082
|
+
var _getEstimatedFee = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(connection) {
|
|
2083
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
2084
2084
|
while (1) switch (_context.prev = _context.next) {
|
|
2085
2085
|
case 0:
|
|
2086
2086
|
_context.next = 2;
|
|
@@ -2707,7 +2707,6 @@ var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey('SysvarS1otHashes11111111111111111
|
|
|
2707
2707
|
var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey('SysvarS1otHistory11111111111111111111111111');
|
|
2708
2708
|
var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey('SysvarStakeHistory1111111111111111111111111');
|
|
2709
2709
|
|
|
2710
|
-
function _regeneratorRuntime$3() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$3 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2711
2710
|
/**
|
|
2712
2711
|
* Sign, send and confirm a transaction.
|
|
2713
2712
|
*
|
|
@@ -2723,9 +2722,9 @@ function sendAndConfirmTransaction(_x, _x2, _x3, _x4) {
|
|
|
2723
2722
|
return _sendAndConfirmTransaction.apply(this, arguments);
|
|
2724
2723
|
}
|
|
2725
2724
|
function _sendAndConfirmTransaction() {
|
|
2726
|
-
_sendAndConfirmTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
2725
|
+
_sendAndConfirmTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(connection, transaction, signers, options) {
|
|
2727
2726
|
var sendOptions, signature, status, nonceInstruction, nonceAccountPubkey;
|
|
2728
|
-
return
|
|
2727
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
2729
2728
|
while (1) switch (_context.prev = _context.next) {
|
|
2730
2729
|
case 0:
|
|
2731
2730
|
sendOptions = options && {
|
|
@@ -3712,7 +3711,6 @@ var SystemProgram = /*#__PURE__*/function () {
|
|
|
3712
3711
|
}();
|
|
3713
3712
|
SystemProgram.programId = new PublicKey('11111111111111111111111111111111');
|
|
3714
3713
|
|
|
3715
|
-
function _regeneratorRuntime$2() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$2 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3716
3714
|
// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
|
|
3717
3715
|
// rest of the Transaction fields
|
|
3718
3716
|
//
|
|
@@ -3765,9 +3763,9 @@ var Loader = /*#__PURE__*/function () {
|
|
|
3765
3763
|
}, {
|
|
3766
3764
|
key: "load",
|
|
3767
3765
|
value: function () {
|
|
3768
|
-
var _load = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
3766
|
+
var _load = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(connection, payer, program, programId, data) {
|
|
3769
3767
|
var balanceNeeded, programInfo, transaction, dataLayout, chunkSize, offset, array, transactions, bytes, _data, _transaction, REQUESTS_PER_SECOND, _dataLayout, _data2, _transaction2, deployCommitment, finalizeSignature, _yield$connection$con, context, value, currentSlot;
|
|
3770
|
-
return
|
|
3768
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
3771
3769
|
while (1) switch (_context.prev = _context.next) {
|
|
3772
3770
|
case 0:
|
|
3773
3771
|
_context.next = 2;
|
|
@@ -4400,7 +4398,6 @@ var _excluded = ["commitment"],
|
|
|
4400
4398
|
_excluded2 = ["encoding"],
|
|
4401
4399
|
_excluded3 = ["commitment"],
|
|
4402
4400
|
_excluded4 = ["commitment"];
|
|
4403
|
-
function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4404
4401
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4405
4402
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default.default(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4406
4403
|
var PublicKeyFromString = superstruct.coerce(superstruct.instance(PublicKey), superstruct.string(), function (value) {
|
|
@@ -4967,9 +4964,9 @@ function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disable
|
|
|
4967
4964
|
var fetchWithMiddleware;
|
|
4968
4965
|
if (fetchMiddleware) {
|
|
4969
4966
|
fetchWithMiddleware = /*#__PURE__*/function () {
|
|
4970
|
-
var _ref = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
4967
|
+
var _ref = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(info, init) {
|
|
4971
4968
|
var modifiedFetchArgs;
|
|
4972
|
-
return
|
|
4969
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
4973
4970
|
while (1) switch (_context.prev = _context.next) {
|
|
4974
4971
|
case 0:
|
|
4975
4972
|
_context.next = 2;
|
|
@@ -5000,9 +4997,9 @@ function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disable
|
|
|
5000
4997
|
}();
|
|
5001
4998
|
}
|
|
5002
4999
|
var clientBrowser = new RpcClient__default.default( /*#__PURE__*/function () {
|
|
5003
|
-
var _ref2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
5000
|
+
var _ref2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee2(request, callback) {
|
|
5004
5001
|
var options, too_many_requests_retries, res, waitTime, text;
|
|
5005
|
-
return
|
|
5002
|
+
return _regeneratorRuntime__default.default.wrap(function _callee2$(_context2) {
|
|
5006
5003
|
while (1) switch (_context2.prev = _context2.next) {
|
|
5007
5004
|
case 0:
|
|
5008
5005
|
options = {
|
|
@@ -6070,18 +6067,18 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6070
6067
|
this.getBlockHeight = function () {
|
|
6071
6068
|
var requestPromises = {};
|
|
6072
6069
|
return /*#__PURE__*/function () {
|
|
6073
|
-
var _ref3 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6070
|
+
var _ref3 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee4(commitmentOrConfig) {
|
|
6074
6071
|
var _requestPromises$requ;
|
|
6075
6072
|
var _extractCommitmentFro, commitment, config, args, requestHash;
|
|
6076
|
-
return
|
|
6073
|
+
return _regeneratorRuntime__default.default.wrap(function _callee4$(_context4) {
|
|
6077
6074
|
while (1) switch (_context4.prev = _context4.next) {
|
|
6078
6075
|
case 0:
|
|
6079
6076
|
_extractCommitmentFro = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro.commitment, config = _extractCommitmentFro.config;
|
|
6080
6077
|
args = _this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
6081
6078
|
requestHash = fastStableStringify$1(args);
|
|
6082
|
-
requestPromises[requestHash] = (_requestPromises$requ = requestPromises[requestHash]) !== null && _requestPromises$requ !== void 0 ? _requestPromises$requ : _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6079
|
+
requestPromises[requestHash] = (_requestPromises$requ = requestPromises[requestHash]) !== null && _requestPromises$requ !== void 0 ? _requestPromises$requ : _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee3() {
|
|
6083
6080
|
var unsafeRes, res;
|
|
6084
|
-
return
|
|
6081
|
+
return _regeneratorRuntime__default.default.wrap(function _callee3$(_context3) {
|
|
6085
6082
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6086
6083
|
case 0:
|
|
6087
6084
|
_context3.prev = 0;
|
|
@@ -6185,9 +6182,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6185
6182
|
}, {
|
|
6186
6183
|
key: "getBalanceAndContext",
|
|
6187
6184
|
value: function () {
|
|
6188
|
-
var _getBalanceAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6185
|
+
var _getBalanceAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee5(publicKey, commitmentOrConfig) {
|
|
6189
6186
|
var _extractCommitmentFro2, commitment, config, args, unsafeRes, res;
|
|
6190
|
-
return
|
|
6187
|
+
return _regeneratorRuntime__default.default.wrap(function _callee5$(_context5) {
|
|
6191
6188
|
while (1) switch (_context5.prev = _context5.next) {
|
|
6192
6189
|
case 0:
|
|
6193
6190
|
/** @internal */
|
|
@@ -6222,8 +6219,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6222
6219
|
}, {
|
|
6223
6220
|
key: "getBalance",
|
|
6224
6221
|
value: function () {
|
|
6225
|
-
var _getBalance = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6226
|
-
return
|
|
6222
|
+
var _getBalance = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee6(publicKey, commitmentOrConfig) {
|
|
6223
|
+
return _regeneratorRuntime__default.default.wrap(function _callee6$(_context6) {
|
|
6227
6224
|
while (1) switch (_context6.prev = _context6.next) {
|
|
6228
6225
|
case 0:
|
|
6229
6226
|
_context6.next = 2;
|
|
@@ -6251,9 +6248,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6251
6248
|
}, {
|
|
6252
6249
|
key: "getBlockTime",
|
|
6253
6250
|
value: function () {
|
|
6254
|
-
var _getBlockTime = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6251
|
+
var _getBlockTime = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee7(slot) {
|
|
6255
6252
|
var unsafeRes, res;
|
|
6256
|
-
return
|
|
6253
|
+
return _regeneratorRuntime__default.default.wrap(function _callee7$(_context7) {
|
|
6257
6254
|
while (1) switch (_context7.prev = _context7.next) {
|
|
6258
6255
|
case 0:
|
|
6259
6256
|
_context7.next = 2;
|
|
@@ -6286,9 +6283,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6286
6283
|
}, {
|
|
6287
6284
|
key: "getMinimumLedgerSlot",
|
|
6288
6285
|
value: function () {
|
|
6289
|
-
var _getMinimumLedgerSlot = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6286
|
+
var _getMinimumLedgerSlot = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee8() {
|
|
6290
6287
|
var unsafeRes, res;
|
|
6291
|
-
return
|
|
6288
|
+
return _regeneratorRuntime__default.default.wrap(function _callee8$(_context8) {
|
|
6292
6289
|
while (1) switch (_context8.prev = _context8.next) {
|
|
6293
6290
|
case 0:
|
|
6294
6291
|
_context8.next = 2;
|
|
@@ -6320,9 +6317,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6320
6317
|
}, {
|
|
6321
6318
|
key: "getFirstAvailableBlock",
|
|
6322
6319
|
value: function () {
|
|
6323
|
-
var _getFirstAvailableBlock = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6320
|
+
var _getFirstAvailableBlock = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee9() {
|
|
6324
6321
|
var unsafeRes, res;
|
|
6325
|
-
return
|
|
6322
|
+
return _regeneratorRuntime__default.default.wrap(function _callee9$(_context9) {
|
|
6326
6323
|
while (1) switch (_context9.prev = _context9.next) {
|
|
6327
6324
|
case 0:
|
|
6328
6325
|
_context9.next = 2;
|
|
@@ -6354,9 +6351,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6354
6351
|
}, {
|
|
6355
6352
|
key: "getSupply",
|
|
6356
6353
|
value: function () {
|
|
6357
|
-
var _getSupply = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6354
|
+
var _getSupply = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee10(config) {
|
|
6358
6355
|
var configArg, unsafeRes, res;
|
|
6359
|
-
return
|
|
6356
|
+
return _regeneratorRuntime__default.default.wrap(function _callee10$(_context10) {
|
|
6360
6357
|
while (1) switch (_context10.prev = _context10.next) {
|
|
6361
6358
|
case 0:
|
|
6362
6359
|
configArg = {};
|
|
@@ -6402,9 +6399,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6402
6399
|
}, {
|
|
6403
6400
|
key: "getTokenSupply",
|
|
6404
6401
|
value: function () {
|
|
6405
|
-
var _getTokenSupply = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6402
|
+
var _getTokenSupply = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee11(tokenMintAddress, commitment) {
|
|
6406
6403
|
var args, unsafeRes, res;
|
|
6407
|
-
return
|
|
6404
|
+
return _regeneratorRuntime__default.default.wrap(function _callee11$(_context11) {
|
|
6408
6405
|
while (1) switch (_context11.prev = _context11.next) {
|
|
6409
6406
|
case 0:
|
|
6410
6407
|
args = this._buildArgs([tokenMintAddress.toBase58()], commitment);
|
|
@@ -6437,9 +6434,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6437
6434
|
}, {
|
|
6438
6435
|
key: "getTokenAccountBalance",
|
|
6439
6436
|
value: function () {
|
|
6440
|
-
var _getTokenAccountBalance = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6437
|
+
var _getTokenAccountBalance = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee12(tokenAddress, commitment) {
|
|
6441
6438
|
var args, unsafeRes, res;
|
|
6442
|
-
return
|
|
6439
|
+
return _regeneratorRuntime__default.default.wrap(function _callee12$(_context12) {
|
|
6443
6440
|
while (1) switch (_context12.prev = _context12.next) {
|
|
6444
6441
|
case 0:
|
|
6445
6442
|
args = this._buildArgs([tokenAddress.toBase58()], commitment);
|
|
@@ -6474,9 +6471,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6474
6471
|
}, {
|
|
6475
6472
|
key: "getTokenAccountsByOwner",
|
|
6476
6473
|
value: function () {
|
|
6477
|
-
var _getTokenAccountsByOwner = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6474
|
+
var _getTokenAccountsByOwner = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee13(ownerAddress, filter, commitmentOrConfig) {
|
|
6478
6475
|
var _extractCommitmentFro3, commitment, config, _args, args, unsafeRes, res;
|
|
6479
|
-
return
|
|
6476
|
+
return _regeneratorRuntime__default.default.wrap(function _callee13$(_context13) {
|
|
6480
6477
|
while (1) switch (_context13.prev = _context13.next) {
|
|
6481
6478
|
case 0:
|
|
6482
6479
|
_extractCommitmentFro3 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro3.commitment, config = _extractCommitmentFro3.config;
|
|
@@ -6522,9 +6519,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6522
6519
|
}, {
|
|
6523
6520
|
key: "getParsedTokenAccountsByOwner",
|
|
6524
6521
|
value: function () {
|
|
6525
|
-
var _getParsedTokenAccountsByOwner = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6522
|
+
var _getParsedTokenAccountsByOwner = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee14(ownerAddress, filter, commitment) {
|
|
6526
6523
|
var _args, args, unsafeRes, res;
|
|
6527
|
-
return
|
|
6524
|
+
return _regeneratorRuntime__default.default.wrap(function _callee14$(_context14) {
|
|
6528
6525
|
while (1) switch (_context14.prev = _context14.next) {
|
|
6529
6526
|
case 0:
|
|
6530
6527
|
_args = [ownerAddress.toBase58()];
|
|
@@ -6567,9 +6564,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6567
6564
|
}, {
|
|
6568
6565
|
key: "getLargestAccounts",
|
|
6569
6566
|
value: function () {
|
|
6570
|
-
var _getLargestAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6567
|
+
var _getLargestAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee15(config) {
|
|
6571
6568
|
var arg, args, unsafeRes, res;
|
|
6572
|
-
return
|
|
6569
|
+
return _regeneratorRuntime__default.default.wrap(function _callee15$(_context15) {
|
|
6573
6570
|
while (1) switch (_context15.prev = _context15.next) {
|
|
6574
6571
|
case 0:
|
|
6575
6572
|
arg = _objectSpread(_objectSpread({}, config), {}, {
|
|
@@ -6606,9 +6603,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6606
6603
|
}, {
|
|
6607
6604
|
key: "getTokenLargestAccounts",
|
|
6608
6605
|
value: function () {
|
|
6609
|
-
var _getTokenLargestAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6606
|
+
var _getTokenLargestAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee16(mintAddress, commitment) {
|
|
6610
6607
|
var args, unsafeRes, res;
|
|
6611
|
-
return
|
|
6608
|
+
return _regeneratorRuntime__default.default.wrap(function _callee16$(_context16) {
|
|
6612
6609
|
while (1) switch (_context16.prev = _context16.next) {
|
|
6613
6610
|
case 0:
|
|
6614
6611
|
args = this._buildArgs([mintAddress.toBase58()], commitment);
|
|
@@ -6641,9 +6638,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6641
6638
|
}, {
|
|
6642
6639
|
key: "getAccountInfoAndContext",
|
|
6643
6640
|
value: function () {
|
|
6644
|
-
var _getAccountInfoAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6641
|
+
var _getAccountInfoAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee17(publicKey, commitmentOrConfig) {
|
|
6645
6642
|
var _extractCommitmentFro4, commitment, config, args, unsafeRes, res;
|
|
6646
|
-
return
|
|
6643
|
+
return _regeneratorRuntime__default.default.wrap(function _callee17$(_context17) {
|
|
6647
6644
|
while (1) switch (_context17.prev = _context17.next) {
|
|
6648
6645
|
case 0:
|
|
6649
6646
|
_extractCommitmentFro4 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro4.commitment, config = _extractCommitmentFro4.config;
|
|
@@ -6677,9 +6674,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6677
6674
|
}, {
|
|
6678
6675
|
key: "getParsedAccountInfo",
|
|
6679
6676
|
value: function () {
|
|
6680
|
-
var _getParsedAccountInfo = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6677
|
+
var _getParsedAccountInfo = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee18(publicKey, commitmentOrConfig) {
|
|
6681
6678
|
var _extractCommitmentFro5, commitment, config, args, unsafeRes, res;
|
|
6682
|
-
return
|
|
6679
|
+
return _regeneratorRuntime__default.default.wrap(function _callee18$(_context18) {
|
|
6683
6680
|
while (1) switch (_context18.prev = _context18.next) {
|
|
6684
6681
|
case 0:
|
|
6685
6682
|
_extractCommitmentFro5 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro5.commitment, config = _extractCommitmentFro5.config;
|
|
@@ -6713,9 +6710,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6713
6710
|
}, {
|
|
6714
6711
|
key: "getAccountInfo",
|
|
6715
6712
|
value: function () {
|
|
6716
|
-
var _getAccountInfo = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6713
|
+
var _getAccountInfo = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee19(publicKey, commitmentOrConfig) {
|
|
6717
6714
|
var res;
|
|
6718
|
-
return
|
|
6715
|
+
return _regeneratorRuntime__default.default.wrap(function _callee19$(_context19) {
|
|
6719
6716
|
while (1) switch (_context19.prev = _context19.next) {
|
|
6720
6717
|
case 0:
|
|
6721
6718
|
_context19.prev = 0;
|
|
@@ -6745,9 +6742,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6745
6742
|
}, {
|
|
6746
6743
|
key: "getMultipleParsedAccounts",
|
|
6747
6744
|
value: function () {
|
|
6748
|
-
var _getMultipleParsedAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6745
|
+
var _getMultipleParsedAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee20(publicKeys, rawConfig) {
|
|
6749
6746
|
var _extractCommitmentFro6, commitment, config, keys, args, unsafeRes, res;
|
|
6750
|
-
return
|
|
6747
|
+
return _regeneratorRuntime__default.default.wrap(function _callee20$(_context20) {
|
|
6751
6748
|
while (1) switch (_context20.prev = _context20.next) {
|
|
6752
6749
|
case 0:
|
|
6753
6750
|
_extractCommitmentFro6 = extractCommitmentFromConfig(rawConfig), commitment = _extractCommitmentFro6.commitment, config = _extractCommitmentFro6.config;
|
|
@@ -6784,9 +6781,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6784
6781
|
}, {
|
|
6785
6782
|
key: "getMultipleAccountsInfoAndContext",
|
|
6786
6783
|
value: function () {
|
|
6787
|
-
var _getMultipleAccountsInfoAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6784
|
+
var _getMultipleAccountsInfoAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee21(publicKeys, commitmentOrConfig) {
|
|
6788
6785
|
var _extractCommitmentFro7, commitment, config, keys, args, unsafeRes, res;
|
|
6789
|
-
return
|
|
6786
|
+
return _regeneratorRuntime__default.default.wrap(function _callee21$(_context21) {
|
|
6790
6787
|
while (1) switch (_context21.prev = _context21.next) {
|
|
6791
6788
|
case 0:
|
|
6792
6789
|
_extractCommitmentFro7 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro7.commitment, config = _extractCommitmentFro7.config;
|
|
@@ -6823,9 +6820,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6823
6820
|
}, {
|
|
6824
6821
|
key: "getMultipleAccountsInfo",
|
|
6825
6822
|
value: function () {
|
|
6826
|
-
var _getMultipleAccountsInfo = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6823
|
+
var _getMultipleAccountsInfo = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee22(publicKeys, commitmentOrConfig) {
|
|
6827
6824
|
var res;
|
|
6828
|
-
return
|
|
6825
|
+
return _regeneratorRuntime__default.default.wrap(function _callee22$(_context22) {
|
|
6829
6826
|
while (1) switch (_context22.prev = _context22.next) {
|
|
6830
6827
|
case 0:
|
|
6831
6828
|
_context22.next = 2;
|
|
@@ -6850,9 +6847,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6850
6847
|
}, {
|
|
6851
6848
|
key: "getStakeActivation",
|
|
6852
6849
|
value: function () {
|
|
6853
|
-
var _getStakeActivation = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6850
|
+
var _getStakeActivation = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee23(publicKey, commitmentOrConfig, epoch) {
|
|
6854
6851
|
var _extractCommitmentFro8, commitment, config, args, unsafeRes, res;
|
|
6855
|
-
return
|
|
6852
|
+
return _regeneratorRuntime__default.default.wrap(function _callee23$(_context23) {
|
|
6856
6853
|
while (1) switch (_context23.prev = _context23.next) {
|
|
6857
6854
|
case 0:
|
|
6858
6855
|
_extractCommitmentFro8 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro8.commitment, config = _extractCommitmentFro8.config;
|
|
@@ -6891,9 +6888,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6891
6888
|
key: "getProgramAccounts",
|
|
6892
6889
|
value: // eslint-disable-next-line no-dupe-class-members
|
|
6893
6890
|
function () {
|
|
6894
|
-
var _getProgramAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6891
|
+
var _getProgramAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee24(programId, configOrCommitment) {
|
|
6895
6892
|
var _extractCommitmentFro9, commitment, config, _ref5, encoding, configWithoutEncoding, args, unsafeRes, baseSchema, res;
|
|
6896
|
-
return
|
|
6893
|
+
return _regeneratorRuntime__default.default.wrap(function _callee24$(_context24) {
|
|
6897
6894
|
while (1) switch (_context24.prev = _context24.next) {
|
|
6898
6895
|
case 0:
|
|
6899
6896
|
_extractCommitmentFro9 = extractCommitmentFromConfig(configOrCommitment), commitment = _extractCommitmentFro9.commitment, config = _extractCommitmentFro9.config;
|
|
@@ -6931,9 +6928,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6931
6928
|
}, {
|
|
6932
6929
|
key: "getParsedProgramAccounts",
|
|
6933
6930
|
value: function () {
|
|
6934
|
-
var _getParsedProgramAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6931
|
+
var _getParsedProgramAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee25(programId, configOrCommitment) {
|
|
6935
6932
|
var _extractCommitmentFro10, commitment, config, args, unsafeRes, res;
|
|
6936
|
-
return
|
|
6933
|
+
return _regeneratorRuntime__default.default.wrap(function _callee25$(_context25) {
|
|
6937
6934
|
while (1) switch (_context25.prev = _context25.next) {
|
|
6938
6935
|
case 0:
|
|
6939
6936
|
_extractCommitmentFro10 = extractCommitmentFromConfig(configOrCommitment), commitment = _extractCommitmentFro10.commitment, config = _extractCommitmentFro10.config;
|
|
@@ -6965,9 +6962,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
6965
6962
|
key: "confirmTransaction",
|
|
6966
6963
|
value: // eslint-disable-next-line no-dupe-class-members
|
|
6967
6964
|
function () {
|
|
6968
|
-
var _confirmTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
6965
|
+
var _confirmTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee26(strategy, commitment) {
|
|
6969
6966
|
var rawSignature, _config$abortSignal, _config, decodedSignature;
|
|
6970
|
-
return
|
|
6967
|
+
return _regeneratorRuntime__default.default.wrap(function _callee26$(_context26) {
|
|
6971
6968
|
while (1) switch (_context26.prev = _context26.next) {
|
|
6972
6969
|
case 0:
|
|
6973
6970
|
if (!(typeof strategy == 'string')) {
|
|
@@ -7088,9 +7085,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7088
7085
|
});
|
|
7089
7086
|
}
|
|
7090
7087
|
});
|
|
7091
|
-
_asyncToGenerator__default.default( /*#__PURE__*/
|
|
7088
|
+
_asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee27() {
|
|
7092
7089
|
var response, context, value;
|
|
7093
|
-
return
|
|
7090
|
+
return _regeneratorRuntime__default.default.wrap(function _callee27$(_context27) {
|
|
7094
7091
|
while (1) switch (_context27.prev = _context27.next) {
|
|
7095
7092
|
case 0:
|
|
7096
7093
|
_context27.next = 2;
|
|
@@ -7189,19 +7186,19 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7189
7186
|
}, {
|
|
7190
7187
|
key: "confirmTransactionUsingBlockHeightExceedanceStrategy",
|
|
7191
7188
|
value: function () {
|
|
7192
|
-
var _confirmTransactionUsingBlockHeightExceedanceStrategy = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7189
|
+
var _confirmTransactionUsingBlockHeightExceedanceStrategy = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee30(_ref8) {
|
|
7193
7190
|
var _this3 = this;
|
|
7194
7191
|
var commitment, _ref8$strategy, abortSignal, lastValidBlockHeight, signature, done, expiryPromise, _this$getTransactionC, abortConfirmation, confirmationPromise, cancellationPromise, result, outcome;
|
|
7195
|
-
return
|
|
7192
|
+
return _regeneratorRuntime__default.default.wrap(function _callee30$(_context30) {
|
|
7196
7193
|
while (1) switch (_context30.prev = _context30.next) {
|
|
7197
7194
|
case 0:
|
|
7198
7195
|
commitment = _ref8.commitment, _ref8$strategy = _ref8.strategy, abortSignal = _ref8$strategy.abortSignal, lastValidBlockHeight = _ref8$strategy.lastValidBlockHeight, signature = _ref8$strategy.signature;
|
|
7199
7196
|
done = false;
|
|
7200
7197
|
expiryPromise = new Promise(function (resolve) {
|
|
7201
7198
|
var checkBlockHeight = /*#__PURE__*/function () {
|
|
7202
|
-
var _ref9 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7199
|
+
var _ref9 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee28() {
|
|
7203
7200
|
var blockHeight;
|
|
7204
|
-
return
|
|
7201
|
+
return _regeneratorRuntime__default.default.wrap(function _callee28$(_context28) {
|
|
7205
7202
|
while (1) switch (_context28.prev = _context28.next) {
|
|
7206
7203
|
case 0:
|
|
7207
7204
|
_context28.prev = 0;
|
|
@@ -7224,9 +7221,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7224
7221
|
return _ref9.apply(this, arguments);
|
|
7225
7222
|
};
|
|
7226
7223
|
}();
|
|
7227
|
-
_asyncToGenerator__default.default( /*#__PURE__*/
|
|
7224
|
+
_asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee29() {
|
|
7228
7225
|
var currentBlockHeight;
|
|
7229
|
-
return
|
|
7226
|
+
return _regeneratorRuntime__default.default.wrap(function _callee29$(_context29) {
|
|
7230
7227
|
while (1) switch (_context29.prev = _context29.next) {
|
|
7231
7228
|
case 0:
|
|
7232
7229
|
_context29.next = 2;
|
|
@@ -7315,10 +7312,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7315
7312
|
}, {
|
|
7316
7313
|
key: "confirmTransactionUsingDurableNonceStrategy",
|
|
7317
7314
|
value: function () {
|
|
7318
|
-
var _confirmTransactionUsingDurableNonceStrategy = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7315
|
+
var _confirmTransactionUsingDurableNonceStrategy = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee33(_ref11) {
|
|
7319
7316
|
var _this4 = this;
|
|
7320
7317
|
var commitment, _ref11$strategy, abortSignal, minContextSlot, nonceAccountPubkey, nonceValue, signature, done, expiryPromise, _this$getTransactionC2, abortConfirmation, confirmationPromise, cancellationPromise, result, outcome, _signatureStatus, signatureStatus, _outcome$slotInWhichN, status, commitmentForStatus, confirmationStatus;
|
|
7321
|
-
return
|
|
7318
|
+
return _regeneratorRuntime__default.default.wrap(function _callee33$(_context34) {
|
|
7322
7319
|
while (1) switch (_context34.prev = _context34.next) {
|
|
7323
7320
|
case 0:
|
|
7324
7321
|
commitment = _ref11.commitment, _ref11$strategy = _ref11.strategy, abortSignal = _ref11$strategy.abortSignal, minContextSlot = _ref11$strategy.minContextSlot, nonceAccountPubkey = _ref11$strategy.nonceAccountPubkey, nonceValue = _ref11$strategy.nonceValue, signature = _ref11$strategy.signature;
|
|
@@ -7327,9 +7324,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7327
7324
|
var currentNonceValue = nonceValue;
|
|
7328
7325
|
var lastCheckedSlot = null;
|
|
7329
7326
|
var getCurrentNonceValue = /*#__PURE__*/function () {
|
|
7330
|
-
var _ref12 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7327
|
+
var _ref12 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee31() {
|
|
7331
7328
|
var _yield$_this4$getNonc, _context31, nonceAccount;
|
|
7332
|
-
return
|
|
7329
|
+
return _regeneratorRuntime__default.default.wrap(function _callee31$(_context32) {
|
|
7333
7330
|
while (1) switch (_context32.prev = _context32.next) {
|
|
7334
7331
|
case 0:
|
|
7335
7332
|
_context32.prev = 0;
|
|
@@ -7358,8 +7355,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7358
7355
|
return _ref12.apply(this, arguments);
|
|
7359
7356
|
};
|
|
7360
7357
|
}();
|
|
7361
|
-
_asyncToGenerator__default.default( /*#__PURE__*/
|
|
7362
|
-
return
|
|
7358
|
+
_asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee32() {
|
|
7359
|
+
return _regeneratorRuntime__default.default.wrap(function _callee32$(_context33) {
|
|
7363
7360
|
while (1) switch (_context33.prev = _context33.next) {
|
|
7364
7361
|
case 0:
|
|
7365
7362
|
_context33.next = 2;
|
|
@@ -7516,10 +7513,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7516
7513
|
}, {
|
|
7517
7514
|
key: "confirmTransactionUsingLegacyTimeoutStrategy",
|
|
7518
7515
|
value: function () {
|
|
7519
|
-
var _confirmTransactionUsingLegacyTimeoutStrategy = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7516
|
+
var _confirmTransactionUsingLegacyTimeoutStrategy = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee34(_ref14) {
|
|
7520
7517
|
var _this5 = this;
|
|
7521
7518
|
var commitment, signature, timeoutId, expiryPromise, _this$getTransactionC3, abortConfirmation, confirmationPromise, result, outcome;
|
|
7522
|
-
return
|
|
7519
|
+
return _regeneratorRuntime__default.default.wrap(function _callee34$(_context35) {
|
|
7523
7520
|
while (1) switch (_context35.prev = _context35.next) {
|
|
7524
7521
|
case 0:
|
|
7525
7522
|
commitment = _ref14.commitment, signature = _ref14.signature;
|
|
@@ -7585,9 +7582,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7585
7582
|
}, {
|
|
7586
7583
|
key: "getClusterNodes",
|
|
7587
7584
|
value: function () {
|
|
7588
|
-
var _getClusterNodes = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7585
|
+
var _getClusterNodes = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee35() {
|
|
7589
7586
|
var unsafeRes, res;
|
|
7590
|
-
return
|
|
7587
|
+
return _regeneratorRuntime__default.default.wrap(function _callee35$(_context36) {
|
|
7591
7588
|
while (1) switch (_context36.prev = _context36.next) {
|
|
7592
7589
|
case 0:
|
|
7593
7590
|
_context36.next = 2;
|
|
@@ -7619,9 +7616,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7619
7616
|
}, {
|
|
7620
7617
|
key: "getVoteAccounts",
|
|
7621
7618
|
value: function () {
|
|
7622
|
-
var _getVoteAccounts = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7619
|
+
var _getVoteAccounts = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee36(commitment) {
|
|
7623
7620
|
var args, unsafeRes, res;
|
|
7624
|
-
return
|
|
7621
|
+
return _regeneratorRuntime__default.default.wrap(function _callee36$(_context37) {
|
|
7625
7622
|
while (1) switch (_context37.prev = _context37.next) {
|
|
7626
7623
|
case 0:
|
|
7627
7624
|
args = this._buildArgs([], commitment);
|
|
@@ -7654,9 +7651,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7654
7651
|
}, {
|
|
7655
7652
|
key: "getSlot",
|
|
7656
7653
|
value: function () {
|
|
7657
|
-
var _getSlot = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7654
|
+
var _getSlot = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee37(commitmentOrConfig) {
|
|
7658
7655
|
var _extractCommitmentFro11, commitment, config, args, unsafeRes, res;
|
|
7659
|
-
return
|
|
7656
|
+
return _regeneratorRuntime__default.default.wrap(function _callee37$(_context38) {
|
|
7660
7657
|
while (1) switch (_context38.prev = _context38.next) {
|
|
7661
7658
|
case 0:
|
|
7662
7659
|
_extractCommitmentFro11 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro11.commitment, config = _extractCommitmentFro11.config;
|
|
@@ -7690,9 +7687,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7690
7687
|
}, {
|
|
7691
7688
|
key: "getSlotLeader",
|
|
7692
7689
|
value: function () {
|
|
7693
|
-
var _getSlotLeader = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7690
|
+
var _getSlotLeader = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee38(commitmentOrConfig) {
|
|
7694
7691
|
var _extractCommitmentFro12, commitment, config, args, unsafeRes, res;
|
|
7695
|
-
return
|
|
7692
|
+
return _regeneratorRuntime__default.default.wrap(function _callee38$(_context39) {
|
|
7696
7693
|
while (1) switch (_context39.prev = _context39.next) {
|
|
7697
7694
|
case 0:
|
|
7698
7695
|
_extractCommitmentFro12 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro12.commitment, config = _extractCommitmentFro12.config;
|
|
@@ -7729,9 +7726,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7729
7726
|
}, {
|
|
7730
7727
|
key: "getSlotLeaders",
|
|
7731
7728
|
value: function () {
|
|
7732
|
-
var _getSlotLeaders = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7729
|
+
var _getSlotLeaders = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee39(startSlot, limit) {
|
|
7733
7730
|
var args, unsafeRes, res;
|
|
7734
|
-
return
|
|
7731
|
+
return _regeneratorRuntime__default.default.wrap(function _callee39$(_context40) {
|
|
7735
7732
|
while (1) switch (_context40.prev = _context40.next) {
|
|
7736
7733
|
case 0:
|
|
7737
7734
|
args = [startSlot, limit];
|
|
@@ -7764,9 +7761,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7764
7761
|
}, {
|
|
7765
7762
|
key: "getSignatureStatus",
|
|
7766
7763
|
value: function () {
|
|
7767
|
-
var _getSignatureStatus = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7764
|
+
var _getSignatureStatus = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee40(signature, config) {
|
|
7768
7765
|
var _yield$this$getSignat, context, values, value;
|
|
7769
|
-
return
|
|
7766
|
+
return _regeneratorRuntime__default.default.wrap(function _callee40$(_context41) {
|
|
7770
7767
|
while (1) switch (_context41.prev = _context41.next) {
|
|
7771
7768
|
case 0:
|
|
7772
7769
|
_context41.next = 2;
|
|
@@ -7798,9 +7795,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7798
7795
|
}, {
|
|
7799
7796
|
key: "getSignatureStatuses",
|
|
7800
7797
|
value: function () {
|
|
7801
|
-
var _getSignatureStatuses = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7798
|
+
var _getSignatureStatuses = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee41(signatures, config) {
|
|
7802
7799
|
var params, unsafeRes, res;
|
|
7803
|
-
return
|
|
7800
|
+
return _regeneratorRuntime__default.default.wrap(function _callee41$(_context42) {
|
|
7804
7801
|
while (1) switch (_context42.prev = _context42.next) {
|
|
7805
7802
|
case 0:
|
|
7806
7803
|
params = [signatures];
|
|
@@ -7836,9 +7833,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7836
7833
|
}, {
|
|
7837
7834
|
key: "getTransactionCount",
|
|
7838
7835
|
value: function () {
|
|
7839
|
-
var _getTransactionCount = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7836
|
+
var _getTransactionCount = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee42(commitmentOrConfig) {
|
|
7840
7837
|
var _extractCommitmentFro13, commitment, config, args, unsafeRes, res;
|
|
7841
|
-
return
|
|
7838
|
+
return _regeneratorRuntime__default.default.wrap(function _callee42$(_context43) {
|
|
7842
7839
|
while (1) switch (_context43.prev = _context43.next) {
|
|
7843
7840
|
case 0:
|
|
7844
7841
|
_extractCommitmentFro13 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro13.commitment, config = _extractCommitmentFro13.config;
|
|
@@ -7874,9 +7871,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7874
7871
|
}, {
|
|
7875
7872
|
key: "getTotalSupply",
|
|
7876
7873
|
value: function () {
|
|
7877
|
-
var _getTotalSupply = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7874
|
+
var _getTotalSupply = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee43(commitment) {
|
|
7878
7875
|
var result;
|
|
7879
|
-
return
|
|
7876
|
+
return _regeneratorRuntime__default.default.wrap(function _callee43$(_context44) {
|
|
7880
7877
|
while (1) switch (_context44.prev = _context44.next) {
|
|
7881
7878
|
case 0:
|
|
7882
7879
|
_context44.next = 2;
|
|
@@ -7904,9 +7901,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7904
7901
|
}, {
|
|
7905
7902
|
key: "getInflationGovernor",
|
|
7906
7903
|
value: function () {
|
|
7907
|
-
var _getInflationGovernor = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7904
|
+
var _getInflationGovernor = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee44(commitment) {
|
|
7908
7905
|
var args, unsafeRes, res;
|
|
7909
|
-
return
|
|
7906
|
+
return _regeneratorRuntime__default.default.wrap(function _callee44$(_context45) {
|
|
7910
7907
|
while (1) switch (_context45.prev = _context45.next) {
|
|
7911
7908
|
case 0:
|
|
7912
7909
|
args = this._buildArgs([], commitment);
|
|
@@ -7939,9 +7936,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7939
7936
|
}, {
|
|
7940
7937
|
key: "getInflationReward",
|
|
7941
7938
|
value: function () {
|
|
7942
|
-
var _getInflationReward = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7939
|
+
var _getInflationReward = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee45(addresses, epoch, commitmentOrConfig) {
|
|
7943
7940
|
var _extractCommitmentFro14, commitment, config, args, unsafeRes, res;
|
|
7944
|
-
return
|
|
7941
|
+
return _regeneratorRuntime__default.default.wrap(function _callee45$(_context46) {
|
|
7945
7942
|
while (1) switch (_context46.prev = _context46.next) {
|
|
7946
7943
|
case 0:
|
|
7947
7944
|
_extractCommitmentFro14 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro14.commitment, config = _extractCommitmentFro14.config;
|
|
@@ -7979,9 +7976,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
7979
7976
|
}, {
|
|
7980
7977
|
key: "getInflationRate",
|
|
7981
7978
|
value: function () {
|
|
7982
|
-
var _getInflationRate = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
7979
|
+
var _getInflationRate = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee46() {
|
|
7983
7980
|
var unsafeRes, res;
|
|
7984
|
-
return
|
|
7981
|
+
return _regeneratorRuntime__default.default.wrap(function _callee46$(_context47) {
|
|
7985
7982
|
while (1) switch (_context47.prev = _context47.next) {
|
|
7986
7983
|
case 0:
|
|
7987
7984
|
_context47.next = 2;
|
|
@@ -8013,9 +8010,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8013
8010
|
}, {
|
|
8014
8011
|
key: "getEpochInfo",
|
|
8015
8012
|
value: function () {
|
|
8016
|
-
var _getEpochInfo = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8013
|
+
var _getEpochInfo = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee47(commitmentOrConfig) {
|
|
8017
8014
|
var _extractCommitmentFro15, commitment, config, args, unsafeRes, res;
|
|
8018
|
-
return
|
|
8015
|
+
return _regeneratorRuntime__default.default.wrap(function _callee47$(_context48) {
|
|
8019
8016
|
while (1) switch (_context48.prev = _context48.next) {
|
|
8020
8017
|
case 0:
|
|
8021
8018
|
_extractCommitmentFro15 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro15.commitment, config = _extractCommitmentFro15.config;
|
|
@@ -8049,9 +8046,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8049
8046
|
}, {
|
|
8050
8047
|
key: "getEpochSchedule",
|
|
8051
8048
|
value: function () {
|
|
8052
|
-
var _getEpochSchedule = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8049
|
+
var _getEpochSchedule = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee48() {
|
|
8053
8050
|
var unsafeRes, res, epochSchedule;
|
|
8054
|
-
return
|
|
8051
|
+
return _regeneratorRuntime__default.default.wrap(function _callee48$(_context49) {
|
|
8055
8052
|
while (1) switch (_context49.prev = _context49.next) {
|
|
8056
8053
|
case 0:
|
|
8057
8054
|
_context49.next = 2;
|
|
@@ -8085,9 +8082,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8085
8082
|
}, {
|
|
8086
8083
|
key: "getLeaderSchedule",
|
|
8087
8084
|
value: function () {
|
|
8088
|
-
var _getLeaderSchedule = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8085
|
+
var _getLeaderSchedule = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee49() {
|
|
8089
8086
|
var unsafeRes, res;
|
|
8090
|
-
return
|
|
8087
|
+
return _regeneratorRuntime__default.default.wrap(function _callee49$(_context50) {
|
|
8091
8088
|
while (1) switch (_context50.prev = _context50.next) {
|
|
8092
8089
|
case 0:
|
|
8093
8090
|
_context50.next = 2;
|
|
@@ -8120,9 +8117,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8120
8117
|
}, {
|
|
8121
8118
|
key: "getMinimumBalanceForRentExemption",
|
|
8122
8119
|
value: function () {
|
|
8123
|
-
var _getMinimumBalanceForRentExemption = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8120
|
+
var _getMinimumBalanceForRentExemption = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee50(dataLength, commitment) {
|
|
8124
8121
|
var args, unsafeRes, res;
|
|
8125
|
-
return
|
|
8122
|
+
return _regeneratorRuntime__default.default.wrap(function _callee50$(_context51) {
|
|
8126
8123
|
while (1) switch (_context51.prev = _context51.next) {
|
|
8127
8124
|
case 0:
|
|
8128
8125
|
args = this._buildArgs([dataLength], commitment);
|
|
@@ -8159,9 +8156,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8159
8156
|
}, {
|
|
8160
8157
|
key: "getRecentBlockhashAndContext",
|
|
8161
8158
|
value: function () {
|
|
8162
|
-
var _getRecentBlockhashAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8159
|
+
var _getRecentBlockhashAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee51(commitment) {
|
|
8163
8160
|
var args, unsafeRes, res;
|
|
8164
|
-
return
|
|
8161
|
+
return _regeneratorRuntime__default.default.wrap(function _callee51$(_context52) {
|
|
8165
8162
|
while (1) switch (_context52.prev = _context52.next) {
|
|
8166
8163
|
case 0:
|
|
8167
8164
|
args = this._buildArgs([], commitment);
|
|
@@ -8195,9 +8192,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8195
8192
|
}, {
|
|
8196
8193
|
key: "getRecentPerformanceSamples",
|
|
8197
8194
|
value: function () {
|
|
8198
|
-
var _getRecentPerformanceSamples = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8195
|
+
var _getRecentPerformanceSamples = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee52(limit) {
|
|
8199
8196
|
var unsafeRes, res;
|
|
8200
|
-
return
|
|
8197
|
+
return _regeneratorRuntime__default.default.wrap(function _callee52$(_context53) {
|
|
8201
8198
|
while (1) switch (_context53.prev = _context53.next) {
|
|
8202
8199
|
case 0:
|
|
8203
8200
|
_context53.next = 2;
|
|
@@ -8231,9 +8228,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8231
8228
|
}, {
|
|
8232
8229
|
key: "getFeeCalculatorForBlockhash",
|
|
8233
8230
|
value: function () {
|
|
8234
|
-
var _getFeeCalculatorForBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8231
|
+
var _getFeeCalculatorForBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee53(blockhash, commitment) {
|
|
8235
8232
|
var args, unsafeRes, res, _res$result, context, value;
|
|
8236
|
-
return
|
|
8233
|
+
return _regeneratorRuntime__default.default.wrap(function _callee53$(_context54) {
|
|
8237
8234
|
while (1) switch (_context54.prev = _context54.next) {
|
|
8238
8235
|
case 0:
|
|
8239
8236
|
args = this._buildArgs([blockhash], commitment);
|
|
@@ -8270,9 +8267,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8270
8267
|
}, {
|
|
8271
8268
|
key: "getFeeForMessage",
|
|
8272
8269
|
value: function () {
|
|
8273
|
-
var _getFeeForMessage = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8270
|
+
var _getFeeForMessage = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee54(message, commitment) {
|
|
8274
8271
|
var wireMessage, args, unsafeRes, res;
|
|
8275
|
-
return
|
|
8272
|
+
return _regeneratorRuntime__default.default.wrap(function _callee54$(_context55) {
|
|
8276
8273
|
while (1) switch (_context55.prev = _context55.next) {
|
|
8277
8274
|
case 0:
|
|
8278
8275
|
wireMessage = toBuffer(message.serialize()).toString('base64');
|
|
@@ -8312,10 +8309,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8312
8309
|
}, {
|
|
8313
8310
|
key: "getRecentPrioritizationFees",
|
|
8314
8311
|
value: function () {
|
|
8315
|
-
var _getRecentPrioritizationFees = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8312
|
+
var _getRecentPrioritizationFees = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee55(config) {
|
|
8316
8313
|
var _config$lockedWritabl;
|
|
8317
8314
|
var accounts, args, unsafeRes, res;
|
|
8318
|
-
return
|
|
8315
|
+
return _regeneratorRuntime__default.default.wrap(function _callee55$(_context56) {
|
|
8319
8316
|
while (1) switch (_context56.prev = _context56.next) {
|
|
8320
8317
|
case 0:
|
|
8321
8318
|
accounts = config === null || config === void 0 ? void 0 : (_config$lockedWritabl = config.lockedWritableAccounts) === null || _config$lockedWritabl === void 0 ? void 0 : _config$lockedWritabl.map(function (key) {
|
|
@@ -8354,9 +8351,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8354
8351
|
}, {
|
|
8355
8352
|
key: "getRecentBlockhash",
|
|
8356
8353
|
value: function () {
|
|
8357
|
-
var _getRecentBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8354
|
+
var _getRecentBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee56(commitment) {
|
|
8358
8355
|
var res;
|
|
8359
|
-
return
|
|
8356
|
+
return _regeneratorRuntime__default.default.wrap(function _callee56$(_context57) {
|
|
8360
8357
|
while (1) switch (_context57.prev = _context57.next) {
|
|
8361
8358
|
case 0:
|
|
8362
8359
|
_context57.prev = 0;
|
|
@@ -8387,9 +8384,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8387
8384
|
}, {
|
|
8388
8385
|
key: "getLatestBlockhash",
|
|
8389
8386
|
value: function () {
|
|
8390
|
-
var _getLatestBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8387
|
+
var _getLatestBlockhash = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee57(commitmentOrConfig) {
|
|
8391
8388
|
var res;
|
|
8392
|
-
return
|
|
8389
|
+
return _regeneratorRuntime__default.default.wrap(function _callee57$(_context58) {
|
|
8393
8390
|
while (1) switch (_context58.prev = _context58.next) {
|
|
8394
8391
|
case 0:
|
|
8395
8392
|
_context58.prev = 0;
|
|
@@ -8420,9 +8417,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8420
8417
|
}, {
|
|
8421
8418
|
key: "getLatestBlockhashAndContext",
|
|
8422
8419
|
value: function () {
|
|
8423
|
-
var _getLatestBlockhashAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8420
|
+
var _getLatestBlockhashAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee58(commitmentOrConfig) {
|
|
8424
8421
|
var _extractCommitmentFro16, commitment, config, args, unsafeRes, res;
|
|
8425
|
-
return
|
|
8422
|
+
return _regeneratorRuntime__default.default.wrap(function _callee58$(_context59) {
|
|
8426
8423
|
while (1) switch (_context59.prev = _context59.next) {
|
|
8427
8424
|
case 0:
|
|
8428
8425
|
_extractCommitmentFro16 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro16.commitment, config = _extractCommitmentFro16.config;
|
|
@@ -8456,9 +8453,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8456
8453
|
}, {
|
|
8457
8454
|
key: "isBlockhashValid",
|
|
8458
8455
|
value: function () {
|
|
8459
|
-
var _isBlockhashValid = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8456
|
+
var _isBlockhashValid = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee59(blockhash, rawConfig) {
|
|
8460
8457
|
var _extractCommitmentFro17, commitment, config, args, unsafeRes, res;
|
|
8461
|
-
return
|
|
8458
|
+
return _regeneratorRuntime__default.default.wrap(function _callee59$(_context60) {
|
|
8462
8459
|
while (1) switch (_context60.prev = _context60.next) {
|
|
8463
8460
|
case 0:
|
|
8464
8461
|
_extractCommitmentFro17 = extractCommitmentFromConfig(rawConfig), commitment = _extractCommitmentFro17.commitment, config = _extractCommitmentFro17.config;
|
|
@@ -8492,9 +8489,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8492
8489
|
}, {
|
|
8493
8490
|
key: "getVersion",
|
|
8494
8491
|
value: function () {
|
|
8495
|
-
var _getVersion = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8492
|
+
var _getVersion = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee60() {
|
|
8496
8493
|
var unsafeRes, res;
|
|
8497
|
-
return
|
|
8494
|
+
return _regeneratorRuntime__default.default.wrap(function _callee60$(_context61) {
|
|
8498
8495
|
while (1) switch (_context61.prev = _context61.next) {
|
|
8499
8496
|
case 0:
|
|
8500
8497
|
_context61.next = 2;
|
|
@@ -8526,9 +8523,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8526
8523
|
}, {
|
|
8527
8524
|
key: "getGenesisHash",
|
|
8528
8525
|
value: function () {
|
|
8529
|
-
var _getGenesisHash = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8526
|
+
var _getGenesisHash = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee61() {
|
|
8530
8527
|
var unsafeRes, res;
|
|
8531
|
-
return
|
|
8528
|
+
return _regeneratorRuntime__default.default.wrap(function _callee61$(_context62) {
|
|
8532
8529
|
while (1) switch (_context62.prev = _context62.next) {
|
|
8533
8530
|
case 0:
|
|
8534
8531
|
_context62.next = 2;
|
|
@@ -8568,9 +8565,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8568
8565
|
*/
|
|
8569
8566
|
// eslint-disable-next-line no-dupe-class-members
|
|
8570
8567
|
function () {
|
|
8571
|
-
var _getBlock = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8568
|
+
var _getBlock = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee62(slot, rawConfig) {
|
|
8572
8569
|
var _extractCommitmentFro18, commitment, config, args, unsafeRes, res, _res, _res2, result;
|
|
8573
|
-
return
|
|
8570
|
+
return _regeneratorRuntime__default.default.wrap(function _callee62$(_context63) {
|
|
8574
8571
|
while (1) switch (_context63.prev = _context63.next) {
|
|
8575
8572
|
case 0:
|
|
8576
8573
|
_extractCommitmentFro18 = extractCommitmentFromConfig(rawConfig), commitment = _extractCommitmentFro18.commitment, config = _extractCommitmentFro18.config;
|
|
@@ -8649,9 +8646,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8649
8646
|
key: "getParsedBlock",
|
|
8650
8647
|
value: // eslint-disable-next-line no-dupe-class-members
|
|
8651
8648
|
function () {
|
|
8652
|
-
var _getParsedBlock = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8649
|
+
var _getParsedBlock = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee63(slot, rawConfig) {
|
|
8653
8650
|
var _extractCommitmentFro19, commitment, config, args, unsafeRes, res, _res3, _res4;
|
|
8654
|
-
return
|
|
8651
|
+
return _regeneratorRuntime__default.default.wrap(function _callee63$(_context64) {
|
|
8655
8652
|
while (1) switch (_context64.prev = _context64.next) {
|
|
8656
8653
|
case 0:
|
|
8657
8654
|
_extractCommitmentFro19 = extractCommitmentFromConfig(rawConfig), commitment = _extractCommitmentFro19.commitment, config = _extractCommitmentFro19.config;
|
|
@@ -8716,9 +8713,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8716
8713
|
* Returns recent block production information from the current or previous epoch
|
|
8717
8714
|
*/
|
|
8718
8715
|
function () {
|
|
8719
|
-
var _getBlockProduction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8716
|
+
var _getBlockProduction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee64(configOrCommitment) {
|
|
8720
8717
|
var extra, commitment, c, rest, args, unsafeRes, res;
|
|
8721
|
-
return
|
|
8718
|
+
return _regeneratorRuntime__default.default.wrap(function _callee64$(_context65) {
|
|
8722
8719
|
while (1) switch (_context65.prev = _context65.next) {
|
|
8723
8720
|
case 0:
|
|
8724
8721
|
if (typeof configOrCommitment === 'string') {
|
|
@@ -8767,9 +8764,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8767
8764
|
*/
|
|
8768
8765
|
// eslint-disable-next-line no-dupe-class-members
|
|
8769
8766
|
function () {
|
|
8770
|
-
var _getTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8767
|
+
var _getTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee65(signature, rawConfig) {
|
|
8771
8768
|
var _extractCommitmentFro20, commitment, config, args, unsafeRes, res, result;
|
|
8772
|
-
return
|
|
8769
|
+
return _regeneratorRuntime__default.default.wrap(function _callee65$(_context66) {
|
|
8773
8770
|
while (1) switch (_context66.prev = _context66.next) {
|
|
8774
8771
|
case 0:
|
|
8775
8772
|
_extractCommitmentFro20 = extractCommitmentFromConfig(rawConfig), commitment = _extractCommitmentFro20.commitment, config = _extractCommitmentFro20.config;
|
|
@@ -8814,9 +8811,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8814
8811
|
}, {
|
|
8815
8812
|
key: "getParsedTransaction",
|
|
8816
8813
|
value: function () {
|
|
8817
|
-
var _getParsedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8814
|
+
var _getParsedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee66(signature, commitmentOrConfig) {
|
|
8818
8815
|
var _extractCommitmentFro21, commitment, config, args, unsafeRes, res;
|
|
8819
|
-
return
|
|
8816
|
+
return _regeneratorRuntime__default.default.wrap(function _callee66$(_context67) {
|
|
8820
8817
|
while (1) switch (_context67.prev = _context67.next) {
|
|
8821
8818
|
case 0:
|
|
8822
8819
|
_extractCommitmentFro21 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro21.commitment, config = _extractCommitmentFro21.config;
|
|
@@ -8850,10 +8847,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8850
8847
|
}, {
|
|
8851
8848
|
key: "getParsedTransactions",
|
|
8852
8849
|
value: function () {
|
|
8853
|
-
var _getParsedTransactions = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8850
|
+
var _getParsedTransactions = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee67(signatures, commitmentOrConfig) {
|
|
8854
8851
|
var _this6 = this;
|
|
8855
8852
|
var _extractCommitmentFro22, commitment, config, batch, unsafeRes, res;
|
|
8856
|
-
return
|
|
8853
|
+
return _regeneratorRuntime__default.default.wrap(function _callee67$(_context68) {
|
|
8857
8854
|
while (1) switch (_context68.prev = _context68.next) {
|
|
8858
8855
|
case 0:
|
|
8859
8856
|
_extractCommitmentFro22 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro22.commitment, config = _extractCommitmentFro22.config;
|
|
@@ -8905,10 +8902,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8905
8902
|
*/
|
|
8906
8903
|
// eslint-disable-next-line no-dupe-class-members
|
|
8907
8904
|
function () {
|
|
8908
|
-
var _getTransactions = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8905
|
+
var _getTransactions = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee68(signatures, commitmentOrConfig) {
|
|
8909
8906
|
var _this7 = this;
|
|
8910
8907
|
var _extractCommitmentFro23, commitment, config, batch, unsafeRes, res;
|
|
8911
|
-
return
|
|
8908
|
+
return _regeneratorRuntime__default.default.wrap(function _callee68$(_context69) {
|
|
8912
8909
|
while (1) switch (_context69.prev = _context69.next) {
|
|
8913
8910
|
case 0:
|
|
8914
8911
|
_extractCommitmentFro23 = extractCommitmentFromConfig(commitmentOrConfig), commitment = _extractCommitmentFro23.commitment, config = _extractCommitmentFro23.config;
|
|
@@ -8957,9 +8954,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
8957
8954
|
}, {
|
|
8958
8955
|
key: "getConfirmedBlock",
|
|
8959
8956
|
value: function () {
|
|
8960
|
-
var _getConfirmedBlock = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
8957
|
+
var _getConfirmedBlock = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee69(slot, commitment) {
|
|
8961
8958
|
var args, unsafeRes, res, result, block;
|
|
8962
|
-
return
|
|
8959
|
+
return _regeneratorRuntime__default.default.wrap(function _callee69$(_context70) {
|
|
8963
8960
|
while (1) switch (_context70.prev = _context70.next) {
|
|
8964
8961
|
case 0:
|
|
8965
8962
|
args = this._buildArgsAtLeastConfirmed([slot], commitment);
|
|
@@ -9021,9 +9018,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9021
9018
|
}, {
|
|
9022
9019
|
key: "getBlocks",
|
|
9023
9020
|
value: function () {
|
|
9024
|
-
var _getBlocks = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9021
|
+
var _getBlocks = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee70(startSlot, endSlot, commitment) {
|
|
9025
9022
|
var args, unsafeRes, res;
|
|
9026
|
-
return
|
|
9023
|
+
return _regeneratorRuntime__default.default.wrap(function _callee70$(_context71) {
|
|
9027
9024
|
while (1) switch (_context71.prev = _context71.next) {
|
|
9028
9025
|
case 0:
|
|
9029
9026
|
args = this._buildArgsAtLeastConfirmed(endSlot !== undefined ? [startSlot, endSlot] : [startSlot], commitment);
|
|
@@ -9056,9 +9053,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9056
9053
|
}, {
|
|
9057
9054
|
key: "getBlockSignatures",
|
|
9058
9055
|
value: function () {
|
|
9059
|
-
var _getBlockSignatures = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9056
|
+
var _getBlockSignatures = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee71(slot, commitment) {
|
|
9060
9057
|
var args, unsafeRes, res, result;
|
|
9061
|
-
return
|
|
9058
|
+
return _regeneratorRuntime__default.default.wrap(function _callee71$(_context72) {
|
|
9062
9059
|
while (1) switch (_context72.prev = _context72.next) {
|
|
9063
9060
|
case 0:
|
|
9064
9061
|
args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {
|
|
@@ -9103,9 +9100,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9103
9100
|
}, {
|
|
9104
9101
|
key: "getConfirmedBlockSignatures",
|
|
9105
9102
|
value: function () {
|
|
9106
|
-
var _getConfirmedBlockSignatures = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9103
|
+
var _getConfirmedBlockSignatures = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee72(slot, commitment) {
|
|
9107
9104
|
var args, unsafeRes, res, result;
|
|
9108
|
-
return
|
|
9105
|
+
return _regeneratorRuntime__default.default.wrap(function _callee72$(_context73) {
|
|
9109
9106
|
while (1) switch (_context73.prev = _context73.next) {
|
|
9110
9107
|
case 0:
|
|
9111
9108
|
args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {
|
|
@@ -9150,9 +9147,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9150
9147
|
}, {
|
|
9151
9148
|
key: "getConfirmedTransaction",
|
|
9152
9149
|
value: function () {
|
|
9153
|
-
var _getConfirmedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9150
|
+
var _getConfirmedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee73(signature, commitment) {
|
|
9154
9151
|
var args, unsafeRes, res, result, message, signatures;
|
|
9155
|
-
return
|
|
9152
|
+
return _regeneratorRuntime__default.default.wrap(function _callee73$(_context74) {
|
|
9156
9153
|
while (1) switch (_context74.prev = _context74.next) {
|
|
9157
9154
|
case 0:
|
|
9158
9155
|
args = this._buildArgsAtLeastConfirmed([signature], commitment);
|
|
@@ -9198,9 +9195,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9198
9195
|
}, {
|
|
9199
9196
|
key: "getParsedConfirmedTransaction",
|
|
9200
9197
|
value: function () {
|
|
9201
|
-
var _getParsedConfirmedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9198
|
+
var _getParsedConfirmedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee74(signature, commitment) {
|
|
9202
9199
|
var args, unsafeRes, res;
|
|
9203
|
-
return
|
|
9200
|
+
return _regeneratorRuntime__default.default.wrap(function _callee74$(_context75) {
|
|
9204
9201
|
while (1) switch (_context75.prev = _context75.next) {
|
|
9205
9202
|
case 0:
|
|
9206
9203
|
args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');
|
|
@@ -9235,10 +9232,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9235
9232
|
}, {
|
|
9236
9233
|
key: "getParsedConfirmedTransactions",
|
|
9237
9234
|
value: function () {
|
|
9238
|
-
var _getParsedConfirmedTransactions = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9235
|
+
var _getParsedConfirmedTransactions = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee75(signatures, commitment) {
|
|
9239
9236
|
var _this8 = this;
|
|
9240
9237
|
var batch, unsafeRes, res;
|
|
9241
|
-
return
|
|
9238
|
+
return _regeneratorRuntime__default.default.wrap(function _callee75$(_context76) {
|
|
9242
9239
|
while (1) switch (_context76.prev = _context76.next) {
|
|
9243
9240
|
case 0:
|
|
9244
9241
|
batch = signatures.map(function (signature) {
|
|
@@ -9284,9 +9281,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9284
9281
|
}, {
|
|
9285
9282
|
key: "getConfirmedSignaturesForAddress",
|
|
9286
9283
|
value: function () {
|
|
9287
|
-
var _getConfirmedSignaturesForAddress = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9284
|
+
var _getConfirmedSignaturesForAddress = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee76(address, startSlot, endSlot) {
|
|
9288
9285
|
var options, firstAvailableBlock, block, highestConfirmedRoot, _block, confirmedSignatureInfo;
|
|
9289
|
-
return
|
|
9286
|
+
return _regeneratorRuntime__default.default.wrap(function _callee76$(_context77) {
|
|
9290
9287
|
while (1) switch (_context77.prev = _context77.next) {
|
|
9291
9288
|
case 0:
|
|
9292
9289
|
options = {};
|
|
@@ -9399,9 +9396,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9399
9396
|
}, {
|
|
9400
9397
|
key: "getConfirmedSignaturesForAddress2",
|
|
9401
9398
|
value: function () {
|
|
9402
|
-
var _getConfirmedSignaturesForAddress2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9399
|
+
var _getConfirmedSignaturesForAddress2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee77(address, options, commitment) {
|
|
9403
9400
|
var args, unsafeRes, res;
|
|
9404
|
-
return
|
|
9401
|
+
return _regeneratorRuntime__default.default.wrap(function _callee77$(_context78) {
|
|
9405
9402
|
while (1) switch (_context78.prev = _context78.next) {
|
|
9406
9403
|
case 0:
|
|
9407
9404
|
args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
@@ -9439,9 +9436,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9439
9436
|
}, {
|
|
9440
9437
|
key: "getSignaturesForAddress",
|
|
9441
9438
|
value: function () {
|
|
9442
|
-
var _getSignaturesForAddress = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9439
|
+
var _getSignaturesForAddress = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee78(address, options, commitment) {
|
|
9443
9440
|
var args, unsafeRes, res;
|
|
9444
|
-
return
|
|
9441
|
+
return _regeneratorRuntime__default.default.wrap(function _callee78$(_context79) {
|
|
9445
9442
|
while (1) switch (_context79.prev = _context79.next) {
|
|
9446
9443
|
case 0:
|
|
9447
9444
|
args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
@@ -9471,9 +9468,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9471
9468
|
}, {
|
|
9472
9469
|
key: "getAddressLookupTable",
|
|
9473
9470
|
value: function () {
|
|
9474
|
-
var _getAddressLookupTable = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9471
|
+
var _getAddressLookupTable = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee79(accountKey, config) {
|
|
9475
9472
|
var _yield$this$getAccoun, context, accountInfo, value;
|
|
9476
|
-
return
|
|
9473
|
+
return _regeneratorRuntime__default.default.wrap(function _callee79$(_context80) {
|
|
9477
9474
|
while (1) switch (_context80.prev = _context80.next) {
|
|
9478
9475
|
case 0:
|
|
9479
9476
|
_context80.next = 2;
|
|
@@ -9510,9 +9507,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9510
9507
|
}, {
|
|
9511
9508
|
key: "getNonceAndContext",
|
|
9512
9509
|
value: function () {
|
|
9513
|
-
var _getNonceAndContext = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9510
|
+
var _getNonceAndContext = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee80(nonceAccount, commitmentOrConfig) {
|
|
9514
9511
|
var _yield$this$getAccoun2, context, accountInfo, value;
|
|
9515
|
-
return
|
|
9512
|
+
return _regeneratorRuntime__default.default.wrap(function _callee80$(_context81) {
|
|
9516
9513
|
while (1) switch (_context81.prev = _context81.next) {
|
|
9517
9514
|
case 0:
|
|
9518
9515
|
_context81.next = 2;
|
|
@@ -9546,8 +9543,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9546
9543
|
}, {
|
|
9547
9544
|
key: "getNonce",
|
|
9548
9545
|
value: function () {
|
|
9549
|
-
var _getNonce = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9550
|
-
return
|
|
9546
|
+
var _getNonce = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee81(nonceAccount, commitmentOrConfig) {
|
|
9547
|
+
return _regeneratorRuntime__default.default.wrap(function _callee81$(_context82) {
|
|
9551
9548
|
while (1) switch (_context82.prev = _context82.next) {
|
|
9552
9549
|
case 0:
|
|
9553
9550
|
_context82.next = 2;
|
|
@@ -9586,9 +9583,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9586
9583
|
}, {
|
|
9587
9584
|
key: "requestAirdrop",
|
|
9588
9585
|
value: function () {
|
|
9589
|
-
var _requestAirdrop = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9586
|
+
var _requestAirdrop = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee82(to, lamports) {
|
|
9590
9587
|
var unsafeRes, res;
|
|
9591
|
-
return
|
|
9588
|
+
return _regeneratorRuntime__default.default.wrap(function _callee82$(_context83) {
|
|
9592
9589
|
while (1) switch (_context83.prev = _context83.next) {
|
|
9593
9590
|
case 0:
|
|
9594
9591
|
_context83.next = 2;
|
|
@@ -9620,9 +9617,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9620
9617
|
}, {
|
|
9621
9618
|
key: "_blockhashWithExpiryBlockHeight",
|
|
9622
9619
|
value: function () {
|
|
9623
|
-
var _blockhashWithExpiryBlockHeight2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9620
|
+
var _blockhashWithExpiryBlockHeight2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee83(disableCache) {
|
|
9624
9621
|
var timeSinceFetch, expired;
|
|
9625
|
-
return
|
|
9622
|
+
return _regeneratorRuntime__default.default.wrap(function _callee83$(_context84) {
|
|
9626
9623
|
while (1) switch (_context84.prev = _context84.next) {
|
|
9627
9624
|
case 0:
|
|
9628
9625
|
if (disableCache) {
|
|
@@ -9669,9 +9666,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9669
9666
|
}, {
|
|
9670
9667
|
key: "_pollNewBlockhash",
|
|
9671
9668
|
value: function () {
|
|
9672
|
-
var _pollNewBlockhash2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9669
|
+
var _pollNewBlockhash2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee84() {
|
|
9673
9670
|
var startTime, cachedLatestBlockhash, cachedBlockhash, i, latestBlockhash;
|
|
9674
|
-
return
|
|
9671
|
+
return _regeneratorRuntime__default.default.wrap(function _callee84$(_context85) {
|
|
9675
9672
|
while (1) switch (_context85.prev = _context85.next) {
|
|
9676
9673
|
case 0:
|
|
9677
9674
|
this._pollingBlockhash = true;
|
|
@@ -9730,9 +9727,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9730
9727
|
}, {
|
|
9731
9728
|
key: "getStakeMinimumDelegation",
|
|
9732
9729
|
value: function () {
|
|
9733
|
-
var _getStakeMinimumDelegation = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9730
|
+
var _getStakeMinimumDelegation = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee85(config) {
|
|
9734
9731
|
var _extractCommitmentFro24, commitment, configArg, args, unsafeRes, res;
|
|
9735
|
-
return
|
|
9732
|
+
return _regeneratorRuntime__default.default.wrap(function _callee85$(_context86) {
|
|
9736
9733
|
while (1) switch (_context86.prev = _context86.next) {
|
|
9737
9734
|
case 0:
|
|
9738
9735
|
_extractCommitmentFro24 = extractCommitmentFromConfig(config), commitment = _extractCommitmentFro24.commitment, configArg = _extractCommitmentFro24.config;
|
|
@@ -9774,9 +9771,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9774
9771
|
*/
|
|
9775
9772
|
// eslint-disable-next-line no-dupe-class-members
|
|
9776
9773
|
function () {
|
|
9777
|
-
var _simulateTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9774
|
+
var _simulateTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee86(transactionOrMessage, configOrSigners, includeAccounts) {
|
|
9778
9775
|
var versionedTx, _wireTransaction, _encodedTransaction, _config2, _args87, _unsafeRes, _res5, transaction, originalTx, signers, _transaction, disableCache, _transaction2, latestBlockhash, _signature, message, signData, wireTransaction, encodedTransaction, config, addresses, args, unsafeRes, res, _logs, traceIndent, logTrace;
|
|
9779
|
-
return
|
|
9776
|
+
return _regeneratorRuntime__default.default.wrap(function _callee86$(_context87) {
|
|
9780
9777
|
while (1) switch (_context87.prev = _context87.next) {
|
|
9781
9778
|
case 0:
|
|
9782
9779
|
if (!('message' in transactionOrMessage)) {
|
|
@@ -9944,9 +9941,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
9944
9941
|
*/
|
|
9945
9942
|
// eslint-disable-next-line no-dupe-class-members
|
|
9946
9943
|
function () {
|
|
9947
|
-
var _sendTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
9944
|
+
var _sendTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee87(transaction, signersOrOptions, options) {
|
|
9948
9945
|
var _wireTransaction2, signers, disableCache, latestBlockhash, _signature2, wireTransaction;
|
|
9949
|
-
return
|
|
9946
|
+
return _regeneratorRuntime__default.default.wrap(function _callee87$(_context88) {
|
|
9950
9947
|
while (1) switch (_context88.prev = _context88.next) {
|
|
9951
9948
|
case 0:
|
|
9952
9949
|
if (!('version' in transaction)) {
|
|
@@ -10037,9 +10034,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10037
10034
|
}, {
|
|
10038
10035
|
key: "sendRawTransaction",
|
|
10039
10036
|
value: function () {
|
|
10040
|
-
var _sendRawTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10037
|
+
var _sendRawTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee88(rawTransaction, options) {
|
|
10041
10038
|
var encodedTransaction, result;
|
|
10042
|
-
return
|
|
10039
|
+
return _regeneratorRuntime__default.default.wrap(function _callee88$(_context89) {
|
|
10043
10040
|
while (1) switch (_context89.prev = _context89.next) {
|
|
10044
10041
|
case 0:
|
|
10045
10042
|
encodedTransaction = toBuffer(rawTransaction).toString('base64');
|
|
@@ -10066,9 +10063,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10066
10063
|
}, {
|
|
10067
10064
|
key: "sendEncodedTransaction",
|
|
10068
10065
|
value: function () {
|
|
10069
|
-
var _sendEncodedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10066
|
+
var _sendEncodedTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee89(encodedTransaction, options) {
|
|
10070
10067
|
var config, skipPreflight, preflightCommitment, args, unsafeRes, res, _logs2;
|
|
10071
|
-
return
|
|
10068
|
+
return _regeneratorRuntime__default.default.wrap(function _callee89$(_context90) {
|
|
10072
10069
|
while (1) switch (_context90.prev = _context90.next) {
|
|
10073
10070
|
case 0:
|
|
10074
10071
|
config = {
|
|
@@ -10125,8 +10122,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10125
10122
|
this._rpcWebSocketConnected = true;
|
|
10126
10123
|
this._rpcWebSocketHeartbeat = setInterval(function () {
|
|
10127
10124
|
// Ping server every 5s to prevent idle timeouts
|
|
10128
|
-
_asyncToGenerator__default.default( /*#__PURE__*/
|
|
10129
|
-
return
|
|
10125
|
+
_asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee90() {
|
|
10126
|
+
return _regeneratorRuntime__default.default.wrap(function _callee90$(_context91) {
|
|
10130
10127
|
while (1) switch (_context91.prev = _context91.next) {
|
|
10131
10128
|
case 0:
|
|
10132
10129
|
_context91.prev = 0;
|
|
@@ -10243,10 +10240,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10243
10240
|
}, {
|
|
10244
10241
|
key: "_updateSubscriptions",
|
|
10245
10242
|
value: function () {
|
|
10246
|
-
var _updateSubscriptions2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10243
|
+
var _updateSubscriptions2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee94() {
|
|
10247
10244
|
var _this12 = this;
|
|
10248
10245
|
var activeWebSocketGeneration, isCurrentConnectionStillActive;
|
|
10249
|
-
return
|
|
10246
|
+
return _regeneratorRuntime__default.default.wrap(function _callee94$(_context95) {
|
|
10250
10247
|
while (1) switch (_context95.prev = _context95.next) {
|
|
10251
10248
|
case 0:
|
|
10252
10249
|
if (!(Object.keys(this._subscriptionsByHash).length === 0)) {
|
|
@@ -10292,9 +10289,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10292
10289
|
// so it's important that we look up the *current* version of
|
|
10293
10290
|
// each subscription, every time we process a hash.
|
|
10294
10291
|
Object.keys(this._subscriptionsByHash).map( /*#__PURE__*/function () {
|
|
10295
|
-
var _ref21 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10292
|
+
var _ref21 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee93(hash) {
|
|
10296
10293
|
var subscription;
|
|
10297
|
-
return
|
|
10294
|
+
return _regeneratorRuntime__default.default.wrap(function _callee93$(_context94) {
|
|
10298
10295
|
while (1) switch (_context94.prev = _context94.next) {
|
|
10299
10296
|
case 0:
|
|
10300
10297
|
subscription = _this12._subscriptionsByHash[hash];
|
|
@@ -10335,9 +10332,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10335
10332
|
return _context94.abrupt("return");
|
|
10336
10333
|
case 12:
|
|
10337
10334
|
_context94.next = 14;
|
|
10338
|
-
return _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10335
|
+
return _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee91() {
|
|
10339
10336
|
var args, method, _serverSubscriptionId;
|
|
10340
|
-
return
|
|
10337
|
+
return _regeneratorRuntime__default.default.wrap(function _callee91$(_context92) {
|
|
10341
10338
|
while (1) switch (_context92.prev = _context92.next) {
|
|
10342
10339
|
case 0:
|
|
10343
10340
|
args = subscription.args, method = subscription.method;
|
|
@@ -10391,9 +10388,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10391
10388
|
break;
|
|
10392
10389
|
}
|
|
10393
10390
|
_context94.next = 18;
|
|
10394
|
-
return _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10391
|
+
return _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee92() {
|
|
10395
10392
|
var serverSubscriptionId, unsubscribeMethod;
|
|
10396
|
-
return
|
|
10393
|
+
return _regeneratorRuntime__default.default.wrap(function _callee92$(_context93) {
|
|
10397
10394
|
while (1) switch (_context93.prev = _context93.next) {
|
|
10398
10395
|
case 0:
|
|
10399
10396
|
serverSubscriptionId = subscription.serverSubscriptionId, unsubscribeMethod = subscription.unsubscribeMethod;
|
|
@@ -10560,9 +10557,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10560
10557
|
existingSubscription.callbacks.add(subscriptionConfig.callback);
|
|
10561
10558
|
}
|
|
10562
10559
|
this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;
|
|
10563
|
-
this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = /*#__PURE__*/_asyncToGenerator__default.default( /*#__PURE__*/
|
|
10560
|
+
this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = /*#__PURE__*/_asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee95() {
|
|
10564
10561
|
var subscription;
|
|
10565
|
-
return
|
|
10562
|
+
return _regeneratorRuntime__default.default.wrap(function _callee95$(_context96) {
|
|
10566
10563
|
while (1) switch (_context96.prev = _context96.next) {
|
|
10567
10564
|
case 0:
|
|
10568
10565
|
delete _this13._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];
|
|
@@ -10611,8 +10608,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10611
10608
|
}, {
|
|
10612
10609
|
key: "removeAccountChangeListener",
|
|
10613
10610
|
value: function () {
|
|
10614
|
-
var _removeAccountChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10615
|
-
return
|
|
10611
|
+
var _removeAccountChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee96(clientSubscriptionId) {
|
|
10612
|
+
return _regeneratorRuntime__default.default.wrap(function _callee96$(_context97) {
|
|
10616
10613
|
while (1) switch (_context97.prev = _context97.next) {
|
|
10617
10614
|
case 0:
|
|
10618
10615
|
_context97.next = 2;
|
|
@@ -10677,8 +10674,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10677
10674
|
}, {
|
|
10678
10675
|
key: "removeProgramAccountChangeListener",
|
|
10679
10676
|
value: function () {
|
|
10680
|
-
var _removeProgramAccountChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10681
|
-
return
|
|
10677
|
+
var _removeProgramAccountChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee97(clientSubscriptionId) {
|
|
10678
|
+
return _regeneratorRuntime__default.default.wrap(function _callee97$(_context98) {
|
|
10682
10679
|
while (1) switch (_context98.prev = _context98.next) {
|
|
10683
10680
|
case 0:
|
|
10684
10681
|
_context98.next = 2;
|
|
@@ -10720,8 +10717,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10720
10717
|
}, {
|
|
10721
10718
|
key: "removeOnLogsListener",
|
|
10722
10719
|
value: function () {
|
|
10723
|
-
var _removeOnLogsListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10724
|
-
return
|
|
10720
|
+
var _removeOnLogsListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee98(clientSubscriptionId) {
|
|
10721
|
+
return _regeneratorRuntime__default.default.wrap(function _callee98$(_context99) {
|
|
10725
10722
|
while (1) switch (_context99.prev = _context99.next) {
|
|
10726
10723
|
case 0:
|
|
10727
10724
|
_context99.next = 2;
|
|
@@ -10785,8 +10782,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10785
10782
|
}, {
|
|
10786
10783
|
key: "removeSlotChangeListener",
|
|
10787
10784
|
value: function () {
|
|
10788
|
-
var _removeSlotChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10789
|
-
return
|
|
10785
|
+
var _removeSlotChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee99(clientSubscriptionId) {
|
|
10786
|
+
return _regeneratorRuntime__default.default.wrap(function _callee99$(_context100) {
|
|
10790
10787
|
while (1) switch (_context100.prev = _context100.next) {
|
|
10791
10788
|
case 0:
|
|
10792
10789
|
_context100.next = 2;
|
|
@@ -10839,8 +10836,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10839
10836
|
}, {
|
|
10840
10837
|
key: "removeSlotUpdateListener",
|
|
10841
10838
|
value: function () {
|
|
10842
|
-
var _removeSlotUpdateListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10843
|
-
return
|
|
10839
|
+
var _removeSlotUpdateListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee100(clientSubscriptionId) {
|
|
10840
|
+
return _regeneratorRuntime__default.default.wrap(function _callee100$(_context101) {
|
|
10844
10841
|
while (1) switch (_context101.prev = _context101.next) {
|
|
10845
10842
|
case 0:
|
|
10846
10843
|
_context101.next = 2;
|
|
@@ -10862,9 +10859,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
10862
10859
|
}, {
|
|
10863
10860
|
key: "_unsubscribeClientSubscription",
|
|
10864
10861
|
value: function () {
|
|
10865
|
-
var _unsubscribeClientSubscription2 = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
10862
|
+
var _unsubscribeClientSubscription2 = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee101(clientSubscriptionId, subscriptionName) {
|
|
10866
10863
|
var dispose;
|
|
10867
|
-
return
|
|
10864
|
+
return _regeneratorRuntime__default.default.wrap(function _callee101$(_context102) {
|
|
10868
10865
|
while (1) switch (_context102.prev = _context102.next) {
|
|
10869
10866
|
case 0:
|
|
10870
10867
|
dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];
|
|
@@ -11037,8 +11034,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
11037
11034
|
}, {
|
|
11038
11035
|
key: "removeSignatureListener",
|
|
11039
11036
|
value: function () {
|
|
11040
|
-
var _removeSignatureListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
11041
|
-
return
|
|
11037
|
+
var _removeSignatureListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee102(clientSubscriptionId) {
|
|
11038
|
+
return _regeneratorRuntime__default.default.wrap(function _callee102$(_context103) {
|
|
11042
11039
|
while (1) switch (_context103.prev = _context103.next) {
|
|
11043
11040
|
case 0:
|
|
11044
11041
|
_context103.next = 2;
|
|
@@ -11090,8 +11087,8 @@ var Connection = /*#__PURE__*/function () {
|
|
|
11090
11087
|
}, {
|
|
11091
11088
|
key: "removeRootChangeListener",
|
|
11092
11089
|
value: function () {
|
|
11093
|
-
var _removeRootChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
11094
|
-
return
|
|
11090
|
+
var _removeRootChangeListener = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee103(clientSubscriptionId) {
|
|
11091
|
+
return _regeneratorRuntime__default.default.wrap(function _callee103$(_context104) {
|
|
11095
11092
|
while (1) switch (_context104.prev = _context104.next) {
|
|
11096
11093
|
case 0:
|
|
11097
11094
|
_context104.next = 2;
|
|
@@ -13452,7 +13449,6 @@ function clusterApiUrl(cluster, tls) {
|
|
|
13452
13449
|
return url;
|
|
13453
13450
|
}
|
|
13454
13451
|
|
|
13455
|
-
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof__default.default(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13456
13452
|
/**
|
|
13457
13453
|
* Send and confirm a raw transaction
|
|
13458
13454
|
*
|
|
@@ -13474,9 +13470,9 @@ function sendAndConfirmRawTransaction(_x, _x2, _x3, _x4) {
|
|
|
13474
13470
|
return _sendAndConfirmRawTransaction.apply(this, arguments);
|
|
13475
13471
|
}
|
|
13476
13472
|
function _sendAndConfirmRawTransaction() {
|
|
13477
|
-
_sendAndConfirmRawTransaction = _asyncToGenerator__default.default( /*#__PURE__*/
|
|
13473
|
+
_sendAndConfirmRawTransaction = _asyncToGenerator__default.default( /*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {
|
|
13478
13474
|
var confirmationStrategy, options, sendOptions, signature, commitment, confirmationPromise, status;
|
|
13479
|
-
return
|
|
13475
|
+
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
13480
13476
|
while (1) switch (_context.prev = _context.next) {
|
|
13481
13477
|
case 0:
|
|
13482
13478
|
if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'lastValidBlockHeight')) {
|