@solana/web3.js 1.77.2 → 1.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.browser.cjs.js +879 -165
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +870 -157
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +911 -221
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +14 -1
- package/lib/index.esm.js +902 -213
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +1258 -486
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +3 -3
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +879 -165
- package/lib/index.native.js.map +1 -1
- package/package.json +14 -13
- package/src/connection.ts +41 -1
package/lib/index.iife.js
CHANGED
|
@@ -2381,7 +2381,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
2381
2381
|
|
|
2382
2382
|
function BufferBigIntNotDefined () {
|
|
2383
2383
|
throw new Error('BigInt not supported')
|
|
2384
|
-
}
|
|
2384
|
+
}
|
|
2385
2385
|
} (buffer));
|
|
2386
2386
|
|
|
2387
2387
|
function number$1(n) {
|
|
@@ -4729,6 +4729,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
4729
4729
|
* Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/
|
|
4730
4730
|
*/
|
|
4731
4731
|
|
|
4732
|
+
/**
|
|
4733
|
+
* Ed25519 Keypair
|
|
4734
|
+
*/
|
|
4735
|
+
|
|
4732
4736
|
const generatePrivateKey = ed25519.utils.randomPrivateKey;
|
|
4733
4737
|
const generateKeypair = () => {
|
|
4734
4738
|
const privateScalar = ed25519.utils.randomPrivateKey();
|
|
@@ -4763,11 +4767,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
4763
4767
|
}
|
|
4764
4768
|
};
|
|
4765
4769
|
|
|
4766
|
-
var
|
|
4767
|
-
var bn = {
|
|
4768
|
-
get exports(){ return bnExports; },
|
|
4769
|
-
set exports(v){ bnExports = v; },
|
|
4770
|
-
};
|
|
4770
|
+
var bn = {exports: {}};
|
|
4771
4771
|
|
|
4772
4772
|
var _nodeResolve_empty = {};
|
|
4773
4773
|
|
|
@@ -4830,11 +4830,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
4830
4830
|
|
|
4831
4831
|
var Buffer;
|
|
4832
4832
|
try {
|
|
4833
|
-
|
|
4834
|
-
Buffer = window.Buffer;
|
|
4835
|
-
} else {
|
|
4836
|
-
Buffer = require$$0$1.Buffer;
|
|
4837
|
-
}
|
|
4833
|
+
Buffer = require$$0$1.Buffer;
|
|
4838
4834
|
} catch (e) {
|
|
4839
4835
|
}
|
|
4840
4836
|
|
|
@@ -4875,19 +4871,23 @@ var solanaWeb3 = (function (exports) {
|
|
|
4875
4871
|
var start = 0;
|
|
4876
4872
|
if (number[0] === '-') {
|
|
4877
4873
|
start++;
|
|
4878
|
-
this.negative = 1;
|
|
4879
4874
|
}
|
|
4880
4875
|
|
|
4881
|
-
if (
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
}
|
|
4876
|
+
if (base === 16) {
|
|
4877
|
+
this._parseHex(number, start);
|
|
4878
|
+
} else {
|
|
4879
|
+
this._parseBase(number, base, start);
|
|
4880
|
+
}
|
|
4881
|
+
|
|
4882
|
+
if (number[0] === '-') {
|
|
4883
|
+
this.negative = 1;
|
|
4890
4884
|
}
|
|
4885
|
+
|
|
4886
|
+
this._strip();
|
|
4887
|
+
|
|
4888
|
+
if (endian !== 'le') return;
|
|
4889
|
+
|
|
4890
|
+
this._initArray(this.toArray(), base, endian);
|
|
4891
4891
|
};
|
|
4892
4892
|
|
|
4893
4893
|
BN.prototype._initNumber = function _initNumber (number, base, endian) {
|
|
@@ -4896,7 +4896,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
4896
4896
|
number = -number;
|
|
4897
4897
|
}
|
|
4898
4898
|
if (number < 0x4000000) {
|
|
4899
|
-
this.words = [number & 0x3ffffff];
|
|
4899
|
+
this.words = [ number & 0x3ffffff ];
|
|
4900
4900
|
this.length = 1;
|
|
4901
4901
|
} else if (number < 0x10000000000000) {
|
|
4902
4902
|
this.words = [
|
|
@@ -4924,7 +4924,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
4924
4924
|
// Perhaps a Uint8Array
|
|
4925
4925
|
assert(typeof number.length === 'number');
|
|
4926
4926
|
if (number.length <= 0) {
|
|
4927
|
-
this.words = [0];
|
|
4927
|
+
this.words = [ 0 ];
|
|
4928
4928
|
this.length = 1;
|
|
4929
4929
|
return this;
|
|
4930
4930
|
}
|
|
@@ -4963,31 +4963,39 @@ var solanaWeb3 = (function (exports) {
|
|
|
4963
4963
|
return this._strip();
|
|
4964
4964
|
};
|
|
4965
4965
|
|
|
4966
|
-
function
|
|
4967
|
-
var
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4966
|
+
function parseHex (str, start, end) {
|
|
4967
|
+
var r = 0;
|
|
4968
|
+
var len = Math.min(str.length, end);
|
|
4969
|
+
var z = 0;
|
|
4970
|
+
for (var i = start; i < len; i++) {
|
|
4971
|
+
var c = str.charCodeAt(i) - 48;
|
|
4972
|
+
|
|
4973
|
+
r <<= 4;
|
|
4974
|
+
|
|
4975
|
+
var b;
|
|
4976
|
+
|
|
4977
|
+
// 'a' - 'f'
|
|
4978
|
+
if (c >= 49 && c <= 54) {
|
|
4979
|
+
b = c - 49 + 0xa;
|
|
4980
|
+
|
|
4981
|
+
// 'A' - 'F'
|
|
4982
|
+
} else if (c >= 17 && c <= 22) {
|
|
4983
|
+
b = c - 17 + 0xa;
|
|
4984
|
+
|
|
4985
|
+
// '0' - '9'
|
|
4986
|
+
} else {
|
|
4987
|
+
b = c;
|
|
4988
|
+
}
|
|
4981
4989
|
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
if (index - 1 >= lowerBound) {
|
|
4985
|
-
r |= parseHex4Bits(string, index - 1) << 4;
|
|
4990
|
+
r |= b;
|
|
4991
|
+
z |= b;
|
|
4986
4992
|
}
|
|
4993
|
+
|
|
4994
|
+
assert(!(z & 0xf0), 'Invalid character in ' + str);
|
|
4987
4995
|
return r;
|
|
4988
4996
|
}
|
|
4989
4997
|
|
|
4990
|
-
BN.prototype._parseHex = function _parseHex (number, start
|
|
4998
|
+
BN.prototype._parseHex = function _parseHex (number, start) {
|
|
4991
4999
|
// Create possibly bigger array to ensure that it fits the number
|
|
4992
5000
|
this.length = Math.ceil((number.length - start) / 6);
|
|
4993
5001
|
this.words = new Array(this.length);
|
|
@@ -4995,38 +5003,25 @@ var solanaWeb3 = (function (exports) {
|
|
|
4995
5003
|
this.words[i] = 0;
|
|
4996
5004
|
}
|
|
4997
5005
|
|
|
4998
|
-
|
|
5006
|
+
var j, w;
|
|
5007
|
+
// Scan 24-bit chunks and add them to the number
|
|
4999
5008
|
var off = 0;
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
j += 1;
|
|
5010
|
-
this.words[j] |= w >>> 26;
|
|
5011
|
-
} else {
|
|
5012
|
-
off += 8;
|
|
5013
|
-
}
|
|
5014
|
-
}
|
|
5015
|
-
} else {
|
|
5016
|
-
var parseLength = number.length - start;
|
|
5017
|
-
for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {
|
|
5018
|
-
w = parseHexByte(number, start, i) << off;
|
|
5019
|
-
this.words[j] |= w & 0x3ffffff;
|
|
5020
|
-
if (off >= 18) {
|
|
5021
|
-
off -= 18;
|
|
5022
|
-
j += 1;
|
|
5023
|
-
this.words[j] |= w >>> 26;
|
|
5024
|
-
} else {
|
|
5025
|
-
off += 8;
|
|
5026
|
-
}
|
|
5009
|
+
for (i = number.length - 6, j = 0; i >= start; i -= 6) {
|
|
5010
|
+
w = parseHex(number, i, i + 6);
|
|
5011
|
+
this.words[j] |= (w << off) & 0x3ffffff;
|
|
5012
|
+
// NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
|
|
5013
|
+
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
|
|
5014
|
+
off += 24;
|
|
5015
|
+
if (off >= 26) {
|
|
5016
|
+
off -= 26;
|
|
5017
|
+
j++;
|
|
5027
5018
|
}
|
|
5028
5019
|
}
|
|
5029
|
-
|
|
5020
|
+
if (i + 6 !== start) {
|
|
5021
|
+
w = parseHex(number, start, i + 6);
|
|
5022
|
+
this.words[j] |= (w << off) & 0x3ffffff;
|
|
5023
|
+
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
|
|
5024
|
+
}
|
|
5030
5025
|
this._strip();
|
|
5031
5026
|
};
|
|
5032
5027
|
|
|
@@ -5059,7 +5054,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
5059
5054
|
|
|
5060
5055
|
BN.prototype._parseBase = function _parseBase (number, base, start) {
|
|
5061
5056
|
// Initialize as zero
|
|
5062
|
-
this.words = [0];
|
|
5057
|
+
this.words = [ 0 ];
|
|
5063
5058
|
this.length = 1;
|
|
5064
5059
|
|
|
5065
5060
|
// Find length of limb in base
|
|
@@ -5100,8 +5095,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
5100
5095
|
this._iaddn(word);
|
|
5101
5096
|
}
|
|
5102
5097
|
}
|
|
5103
|
-
|
|
5104
|
-
this._strip();
|
|
5105
5098
|
};
|
|
5106
5099
|
|
|
5107
5100
|
BN.prototype.copy = function copy (dest) {
|
|
@@ -5114,15 +5107,11 @@ var solanaWeb3 = (function (exports) {
|
|
|
5114
5107
|
dest.red = this.red;
|
|
5115
5108
|
};
|
|
5116
5109
|
|
|
5117
|
-
function move (dest, src) {
|
|
5118
|
-
dest.words = src.words;
|
|
5119
|
-
dest.length = src.length;
|
|
5120
|
-
dest.negative = src.negative;
|
|
5121
|
-
dest.red = src.red;
|
|
5122
|
-
}
|
|
5123
|
-
|
|
5124
5110
|
BN.prototype._move = function _move (dest) {
|
|
5125
|
-
|
|
5111
|
+
dest.words = this.words;
|
|
5112
|
+
dest.length = this.length;
|
|
5113
|
+
dest.negative = this.negative;
|
|
5114
|
+
dest.red = this.red;
|
|
5126
5115
|
};
|
|
5127
5116
|
|
|
5128
5117
|
BN.prototype.clone = function clone () {
|
|
@@ -5154,21 +5143,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
5154
5143
|
return this;
|
|
5155
5144
|
};
|
|
5156
5145
|
|
|
5157
|
-
|
|
5158
|
-
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility
|
|
5159
|
-
if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {
|
|
5160
|
-
try {
|
|
5161
|
-
BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;
|
|
5162
|
-
} catch (e) {
|
|
5163
|
-
BN.prototype.inspect = inspect;
|
|
5164
|
-
}
|
|
5165
|
-
} else {
|
|
5166
|
-
BN.prototype.inspect = inspect;
|
|
5167
|
-
}
|
|
5168
|
-
|
|
5169
|
-
function inspect () {
|
|
5146
|
+
BN.prototype.inspect = function inspect () {
|
|
5170
5147
|
return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
|
|
5171
|
-
}
|
|
5148
|
+
};
|
|
5172
5149
|
|
|
5173
5150
|
/*
|
|
5174
5151
|
|
|
@@ -5260,16 +5237,16 @@ var solanaWeb3 = (function (exports) {
|
|
|
5260
5237
|
var w = this.words[i];
|
|
5261
5238
|
var word = (((w << off) | carry) & 0xffffff).toString(16);
|
|
5262
5239
|
carry = (w >>> (24 - off)) & 0xffffff;
|
|
5263
|
-
off += 2;
|
|
5264
|
-
if (off >= 26) {
|
|
5265
|
-
off -= 26;
|
|
5266
|
-
i--;
|
|
5267
|
-
}
|
|
5268
5240
|
if (carry !== 0 || i !== this.length - 1) {
|
|
5269
5241
|
out = zeros[6 - word.length] + word + out;
|
|
5270
5242
|
} else {
|
|
5271
5243
|
out = word + out;
|
|
5272
5244
|
}
|
|
5245
|
+
off += 2;
|
|
5246
|
+
if (off >= 26) {
|
|
5247
|
+
off -= 26;
|
|
5248
|
+
i--;
|
|
5249
|
+
}
|
|
5273
5250
|
}
|
|
5274
5251
|
if (carry !== 0) {
|
|
5275
5252
|
out = carry.toString(16) + out;
|
|
@@ -5343,97 +5320,51 @@ var solanaWeb3 = (function (exports) {
|
|
|
5343
5320
|
return this.toArrayLike(Array, endian, length);
|
|
5344
5321
|
};
|
|
5345
5322
|
|
|
5346
|
-
var allocate = function allocate (ArrayType, size) {
|
|
5347
|
-
if (ArrayType.allocUnsafe) {
|
|
5348
|
-
return ArrayType.allocUnsafe(size);
|
|
5349
|
-
}
|
|
5350
|
-
return new ArrayType(size);
|
|
5351
|
-
};
|
|
5352
|
-
|
|
5353
5323
|
BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
|
|
5354
|
-
this._strip();
|
|
5355
|
-
|
|
5356
5324
|
var byteLength = this.byteLength();
|
|
5357
5325
|
var reqLength = length || Math.max(1, byteLength);
|
|
5358
5326
|
assert(byteLength <= reqLength, 'byte array longer than desired length');
|
|
5359
5327
|
assert(reqLength > 0, 'Requested array length <= 0');
|
|
5360
5328
|
|
|
5329
|
+
this._strip();
|
|
5330
|
+
var littleEndian = endian === 'le';
|
|
5361
5331
|
var res = allocate(ArrayType, reqLength);
|
|
5362
|
-
var postfix = endian === 'le' ? 'LE' : 'BE';
|
|
5363
|
-
this['_toArrayLike' + postfix](res, byteLength);
|
|
5364
|
-
return res;
|
|
5365
|
-
};
|
|
5366
5332
|
|
|
5367
|
-
|
|
5368
|
-
var
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
res[position++] = word & 0xff;
|
|
5375
|
-
if (position < res.length) {
|
|
5376
|
-
res[position++] = (word >> 8) & 0xff;
|
|
5377
|
-
}
|
|
5378
|
-
if (position < res.length) {
|
|
5379
|
-
res[position++] = (word >> 16) & 0xff;
|
|
5380
|
-
}
|
|
5381
|
-
|
|
5382
|
-
if (shift === 6) {
|
|
5383
|
-
if (position < res.length) {
|
|
5384
|
-
res[position++] = (word >> 24) & 0xff;
|
|
5385
|
-
}
|
|
5386
|
-
carry = 0;
|
|
5387
|
-
shift = 0;
|
|
5388
|
-
} else {
|
|
5389
|
-
carry = word >>> 24;
|
|
5390
|
-
shift += 2;
|
|
5333
|
+
var b, i;
|
|
5334
|
+
var q = this.clone();
|
|
5335
|
+
if (!littleEndian) {
|
|
5336
|
+
// Assume big-endian
|
|
5337
|
+
for (i = 0; i < reqLength - byteLength; i++) {
|
|
5338
|
+
res[i] = 0;
|
|
5391
5339
|
}
|
|
5392
|
-
}
|
|
5393
5340
|
|
|
5394
|
-
|
|
5395
|
-
|
|
5341
|
+
for (i = 0; !q.isZero(); i++) {
|
|
5342
|
+
b = q.andln(0xff);
|
|
5343
|
+
q.iushrn(8);
|
|
5396
5344
|
|
|
5397
|
-
|
|
5398
|
-
res[position++] = 0;
|
|
5345
|
+
res[reqLength - i - 1] = b;
|
|
5399
5346
|
}
|
|
5400
|
-
}
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
var position = res.length - 1;
|
|
5405
|
-
var carry = 0;
|
|
5406
|
-
|
|
5407
|
-
for (var i = 0, shift = 0; i < this.length; i++) {
|
|
5408
|
-
var word = (this.words[i] << shift) | carry;
|
|
5347
|
+
} else {
|
|
5348
|
+
for (i = 0; !q.isZero(); i++) {
|
|
5349
|
+
b = q.andln(0xff);
|
|
5350
|
+
q.iushrn(8);
|
|
5409
5351
|
|
|
5410
|
-
|
|
5411
|
-
if (position >= 0) {
|
|
5412
|
-
res[position--] = (word >> 8) & 0xff;
|
|
5413
|
-
}
|
|
5414
|
-
if (position >= 0) {
|
|
5415
|
-
res[position--] = (word >> 16) & 0xff;
|
|
5352
|
+
res[i] = b;
|
|
5416
5353
|
}
|
|
5417
5354
|
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
res[position--] = (word >> 24) & 0xff;
|
|
5421
|
-
}
|
|
5422
|
-
carry = 0;
|
|
5423
|
-
shift = 0;
|
|
5424
|
-
} else {
|
|
5425
|
-
carry = word >>> 24;
|
|
5426
|
-
shift += 2;
|
|
5355
|
+
for (; i < reqLength; i++) {
|
|
5356
|
+
res[i] = 0;
|
|
5427
5357
|
}
|
|
5428
5358
|
}
|
|
5429
5359
|
|
|
5430
|
-
|
|
5431
|
-
|
|
5360
|
+
return res;
|
|
5361
|
+
};
|
|
5432
5362
|
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5363
|
+
var allocate = function allocate (ArrayType, size) {
|
|
5364
|
+
if (ArrayType.allocUnsafe) {
|
|
5365
|
+
return ArrayType.allocUnsafe(size);
|
|
5436
5366
|
}
|
|
5367
|
+
return new ArrayType(size);
|
|
5437
5368
|
};
|
|
5438
5369
|
|
|
5439
5370
|
if (Math.clz32) {
|
|
@@ -5506,7 +5437,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
5506
5437
|
var off = (bit / 26) | 0;
|
|
5507
5438
|
var wbit = bit % 26;
|
|
5508
5439
|
|
|
5509
|
-
w[bit] = (num.words[off]
|
|
5440
|
+
w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
|
|
5510
5441
|
}
|
|
5511
5442
|
|
|
5512
5443
|
return w;
|
|
@@ -6528,10 +6459,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
6528
6459
|
}
|
|
6529
6460
|
|
|
6530
6461
|
function jumboMulTo (self, num, out) {
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
// return fftm.mulp(self, num, out);
|
|
6534
|
-
return bigMulTo(self, num, out);
|
|
6462
|
+
var fftm = new FFTM();
|
|
6463
|
+
return fftm.mulp(self, num, out);
|
|
6535
6464
|
}
|
|
6536
6465
|
|
|
6537
6466
|
BN.prototype.mulTo = function mulTo (num, out) {
|
|
@@ -6550,6 +6479,202 @@ var solanaWeb3 = (function (exports) {
|
|
|
6550
6479
|
return res;
|
|
6551
6480
|
};
|
|
6552
6481
|
|
|
6482
|
+
// Cooley-Tukey algorithm for FFT
|
|
6483
|
+
// slightly revisited to rely on looping instead of recursion
|
|
6484
|
+
|
|
6485
|
+
function FFTM (x, y) {
|
|
6486
|
+
this.x = x;
|
|
6487
|
+
this.y = y;
|
|
6488
|
+
}
|
|
6489
|
+
|
|
6490
|
+
FFTM.prototype.makeRBT = function makeRBT (N) {
|
|
6491
|
+
var t = new Array(N);
|
|
6492
|
+
var l = BN.prototype._countBits(N) - 1;
|
|
6493
|
+
for (var i = 0; i < N; i++) {
|
|
6494
|
+
t[i] = this.revBin(i, l, N);
|
|
6495
|
+
}
|
|
6496
|
+
|
|
6497
|
+
return t;
|
|
6498
|
+
};
|
|
6499
|
+
|
|
6500
|
+
// Returns binary-reversed representation of `x`
|
|
6501
|
+
FFTM.prototype.revBin = function revBin (x, l, N) {
|
|
6502
|
+
if (x === 0 || x === N - 1) return x;
|
|
6503
|
+
|
|
6504
|
+
var rb = 0;
|
|
6505
|
+
for (var i = 0; i < l; i++) {
|
|
6506
|
+
rb |= (x & 1) << (l - i - 1);
|
|
6507
|
+
x >>= 1;
|
|
6508
|
+
}
|
|
6509
|
+
|
|
6510
|
+
return rb;
|
|
6511
|
+
};
|
|
6512
|
+
|
|
6513
|
+
// Performs "tweedling" phase, therefore 'emulating'
|
|
6514
|
+
// behaviour of the recursive algorithm
|
|
6515
|
+
FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
|
|
6516
|
+
for (var i = 0; i < N; i++) {
|
|
6517
|
+
rtws[i] = rws[rbt[i]];
|
|
6518
|
+
itws[i] = iws[rbt[i]];
|
|
6519
|
+
}
|
|
6520
|
+
};
|
|
6521
|
+
|
|
6522
|
+
FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
|
|
6523
|
+
this.permute(rbt, rws, iws, rtws, itws, N);
|
|
6524
|
+
|
|
6525
|
+
for (var s = 1; s < N; s <<= 1) {
|
|
6526
|
+
var l = s << 1;
|
|
6527
|
+
|
|
6528
|
+
var rtwdf = Math.cos(2 * Math.PI / l);
|
|
6529
|
+
var itwdf = Math.sin(2 * Math.PI / l);
|
|
6530
|
+
|
|
6531
|
+
for (var p = 0; p < N; p += l) {
|
|
6532
|
+
var rtwdf_ = rtwdf;
|
|
6533
|
+
var itwdf_ = itwdf;
|
|
6534
|
+
|
|
6535
|
+
for (var j = 0; j < s; j++) {
|
|
6536
|
+
var re = rtws[p + j];
|
|
6537
|
+
var ie = itws[p + j];
|
|
6538
|
+
|
|
6539
|
+
var ro = rtws[p + j + s];
|
|
6540
|
+
var io = itws[p + j + s];
|
|
6541
|
+
|
|
6542
|
+
var rx = rtwdf_ * ro - itwdf_ * io;
|
|
6543
|
+
|
|
6544
|
+
io = rtwdf_ * io + itwdf_ * ro;
|
|
6545
|
+
ro = rx;
|
|
6546
|
+
|
|
6547
|
+
rtws[p + j] = re + ro;
|
|
6548
|
+
itws[p + j] = ie + io;
|
|
6549
|
+
|
|
6550
|
+
rtws[p + j + s] = re - ro;
|
|
6551
|
+
itws[p + j + s] = ie - io;
|
|
6552
|
+
|
|
6553
|
+
/* jshint maxdepth : false */
|
|
6554
|
+
if (j !== l) {
|
|
6555
|
+
rx = rtwdf * rtwdf_ - itwdf * itwdf_;
|
|
6556
|
+
|
|
6557
|
+
itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
|
|
6558
|
+
rtwdf_ = rx;
|
|
6559
|
+
}
|
|
6560
|
+
}
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
};
|
|
6564
|
+
|
|
6565
|
+
FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
|
|
6566
|
+
var N = Math.max(m, n) | 1;
|
|
6567
|
+
var odd = N & 1;
|
|
6568
|
+
var i = 0;
|
|
6569
|
+
for (N = N / 2 | 0; N; N = N >>> 1) {
|
|
6570
|
+
i++;
|
|
6571
|
+
}
|
|
6572
|
+
|
|
6573
|
+
return 1 << i + 1 + odd;
|
|
6574
|
+
};
|
|
6575
|
+
|
|
6576
|
+
FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
|
|
6577
|
+
if (N <= 1) return;
|
|
6578
|
+
|
|
6579
|
+
for (var i = 0; i < N / 2; i++) {
|
|
6580
|
+
var t = rws[i];
|
|
6581
|
+
|
|
6582
|
+
rws[i] = rws[N - i - 1];
|
|
6583
|
+
rws[N - i - 1] = t;
|
|
6584
|
+
|
|
6585
|
+
t = iws[i];
|
|
6586
|
+
|
|
6587
|
+
iws[i] = -iws[N - i - 1];
|
|
6588
|
+
iws[N - i - 1] = -t;
|
|
6589
|
+
}
|
|
6590
|
+
};
|
|
6591
|
+
|
|
6592
|
+
FFTM.prototype.normalize13b = function normalize13b (ws, N) {
|
|
6593
|
+
var carry = 0;
|
|
6594
|
+
for (var i = 0; i < N / 2; i++) {
|
|
6595
|
+
var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
|
|
6596
|
+
Math.round(ws[2 * i] / N) +
|
|
6597
|
+
carry;
|
|
6598
|
+
|
|
6599
|
+
ws[i] = w & 0x3ffffff;
|
|
6600
|
+
|
|
6601
|
+
if (w < 0x4000000) {
|
|
6602
|
+
carry = 0;
|
|
6603
|
+
} else {
|
|
6604
|
+
carry = w / 0x4000000 | 0;
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
|
|
6608
|
+
return ws;
|
|
6609
|
+
};
|
|
6610
|
+
|
|
6611
|
+
FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
|
|
6612
|
+
var carry = 0;
|
|
6613
|
+
for (var i = 0; i < len; i++) {
|
|
6614
|
+
carry = carry + (ws[i] | 0);
|
|
6615
|
+
|
|
6616
|
+
rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
|
|
6617
|
+
rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
|
|
6618
|
+
}
|
|
6619
|
+
|
|
6620
|
+
// Pad with zeroes
|
|
6621
|
+
for (i = 2 * len; i < N; ++i) {
|
|
6622
|
+
rws[i] = 0;
|
|
6623
|
+
}
|
|
6624
|
+
|
|
6625
|
+
assert(carry === 0);
|
|
6626
|
+
assert((carry & ~0x1fff) === 0);
|
|
6627
|
+
};
|
|
6628
|
+
|
|
6629
|
+
FFTM.prototype.stub = function stub (N) {
|
|
6630
|
+
var ph = new Array(N);
|
|
6631
|
+
for (var i = 0; i < N; i++) {
|
|
6632
|
+
ph[i] = 0;
|
|
6633
|
+
}
|
|
6634
|
+
|
|
6635
|
+
return ph;
|
|
6636
|
+
};
|
|
6637
|
+
|
|
6638
|
+
FFTM.prototype.mulp = function mulp (x, y, out) {
|
|
6639
|
+
var N = 2 * this.guessLen13b(x.length, y.length);
|
|
6640
|
+
|
|
6641
|
+
var rbt = this.makeRBT(N);
|
|
6642
|
+
|
|
6643
|
+
var _ = this.stub(N);
|
|
6644
|
+
|
|
6645
|
+
var rws = new Array(N);
|
|
6646
|
+
var rwst = new Array(N);
|
|
6647
|
+
var iwst = new Array(N);
|
|
6648
|
+
|
|
6649
|
+
var nrws = new Array(N);
|
|
6650
|
+
var nrwst = new Array(N);
|
|
6651
|
+
var niwst = new Array(N);
|
|
6652
|
+
|
|
6653
|
+
var rmws = out.words;
|
|
6654
|
+
rmws.length = N;
|
|
6655
|
+
|
|
6656
|
+
this.convert13b(x.words, x.length, rws, N);
|
|
6657
|
+
this.convert13b(y.words, y.length, nrws, N);
|
|
6658
|
+
|
|
6659
|
+
this.transform(rws, _, rwst, iwst, N, rbt);
|
|
6660
|
+
this.transform(nrws, _, nrwst, niwst, N, rbt);
|
|
6661
|
+
|
|
6662
|
+
for (var i = 0; i < N; i++) {
|
|
6663
|
+
var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
|
|
6664
|
+
iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
|
|
6665
|
+
rwst[i] = rx;
|
|
6666
|
+
}
|
|
6667
|
+
|
|
6668
|
+
this.conjugate(rwst, iwst, N);
|
|
6669
|
+
this.transform(rwst, iwst, rmws, _, N, rbt);
|
|
6670
|
+
this.conjugate(rmws, _, N);
|
|
6671
|
+
this.normalize13b(rmws, N);
|
|
6672
|
+
|
|
6673
|
+
out.negative = x.negative ^ y.negative;
|
|
6674
|
+
out.length = x.length + y.length;
|
|
6675
|
+
return out._strip();
|
|
6676
|
+
};
|
|
6677
|
+
|
|
6553
6678
|
// Multiply `this` by `num`
|
|
6554
6679
|
BN.prototype.mul = function mul (num) {
|
|
6555
6680
|
var out = new BN(null);
|
|
@@ -6813,7 +6938,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
6813
6938
|
|
|
6814
6939
|
// Possible sign change
|
|
6815
6940
|
if (this.negative !== 0) {
|
|
6816
|
-
if (this.length === 1 && (this.words[0] | 0)
|
|
6941
|
+
if (this.length === 1 && (this.words[0] | 0) < num) {
|
|
6817
6942
|
this.words[0] = num - (this.words[0] | 0);
|
|
6818
6943
|
this.negative = 0;
|
|
6819
6944
|
return this;
|
|
@@ -7130,7 +7255,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
7130
7255
|
var cmp = mod.cmp(half);
|
|
7131
7256
|
|
|
7132
7257
|
// Round down
|
|
7133
|
-
if (cmp < 0 ||
|
|
7258
|
+
if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
|
|
7134
7259
|
|
|
7135
7260
|
// Round up
|
|
7136
7261
|
return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
|
|
@@ -7666,13 +7791,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
7666
7791
|
} else if (cmp > 0) {
|
|
7667
7792
|
r.isub(this.p);
|
|
7668
7793
|
} else {
|
|
7669
|
-
|
|
7670
|
-
// r is a BN v4 instance
|
|
7671
|
-
r.strip();
|
|
7672
|
-
} else {
|
|
7673
|
-
// r is a BN v5 instance
|
|
7674
|
-
r._strip();
|
|
7675
|
-
}
|
|
7794
|
+
r._strip();
|
|
7676
7795
|
}
|
|
7677
7796
|
|
|
7678
7797
|
return r;
|
|
@@ -7846,7 +7965,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
7846
7965
|
Red.prototype.imod = function imod (a) {
|
|
7847
7966
|
if (this.prime) return this.prime.ireduce(a)._forceRed(this);
|
|
7848
7967
|
|
|
7849
|
-
|
|
7968
|
+
a.umod(this.m)._forceRed(this)._move(a);
|
|
7850
7969
|
return a;
|
|
7851
7970
|
};
|
|
7852
7971
|
|
|
@@ -8126,14 +8245,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
8126
8245
|
var res = this.imod(a._invmp(this.m).mul(this.r2));
|
|
8127
8246
|
return res._forceRed(this);
|
|
8128
8247
|
};
|
|
8129
|
-
})(module, commonjsGlobal);
|
|
8248
|
+
})(module, commonjsGlobal);
|
|
8130
8249
|
} (bn));
|
|
8131
8250
|
|
|
8132
|
-
var
|
|
8133
|
-
var
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
};
|
|
8251
|
+
var bnExports = bn.exports;
|
|
8252
|
+
var BN = /*@__PURE__*/getDefaultExportFromCjs(bnExports);
|
|
8253
|
+
|
|
8254
|
+
var safeBuffer = {exports: {}};
|
|
8137
8255
|
|
|
8138
8256
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
8139
8257
|
|
|
@@ -8201,8 +8319,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
8201
8319
|
throw new TypeError('Argument must be a number')
|
|
8202
8320
|
}
|
|
8203
8321
|
return buffer$1.SlowBuffer(size)
|
|
8204
|
-
};
|
|
8205
|
-
} (safeBuffer,
|
|
8322
|
+
};
|
|
8323
|
+
} (safeBuffer, safeBuffer.exports));
|
|
8324
|
+
|
|
8325
|
+
var safeBufferExports = safeBuffer.exports;
|
|
8206
8326
|
|
|
8207
8327
|
// base-x encoding / decoding
|
|
8208
8328
|
// Copyright (c) 2018 base-x contributors
|
|
@@ -8328,7 +8448,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
8328
8448
|
|
|
8329
8449
|
var bs58 = basex(ALPHABET);
|
|
8330
8450
|
|
|
8331
|
-
var bs58$1 = bs58;
|
|
8451
|
+
var bs58$1 = /*@__PURE__*/getDefaultExportFromCjs(bs58);
|
|
8332
8452
|
|
|
8333
8453
|
// Choice: a ? b : c
|
|
8334
8454
|
const Chi = (a, b, c) => (a & b) ^ (~a & c);
|
|
@@ -9585,6 +9705,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
9585
9705
|
* Value to be converted into public key
|
|
9586
9706
|
*/
|
|
9587
9707
|
|
|
9708
|
+
/**
|
|
9709
|
+
* JSON object representation of PublicKey class
|
|
9710
|
+
*/
|
|
9711
|
+
|
|
9588
9712
|
function isPublicKeyData(value) {
|
|
9589
9713
|
return value._bn !== undefined;
|
|
9590
9714
|
}
|
|
@@ -9597,14 +9721,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
9597
9721
|
*/
|
|
9598
9722
|
_Symbol$toStringTag = Symbol.toStringTag;
|
|
9599
9723
|
class PublicKey extends Struct$1 {
|
|
9600
|
-
/** @internal */
|
|
9601
|
-
|
|
9602
9724
|
/**
|
|
9603
9725
|
* Create a new PublicKey object
|
|
9604
9726
|
* @param value ed25519 public key as buffer or base-58 encoded string
|
|
9605
9727
|
*/
|
|
9606
9728
|
constructor(value) {
|
|
9607
9729
|
super({});
|
|
9730
|
+
/** @internal */
|
|
9608
9731
|
this._bn = void 0;
|
|
9609
9732
|
if (isPublicKeyData(value)) {
|
|
9610
9733
|
this._bn = value._bn;
|
|
@@ -9615,9 +9738,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
9615
9738
|
if (decoded.length != PUBLIC_KEY_LENGTH) {
|
|
9616
9739
|
throw new Error(`Invalid public key input`);
|
|
9617
9740
|
}
|
|
9618
|
-
this._bn = new
|
|
9741
|
+
this._bn = new BN(decoded);
|
|
9619
9742
|
} else {
|
|
9620
|
-
this._bn = new
|
|
9743
|
+
this._bn = new BN(value);
|
|
9621
9744
|
}
|
|
9622
9745
|
if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {
|
|
9623
9746
|
throw new Error(`Invalid public key input`);
|
|
@@ -9786,10 +9909,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
9786
9909
|
* @deprecated since v1.10.0, please use {@link Keypair} instead.
|
|
9787
9910
|
*/
|
|
9788
9911
|
class Account {
|
|
9789
|
-
/** @internal */
|
|
9790
|
-
|
|
9791
|
-
/** @internal */
|
|
9792
|
-
|
|
9793
9912
|
/**
|
|
9794
9913
|
* Create a new Account object
|
|
9795
9914
|
*
|
|
@@ -9799,7 +9918,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
9799
9918
|
* @param secretKey Secret key for the account
|
|
9800
9919
|
*/
|
|
9801
9920
|
constructor(secretKey) {
|
|
9921
|
+
/** @internal */
|
|
9802
9922
|
this._publicKey = void 0;
|
|
9923
|
+
/** @internal */
|
|
9803
9924
|
this._secretKey = void 0;
|
|
9804
9925
|
if (secretKey) {
|
|
9805
9926
|
const secretKeyBuffer = toBuffer(secretKey);
|
|
@@ -12439,6 +12560,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
12439
12560
|
* @property {string} data
|
|
12440
12561
|
*/
|
|
12441
12562
|
|
|
12563
|
+
/**
|
|
12564
|
+
* Message constructor arguments
|
|
12565
|
+
*/
|
|
12566
|
+
|
|
12442
12567
|
/**
|
|
12443
12568
|
* List of instructions to be processed atomically
|
|
12444
12569
|
*/
|
|
@@ -12883,17 +13008,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
12883
13008
|
* Transaction signature as base-58 encoded string
|
|
12884
13009
|
*/
|
|
12885
13010
|
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
/**
|
|
12889
|
-
* Default (empty) signature
|
|
12890
|
-
*/
|
|
12891
|
-
(function (TransactionStatus) {
|
|
13011
|
+
let TransactionStatus = /*#__PURE__*/function (TransactionStatus) {
|
|
12892
13012
|
TransactionStatus[TransactionStatus["BLOCKHEIGHT_EXCEEDED"] = 0] = "BLOCKHEIGHT_EXCEEDED";
|
|
12893
13013
|
TransactionStatus[TransactionStatus["PROCESSED"] = 1] = "PROCESSED";
|
|
12894
13014
|
TransactionStatus[TransactionStatus["TIMED_OUT"] = 2] = "TIMED_OUT";
|
|
12895
13015
|
TransactionStatus[TransactionStatus["NONCE_INVALID"] = 3] = "NONCE_INVALID";
|
|
12896
|
-
|
|
13016
|
+
return TransactionStatus;
|
|
13017
|
+
}({});
|
|
13018
|
+
|
|
13019
|
+
/**
|
|
13020
|
+
* Default (empty) signature
|
|
13021
|
+
*/
|
|
12897
13022
|
const DEFAULT_SIGNATURE = buffer.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
|
|
12898
13023
|
|
|
12899
13024
|
/**
|
|
@@ -12901,25 +13026,34 @@ var solanaWeb3 = (function (exports) {
|
|
|
12901
13026
|
*/
|
|
12902
13027
|
|
|
12903
13028
|
/**
|
|
12904
|
-
*
|
|
13029
|
+
* List of TransactionInstruction object fields that may be initialized at construction
|
|
12905
13030
|
*/
|
|
12906
|
-
class TransactionInstruction {
|
|
12907
|
-
/**
|
|
12908
|
-
* Public keys to include in this transaction
|
|
12909
|
-
* Boolean represents whether this pubkey needs to sign the transaction
|
|
12910
|
-
*/
|
|
12911
13031
|
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
13032
|
+
/**
|
|
13033
|
+
* Configuration object for Transaction.serialize()
|
|
13034
|
+
*/
|
|
12915
13035
|
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
13036
|
+
/**
|
|
13037
|
+
* @internal
|
|
13038
|
+
*/
|
|
12919
13039
|
|
|
13040
|
+
/**
|
|
13041
|
+
* Transaction Instruction class
|
|
13042
|
+
*/
|
|
13043
|
+
class TransactionInstruction {
|
|
12920
13044
|
constructor(opts) {
|
|
13045
|
+
/**
|
|
13046
|
+
* Public keys to include in this transaction
|
|
13047
|
+
* Boolean represents whether this pubkey needs to sign the transaction
|
|
13048
|
+
*/
|
|
12921
13049
|
this.keys = void 0;
|
|
13050
|
+
/**
|
|
13051
|
+
* Program Id to execute
|
|
13052
|
+
*/
|
|
12922
13053
|
this.programId = void 0;
|
|
13054
|
+
/**
|
|
13055
|
+
* Program input
|
|
13056
|
+
*/
|
|
12923
13057
|
this.data = buffer.Buffer.alloc(0);
|
|
12924
13058
|
this.programId = opts.programId;
|
|
12925
13059
|
this.keys = opts.keys;
|
|
@@ -12953,19 +13087,35 @@ var solanaWeb3 = (function (exports) {
|
|
|
12953
13087
|
*/
|
|
12954
13088
|
|
|
12955
13089
|
/**
|
|
12956
|
-
* Transaction
|
|
13090
|
+
* List of Transaction object fields that may be initialized at construction
|
|
12957
13091
|
*/
|
|
12958
|
-
class Transaction {
|
|
12959
|
-
/**
|
|
12960
|
-
* Signatures for the transaction. Typically created by invoking the
|
|
12961
|
-
* `sign()` method
|
|
12962
|
-
*/
|
|
12963
13092
|
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
13093
|
+
// For backward compatibility; an unfortunate consequence of being
|
|
13094
|
+
// forced to over-export types by the documentation generator.
|
|
13095
|
+
// See https://github.com/solana-labs/solana/pull/25820
|
|
13096
|
+
/**
|
|
13097
|
+
* Blockhash-based transactions have a lifetime that are defined by
|
|
13098
|
+
* the blockhash they include. Any transaction whose blockhash is
|
|
13099
|
+
* too old will be rejected.
|
|
13100
|
+
*/
|
|
13101
|
+
/**
|
|
13102
|
+
* Use these options to construct a durable nonce transaction.
|
|
13103
|
+
*/
|
|
13104
|
+
/**
|
|
13105
|
+
* Nonce information to be used to build an offline Transaction.
|
|
13106
|
+
*/
|
|
13107
|
+
/**
|
|
13108
|
+
* @internal
|
|
13109
|
+
*/
|
|
13110
|
+
/**
|
|
13111
|
+
* Transaction class
|
|
13112
|
+
*/
|
|
13113
|
+
class Transaction {
|
|
13114
|
+
/**
|
|
13115
|
+
* The first (payer) Transaction signature
|
|
13116
|
+
*/
|
|
13117
|
+
get signature() {
|
|
13118
|
+
if (this.signatures.length > 0) {
|
|
12969
13119
|
return this.signatures[0].signature;
|
|
12970
13120
|
}
|
|
12971
13121
|
return null;
|
|
@@ -12975,18 +13125,57 @@ var solanaWeb3 = (function (exports) {
|
|
|
12975
13125
|
* The transaction fee payer
|
|
12976
13126
|
*/
|
|
12977
13127
|
|
|
13128
|
+
// Construct a transaction with a blockhash and lastValidBlockHeight
|
|
13129
|
+
|
|
13130
|
+
// Construct a transaction using a durable nonce
|
|
13131
|
+
|
|
13132
|
+
/**
|
|
13133
|
+
* @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.
|
|
13134
|
+
* Please supply a `TransactionBlockhashCtor` instead.
|
|
13135
|
+
*/
|
|
13136
|
+
|
|
12978
13137
|
/**
|
|
12979
13138
|
* Construct an empty Transaction
|
|
12980
13139
|
*/
|
|
12981
13140
|
constructor(opts) {
|
|
13141
|
+
/**
|
|
13142
|
+
* Signatures for the transaction. Typically created by invoking the
|
|
13143
|
+
* `sign()` method
|
|
13144
|
+
*/
|
|
12982
13145
|
this.signatures = [];
|
|
12983
13146
|
this.feePayer = void 0;
|
|
13147
|
+
/**
|
|
13148
|
+
* The instructions to atomically execute
|
|
13149
|
+
*/
|
|
12984
13150
|
this.instructions = [];
|
|
13151
|
+
/**
|
|
13152
|
+
* A recent transaction id. Must be populated by the caller
|
|
13153
|
+
*/
|
|
12985
13154
|
this.recentBlockhash = void 0;
|
|
13155
|
+
/**
|
|
13156
|
+
* the last block chain can advance to before tx is declared expired
|
|
13157
|
+
* */
|
|
12986
13158
|
this.lastValidBlockHeight = void 0;
|
|
13159
|
+
/**
|
|
13160
|
+
* Optional Nonce information. If populated, transaction will use a durable
|
|
13161
|
+
* Nonce hash instead of a recentBlockhash. Must be populated by the caller
|
|
13162
|
+
*/
|
|
12987
13163
|
this.nonceInfo = void 0;
|
|
13164
|
+
/**
|
|
13165
|
+
* If this is a nonce transaction this represents the minimum slot from which
|
|
13166
|
+
* to evaluate if the nonce has advanced when attempting to confirm the
|
|
13167
|
+
* transaction. This protects against a case where the transaction confirmation
|
|
13168
|
+
* logic loads the nonce account from an old slot and assumes the mismatch in
|
|
13169
|
+
* nonce value implies that the nonce has been advanced.
|
|
13170
|
+
*/
|
|
12988
13171
|
this.minNonceContextSlot = void 0;
|
|
13172
|
+
/**
|
|
13173
|
+
* @internal
|
|
13174
|
+
*/
|
|
12989
13175
|
this._message = void 0;
|
|
13176
|
+
/**
|
|
13177
|
+
* @internal
|
|
13178
|
+
*/
|
|
12990
13179
|
this._json = void 0;
|
|
12991
13180
|
if (!opts) {
|
|
12992
13181
|
return;
|
|
@@ -13801,6 +13990,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
13801
13990
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
13802
13991
|
}
|
|
13803
13992
|
|
|
13993
|
+
/**
|
|
13994
|
+
* @internal
|
|
13995
|
+
*/
|
|
13996
|
+
|
|
13804
13997
|
/**
|
|
13805
13998
|
* Populate a buffer of instruction data using an InstructionType
|
|
13806
13999
|
* @internal
|
|
@@ -13984,6 +14177,62 @@ var solanaWeb3 = (function (exports) {
|
|
|
13984
14177
|
* Create account system transaction params
|
|
13985
14178
|
*/
|
|
13986
14179
|
|
|
14180
|
+
/**
|
|
14181
|
+
* Transfer system transaction params
|
|
14182
|
+
*/
|
|
14183
|
+
|
|
14184
|
+
/**
|
|
14185
|
+
* Assign system transaction params
|
|
14186
|
+
*/
|
|
14187
|
+
|
|
14188
|
+
/**
|
|
14189
|
+
* Create account with seed system transaction params
|
|
14190
|
+
*/
|
|
14191
|
+
|
|
14192
|
+
/**
|
|
14193
|
+
* Create nonce account system transaction params
|
|
14194
|
+
*/
|
|
14195
|
+
|
|
14196
|
+
/**
|
|
14197
|
+
* Create nonce account with seed system transaction params
|
|
14198
|
+
*/
|
|
14199
|
+
|
|
14200
|
+
/**
|
|
14201
|
+
* Initialize nonce account system instruction params
|
|
14202
|
+
*/
|
|
14203
|
+
|
|
14204
|
+
/**
|
|
14205
|
+
* Advance nonce account system instruction params
|
|
14206
|
+
*/
|
|
14207
|
+
|
|
14208
|
+
/**
|
|
14209
|
+
* Withdraw nonce account system transaction params
|
|
14210
|
+
*/
|
|
14211
|
+
|
|
14212
|
+
/**
|
|
14213
|
+
* Authorize nonce account system transaction params
|
|
14214
|
+
*/
|
|
14215
|
+
|
|
14216
|
+
/**
|
|
14217
|
+
* Allocate account system transaction params
|
|
14218
|
+
*/
|
|
14219
|
+
|
|
14220
|
+
/**
|
|
14221
|
+
* Allocate account with seed system transaction params
|
|
14222
|
+
*/
|
|
14223
|
+
|
|
14224
|
+
/**
|
|
14225
|
+
* Assign account with seed system transaction params
|
|
14226
|
+
*/
|
|
14227
|
+
|
|
14228
|
+
/**
|
|
14229
|
+
* Transfer with seed system transaction params
|
|
14230
|
+
*/
|
|
14231
|
+
|
|
14232
|
+
/** Decoded transfer system transaction instruction */
|
|
14233
|
+
|
|
14234
|
+
/** Decoded transferWithSeed system transaction instruction */
|
|
14235
|
+
|
|
13987
14236
|
/**
|
|
13988
14237
|
* System Instruction class
|
|
13989
14238
|
*/
|
|
@@ -14957,7 +15206,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
14957
15206
|
}
|
|
14958
15207
|
};
|
|
14959
15208
|
|
|
14960
|
-
var fastStableStringify$1 = fastStableStringify;
|
|
15209
|
+
var fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);
|
|
14961
15210
|
|
|
14962
15211
|
/**
|
|
14963
15212
|
* A `StructFailure` represents a single specific failure in validation.
|
|
@@ -16393,7 +16642,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
16393
16642
|
callback(null, response);
|
|
16394
16643
|
};
|
|
16395
16644
|
|
|
16396
|
-
var RpcClient = browser;
|
|
16645
|
+
var RpcClient = /*@__PURE__*/getDefaultExportFromCjs(browser);
|
|
16397
16646
|
|
|
16398
16647
|
const MINIMUM_SLOT_PER_EPOCH = 32;
|
|
16399
16648
|
|
|
@@ -16426,21 +16675,16 @@ var solanaWeb3 = (function (exports) {
|
|
|
16426
16675
|
* Can be retrieved with the {@link Connection.getEpochSchedule} method
|
|
16427
16676
|
*/
|
|
16428
16677
|
class EpochSchedule {
|
|
16429
|
-
/** The maximum number of slots in each epoch */
|
|
16430
|
-
|
|
16431
|
-
/** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */
|
|
16432
|
-
|
|
16433
|
-
/** Indicates whether epochs start short and grow */
|
|
16434
|
-
|
|
16435
|
-
/** The first epoch with `slotsPerEpoch` slots */
|
|
16436
|
-
|
|
16437
|
-
/** The first slot of `firstNormalEpoch` */
|
|
16438
|
-
|
|
16439
16678
|
constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {
|
|
16679
|
+
/** The maximum number of slots in each epoch */
|
|
16440
16680
|
this.slotsPerEpoch = void 0;
|
|
16681
|
+
/** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */
|
|
16441
16682
|
this.leaderScheduleSlotOffset = void 0;
|
|
16683
|
+
/** Indicates whether epochs start short and grow */
|
|
16442
16684
|
this.warmup = void 0;
|
|
16685
|
+
/** The first epoch with `slotsPerEpoch` slots */
|
|
16443
16686
|
this.firstNormalEpoch = void 0;
|
|
16687
|
+
/** The first slot of `firstNormalEpoch` */
|
|
16444
16688
|
this.firstNormalSlot = void 0;
|
|
16445
16689
|
this.slotsPerEpoch = slotsPerEpoch;
|
|
16446
16690
|
this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;
|
|
@@ -16531,11 +16775,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
16531
16775
|
|
|
16532
16776
|
var client = {};
|
|
16533
16777
|
|
|
16534
|
-
var
|
|
16535
|
-
var interopRequireDefault = {
|
|
16536
|
-
get exports(){ return interopRequireDefaultExports; },
|
|
16537
|
-
set exports(v){ interopRequireDefaultExports = v; },
|
|
16538
|
-
};
|
|
16778
|
+
var interopRequireDefault = {exports: {}};
|
|
16539
16779
|
|
|
16540
16780
|
(function (module) {
|
|
16541
16781
|
function _interopRequireDefault(obj) {
|
|
@@ -16543,25 +16783,19 @@ var solanaWeb3 = (function (exports) {
|
|
|
16543
16783
|
"default": obj
|
|
16544
16784
|
};
|
|
16545
16785
|
}
|
|
16546
|
-
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16786
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16547
16787
|
} (interopRequireDefault));
|
|
16548
16788
|
|
|
16549
|
-
var
|
|
16550
|
-
var regeneratorRuntime$1 = {
|
|
16551
|
-
get exports(){ return regeneratorRuntimeExports; },
|
|
16552
|
-
set exports(v){ regeneratorRuntimeExports = v; },
|
|
16553
|
-
};
|
|
16789
|
+
var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
16554
16790
|
|
|
16555
|
-
var
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
set exports(v){ _typeofExports = v; },
|
|
16559
|
-
};
|
|
16791
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
16792
|
+
|
|
16793
|
+
var _typeof = {exports: {}};
|
|
16560
16794
|
|
|
16561
16795
|
var hasRequired_typeof;
|
|
16562
16796
|
|
|
16563
16797
|
function require_typeof () {
|
|
16564
|
-
if (hasRequired_typeof) return
|
|
16798
|
+
if (hasRequired_typeof) return _typeof.exports;
|
|
16565
16799
|
hasRequired_typeof = 1;
|
|
16566
16800
|
(function (module) {
|
|
16567
16801
|
function _typeof(obj) {
|
|
@@ -16573,15 +16807,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
16573
16807
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
16574
16808
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
16575
16809
|
}
|
|
16576
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16577
|
-
|
|
16578
|
-
return
|
|
16810
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16811
|
+
} (_typeof));
|
|
16812
|
+
return _typeof.exports;
|
|
16579
16813
|
}
|
|
16580
16814
|
|
|
16581
16815
|
var hasRequiredRegeneratorRuntime;
|
|
16582
16816
|
|
|
16583
16817
|
function requireRegeneratorRuntime () {
|
|
16584
|
-
if (hasRequiredRegeneratorRuntime) return
|
|
16818
|
+
if (hasRequiredRegeneratorRuntime) return regeneratorRuntime$1.exports;
|
|
16585
16819
|
hasRequiredRegeneratorRuntime = 1;
|
|
16586
16820
|
(function (module) {
|
|
16587
16821
|
var _typeof = require_typeof()["default"];
|
|
@@ -16886,9 +17120,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
16886
17120
|
}
|
|
16887
17121
|
}, exports;
|
|
16888
17122
|
}
|
|
16889
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16890
|
-
|
|
16891
|
-
return
|
|
17123
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17124
|
+
} (regeneratorRuntime$1));
|
|
17125
|
+
return regeneratorRuntime$1.exports;
|
|
16892
17126
|
}
|
|
16893
17127
|
|
|
16894
17128
|
var regenerator;
|
|
@@ -16915,16 +17149,12 @@ var solanaWeb3 = (function (exports) {
|
|
|
16915
17149
|
return regenerator;
|
|
16916
17150
|
}
|
|
16917
17151
|
|
|
16918
|
-
var
|
|
16919
|
-
var asyncToGenerator = {
|
|
16920
|
-
get exports(){ return asyncToGeneratorExports; },
|
|
16921
|
-
set exports(v){ asyncToGeneratorExports = v; },
|
|
16922
|
-
};
|
|
17152
|
+
var asyncToGenerator = {exports: {}};
|
|
16923
17153
|
|
|
16924
17154
|
var hasRequiredAsyncToGenerator;
|
|
16925
17155
|
|
|
16926
17156
|
function requireAsyncToGenerator () {
|
|
16927
|
-
if (hasRequiredAsyncToGenerator) return
|
|
17157
|
+
if (hasRequiredAsyncToGenerator) return asyncToGenerator.exports;
|
|
16928
17158
|
hasRequiredAsyncToGenerator = 1;
|
|
16929
17159
|
(function (module) {
|
|
16930
17160
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -16957,21 +17187,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
16957
17187
|
});
|
|
16958
17188
|
};
|
|
16959
17189
|
}
|
|
16960
|
-
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16961
|
-
|
|
16962
|
-
return
|
|
17190
|
+
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17191
|
+
} (asyncToGenerator));
|
|
17192
|
+
return asyncToGenerator.exports;
|
|
16963
17193
|
}
|
|
16964
17194
|
|
|
16965
|
-
var
|
|
16966
|
-
var classCallCheck = {
|
|
16967
|
-
get exports(){ return classCallCheckExports; },
|
|
16968
|
-
set exports(v){ classCallCheckExports = v; },
|
|
16969
|
-
};
|
|
17195
|
+
var classCallCheck = {exports: {}};
|
|
16970
17196
|
|
|
16971
17197
|
var hasRequiredClassCallCheck;
|
|
16972
17198
|
|
|
16973
17199
|
function requireClassCallCheck () {
|
|
16974
|
-
if (hasRequiredClassCallCheck) return
|
|
17200
|
+
if (hasRequiredClassCallCheck) return classCallCheck.exports;
|
|
16975
17201
|
hasRequiredClassCallCheck = 1;
|
|
16976
17202
|
(function (module) {
|
|
16977
17203
|
function _classCallCheck(instance, Constructor) {
|
|
@@ -16979,33 +17205,21 @@ var solanaWeb3 = (function (exports) {
|
|
|
16979
17205
|
throw new TypeError("Cannot call a class as a function");
|
|
16980
17206
|
}
|
|
16981
17207
|
}
|
|
16982
|
-
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
16983
|
-
|
|
16984
|
-
return
|
|
17208
|
+
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17209
|
+
} (classCallCheck));
|
|
17210
|
+
return classCallCheck.exports;
|
|
16985
17211
|
}
|
|
16986
17212
|
|
|
16987
|
-
var
|
|
16988
|
-
var createClass = {
|
|
16989
|
-
get exports(){ return createClassExports; },
|
|
16990
|
-
set exports(v){ createClassExports = v; },
|
|
16991
|
-
};
|
|
17213
|
+
var createClass = {exports: {}};
|
|
16992
17214
|
|
|
16993
|
-
var
|
|
16994
|
-
var toPropertyKey = {
|
|
16995
|
-
get exports(){ return toPropertyKeyExports; },
|
|
16996
|
-
set exports(v){ toPropertyKeyExports = v; },
|
|
16997
|
-
};
|
|
17215
|
+
var toPropertyKey = {exports: {}};
|
|
16998
17216
|
|
|
16999
|
-
var
|
|
17000
|
-
var toPrimitive = {
|
|
17001
|
-
get exports(){ return toPrimitiveExports; },
|
|
17002
|
-
set exports(v){ toPrimitiveExports = v; },
|
|
17003
|
-
};
|
|
17217
|
+
var toPrimitive = {exports: {}};
|
|
17004
17218
|
|
|
17005
17219
|
var hasRequiredToPrimitive;
|
|
17006
17220
|
|
|
17007
17221
|
function requireToPrimitive () {
|
|
17008
|
-
if (hasRequiredToPrimitive) return
|
|
17222
|
+
if (hasRequiredToPrimitive) return toPrimitive.exports;
|
|
17009
17223
|
hasRequiredToPrimitive = 1;
|
|
17010
17224
|
(function (module) {
|
|
17011
17225
|
var _typeof = require_typeof()["default"];
|
|
@@ -17019,15 +17233,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
17019
17233
|
}
|
|
17020
17234
|
return (hint === "string" ? String : Number)(input);
|
|
17021
17235
|
}
|
|
17022
|
-
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17023
|
-
|
|
17024
|
-
return
|
|
17236
|
+
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17237
|
+
} (toPrimitive));
|
|
17238
|
+
return toPrimitive.exports;
|
|
17025
17239
|
}
|
|
17026
17240
|
|
|
17027
17241
|
var hasRequiredToPropertyKey;
|
|
17028
17242
|
|
|
17029
17243
|
function requireToPropertyKey () {
|
|
17030
|
-
if (hasRequiredToPropertyKey) return
|
|
17244
|
+
if (hasRequiredToPropertyKey) return toPropertyKey.exports;
|
|
17031
17245
|
hasRequiredToPropertyKey = 1;
|
|
17032
17246
|
(function (module) {
|
|
17033
17247
|
var _typeof = require_typeof()["default"];
|
|
@@ -17036,15 +17250,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
17036
17250
|
var key = toPrimitive(arg, "string");
|
|
17037
17251
|
return _typeof(key) === "symbol" ? key : String(key);
|
|
17038
17252
|
}
|
|
17039
|
-
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17040
|
-
|
|
17041
|
-
return
|
|
17253
|
+
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17254
|
+
} (toPropertyKey));
|
|
17255
|
+
return toPropertyKey.exports;
|
|
17042
17256
|
}
|
|
17043
17257
|
|
|
17044
17258
|
var hasRequiredCreateClass;
|
|
17045
17259
|
|
|
17046
17260
|
function requireCreateClass () {
|
|
17047
|
-
if (hasRequiredCreateClass) return
|
|
17261
|
+
if (hasRequiredCreateClass) return createClass.exports;
|
|
17048
17262
|
hasRequiredCreateClass = 1;
|
|
17049
17263
|
(function (module) {
|
|
17050
17264
|
var toPropertyKey = requireToPropertyKey();
|
|
@@ -17065,27 +17279,19 @@ var solanaWeb3 = (function (exports) {
|
|
|
17065
17279
|
});
|
|
17066
17280
|
return Constructor;
|
|
17067
17281
|
}
|
|
17068
|
-
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17069
|
-
|
|
17070
|
-
return
|
|
17282
|
+
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17283
|
+
} (createClass));
|
|
17284
|
+
return createClass.exports;
|
|
17071
17285
|
}
|
|
17072
17286
|
|
|
17073
|
-
var
|
|
17074
|
-
var inherits = {
|
|
17075
|
-
get exports(){ return inheritsExports; },
|
|
17076
|
-
set exports(v){ inheritsExports = v; },
|
|
17077
|
-
};
|
|
17287
|
+
var inherits = {exports: {}};
|
|
17078
17288
|
|
|
17079
|
-
var
|
|
17080
|
-
var setPrototypeOf = {
|
|
17081
|
-
get exports(){ return setPrototypeOfExports; },
|
|
17082
|
-
set exports(v){ setPrototypeOfExports = v; },
|
|
17083
|
-
};
|
|
17289
|
+
var setPrototypeOf = {exports: {}};
|
|
17084
17290
|
|
|
17085
17291
|
var hasRequiredSetPrototypeOf;
|
|
17086
17292
|
|
|
17087
17293
|
function requireSetPrototypeOf () {
|
|
17088
|
-
if (hasRequiredSetPrototypeOf) return
|
|
17294
|
+
if (hasRequiredSetPrototypeOf) return setPrototypeOf.exports;
|
|
17089
17295
|
hasRequiredSetPrototypeOf = 1;
|
|
17090
17296
|
(function (module) {
|
|
17091
17297
|
function _setPrototypeOf(o, p) {
|
|
@@ -17095,15 +17301,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
17095
17301
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17096
17302
|
return _setPrototypeOf(o, p);
|
|
17097
17303
|
}
|
|
17098
|
-
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17099
|
-
|
|
17100
|
-
return
|
|
17304
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17305
|
+
} (setPrototypeOf));
|
|
17306
|
+
return setPrototypeOf.exports;
|
|
17101
17307
|
}
|
|
17102
17308
|
|
|
17103
17309
|
var hasRequiredInherits;
|
|
17104
17310
|
|
|
17105
17311
|
function requireInherits () {
|
|
17106
|
-
if (hasRequiredInherits) return
|
|
17312
|
+
if (hasRequiredInherits) return inherits.exports;
|
|
17107
17313
|
hasRequiredInherits = 1;
|
|
17108
17314
|
(function (module) {
|
|
17109
17315
|
var setPrototypeOf = requireSetPrototypeOf();
|
|
@@ -17123,27 +17329,19 @@ var solanaWeb3 = (function (exports) {
|
|
|
17123
17329
|
});
|
|
17124
17330
|
if (superClass) setPrototypeOf(subClass, superClass);
|
|
17125
17331
|
}
|
|
17126
|
-
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17127
|
-
|
|
17128
|
-
return
|
|
17332
|
+
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17333
|
+
} (inherits));
|
|
17334
|
+
return inherits.exports;
|
|
17129
17335
|
}
|
|
17130
17336
|
|
|
17131
|
-
var
|
|
17132
|
-
var possibleConstructorReturn = {
|
|
17133
|
-
get exports(){ return possibleConstructorReturnExports; },
|
|
17134
|
-
set exports(v){ possibleConstructorReturnExports = v; },
|
|
17135
|
-
};
|
|
17337
|
+
var possibleConstructorReturn = {exports: {}};
|
|
17136
17338
|
|
|
17137
|
-
var
|
|
17138
|
-
var assertThisInitialized = {
|
|
17139
|
-
get exports(){ return assertThisInitializedExports; },
|
|
17140
|
-
set exports(v){ assertThisInitializedExports = v; },
|
|
17141
|
-
};
|
|
17339
|
+
var assertThisInitialized = {exports: {}};
|
|
17142
17340
|
|
|
17143
17341
|
var hasRequiredAssertThisInitialized;
|
|
17144
17342
|
|
|
17145
17343
|
function requireAssertThisInitialized () {
|
|
17146
|
-
if (hasRequiredAssertThisInitialized) return
|
|
17344
|
+
if (hasRequiredAssertThisInitialized) return assertThisInitialized.exports;
|
|
17147
17345
|
hasRequiredAssertThisInitialized = 1;
|
|
17148
17346
|
(function (module) {
|
|
17149
17347
|
function _assertThisInitialized(self) {
|
|
@@ -17152,15 +17350,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
17152
17350
|
}
|
|
17153
17351
|
return self;
|
|
17154
17352
|
}
|
|
17155
|
-
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17156
|
-
|
|
17157
|
-
return
|
|
17353
|
+
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17354
|
+
} (assertThisInitialized));
|
|
17355
|
+
return assertThisInitialized.exports;
|
|
17158
17356
|
}
|
|
17159
17357
|
|
|
17160
17358
|
var hasRequiredPossibleConstructorReturn;
|
|
17161
17359
|
|
|
17162
17360
|
function requirePossibleConstructorReturn () {
|
|
17163
|
-
if (hasRequiredPossibleConstructorReturn) return
|
|
17361
|
+
if (hasRequiredPossibleConstructorReturn) return possibleConstructorReturn.exports;
|
|
17164
17362
|
hasRequiredPossibleConstructorReturn = 1;
|
|
17165
17363
|
(function (module) {
|
|
17166
17364
|
var _typeof = require_typeof()["default"];
|
|
@@ -17173,21 +17371,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
17173
17371
|
}
|
|
17174
17372
|
return assertThisInitialized(self);
|
|
17175
17373
|
}
|
|
17176
|
-
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17177
|
-
|
|
17178
|
-
return
|
|
17374
|
+
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17375
|
+
} (possibleConstructorReturn));
|
|
17376
|
+
return possibleConstructorReturn.exports;
|
|
17179
17377
|
}
|
|
17180
17378
|
|
|
17181
|
-
var
|
|
17182
|
-
var getPrototypeOf = {
|
|
17183
|
-
get exports(){ return getPrototypeOfExports; },
|
|
17184
|
-
set exports(v){ getPrototypeOfExports = v; },
|
|
17185
|
-
};
|
|
17379
|
+
var getPrototypeOf = {exports: {}};
|
|
17186
17380
|
|
|
17187
17381
|
var hasRequiredGetPrototypeOf;
|
|
17188
17382
|
|
|
17189
17383
|
function requireGetPrototypeOf () {
|
|
17190
|
-
if (hasRequiredGetPrototypeOf) return
|
|
17384
|
+
if (hasRequiredGetPrototypeOf) return getPrototypeOf.exports;
|
|
17191
17385
|
hasRequiredGetPrototypeOf = 1;
|
|
17192
17386
|
(function (module) {
|
|
17193
17387
|
function _getPrototypeOf(o) {
|
|
@@ -17196,21 +17390,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
17196
17390
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17197
17391
|
return _getPrototypeOf(o);
|
|
17198
17392
|
}
|
|
17199
|
-
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17200
|
-
|
|
17201
|
-
return
|
|
17393
|
+
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17394
|
+
} (getPrototypeOf));
|
|
17395
|
+
return getPrototypeOf.exports;
|
|
17202
17396
|
}
|
|
17203
17397
|
|
|
17204
|
-
var
|
|
17205
|
-
var eventemitter3 = {
|
|
17206
|
-
get exports(){ return eventemitter3Exports; },
|
|
17207
|
-
set exports(v){ eventemitter3Exports = v; },
|
|
17208
|
-
};
|
|
17398
|
+
var eventemitter3 = {exports: {}};
|
|
17209
17399
|
|
|
17210
17400
|
var hasRequiredEventemitter3;
|
|
17211
17401
|
|
|
17212
17402
|
function requireEventemitter3 () {
|
|
17213
|
-
if (hasRequiredEventemitter3) return
|
|
17403
|
+
if (hasRequiredEventemitter3) return eventemitter3.exports;
|
|
17214
17404
|
hasRequiredEventemitter3 = 1;
|
|
17215
17405
|
(function (module) {
|
|
17216
17406
|
|
|
@@ -17547,9 +17737,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
17547
17737
|
//
|
|
17548
17738
|
{
|
|
17549
17739
|
module.exports = EventEmitter;
|
|
17550
|
-
}
|
|
17551
|
-
|
|
17552
|
-
return
|
|
17740
|
+
}
|
|
17741
|
+
} (eventemitter3));
|
|
17742
|
+
return eventemitter3.exports;
|
|
17553
17743
|
}
|
|
17554
17744
|
|
|
17555
17745
|
/**
|
|
@@ -18034,7 +18224,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18034
18224
|
return CommonClient;
|
|
18035
18225
|
}(_eventemitter.EventEmitter);
|
|
18036
18226
|
|
|
18037
|
-
exports["default"] = CommonClient;
|
|
18227
|
+
exports["default"] = CommonClient;
|
|
18038
18228
|
} (client));
|
|
18039
18229
|
|
|
18040
18230
|
var RpcWebSocketCommonClient = /*@__PURE__*/getDefaultExportFromCjs(client);
|
|
@@ -18163,7 +18353,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18163
18353
|
|
|
18164
18354
|
function _default(address, options) {
|
|
18165
18355
|
return new WebSocketBrowserImpl(address, options);
|
|
18166
|
-
}
|
|
18356
|
+
}
|
|
18167
18357
|
} (websocket_browser));
|
|
18168
18358
|
|
|
18169
18359
|
var createRpc = /*@__PURE__*/getDefaultExportFromCjs(websocket_browser);
|
|
@@ -18302,6 +18492,92 @@ var solanaWeb3 = (function (exports) {
|
|
|
18302
18492
|
* https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d
|
|
18303
18493
|
*/
|
|
18304
18494
|
|
|
18495
|
+
/** @internal */
|
|
18496
|
+
/** @internal */
|
|
18497
|
+
/** @internal */
|
|
18498
|
+
/** @internal */
|
|
18499
|
+
|
|
18500
|
+
/** @internal */
|
|
18501
|
+
/**
|
|
18502
|
+
* @internal
|
|
18503
|
+
* Every subscription contains the args used to open the subscription with
|
|
18504
|
+
* the server, and a list of callers interested in notifications.
|
|
18505
|
+
*/
|
|
18506
|
+
|
|
18507
|
+
/**
|
|
18508
|
+
* @internal
|
|
18509
|
+
* A subscription may be in various states of connectedness. Only when it is
|
|
18510
|
+
* fully connected will it have a server subscription id associated with it.
|
|
18511
|
+
* This id can be returned to the server to unsubscribe the client entirely.
|
|
18512
|
+
*/
|
|
18513
|
+
|
|
18514
|
+
/**
|
|
18515
|
+
* A type that encapsulates a subscription's RPC method
|
|
18516
|
+
* names and notification (callback) signature.
|
|
18517
|
+
*/
|
|
18518
|
+
|
|
18519
|
+
/**
|
|
18520
|
+
* @internal
|
|
18521
|
+
* Utility type that keeps tagged unions intact while omitting properties.
|
|
18522
|
+
*/
|
|
18523
|
+
|
|
18524
|
+
/**
|
|
18525
|
+
* @internal
|
|
18526
|
+
* This type represents a single subscribable 'topic.' It's made up of:
|
|
18527
|
+
*
|
|
18528
|
+
* - The args used to open the subscription with the server,
|
|
18529
|
+
* - The state of the subscription, in terms of its connectedness, and
|
|
18530
|
+
* - The set of callbacks to call when the server publishes notifications
|
|
18531
|
+
*
|
|
18532
|
+
* This record gets indexed by `SubscriptionConfigHash` and is used to
|
|
18533
|
+
* set up subscriptions, fan out notifications, and track subscription state.
|
|
18534
|
+
*/
|
|
18535
|
+
|
|
18536
|
+
/**
|
|
18537
|
+
* @internal
|
|
18538
|
+
*/
|
|
18539
|
+
|
|
18540
|
+
/**
|
|
18541
|
+
* Extra contextual information for RPC responses
|
|
18542
|
+
*/
|
|
18543
|
+
|
|
18544
|
+
/**
|
|
18545
|
+
* Options for sending transactions
|
|
18546
|
+
*/
|
|
18547
|
+
|
|
18548
|
+
/**
|
|
18549
|
+
* Options for confirming transactions
|
|
18550
|
+
*/
|
|
18551
|
+
|
|
18552
|
+
/**
|
|
18553
|
+
* Options for getConfirmedSignaturesForAddress2
|
|
18554
|
+
*/
|
|
18555
|
+
|
|
18556
|
+
/**
|
|
18557
|
+
* Options for getSignaturesForAddress
|
|
18558
|
+
*/
|
|
18559
|
+
|
|
18560
|
+
/**
|
|
18561
|
+
* RPC Response with extra contextual information
|
|
18562
|
+
*/
|
|
18563
|
+
|
|
18564
|
+
/**
|
|
18565
|
+
* A strategy for confirming transactions that uses the last valid
|
|
18566
|
+
* block height for a given blockhash to check for transaction expiration.
|
|
18567
|
+
*/
|
|
18568
|
+
|
|
18569
|
+
/**
|
|
18570
|
+
* A strategy for confirming durable nonce transactions.
|
|
18571
|
+
*/
|
|
18572
|
+
|
|
18573
|
+
/**
|
|
18574
|
+
* Properties shared by all transaction confirmation strategies
|
|
18575
|
+
*/
|
|
18576
|
+
|
|
18577
|
+
/**
|
|
18578
|
+
* This type represents all transaction confirmation strategies
|
|
18579
|
+
*/
|
|
18580
|
+
|
|
18305
18581
|
/* @internal */
|
|
18306
18582
|
function assertEndpointUrl(putativeUrl) {
|
|
18307
18583
|
if (/^https?:/.test(putativeUrl) === false) {
|
|
@@ -18420,6 +18696,85 @@ var solanaWeb3 = (function (exports) {
|
|
|
18420
18696
|
* </pre>
|
|
18421
18697
|
*/
|
|
18422
18698
|
|
|
18699
|
+
// Deprecated as of v1.5.5
|
|
18700
|
+
/**
|
|
18701
|
+
* A subset of Commitment levels, which are at least optimistically confirmed
|
|
18702
|
+
* <pre>
|
|
18703
|
+
* 'confirmed': Query the most recent block which has reached 1 confirmation by the cluster
|
|
18704
|
+
* 'finalized': Query the most recent block which has been finalized by the cluster
|
|
18705
|
+
* </pre>
|
|
18706
|
+
*/
|
|
18707
|
+
/**
|
|
18708
|
+
* Filter for largest accounts query
|
|
18709
|
+
* <pre>
|
|
18710
|
+
* 'circulating': Return the largest accounts that are part of the circulating supply
|
|
18711
|
+
* 'nonCirculating': Return the largest accounts that are not part of the circulating supply
|
|
18712
|
+
* </pre>
|
|
18713
|
+
*/
|
|
18714
|
+
/**
|
|
18715
|
+
* Configuration object for changing `getAccountInfo` query behavior
|
|
18716
|
+
*/
|
|
18717
|
+
/**
|
|
18718
|
+
* Configuration object for changing `getBalance` query behavior
|
|
18719
|
+
*/
|
|
18720
|
+
/**
|
|
18721
|
+
* Configuration object for changing `getBlock` query behavior
|
|
18722
|
+
*/
|
|
18723
|
+
/**
|
|
18724
|
+
* Configuration object for changing `getBlock` query behavior
|
|
18725
|
+
*/
|
|
18726
|
+
/**
|
|
18727
|
+
* Configuration object for changing `getStakeMinimumDelegation` query behavior
|
|
18728
|
+
*/
|
|
18729
|
+
/**
|
|
18730
|
+
* Configuration object for changing `getBlockHeight` query behavior
|
|
18731
|
+
*/
|
|
18732
|
+
/**
|
|
18733
|
+
* Configuration object for changing `getEpochInfo` query behavior
|
|
18734
|
+
*/
|
|
18735
|
+
/**
|
|
18736
|
+
* Configuration object for changing `getInflationReward` query behavior
|
|
18737
|
+
*/
|
|
18738
|
+
/**
|
|
18739
|
+
* Configuration object for changing `getLatestBlockhash` query behavior
|
|
18740
|
+
*/
|
|
18741
|
+
/**
|
|
18742
|
+
* Configuration object for changing `isBlockhashValid` query behavior
|
|
18743
|
+
*/
|
|
18744
|
+
/**
|
|
18745
|
+
* Configuration object for changing `getSlot` query behavior
|
|
18746
|
+
*/
|
|
18747
|
+
/**
|
|
18748
|
+
* Configuration object for changing `getSlotLeader` query behavior
|
|
18749
|
+
*/
|
|
18750
|
+
/**
|
|
18751
|
+
* Configuration object for changing `getTransaction` query behavior
|
|
18752
|
+
*/
|
|
18753
|
+
/**
|
|
18754
|
+
* Configuration object for changing `getTransaction` query behavior
|
|
18755
|
+
*/
|
|
18756
|
+
/**
|
|
18757
|
+
* Configuration object for changing `getLargestAccounts` query behavior
|
|
18758
|
+
*/
|
|
18759
|
+
/**
|
|
18760
|
+
* Configuration object for changing `getSupply` request behavior
|
|
18761
|
+
*/
|
|
18762
|
+
/**
|
|
18763
|
+
* Configuration object for changing query behavior
|
|
18764
|
+
*/
|
|
18765
|
+
/**
|
|
18766
|
+
* Information describing a cluster node
|
|
18767
|
+
*/
|
|
18768
|
+
/**
|
|
18769
|
+
* Information describing a vote account
|
|
18770
|
+
*/
|
|
18771
|
+
/**
|
|
18772
|
+
* A collection of cluster vote accounts
|
|
18773
|
+
*/
|
|
18774
|
+
/**
|
|
18775
|
+
* Network Inflation
|
|
18776
|
+
* (see https://docs.solana.com/implemented-proposals/ed_overview)
|
|
18777
|
+
*/
|
|
18423
18778
|
const GetInflationGovernorResult = type({
|
|
18424
18779
|
foundation: number(),
|
|
18425
18780
|
foundationTerm: number(),
|
|
@@ -18442,6 +18797,11 @@ var solanaWeb3 = (function (exports) {
|
|
|
18442
18797
|
postBalance: number(),
|
|
18443
18798
|
commission: optional(nullable(number()))
|
|
18444
18799
|
}))));
|
|
18800
|
+
|
|
18801
|
+
/**
|
|
18802
|
+
* Configuration object for changing `getRecentPrioritizationFees` query behavior
|
|
18803
|
+
*/
|
|
18804
|
+
|
|
18445
18805
|
/**
|
|
18446
18806
|
* Expected JSON RPC response for the "getRecentPrioritizationFees" message
|
|
18447
18807
|
*/
|
|
@@ -18527,6 +18887,127 @@ var solanaWeb3 = (function (exports) {
|
|
|
18527
18887
|
data: tuple([string(), literal('base64')])
|
|
18528
18888
|
})))
|
|
18529
18889
|
}));
|
|
18890
|
+
|
|
18891
|
+
/**
|
|
18892
|
+
* Metadata for a parsed confirmed transaction on the ledger
|
|
18893
|
+
*
|
|
18894
|
+
* @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.
|
|
18895
|
+
*/
|
|
18896
|
+
|
|
18897
|
+
/**
|
|
18898
|
+
* Collection of addresses loaded by a transaction using address table lookups
|
|
18899
|
+
*/
|
|
18900
|
+
|
|
18901
|
+
/**
|
|
18902
|
+
* Metadata for a parsed transaction on the ledger
|
|
18903
|
+
*/
|
|
18904
|
+
|
|
18905
|
+
/**
|
|
18906
|
+
* Metadata for a confirmed transaction on the ledger
|
|
18907
|
+
*/
|
|
18908
|
+
|
|
18909
|
+
/**
|
|
18910
|
+
* A processed transaction from the RPC API
|
|
18911
|
+
*/
|
|
18912
|
+
|
|
18913
|
+
/**
|
|
18914
|
+
* A processed transaction from the RPC API
|
|
18915
|
+
*/
|
|
18916
|
+
|
|
18917
|
+
/**
|
|
18918
|
+
* A processed transaction message from the RPC API
|
|
18919
|
+
*/
|
|
18920
|
+
|
|
18921
|
+
/**
|
|
18922
|
+
* A confirmed transaction on the ledger
|
|
18923
|
+
*
|
|
18924
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
18925
|
+
*/
|
|
18926
|
+
|
|
18927
|
+
/**
|
|
18928
|
+
* A partially decoded transaction instruction
|
|
18929
|
+
*/
|
|
18930
|
+
|
|
18931
|
+
/**
|
|
18932
|
+
* A parsed transaction message account
|
|
18933
|
+
*/
|
|
18934
|
+
|
|
18935
|
+
/**
|
|
18936
|
+
* A parsed transaction instruction
|
|
18937
|
+
*/
|
|
18938
|
+
|
|
18939
|
+
/**
|
|
18940
|
+
* A parsed address table lookup
|
|
18941
|
+
*/
|
|
18942
|
+
|
|
18943
|
+
/**
|
|
18944
|
+
* A parsed transaction message
|
|
18945
|
+
*/
|
|
18946
|
+
|
|
18947
|
+
/**
|
|
18948
|
+
* A parsed transaction
|
|
18949
|
+
*/
|
|
18950
|
+
|
|
18951
|
+
/**
|
|
18952
|
+
* A parsed and confirmed transaction on the ledger
|
|
18953
|
+
*
|
|
18954
|
+
* @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.
|
|
18955
|
+
*/
|
|
18956
|
+
|
|
18957
|
+
/**
|
|
18958
|
+
* A parsed transaction on the ledger with meta
|
|
18959
|
+
*/
|
|
18960
|
+
|
|
18961
|
+
/**
|
|
18962
|
+
* A processed block fetched from the RPC API
|
|
18963
|
+
*/
|
|
18964
|
+
|
|
18965
|
+
/**
|
|
18966
|
+
* A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`
|
|
18967
|
+
*/
|
|
18968
|
+
|
|
18969
|
+
/**
|
|
18970
|
+
* A processed block fetched from the RPC API where the `transactionDetails` mode is `none`
|
|
18971
|
+
*/
|
|
18972
|
+
|
|
18973
|
+
/**
|
|
18974
|
+
* A block with parsed transactions
|
|
18975
|
+
*/
|
|
18976
|
+
|
|
18977
|
+
/**
|
|
18978
|
+
* A block with parsed transactions where the `transactionDetails` mode is `accounts`
|
|
18979
|
+
*/
|
|
18980
|
+
|
|
18981
|
+
/**
|
|
18982
|
+
* A block with parsed transactions where the `transactionDetails` mode is `none`
|
|
18983
|
+
*/
|
|
18984
|
+
|
|
18985
|
+
/**
|
|
18986
|
+
* A processed block fetched from the RPC API
|
|
18987
|
+
*/
|
|
18988
|
+
|
|
18989
|
+
/**
|
|
18990
|
+
* A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`
|
|
18991
|
+
*/
|
|
18992
|
+
|
|
18993
|
+
/**
|
|
18994
|
+
* A processed block fetched from the RPC API where the `transactionDetails` mode is `none`
|
|
18995
|
+
*/
|
|
18996
|
+
|
|
18997
|
+
/**
|
|
18998
|
+
* A confirmed block on the ledger
|
|
18999
|
+
*
|
|
19000
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
19001
|
+
*/
|
|
19002
|
+
|
|
19003
|
+
/**
|
|
19004
|
+
* A Block on the ledger with signatures only
|
|
19005
|
+
*/
|
|
19006
|
+
|
|
19007
|
+
/**
|
|
19008
|
+
* recent block production information
|
|
19009
|
+
*/
|
|
19010
|
+
|
|
18530
19011
|
/**
|
|
18531
19012
|
* Expected JSON RPC response for the "getBlockProduction" message
|
|
18532
19013
|
*/
|
|
@@ -19280,43 +19761,152 @@ var solanaWeb3 = (function (exports) {
|
|
|
19280
19761
|
/**
|
|
19281
19762
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
19282
19763
|
*/
|
|
19283
|
-
const GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({
|
|
19284
|
-
blockhash: string(),
|
|
19285
|
-
lastValidBlockHeight: number()
|
|
19286
|
-
}));
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19764
|
+
const GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({
|
|
19765
|
+
blockhash: string(),
|
|
19766
|
+
lastValidBlockHeight: number()
|
|
19767
|
+
}));
|
|
19768
|
+
|
|
19769
|
+
/**
|
|
19770
|
+
* Expected JSON RPC response for the "isBlockhashValid" message
|
|
19771
|
+
*/
|
|
19772
|
+
const IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());
|
|
19773
|
+
const PerfSampleResult = type({
|
|
19774
|
+
slot: number(),
|
|
19775
|
+
numTransactions: number(),
|
|
19776
|
+
numSlots: number(),
|
|
19777
|
+
samplePeriodSecs: number()
|
|
19778
|
+
});
|
|
19779
|
+
|
|
19780
|
+
/*
|
|
19781
|
+
* Expected JSON RPC response for "getRecentPerformanceSamples" message
|
|
19782
|
+
*/
|
|
19783
|
+
const GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));
|
|
19784
|
+
|
|
19785
|
+
/**
|
|
19786
|
+
* Expected JSON RPC response for the "getFeeCalculatorForBlockhash" message
|
|
19787
|
+
*/
|
|
19788
|
+
const GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({
|
|
19789
|
+
feeCalculator: type({
|
|
19790
|
+
lamportsPerSignature: number()
|
|
19791
|
+
})
|
|
19792
|
+
})));
|
|
19793
|
+
|
|
19794
|
+
/**
|
|
19795
|
+
* Expected JSON RPC response for the "requestAirdrop" message
|
|
19796
|
+
*/
|
|
19797
|
+
const RequestAirdropRpcResult = jsonRpcResult(string());
|
|
19798
|
+
|
|
19799
|
+
/**
|
|
19800
|
+
* Expected JSON RPC response for the "sendTransaction" message
|
|
19801
|
+
*/
|
|
19802
|
+
const SendTransactionRpcResult = jsonRpcResult(string());
|
|
19803
|
+
|
|
19804
|
+
/**
|
|
19805
|
+
* Information about the latest slot being processed by a node
|
|
19806
|
+
*/
|
|
19807
|
+
|
|
19808
|
+
/**
|
|
19809
|
+
* Parsed account data
|
|
19810
|
+
*/
|
|
19811
|
+
|
|
19812
|
+
/**
|
|
19813
|
+
* Stake Activation data
|
|
19814
|
+
*/
|
|
19815
|
+
|
|
19816
|
+
/**
|
|
19817
|
+
* Data slice argument for getProgramAccounts
|
|
19818
|
+
*/
|
|
19819
|
+
|
|
19820
|
+
/**
|
|
19821
|
+
* Memory comparison filter for getProgramAccounts
|
|
19822
|
+
*/
|
|
19823
|
+
|
|
19824
|
+
/**
|
|
19825
|
+
* Data size comparison filter for getProgramAccounts
|
|
19826
|
+
*/
|
|
19827
|
+
|
|
19828
|
+
/**
|
|
19829
|
+
* A filter object for getProgramAccounts
|
|
19830
|
+
*/
|
|
19831
|
+
|
|
19832
|
+
/**
|
|
19833
|
+
* Configuration object for getProgramAccounts requests
|
|
19834
|
+
*/
|
|
19835
|
+
|
|
19836
|
+
/**
|
|
19837
|
+
* Configuration object for getParsedProgramAccounts
|
|
19838
|
+
*/
|
|
19839
|
+
|
|
19840
|
+
/**
|
|
19841
|
+
* Configuration object for getMultipleAccounts
|
|
19842
|
+
*/
|
|
19843
|
+
|
|
19844
|
+
/**
|
|
19845
|
+
* Configuration object for `getStakeActivation`
|
|
19846
|
+
*/
|
|
19847
|
+
|
|
19848
|
+
/**
|
|
19849
|
+
* Configuration object for `getStakeActivation`
|
|
19850
|
+
*/
|
|
19851
|
+
|
|
19852
|
+
/**
|
|
19853
|
+
* Configuration object for `getStakeActivation`
|
|
19854
|
+
*/
|
|
19855
|
+
|
|
19856
|
+
/**
|
|
19857
|
+
* Configuration object for `getNonce`
|
|
19858
|
+
*/
|
|
19859
|
+
|
|
19860
|
+
/**
|
|
19861
|
+
* Configuration object for `getNonceAndContext`
|
|
19862
|
+
*/
|
|
19863
|
+
|
|
19864
|
+
/**
|
|
19865
|
+
* Information describing an account
|
|
19866
|
+
*/
|
|
19867
|
+
|
|
19868
|
+
/**
|
|
19869
|
+
* Account information identified by pubkey
|
|
19870
|
+
*/
|
|
19871
|
+
|
|
19872
|
+
/**
|
|
19873
|
+
* Callback function for account change notifications
|
|
19874
|
+
*/
|
|
19875
|
+
|
|
19876
|
+
/**
|
|
19877
|
+
* Callback function for program account change notifications
|
|
19878
|
+
*/
|
|
19879
|
+
|
|
19880
|
+
/**
|
|
19881
|
+
* Callback function for slot change notifications
|
|
19882
|
+
*/
|
|
19883
|
+
|
|
19884
|
+
/**
|
|
19885
|
+
* Callback function for slot update notifications
|
|
19886
|
+
*/
|
|
19887
|
+
|
|
19888
|
+
/**
|
|
19889
|
+
* Callback function for signature status notifications
|
|
19890
|
+
*/
|
|
19293
19891
|
|
|
19294
|
-
|
|
19295
|
-
*
|
|
19892
|
+
/**
|
|
19893
|
+
* Signature status notification with transaction result
|
|
19296
19894
|
*/
|
|
19297
|
-
const GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));
|
|
19298
19895
|
|
|
19299
19896
|
/**
|
|
19300
|
-
*
|
|
19897
|
+
* Signature received notification
|
|
19301
19898
|
*/
|
|
19302
|
-
const GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({
|
|
19303
|
-
feeCalculator: type({
|
|
19304
|
-
lamportsPerSignature: number()
|
|
19305
|
-
})
|
|
19306
|
-
})));
|
|
19307
19899
|
|
|
19308
19900
|
/**
|
|
19309
|
-
*
|
|
19901
|
+
* Callback function for signature notifications
|
|
19310
19902
|
*/
|
|
19311
|
-
const RequestAirdropRpcResult = jsonRpcResult(string());
|
|
19312
19903
|
|
|
19313
19904
|
/**
|
|
19314
|
-
*
|
|
19905
|
+
* Signature subscription options
|
|
19315
19906
|
*/
|
|
19316
|
-
const SendTransactionRpcResult = jsonRpcResult(string());
|
|
19317
19907
|
|
|
19318
19908
|
/**
|
|
19319
|
-
*
|
|
19909
|
+
* Callback function for root change notifications
|
|
19320
19910
|
*/
|
|
19321
19911
|
|
|
19322
19912
|
/**
|
|
@@ -19344,66 +19934,60 @@ var solanaWeb3 = (function (exports) {
|
|
|
19344
19934
|
* Filter for log subscriptions.
|
|
19345
19935
|
*/
|
|
19346
19936
|
|
|
19347
|
-
/**
|
|
19348
|
-
|
|
19349
|
-
|
|
19350
|
-
};
|
|
19937
|
+
/**
|
|
19938
|
+
* Callback function for log notifications.
|
|
19939
|
+
*/
|
|
19351
19940
|
|
|
19352
19941
|
/**
|
|
19353
|
-
*
|
|
19942
|
+
* Signature result
|
|
19354
19943
|
*/
|
|
19355
|
-
class Connection {
|
|
19356
|
-
/** @internal */
|
|
19357
|
-
/** @internal */
|
|
19358
|
-
/** @internal */
|
|
19359
|
-
/** @internal */
|
|
19360
|
-
/** @internal */
|
|
19361
|
-
/** @internal */
|
|
19362
|
-
/** @internal */
|
|
19363
|
-
/** @internal */
|
|
19364
|
-
/** @internal */
|
|
19365
|
-
/** @internal */
|
|
19366
19944
|
|
|
19367
|
-
|
|
19945
|
+
/**
|
|
19946
|
+
* Transaction error
|
|
19947
|
+
*/
|
|
19368
19948
|
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19949
|
+
/**
|
|
19950
|
+
* Transaction confirmation status
|
|
19951
|
+
* <pre>
|
|
19952
|
+
* 'processed': Transaction landed in a block which has reached 1 confirmation by the connected node
|
|
19953
|
+
* 'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster
|
|
19954
|
+
* 'finalized': Transaction landed in a block which has been finalized by the cluster
|
|
19955
|
+
* </pre>
|
|
19956
|
+
*/
|
|
19376
19957
|
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19958
|
+
/**
|
|
19959
|
+
* Signature status
|
|
19960
|
+
*/
|
|
19380
19961
|
|
|
19381
|
-
|
|
19382
|
-
|
|
19962
|
+
/**
|
|
19963
|
+
* A confirmed signature with its status
|
|
19964
|
+
*/
|
|
19383
19965
|
|
|
19384
|
-
|
|
19966
|
+
/**
|
|
19967
|
+
* An object defining headers to be passed to the RPC server
|
|
19968
|
+
*/
|
|
19385
19969
|
|
|
19386
|
-
|
|
19970
|
+
/**
|
|
19971
|
+
* The type of the JavaScript `fetch()` API
|
|
19972
|
+
*/
|
|
19387
19973
|
|
|
19388
|
-
|
|
19974
|
+
/**
|
|
19975
|
+
* A callback used to augment the outgoing HTTP request
|
|
19976
|
+
*/
|
|
19389
19977
|
|
|
19390
|
-
|
|
19978
|
+
/**
|
|
19979
|
+
* Configuration for instantiating a Connection
|
|
19980
|
+
*/
|
|
19391
19981
|
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
* subscriptions have been disposed in such a way, so that we know
|
|
19397
|
-
* whether the client is dealing with a not-yet-processed signature
|
|
19398
|
-
* (in which case we must tear down the server subscription) or an
|
|
19399
|
-
* already-processed signature (in which case the client can simply
|
|
19400
|
-
* clear out the subscription locally without telling the server).
|
|
19401
|
-
*
|
|
19402
|
-
* NOTE: There is a proposal to eliminate this special case, here:
|
|
19403
|
-
* https://github.com/solana-labs/solana/issues/18892
|
|
19404
|
-
*/
|
|
19405
|
-
/** @internal */
|
|
19982
|
+
/** @internal */
|
|
19983
|
+
const COMMON_HTTP_HEADERS = {
|
|
19984
|
+
'solana-client': `js/${"0.0.0-development" }`
|
|
19985
|
+
};
|
|
19406
19986
|
|
|
19987
|
+
/**
|
|
19988
|
+
* A connection to a fullnode JSON RPC endpoint
|
|
19989
|
+
*/
|
|
19990
|
+
class Connection {
|
|
19407
19991
|
/**
|
|
19408
19992
|
* Establish a JSON RPC connection
|
|
19409
19993
|
*
|
|
@@ -19411,33 +19995,77 @@ var solanaWeb3 = (function (exports) {
|
|
|
19411
19995
|
* @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object
|
|
19412
19996
|
*/
|
|
19413
19997
|
constructor(endpoint, _commitmentOrConfig) {
|
|
19998
|
+
/** @internal */
|
|
19414
19999
|
this._commitment = void 0;
|
|
20000
|
+
/** @internal */
|
|
19415
20001
|
this._confirmTransactionInitialTimeout = void 0;
|
|
20002
|
+
/** @internal */
|
|
19416
20003
|
this._rpcEndpoint = void 0;
|
|
20004
|
+
/** @internal */
|
|
19417
20005
|
this._rpcWsEndpoint = void 0;
|
|
20006
|
+
/** @internal */
|
|
19418
20007
|
this._rpcClient = void 0;
|
|
20008
|
+
/** @internal */
|
|
19419
20009
|
this._rpcRequest = void 0;
|
|
20010
|
+
/** @internal */
|
|
19420
20011
|
this._rpcBatchRequest = void 0;
|
|
20012
|
+
/** @internal */
|
|
19421
20013
|
this._rpcWebSocket = void 0;
|
|
20014
|
+
/** @internal */
|
|
19422
20015
|
this._rpcWebSocketConnected = false;
|
|
20016
|
+
/** @internal */
|
|
19423
20017
|
this._rpcWebSocketHeartbeat = null;
|
|
20018
|
+
/** @internal */
|
|
19424
20019
|
this._rpcWebSocketIdleTimeout = null;
|
|
20020
|
+
/** @internal
|
|
20021
|
+
* A number that we increment every time an active connection closes.
|
|
20022
|
+
* Used to determine whether the same socket connection that was open
|
|
20023
|
+
* when an async operation started is the same one that's active when
|
|
20024
|
+
* its continuation fires.
|
|
20025
|
+
*
|
|
20026
|
+
*/
|
|
19425
20027
|
this._rpcWebSocketGeneration = 0;
|
|
20028
|
+
/** @internal */
|
|
19426
20029
|
this._disableBlockhashCaching = false;
|
|
20030
|
+
/** @internal */
|
|
19427
20031
|
this._pollingBlockhash = false;
|
|
20032
|
+
/** @internal */
|
|
19428
20033
|
this._blockhashInfo = {
|
|
19429
20034
|
latestBlockhash: null,
|
|
19430
20035
|
lastFetch: 0,
|
|
19431
20036
|
transactionSignatures: [],
|
|
19432
20037
|
simulatedSignatures: []
|
|
19433
20038
|
};
|
|
20039
|
+
/** @internal */
|
|
19434
20040
|
this._nextClientSubscriptionId = 0;
|
|
20041
|
+
/** @internal */
|
|
19435
20042
|
this._subscriptionDisposeFunctionsByClientSubscriptionId = {};
|
|
20043
|
+
/** @internal */
|
|
19436
20044
|
this._subscriptionHashByClientSubscriptionId = {};
|
|
20045
|
+
/** @internal */
|
|
19437
20046
|
this._subscriptionStateChangeCallbacksByHash = {};
|
|
20047
|
+
/** @internal */
|
|
19438
20048
|
this._subscriptionCallbacksByServerSubscriptionId = {};
|
|
20049
|
+
/** @internal */
|
|
19439
20050
|
this._subscriptionsByHash = {};
|
|
20051
|
+
/**
|
|
20052
|
+
* Special case.
|
|
20053
|
+
* After a signature is processed, RPCs automatically dispose of the
|
|
20054
|
+
* subscription on the server side. We need to track which of these
|
|
20055
|
+
* subscriptions have been disposed in such a way, so that we know
|
|
20056
|
+
* whether the client is dealing with a not-yet-processed signature
|
|
20057
|
+
* (in which case we must tear down the server subscription) or an
|
|
20058
|
+
* already-processed signature (in which case the client can simply
|
|
20059
|
+
* clear out the subscription locally without telling the server).
|
|
20060
|
+
*
|
|
20061
|
+
* NOTE: There is a proposal to eliminate this special case, here:
|
|
20062
|
+
* https://github.com/solana-labs/solana/issues/18892
|
|
20063
|
+
*/
|
|
20064
|
+
/** @internal */
|
|
19440
20065
|
this._subscriptionsAutoDisposedByRpc = new Set();
|
|
20066
|
+
/*
|
|
20067
|
+
* Returns the current block height of the node
|
|
20068
|
+
*/
|
|
19441
20069
|
this.getBlockHeight = (() => {
|
|
19442
20070
|
const requestPromises = {};
|
|
19443
20071
|
return async commitmentOrConfig => {
|
|
@@ -19833,6 +20461,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
19833
20461
|
* @return {Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>}
|
|
19834
20462
|
*/
|
|
19835
20463
|
|
|
20464
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
20465
|
+
|
|
19836
20466
|
// eslint-disable-next-line no-dupe-class-members
|
|
19837
20467
|
async getProgramAccounts(programId, configOrCommitment) {
|
|
19838
20468
|
const {
|
|
@@ -19871,6 +20501,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
19871
20501
|
}
|
|
19872
20502
|
return res.result;
|
|
19873
20503
|
}
|
|
20504
|
+
|
|
20505
|
+
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */ // eslint-disable-next-line no-dupe-class-members
|
|
19874
20506
|
// eslint-disable-next-line no-dupe-class-members
|
|
19875
20507
|
async confirmTransaction(strategy, commitment) {
|
|
19876
20508
|
let rawSignature;
|
|
@@ -19937,7 +20569,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19937
20569
|
value: result
|
|
19938
20570
|
};
|
|
19939
20571
|
resolve({
|
|
19940
|
-
__type:
|
|
20572
|
+
__type: TransactionStatus.PROCESSED,
|
|
19941
20573
|
response
|
|
19942
20574
|
});
|
|
19943
20575
|
}, commitment);
|
|
@@ -19995,7 +20627,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19995
20627
|
}
|
|
19996
20628
|
done = true;
|
|
19997
20629
|
resolve({
|
|
19998
|
-
__type:
|
|
20630
|
+
__type: TransactionStatus.PROCESSED,
|
|
19999
20631
|
response: {
|
|
20000
20632
|
context,
|
|
20001
20633
|
value
|
|
@@ -20050,7 +20682,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20050
20682
|
if (done) return;
|
|
20051
20683
|
}
|
|
20052
20684
|
resolve({
|
|
20053
|
-
__type:
|
|
20685
|
+
__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED
|
|
20054
20686
|
});
|
|
20055
20687
|
})();
|
|
20056
20688
|
});
|
|
@@ -20065,7 +20697,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20065
20697
|
let result;
|
|
20066
20698
|
try {
|
|
20067
20699
|
const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);
|
|
20068
|
-
if (outcome.__type ===
|
|
20700
|
+
if (outcome.__type === TransactionStatus.PROCESSED) {
|
|
20069
20701
|
result = outcome.response;
|
|
20070
20702
|
} else {
|
|
20071
20703
|
throw new TransactionExpiredBlockheightExceededError(signature);
|
|
@@ -20114,7 +20746,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20114
20746
|
) {
|
|
20115
20747
|
if (nonceValue !== currentNonceValue) {
|
|
20116
20748
|
resolve({
|
|
20117
|
-
__type:
|
|
20749
|
+
__type: TransactionStatus.NONCE_INVALID,
|
|
20118
20750
|
slotInWhichNonceDidAdvance: lastCheckedSlot
|
|
20119
20751
|
});
|
|
20120
20752
|
return;
|
|
@@ -20137,7 +20769,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20137
20769
|
let result;
|
|
20138
20770
|
try {
|
|
20139
20771
|
const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);
|
|
20140
|
-
if (outcome.__type ===
|
|
20772
|
+
if (outcome.__type === TransactionStatus.PROCESSED) {
|
|
20141
20773
|
result = outcome.response;
|
|
20142
20774
|
} else {
|
|
20143
20775
|
// Double check that the transaction is indeed unconfirmed.
|
|
@@ -20221,7 +20853,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20221
20853
|
}
|
|
20222
20854
|
}
|
|
20223
20855
|
timeoutId = setTimeout(() => resolve({
|
|
20224
|
-
__type:
|
|
20856
|
+
__type: TransactionStatus.TIMED_OUT,
|
|
20225
20857
|
timeoutMs
|
|
20226
20858
|
}), timeoutMs);
|
|
20227
20859
|
});
|
|
@@ -20235,7 +20867,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20235
20867
|
let result;
|
|
20236
20868
|
try {
|
|
20237
20869
|
const outcome = await Promise.race([confirmationPromise, expiryPromise]);
|
|
20238
|
-
if (outcome.__type ===
|
|
20870
|
+
if (outcome.__type === TransactionStatus.PROCESSED) {
|
|
20239
20871
|
result = outcome.response;
|
|
20240
20872
|
} else {
|
|
20241
20873
|
throw new TransactionExpiredTimeoutError(signature, outcome.timeoutMs / 1000);
|
|
@@ -20614,6 +21246,23 @@ var solanaWeb3 = (function (exports) {
|
|
|
20614
21246
|
return res.result;
|
|
20615
21247
|
}
|
|
20616
21248
|
|
|
21249
|
+
/**
|
|
21250
|
+
* Returns whether a blockhash is still valid or not
|
|
21251
|
+
*/
|
|
21252
|
+
async isBlockhashValid(blockhash, rawConfig) {
|
|
21253
|
+
const {
|
|
21254
|
+
commitment,
|
|
21255
|
+
config
|
|
21256
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
21257
|
+
const args = this._buildArgs([blockhash], commitment, undefined /* encoding */, config);
|
|
21258
|
+
const unsafeRes = await this._rpcRequest('isBlockhashValid', args);
|
|
21259
|
+
const res = create(unsafeRes, IsBlockhashValidRpcResult);
|
|
21260
|
+
if ('error' in res) {
|
|
21261
|
+
throw new SolanaJSONRPCError(res.error, 'failed to determine if the blockhash `' + blockhash + '`is valid');
|
|
21262
|
+
}
|
|
21263
|
+
return res.result;
|
|
21264
|
+
}
|
|
21265
|
+
|
|
20617
21266
|
/**
|
|
20618
21267
|
* Fetch the node version
|
|
20619
21268
|
*/
|
|
@@ -20645,10 +21294,24 @@ var solanaWeb3 = (function (exports) {
|
|
|
20645
21294
|
* setting the `maxSupportedTransactionVersion` property.
|
|
20646
21295
|
*/
|
|
20647
21296
|
|
|
21297
|
+
/**
|
|
21298
|
+
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
21299
|
+
* setting the `maxSupportedTransactionVersion` property.
|
|
21300
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21301
|
+
/**
|
|
21302
|
+
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
21303
|
+
* setting the `maxSupportedTransactionVersion` property.
|
|
21304
|
+
*/
|
|
21305
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
20648
21306
|
/**
|
|
20649
21307
|
* Fetch a processed block from the cluster.
|
|
20650
21308
|
*/
|
|
20651
21309
|
// eslint-disable-next-line no-dupe-class-members
|
|
21310
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21311
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21312
|
+
/**
|
|
21313
|
+
* Fetch a processed block from the cluster.
|
|
21314
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
20652
21315
|
async getBlock(slot, rawConfig) {
|
|
20653
21316
|
const {
|
|
20654
21317
|
commitment,
|
|
@@ -20709,6 +21372,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
20709
21372
|
* Fetch parsed transaction details for a confirmed or finalized block
|
|
20710
21373
|
*/
|
|
20711
21374
|
|
|
21375
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21376
|
+
|
|
21377
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21378
|
+
|
|
20712
21379
|
// eslint-disable-next-line no-dupe-class-members
|
|
20713
21380
|
async getParsedBlock(slot, rawConfig) {
|
|
20714
21381
|
const {
|
|
@@ -20748,11 +21415,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
20748
21415
|
throw new SolanaJSONRPCError(e, 'failed to get block');
|
|
20749
21416
|
}
|
|
20750
21417
|
}
|
|
20751
|
-
|
|
20752
|
-
/*
|
|
20753
|
-
* Returns the current block height of the node
|
|
20754
|
-
*/
|
|
20755
|
-
|
|
20756
21418
|
/*
|
|
20757
21419
|
* Returns recent block production information from the current or previous epoch
|
|
20758
21420
|
*/
|
|
@@ -20788,8 +21450,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
20788
21450
|
|
|
20789
21451
|
/**
|
|
20790
21452
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
20791
|
-
*/
|
|
20792
|
-
|
|
21453
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21454
|
+
/**
|
|
21455
|
+
* Fetch a confirmed or finalized transaction from the cluster.
|
|
21456
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
20793
21457
|
async getTransaction(signature, rawConfig) {
|
|
20794
21458
|
const {
|
|
20795
21459
|
commitment,
|
|
@@ -20868,8 +21532,12 @@ var solanaWeb3 = (function (exports) {
|
|
|
20868
21532
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
20869
21533
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
20870
21534
|
* VersionedTransactionResponse}.
|
|
20871
|
-
*/
|
|
20872
|
-
|
|
21535
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21536
|
+
/**
|
|
21537
|
+
* Fetch transaction details for a batch of confirmed transactions.
|
|
21538
|
+
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
21539
|
+
* VersionedTransactionResponse}.
|
|
21540
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
20873
21541
|
async getTransactions(signatures, commitmentOrConfig) {
|
|
20874
21542
|
const {
|
|
20875
21543
|
commitment,
|
|
@@ -21295,8 +21963,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
21295
21963
|
|
|
21296
21964
|
/**
|
|
21297
21965
|
* Simulate a transaction
|
|
21298
|
-
*/
|
|
21299
|
-
|
|
21966
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21967
|
+
/**
|
|
21968
|
+
* Simulate a transaction
|
|
21969
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21300
21970
|
async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {
|
|
21301
21971
|
if ('message' in transactionOrMessage) {
|
|
21302
21972
|
const versionedTx = transactionOrMessage;
|
|
@@ -21407,10 +22077,12 @@ var solanaWeb3 = (function (exports) {
|
|
|
21407
22077
|
* VersionedTransaction}
|
|
21408
22078
|
*/
|
|
21409
22079
|
|
|
22080
|
+
/**
|
|
22081
|
+
* Send a signed transaction
|
|
22082
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21410
22083
|
/**
|
|
21411
22084
|
* Sign and send a transaction
|
|
21412
|
-
*/
|
|
21413
|
-
// eslint-disable-next-line no-dupe-class-members
|
|
22085
|
+
*/ // eslint-disable-next-line no-dupe-class-members
|
|
21414
22086
|
async sendTransaction(transaction, signersOrOptions, options) {
|
|
21415
22087
|
if ('version' in transaction) {
|
|
21416
22088
|
if (signersOrOptions && Array.isArray(signersOrOptions)) {
|
|
@@ -21818,7 +22490,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
21818
22490
|
*/
|
|
21819
22491
|
args) {
|
|
21820
22492
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
21821
|
-
const hash = fastStableStringify$1([subscriptionConfig.method, args]);
|
|
22493
|
+
const hash = fastStableStringify$1([subscriptionConfig.method, args], true /* isArrayProp */);
|
|
21822
22494
|
|
|
21823
22495
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
21824
22496
|
if (existingSubscription === undefined) {
|
|
@@ -22300,6 +22972,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
22300
22972
|
}
|
|
22301
22973
|
}
|
|
22302
22974
|
|
|
22975
|
+
/**
|
|
22976
|
+
* An enumeration of valid LookupTableInstructionType's
|
|
22977
|
+
*/
|
|
22978
|
+
|
|
22303
22979
|
/**
|
|
22304
22980
|
* An enumeration of valid address lookup table InstructionType's
|
|
22305
22981
|
* @internal
|
|
@@ -22641,6 +23317,22 @@ var solanaWeb3 = (function (exports) {
|
|
|
22641
23317
|
* An enumeration of valid ComputeBudgetInstructionType's
|
|
22642
23318
|
*/
|
|
22643
23319
|
|
|
23320
|
+
/**
|
|
23321
|
+
* Request units instruction params
|
|
23322
|
+
*/
|
|
23323
|
+
|
|
23324
|
+
/**
|
|
23325
|
+
* Request heap frame instruction params
|
|
23326
|
+
*/
|
|
23327
|
+
|
|
23328
|
+
/**
|
|
23329
|
+
* Set compute unit limit instruction params
|
|
23330
|
+
*/
|
|
23331
|
+
|
|
23332
|
+
/**
|
|
23333
|
+
* Set compute unit price instruction params
|
|
23334
|
+
*/
|
|
23335
|
+
|
|
22644
23336
|
/**
|
|
22645
23337
|
* An enumeration of valid ComputeBudget InstructionType's
|
|
22646
23338
|
* @internal
|
|
@@ -22729,6 +23421,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
22729
23421
|
* Params for creating an ed25519 instruction using a public key
|
|
22730
23422
|
*/
|
|
22731
23423
|
|
|
23424
|
+
/**
|
|
23425
|
+
* Params for creating an ed25519 instruction using a private key
|
|
23426
|
+
*/
|
|
23427
|
+
|
|
22732
23428
|
const ED25519_INSTRUCTION_LAYOUT = struct([u8('numSignatures'), u8('padding'), u16('signatureOffset'), u16('signatureInstructionIndex'), u16('publicKeyOffset'), u16('publicKeyInstructionIndex'), u16('messageDataOffset'), u16('messageDataSize'), u16('messageInstructionIndex')]);
|
|
22733
23429
|
class Ed25519Program {
|
|
22734
23430
|
/**
|
|
@@ -24396,6 +25092,14 @@ var solanaWeb3 = (function (exports) {
|
|
|
24396
25092
|
* Params for creating an secp256k1 instruction using a public key
|
|
24397
25093
|
*/
|
|
24398
25094
|
|
|
25095
|
+
/**
|
|
25096
|
+
* Params for creating an secp256k1 instruction using an Ethereum address
|
|
25097
|
+
*/
|
|
25098
|
+
|
|
25099
|
+
/**
|
|
25100
|
+
* Params for creating an secp256k1 instruction using a private key
|
|
25101
|
+
*/
|
|
25102
|
+
|
|
24399
25103
|
const SECP256K1_INSTRUCTION_LAYOUT = struct([u8('numSignatures'), u16('signatureOffset'), u8('signatureInstructionIndex'), u16('ethAddressOffset'), u8('ethAddressInstructionIndex'), u16('messageDataOffset'), u16('messageDataSize'), u8('messageInstructionIndex'), blob(20, 'ethAddress'), blob(64, 'signature'), u8('recoveryId')]);
|
|
24400
25104
|
class Secp256k1Program {
|
|
24401
25105
|
/**
|
|
@@ -24531,17 +25235,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
24531
25235
|
* Stake account authority info
|
|
24532
25236
|
*/
|
|
24533
25237
|
class Authorized {
|
|
24534
|
-
/** stake authority */
|
|
24535
|
-
|
|
24536
|
-
/** withdraw authority */
|
|
24537
|
-
|
|
24538
25238
|
/**
|
|
24539
25239
|
* Create a new Authorized object
|
|
24540
25240
|
* @param staker the stake authority
|
|
24541
25241
|
* @param withdrawer the withdraw authority
|
|
24542
25242
|
*/
|
|
24543
25243
|
constructor(staker, withdrawer) {
|
|
25244
|
+
/** stake authority */
|
|
24544
25245
|
this.staker = void 0;
|
|
25246
|
+
/** withdraw authority */
|
|
24545
25247
|
this.withdrawer = void 0;
|
|
24546
25248
|
this.staker = staker;
|
|
24547
25249
|
this.withdrawer = withdrawer;
|
|
@@ -24551,18 +25253,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
24551
25253
|
* Stake account lockup info
|
|
24552
25254
|
*/
|
|
24553
25255
|
class Lockup {
|
|
24554
|
-
/** Unix timestamp of lockup expiration */
|
|
24555
|
-
|
|
24556
|
-
/** Epoch of lockup expiration */
|
|
24557
|
-
|
|
24558
|
-
/** Lockup custodian authority */
|
|
24559
|
-
|
|
24560
25256
|
/**
|
|
24561
25257
|
* Create a new Lockup object
|
|
24562
25258
|
*/
|
|
24563
25259
|
constructor(unixTimestamp, epoch, custodian) {
|
|
25260
|
+
/** Unix timestamp of lockup expiration */
|
|
24564
25261
|
this.unixTimestamp = void 0;
|
|
25262
|
+
/** Epoch of lockup expiration */
|
|
24565
25263
|
this.epoch = void 0;
|
|
25264
|
+
/** Lockup custodian authority */
|
|
24566
25265
|
this.custodian = void 0;
|
|
24567
25266
|
this.unixTimestamp = unixTimestamp;
|
|
24568
25267
|
this.epoch = epoch;
|
|
@@ -24574,6 +25273,39 @@ var solanaWeb3 = (function (exports) {
|
|
|
24574
25273
|
*/
|
|
24575
25274
|
}
|
|
24576
25275
|
Lockup.default = new Lockup(0, 0, PublicKey.default);
|
|
25276
|
+
/**
|
|
25277
|
+
* Create stake account transaction params
|
|
25278
|
+
*/
|
|
25279
|
+
/**
|
|
25280
|
+
* Create stake account with seed transaction params
|
|
25281
|
+
*/
|
|
25282
|
+
/**
|
|
25283
|
+
* Initialize stake instruction params
|
|
25284
|
+
*/
|
|
25285
|
+
/**
|
|
25286
|
+
* Delegate stake instruction params
|
|
25287
|
+
*/
|
|
25288
|
+
/**
|
|
25289
|
+
* Authorize stake instruction params
|
|
25290
|
+
*/
|
|
25291
|
+
/**
|
|
25292
|
+
* Authorize stake instruction params using a derived key
|
|
25293
|
+
*/
|
|
25294
|
+
/**
|
|
25295
|
+
* Split stake instruction params
|
|
25296
|
+
*/
|
|
25297
|
+
/**
|
|
25298
|
+
* Split with seed transaction params
|
|
25299
|
+
*/
|
|
25300
|
+
/**
|
|
25301
|
+
* Withdraw stake instruction params
|
|
25302
|
+
*/
|
|
25303
|
+
/**
|
|
25304
|
+
* Deactivate stake instruction params
|
|
25305
|
+
*/
|
|
25306
|
+
/**
|
|
25307
|
+
* Merge stake instruction params
|
|
25308
|
+
*/
|
|
24577
25309
|
/**
|
|
24578
25310
|
* Stake Instruction class
|
|
24579
25311
|
*/
|
|
@@ -25262,6 +25994,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
25262
25994
|
}
|
|
25263
25995
|
}
|
|
25264
25996
|
StakeProgram.programId = new PublicKey('Stake11111111111111111111111111111111111111');
|
|
25997
|
+
/**
|
|
25998
|
+
* Max space of a Stake account
|
|
25999
|
+
*
|
|
26000
|
+
* This is generated from the solana-stake-program StakeState struct as
|
|
26001
|
+
* `StakeState::size_of()`:
|
|
26002
|
+
* https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeState.html
|
|
26003
|
+
*/
|
|
25265
26004
|
StakeProgram.space = 200;
|
|
25266
26005
|
|
|
25267
26006
|
/**
|
|
@@ -25286,6 +26025,22 @@ var solanaWeb3 = (function (exports) {
|
|
|
25286
26025
|
* Create vote account transaction params
|
|
25287
26026
|
*/
|
|
25288
26027
|
|
|
26028
|
+
/**
|
|
26029
|
+
* InitializeAccount instruction params
|
|
26030
|
+
*/
|
|
26031
|
+
|
|
26032
|
+
/**
|
|
26033
|
+
* Authorize instruction params
|
|
26034
|
+
*/
|
|
26035
|
+
|
|
26036
|
+
/**
|
|
26037
|
+
* AuthorizeWithSeed instruction params
|
|
26038
|
+
*/
|
|
26039
|
+
|
|
26040
|
+
/**
|
|
26041
|
+
* Withdraw from vote account transaction params
|
|
26042
|
+
*/
|
|
26043
|
+
|
|
25289
26044
|
/**
|
|
25290
26045
|
* Vote Instruction class
|
|
25291
26046
|
*/
|
|
@@ -25417,6 +26172,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
25417
26172
|
* An enumeration of valid VoteInstructionType's
|
|
25418
26173
|
*/
|
|
25419
26174
|
|
|
26175
|
+
/** @internal */
|
|
26176
|
+
|
|
25420
26177
|
const VOTE_INSTRUCTION_LAYOUTS = Object.freeze({
|
|
25421
26178
|
InitializeAccount: {
|
|
25422
26179
|
index: 0,
|
|
@@ -25653,6 +26410,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
25653
26410
|
}
|
|
25654
26411
|
}
|
|
25655
26412
|
VoteProgram.programId = new PublicKey('Vote111111111111111111111111111111111111111');
|
|
26413
|
+
/**
|
|
26414
|
+
* Max space of a Vote account
|
|
26415
|
+
*
|
|
26416
|
+
* This is generated from the solana-vote-program VoteState struct as
|
|
26417
|
+
* `VoteState::size_of()`:
|
|
26418
|
+
* https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of
|
|
26419
|
+
*
|
|
26420
|
+
* KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342
|
|
26421
|
+
*/
|
|
25656
26422
|
VoteProgram.space = 3731;
|
|
25657
26423
|
|
|
25658
26424
|
const VALIDATOR_INFO_KEY = new PublicKey('Va1idator1nfo111111111111111111111111111111');
|
|
@@ -25661,6 +26427,10 @@ var solanaWeb3 = (function (exports) {
|
|
|
25661
26427
|
* @internal
|
|
25662
26428
|
*/
|
|
25663
26429
|
|
|
26430
|
+
/**
|
|
26431
|
+
* Info used to identity validators.
|
|
26432
|
+
*/
|
|
26433
|
+
|
|
25664
26434
|
const InfoString = type({
|
|
25665
26435
|
name: string(),
|
|
25666
26436
|
website: optional(string()),
|
|
@@ -25672,14 +26442,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
25672
26442
|
* ValidatorInfo class
|
|
25673
26443
|
*/
|
|
25674
26444
|
class ValidatorInfo {
|
|
25675
|
-
/**
|
|
25676
|
-
* validator public key
|
|
25677
|
-
*/
|
|
25678
|
-
|
|
25679
|
-
/**
|
|
25680
|
-
* validator information
|
|
25681
|
-
*/
|
|
25682
|
-
|
|
25683
26445
|
/**
|
|
25684
26446
|
* Construct a valid ValidatorInfo
|
|
25685
26447
|
*
|
|
@@ -25687,7 +26449,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
25687
26449
|
* @param info validator information
|
|
25688
26450
|
*/
|
|
25689
26451
|
constructor(key, info) {
|
|
26452
|
+
/**
|
|
26453
|
+
* validator public key
|
|
26454
|
+
*/
|
|
25690
26455
|
this.key = void 0;
|
|
26456
|
+
/**
|
|
26457
|
+
* validator information
|
|
26458
|
+
*/
|
|
25691
26459
|
this.info = void 0;
|
|
25692
26460
|
this.key = key;
|
|
25693
26461
|
this.info = info;
|
|
@@ -25728,6 +26496,11 @@ var solanaWeb3 = (function (exports) {
|
|
|
25728
26496
|
}
|
|
25729
26497
|
|
|
25730
26498
|
const VOTE_PROGRAM_ID = new PublicKey('Vote111111111111111111111111111111111111111');
|
|
26499
|
+
|
|
26500
|
+
/**
|
|
26501
|
+
* History of how many credits earned by the end of each epoch
|
|
26502
|
+
*/
|
|
26503
|
+
|
|
25731
26504
|
/**
|
|
25732
26505
|
* See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88
|
|
25733
26506
|
*
|
|
@@ -25867,9 +26640,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
25867
26640
|
/**
|
|
25868
26641
|
* @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`
|
|
25869
26642
|
* is no longer supported and will be removed in a future version.
|
|
25870
|
-
*/
|
|
25871
|
-
// eslint-disable-next-line no-redeclare
|
|
25872
|
-
|
|
26643
|
+
*/ // eslint-disable-next-line no-redeclare
|
|
25873
26644
|
// eslint-disable-next-line no-redeclare
|
|
25874
26645
|
async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {
|
|
25875
26646
|
let confirmationStrategy;
|
|
@@ -25964,6 +26735,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
25964
26735
|
exports.TransactionExpiredTimeoutError = TransactionExpiredTimeoutError;
|
|
25965
26736
|
exports.TransactionInstruction = TransactionInstruction;
|
|
25966
26737
|
exports.TransactionMessage = TransactionMessage;
|
|
26738
|
+
exports.TransactionStatus = TransactionStatus;
|
|
25967
26739
|
exports.VALIDATOR_INFO_KEY = VALIDATOR_INFO_KEY;
|
|
25968
26740
|
exports.VERSION_PREFIX_MASK = VERSION_PREFIX_MASK;
|
|
25969
26741
|
exports.VOTE_PROGRAM_ID = VOTE_PROGRAM_ID;
|