@stellar/stellar-base 11.0.0 → 11.1.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/CHANGELOG.md +16 -0
- package/dist/stellar-base.js +617 -385
- package/dist/stellar-base.min.js +1 -1
- package/lib/account.js +2 -3
- package/lib/address.js +2 -3
- package/lib/asset.js +2 -3
- package/lib/auth.js +1 -1
- package/lib/claimant.js +2 -3
- package/lib/contract.js +2 -3
- package/lib/events.js +1 -1
- package/lib/fee_bump_transaction.js +3 -4
- package/lib/generated/curr_generated.js +243 -17
- package/lib/generated/next_generated.js +243 -17
- package/lib/keypair.js +2 -3
- package/lib/liquidity_pool_asset.js +2 -3
- package/lib/liquidity_pool_id.js +2 -3
- package/lib/memo.js +2 -3
- package/lib/muxed_account.js +2 -3
- package/lib/numbers/int128.js +3 -4
- package/lib/numbers/int256.js +3 -4
- package/lib/numbers/sc_int.js +2 -2
- package/lib/numbers/uint128.js +3 -4
- package/lib/numbers/uint256.js +3 -4
- package/lib/numbers/xdr_large_int.js +2 -3
- package/lib/operation.js +3 -4
- package/lib/signerkey.js +2 -3
- package/lib/soroban.js +2 -3
- package/lib/sorobandata_builder.js +2 -3
- package/lib/strkey.js +2 -3
- package/lib/transaction.js +3 -4
- package/lib/transaction_base.js +2 -3
- package/lib/transaction_builder.js +2 -3
- package/package.json +17 -17
- package/types/curr.d.ts +371 -12
- package/types/next.d.ts +371 -12
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var XDR = _interopRequireWildcard(require("@stellar/js-xdr"));
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
11
11
|
// Automatically generated by xdrgen
|
|
12
12
|
// DO NOT EDIT or your changes may be overwritten
|
|
13
13
|
|
|
@@ -493,7 +493,7 @@ var types = XDR.config(function (xdr) {
|
|
|
493
493
|
// const MASK_ACCOUNT_FLAGS_V17 = 0xF;
|
|
494
494
|
//
|
|
495
495
|
// ===========================================================================
|
|
496
|
-
xdr["const"]("MASK_ACCOUNT_FLAGS_V17",
|
|
496
|
+
xdr["const"]("MASK_ACCOUNT_FLAGS_V17", 0xF);
|
|
497
497
|
|
|
498
498
|
// === xdr source ============================================================
|
|
499
499
|
//
|
|
@@ -1335,15 +1335,79 @@ var types = XDR.config(function (xdr) {
|
|
|
1335
1335
|
|
|
1336
1336
|
// === xdr source ============================================================
|
|
1337
1337
|
//
|
|
1338
|
-
// struct
|
|
1338
|
+
// struct ContractCodeCostInputs {
|
|
1339
1339
|
// ExtensionPoint ext;
|
|
1340
|
+
// uint32 nInstructions;
|
|
1341
|
+
// uint32 nFunctions;
|
|
1342
|
+
// uint32 nGlobals;
|
|
1343
|
+
// uint32 nTableEntries;
|
|
1344
|
+
// uint32 nTypes;
|
|
1345
|
+
// uint32 nDataSegments;
|
|
1346
|
+
// uint32 nElemSegments;
|
|
1347
|
+
// uint32 nImports;
|
|
1348
|
+
// uint32 nExports;
|
|
1349
|
+
// uint32 nDataSegmentBytes;
|
|
1350
|
+
// };
|
|
1351
|
+
//
|
|
1352
|
+
// ===========================================================================
|
|
1353
|
+
xdr.struct("ContractCodeCostInputs", [["ext", xdr.lookup("ExtensionPoint")], ["nInstructions", xdr.lookup("Uint32")], ["nFunctions", xdr.lookup("Uint32")], ["nGlobals", xdr.lookup("Uint32")], ["nTableEntries", xdr.lookup("Uint32")], ["nTypes", xdr.lookup("Uint32")], ["nDataSegments", xdr.lookup("Uint32")], ["nElemSegments", xdr.lookup("Uint32")], ["nImports", xdr.lookup("Uint32")], ["nExports", xdr.lookup("Uint32")], ["nDataSegmentBytes", xdr.lookup("Uint32")]]);
|
|
1354
|
+
|
|
1355
|
+
// === xdr source ============================================================
|
|
1356
|
+
//
|
|
1357
|
+
// struct
|
|
1358
|
+
// {
|
|
1359
|
+
// ExtensionPoint ext;
|
|
1360
|
+
// ContractCodeCostInputs costInputs;
|
|
1361
|
+
// }
|
|
1362
|
+
//
|
|
1363
|
+
// ===========================================================================
|
|
1364
|
+
xdr.struct("ContractCodeEntryV1", [["ext", xdr.lookup("ExtensionPoint")], ["costInputs", xdr.lookup("ContractCodeCostInputs")]]);
|
|
1365
|
+
|
|
1366
|
+
// === xdr source ============================================================
|
|
1367
|
+
//
|
|
1368
|
+
// union switch (int v)
|
|
1369
|
+
// {
|
|
1370
|
+
// case 0:
|
|
1371
|
+
// void;
|
|
1372
|
+
// case 1:
|
|
1373
|
+
// struct
|
|
1374
|
+
// {
|
|
1375
|
+
// ExtensionPoint ext;
|
|
1376
|
+
// ContractCodeCostInputs costInputs;
|
|
1377
|
+
// } v1;
|
|
1378
|
+
// }
|
|
1379
|
+
//
|
|
1380
|
+
// ===========================================================================
|
|
1381
|
+
xdr.union("ContractCodeEntryExt", {
|
|
1382
|
+
switchOn: xdr["int"](),
|
|
1383
|
+
switchName: "v",
|
|
1384
|
+
switches: [[0, xdr["void"]()], [1, "v1"]],
|
|
1385
|
+
arms: {
|
|
1386
|
+
v1: xdr.lookup("ContractCodeEntryV1")
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1389
|
+
|
|
1390
|
+
// === xdr source ============================================================
|
|
1391
|
+
//
|
|
1392
|
+
// struct ContractCodeEntry {
|
|
1393
|
+
// union switch (int v)
|
|
1394
|
+
// {
|
|
1395
|
+
// case 0:
|
|
1396
|
+
// void;
|
|
1397
|
+
// case 1:
|
|
1398
|
+
// struct
|
|
1399
|
+
// {
|
|
1400
|
+
// ExtensionPoint ext;
|
|
1401
|
+
// ContractCodeCostInputs costInputs;
|
|
1402
|
+
// } v1;
|
|
1403
|
+
// } ext;
|
|
1340
1404
|
//
|
|
1341
1405
|
// Hash hash;
|
|
1342
1406
|
// opaque code<>;
|
|
1343
1407
|
// };
|
|
1344
1408
|
//
|
|
1345
1409
|
// ===========================================================================
|
|
1346
|
-
xdr.struct("ContractCodeEntry", [["ext", xdr.lookup("
|
|
1410
|
+
xdr.struct("ContractCodeEntry", [["ext", xdr.lookup("ContractCodeEntryExt")], ["hash", xdr.lookup("Hash")], ["code", xdr.varOpaque()]]);
|
|
1347
1411
|
|
|
1348
1412
|
// === xdr source ============================================================
|
|
1349
1413
|
//
|
|
@@ -2538,10 +2602,69 @@ var types = XDR.config(function (xdr) {
|
|
|
2538
2602
|
|
|
2539
2603
|
// === xdr source ============================================================
|
|
2540
2604
|
//
|
|
2541
|
-
// struct
|
|
2605
|
+
// struct SorobanTransactionMetaExtV1
|
|
2542
2606
|
// {
|
|
2543
2607
|
// ExtensionPoint ext;
|
|
2544
2608
|
//
|
|
2609
|
+
// // The following are the components of the overall Soroban resource fee
|
|
2610
|
+
// // charged for the transaction.
|
|
2611
|
+
// // The following relation holds:
|
|
2612
|
+
// // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged`
|
|
2613
|
+
// // where `resourceFeeCharged` is the overall fee charged for the
|
|
2614
|
+
// // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee`
|
|
2615
|
+
// // i.e.we never charge more than the declared resource fee.
|
|
2616
|
+
// // The inclusion fee for charged the Soroban transaction can be found using
|
|
2617
|
+
// // the following equation:
|
|
2618
|
+
// // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.
|
|
2619
|
+
//
|
|
2620
|
+
// // Total amount (in stroops) that has been charged for non-refundable
|
|
2621
|
+
// // Soroban resources.
|
|
2622
|
+
// // Non-refundable resources are charged based on the usage declared in
|
|
2623
|
+
// // the transaction envelope (such as `instructions`, `readBytes` etc.) and
|
|
2624
|
+
// // is charged regardless of the success of the transaction.
|
|
2625
|
+
// int64 totalNonRefundableResourceFeeCharged;
|
|
2626
|
+
// // Total amount (in stroops) that has been charged for refundable
|
|
2627
|
+
// // Soroban resource fees.
|
|
2628
|
+
// // Currently this comprises the rent fee (`rentFeeCharged`) and the
|
|
2629
|
+
// // fee for the events and return value.
|
|
2630
|
+
// // Refundable resources are charged based on the actual resources usage.
|
|
2631
|
+
// // Since currently refundable resources are only used for the successful
|
|
2632
|
+
// // transactions, this will be `0` for failed transactions.
|
|
2633
|
+
// int64 totalRefundableResourceFeeCharged;
|
|
2634
|
+
// // Amount (in stroops) that has been charged for rent.
|
|
2635
|
+
// // This is a part of `totalNonRefundableResourceFeeCharged`.
|
|
2636
|
+
// int64 rentFeeCharged;
|
|
2637
|
+
// };
|
|
2638
|
+
//
|
|
2639
|
+
// ===========================================================================
|
|
2640
|
+
xdr.struct("SorobanTransactionMetaExtV1", [["ext", xdr.lookup("ExtensionPoint")], ["totalNonRefundableResourceFeeCharged", xdr.lookup("Int64")], ["totalRefundableResourceFeeCharged", xdr.lookup("Int64")], ["rentFeeCharged", xdr.lookup("Int64")]]);
|
|
2641
|
+
|
|
2642
|
+
// === xdr source ============================================================
|
|
2643
|
+
//
|
|
2644
|
+
// union SorobanTransactionMetaExt switch (int v)
|
|
2645
|
+
// {
|
|
2646
|
+
// case 0:
|
|
2647
|
+
// void;
|
|
2648
|
+
// case 1:
|
|
2649
|
+
// SorobanTransactionMetaExtV1 v1;
|
|
2650
|
+
// };
|
|
2651
|
+
//
|
|
2652
|
+
// ===========================================================================
|
|
2653
|
+
xdr.union("SorobanTransactionMetaExt", {
|
|
2654
|
+
switchOn: xdr["int"](),
|
|
2655
|
+
switchName: "v",
|
|
2656
|
+
switches: [[0, xdr["void"]()], [1, "v1"]],
|
|
2657
|
+
arms: {
|
|
2658
|
+
v1: xdr.lookup("SorobanTransactionMetaExtV1")
|
|
2659
|
+
}
|
|
2660
|
+
});
|
|
2661
|
+
|
|
2662
|
+
// === xdr source ============================================================
|
|
2663
|
+
//
|
|
2664
|
+
// struct SorobanTransactionMeta
|
|
2665
|
+
// {
|
|
2666
|
+
// SorobanTransactionMetaExt ext;
|
|
2667
|
+
//
|
|
2545
2668
|
// ContractEvent events<>; // custom events populated by the
|
|
2546
2669
|
// // contracts themselves.
|
|
2547
2670
|
// SCVal returnValue; // return value of the host fn invocation
|
|
@@ -2553,7 +2676,7 @@ var types = XDR.config(function (xdr) {
|
|
|
2553
2676
|
// };
|
|
2554
2677
|
//
|
|
2555
2678
|
// ===========================================================================
|
|
2556
|
-
xdr.struct("SorobanTransactionMeta", [["ext", xdr.lookup("
|
|
2679
|
+
xdr.struct("SorobanTransactionMeta", [["ext", xdr.lookup("SorobanTransactionMetaExt")], ["events", xdr.varArray(xdr.lookup("ContractEvent"), 2147483647)], ["returnValue", xdr.lookup("ScVal")], ["diagnosticEvents", xdr.varArray(xdr.lookup("DiagnosticEvent"), 2147483647)]]);
|
|
2557
2680
|
|
|
2558
2681
|
// === xdr source ============================================================
|
|
2559
2682
|
//
|
|
@@ -2659,11 +2782,40 @@ var types = XDR.config(function (xdr) {
|
|
|
2659
2782
|
|
|
2660
2783
|
// === xdr source ============================================================
|
|
2661
2784
|
//
|
|
2662
|
-
// struct
|
|
2785
|
+
// struct LedgerCloseMetaExtV1
|
|
2663
2786
|
// {
|
|
2664
|
-
// // We forgot to add an ExtensionPoint in v0 but at least
|
|
2665
|
-
// // we can add one now in v1.
|
|
2666
2787
|
// ExtensionPoint ext;
|
|
2788
|
+
// int64 sorobanFeeWrite1KB;
|
|
2789
|
+
// };
|
|
2790
|
+
//
|
|
2791
|
+
// ===========================================================================
|
|
2792
|
+
xdr.struct("LedgerCloseMetaExtV1", [["ext", xdr.lookup("ExtensionPoint")], ["sorobanFeeWrite1Kb", xdr.lookup("Int64")]]);
|
|
2793
|
+
|
|
2794
|
+
// === xdr source ============================================================
|
|
2795
|
+
//
|
|
2796
|
+
// union LedgerCloseMetaExt switch (int v)
|
|
2797
|
+
// {
|
|
2798
|
+
// case 0:
|
|
2799
|
+
// void;
|
|
2800
|
+
// case 1:
|
|
2801
|
+
// LedgerCloseMetaExtV1 v1;
|
|
2802
|
+
// };
|
|
2803
|
+
//
|
|
2804
|
+
// ===========================================================================
|
|
2805
|
+
xdr.union("LedgerCloseMetaExt", {
|
|
2806
|
+
switchOn: xdr["int"](),
|
|
2807
|
+
switchName: "v",
|
|
2808
|
+
switches: [[0, xdr["void"]()], [1, "v1"]],
|
|
2809
|
+
arms: {
|
|
2810
|
+
v1: xdr.lookup("LedgerCloseMetaExtV1")
|
|
2811
|
+
}
|
|
2812
|
+
});
|
|
2813
|
+
|
|
2814
|
+
// === xdr source ============================================================
|
|
2815
|
+
//
|
|
2816
|
+
// struct LedgerCloseMetaV1
|
|
2817
|
+
// {
|
|
2818
|
+
// LedgerCloseMetaExt ext;
|
|
2667
2819
|
//
|
|
2668
2820
|
// LedgerHeaderHistoryEntry ledgerHeader;
|
|
2669
2821
|
//
|
|
@@ -2693,7 +2845,7 @@ var types = XDR.config(function (xdr) {
|
|
|
2693
2845
|
// };
|
|
2694
2846
|
//
|
|
2695
2847
|
// ===========================================================================
|
|
2696
|
-
xdr.struct("LedgerCloseMetaV1", [["ext", xdr.lookup("
|
|
2848
|
+
xdr.struct("LedgerCloseMetaV1", [["ext", xdr.lookup("LedgerCloseMetaExt")], ["ledgerHeader", xdr.lookup("LedgerHeaderHistoryEntry")], ["txSet", xdr.lookup("GeneralizedTransactionSet")], ["txProcessing", xdr.varArray(xdr.lookup("TransactionResultMeta"), 2147483647)], ["upgradesProcessing", xdr.varArray(xdr.lookup("UpgradeEntryMeta"), 2147483647)], ["scpInfo", xdr.varArray(xdr.lookup("ScpHistoryEntry"), 2147483647)], ["totalByteSizeOfBucketList", xdr.lookup("Uint64")], ["evictedTemporaryLedgerKeys", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ["evictedPersistentLedgerEntries", xdr.varArray(xdr.lookup("LedgerEntry"), 2147483647)]]);
|
|
2697
2849
|
|
|
2698
2850
|
// === xdr source ============================================================
|
|
2699
2851
|
//
|
|
@@ -8107,8 +8259,9 @@ var types = XDR.config(function (xdr) {
|
|
|
8107
8259
|
// InvokeVmFunction = 13,
|
|
8108
8260
|
// // Cost of computing a keccak256 hash from bytes.
|
|
8109
8261
|
// ComputeKeccak256Hash = 14,
|
|
8110
|
-
// // Cost of
|
|
8111
|
-
//
|
|
8262
|
+
// // Cost of decoding an ECDSA signature computed from a 256-bit prime modulus
|
|
8263
|
+
// // curve (e.g. secp256k1 and secp256r1)
|
|
8264
|
+
// DecodeEcdsaCurve256Sig = 15,
|
|
8112
8265
|
// // Cost of recovering an ECDSA secp256k1 key from a signature.
|
|
8113
8266
|
// RecoverEcdsaSecp256k1Key = 16,
|
|
8114
8267
|
// // Cost of int256 addition (`+`) and subtraction (`-`) operations
|
|
@@ -8122,7 +8275,55 @@ var types = XDR.config(function (xdr) {
|
|
|
8122
8275
|
// // Cost of int256 shift (`shl`, `shr`) operation
|
|
8123
8276
|
// Int256Shift = 21,
|
|
8124
8277
|
// // Cost of drawing random bytes using a ChaCha20 PRNG
|
|
8125
|
-
// ChaCha20DrawBytes = 22
|
|
8278
|
+
// ChaCha20DrawBytes = 22,
|
|
8279
|
+
//
|
|
8280
|
+
// // Cost of parsing wasm bytes that only encode instructions.
|
|
8281
|
+
// ParseWasmInstructions = 23,
|
|
8282
|
+
// // Cost of parsing a known number of wasm functions.
|
|
8283
|
+
// ParseWasmFunctions = 24,
|
|
8284
|
+
// // Cost of parsing a known number of wasm globals.
|
|
8285
|
+
// ParseWasmGlobals = 25,
|
|
8286
|
+
// // Cost of parsing a known number of wasm table entries.
|
|
8287
|
+
// ParseWasmTableEntries = 26,
|
|
8288
|
+
// // Cost of parsing a known number of wasm types.
|
|
8289
|
+
// ParseWasmTypes = 27,
|
|
8290
|
+
// // Cost of parsing a known number of wasm data segments.
|
|
8291
|
+
// ParseWasmDataSegments = 28,
|
|
8292
|
+
// // Cost of parsing a known number of wasm element segments.
|
|
8293
|
+
// ParseWasmElemSegments = 29,
|
|
8294
|
+
// // Cost of parsing a known number of wasm imports.
|
|
8295
|
+
// ParseWasmImports = 30,
|
|
8296
|
+
// // Cost of parsing a known number of wasm exports.
|
|
8297
|
+
// ParseWasmExports = 31,
|
|
8298
|
+
// // Cost of parsing a known number of data segment bytes.
|
|
8299
|
+
// ParseWasmDataSegmentBytes = 32,
|
|
8300
|
+
//
|
|
8301
|
+
// // Cost of instantiating wasm bytes that only encode instructions.
|
|
8302
|
+
// InstantiateWasmInstructions = 33,
|
|
8303
|
+
// // Cost of instantiating a known number of wasm functions.
|
|
8304
|
+
// InstantiateWasmFunctions = 34,
|
|
8305
|
+
// // Cost of instantiating a known number of wasm globals.
|
|
8306
|
+
// InstantiateWasmGlobals = 35,
|
|
8307
|
+
// // Cost of instantiating a known number of wasm table entries.
|
|
8308
|
+
// InstantiateWasmTableEntries = 36,
|
|
8309
|
+
// // Cost of instantiating a known number of wasm types.
|
|
8310
|
+
// InstantiateWasmTypes = 37,
|
|
8311
|
+
// // Cost of instantiating a known number of wasm data segments.
|
|
8312
|
+
// InstantiateWasmDataSegments = 38,
|
|
8313
|
+
// // Cost of instantiating a known number of wasm element segments.
|
|
8314
|
+
// InstantiateWasmElemSegments = 39,
|
|
8315
|
+
// // Cost of instantiating a known number of wasm imports.
|
|
8316
|
+
// InstantiateWasmImports = 40,
|
|
8317
|
+
// // Cost of instantiating a known number of wasm exports.
|
|
8318
|
+
// InstantiateWasmExports = 41,
|
|
8319
|
+
// // Cost of instantiating a known number of data segment bytes.
|
|
8320
|
+
// InstantiateWasmDataSegmentBytes = 42,
|
|
8321
|
+
//
|
|
8322
|
+
// // Cost of decoding a bytes array representing an uncompressed SEC-1 encoded
|
|
8323
|
+
// // point on a 256-bit elliptic curve
|
|
8324
|
+
// Sec1DecodePointUncompressed = 43,
|
|
8325
|
+
// // Cost of verifying an ECDSA Secp256r1 signature
|
|
8326
|
+
// VerifyEcdsaSecp256r1Sig = 44
|
|
8126
8327
|
// };
|
|
8127
8328
|
//
|
|
8128
8329
|
// ===========================================================================
|
|
@@ -8142,14 +8343,36 @@ var types = XDR.config(function (xdr) {
|
|
|
8142
8343
|
vmCachedInstantiation: 12,
|
|
8143
8344
|
invokeVmFunction: 13,
|
|
8144
8345
|
computeKeccak256Hash: 14,
|
|
8145
|
-
|
|
8346
|
+
decodeEcdsaCurve256Sig: 15,
|
|
8146
8347
|
recoverEcdsaSecp256k1Key: 16,
|
|
8147
8348
|
int256AddSub: 17,
|
|
8148
8349
|
int256Mul: 18,
|
|
8149
8350
|
int256Div: 19,
|
|
8150
8351
|
int256Pow: 20,
|
|
8151
8352
|
int256Shift: 21,
|
|
8152
|
-
chaCha20DrawBytes: 22
|
|
8353
|
+
chaCha20DrawBytes: 22,
|
|
8354
|
+
parseWasmInstructions: 23,
|
|
8355
|
+
parseWasmFunctions: 24,
|
|
8356
|
+
parseWasmGlobals: 25,
|
|
8357
|
+
parseWasmTableEntries: 26,
|
|
8358
|
+
parseWasmTypes: 27,
|
|
8359
|
+
parseWasmDataSegments: 28,
|
|
8360
|
+
parseWasmElemSegments: 29,
|
|
8361
|
+
parseWasmImports: 30,
|
|
8362
|
+
parseWasmExports: 31,
|
|
8363
|
+
parseWasmDataSegmentBytes: 32,
|
|
8364
|
+
instantiateWasmInstructions: 33,
|
|
8365
|
+
instantiateWasmFunctions: 34,
|
|
8366
|
+
instantiateWasmGlobals: 35,
|
|
8367
|
+
instantiateWasmTableEntries: 36,
|
|
8368
|
+
instantiateWasmTypes: 37,
|
|
8369
|
+
instantiateWasmDataSegments: 38,
|
|
8370
|
+
instantiateWasmElemSegments: 39,
|
|
8371
|
+
instantiateWasmImports: 40,
|
|
8372
|
+
instantiateWasmExports: 41,
|
|
8373
|
+
instantiateWasmDataSegmentBytes: 42,
|
|
8374
|
+
sec1DecodePointUncompressed: 43,
|
|
8375
|
+
verifyEcdsaSecp256r1Sig: 44
|
|
8153
8376
|
});
|
|
8154
8377
|
|
|
8155
8378
|
// === xdr source ============================================================
|
|
@@ -8182,15 +8405,18 @@ var types = XDR.config(function (xdr) {
|
|
|
8182
8405
|
// // Number of snapshots to use when calculating average BucketList size
|
|
8183
8406
|
// uint32 bucketListSizeWindowSampleSize;
|
|
8184
8407
|
//
|
|
8408
|
+
// // How often to sample the BucketList size for the average, in ledgers
|
|
8409
|
+
// uint32 bucketListWindowSamplePeriod;
|
|
8410
|
+
//
|
|
8185
8411
|
// // Maximum number of bytes that we scan for eviction per ledger
|
|
8186
|
-
//
|
|
8412
|
+
// uint32 evictionScanSize;
|
|
8187
8413
|
//
|
|
8188
8414
|
// // Lowest BucketList level to be scanned to evict entries
|
|
8189
8415
|
// uint32 startingEvictionScanLevel;
|
|
8190
8416
|
// };
|
|
8191
8417
|
//
|
|
8192
8418
|
// ===========================================================================
|
|
8193
|
-
xdr.struct("StateArchivalSettings", [["maxEntryTtl", xdr.lookup("Uint32")], ["minTemporaryTtl", xdr.lookup("Uint32")], ["minPersistentTtl", xdr.lookup("Uint32")], ["persistentRentRateDenominator", xdr.lookup("Int64")], ["tempRentRateDenominator", xdr.lookup("Int64")], ["maxEntriesToArchive", xdr.lookup("Uint32")], ["bucketListSizeWindowSampleSize", xdr.lookup("Uint32")], ["evictionScanSize", xdr.lookup("
|
|
8419
|
+
xdr.struct("StateArchivalSettings", [["maxEntryTtl", xdr.lookup("Uint32")], ["minTemporaryTtl", xdr.lookup("Uint32")], ["minPersistentTtl", xdr.lookup("Uint32")], ["persistentRentRateDenominator", xdr.lookup("Int64")], ["tempRentRateDenominator", xdr.lookup("Int64")], ["maxEntriesToArchive", xdr.lookup("Uint32")], ["bucketListSizeWindowSampleSize", xdr.lookup("Uint32")], ["bucketListWindowSamplePeriod", xdr.lookup("Uint32")], ["evictionScanSize", xdr.lookup("Uint32")], ["startingEvictionScanLevel", xdr.lookup("Uint32")]]);
|
|
8194
8420
|
|
|
8195
8421
|
// === xdr source ============================================================
|
|
8196
8422
|
//
|
package/lib/keypair.js
CHANGED
|
@@ -14,7 +14,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint no-bitwise: ["error", {"allow": ["^"]}] */
|
|
19
19
|
/**
|
|
20
20
|
* `Keypair` represents public (and secret) keys of the account.
|
|
@@ -65,7 +65,7 @@ var Keypair = exports.Keypair = /*#__PURE__*/function () {
|
|
|
65
65
|
* @param {string} secret secret key (ex. `SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS`)
|
|
66
66
|
* @returns {Keypair}
|
|
67
67
|
*/
|
|
68
|
-
_createClass(Keypair, [{
|
|
68
|
+
return _createClass(Keypair, [{
|
|
69
69
|
key: "xdrAccountId",
|
|
70
70
|
value: function xdrAccountId() {
|
|
71
71
|
return new _xdr["default"].AccountId.publicKeyTypeEd25519(this._publicKey);
|
|
@@ -304,5 +304,4 @@ var Keypair = exports.Keypair = /*#__PURE__*/function () {
|
|
|
304
304
|
return this.fromRawEd25519Seed(secret);
|
|
305
305
|
}
|
|
306
306
|
}]);
|
|
307
|
-
return Keypair;
|
|
308
307
|
}();
|
|
@@ -15,7 +15,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
15
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
16
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
/**
|
|
21
21
|
* LiquidityPoolAsset class represents a liquidity pool trustline change.
|
|
@@ -51,7 +51,7 @@ var LiquidityPoolAsset = exports.LiquidityPoolAsset = /*#__PURE__*/function () {
|
|
|
51
51
|
* @param {xdr.ChangeTrustAsset} ctAssetXdr - The asset XDR object.
|
|
52
52
|
* @returns {LiquidityPoolAsset}
|
|
53
53
|
*/
|
|
54
|
-
_createClass(LiquidityPoolAsset, [{
|
|
54
|
+
return _createClass(LiquidityPoolAsset, [{
|
|
55
55
|
key: "toXDRObject",
|
|
56
56
|
value:
|
|
57
57
|
/**
|
|
@@ -122,5 +122,4 @@ var LiquidityPoolAsset = exports.LiquidityPoolAsset = /*#__PURE__*/function () {
|
|
|
122
122
|
throw new Error("Invalid asset type: ".concat(assetType.name));
|
|
123
123
|
}
|
|
124
124
|
}]);
|
|
125
|
-
return LiquidityPoolAsset;
|
|
126
125
|
}();
|
package/lib/liquidity_pool_id.js
CHANGED
|
@@ -10,7 +10,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
11
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
/**
|
|
16
16
|
* LiquidityPoolId class represents the asset referenced by a trustline to a
|
|
@@ -36,7 +36,7 @@ var LiquidityPoolId = exports.LiquidityPoolId = /*#__PURE__*/function () {
|
|
|
36
36
|
* @param {xdr.TrustLineAsset} tlAssetXdr - The asset XDR object.
|
|
37
37
|
* @returns {LiquidityPoolId}
|
|
38
38
|
*/
|
|
39
|
-
_createClass(LiquidityPoolId, [{
|
|
39
|
+
return _createClass(LiquidityPoolId, [{
|
|
40
40
|
key: "toXDRObject",
|
|
41
41
|
value:
|
|
42
42
|
/**
|
|
@@ -97,5 +97,4 @@ var LiquidityPoolId = exports.LiquidityPoolId = /*#__PURE__*/function () {
|
|
|
97
97
|
throw new Error("Invalid asset type: ".concat(assetType.name));
|
|
98
98
|
}
|
|
99
99
|
}]);
|
|
100
|
-
return LiquidityPoolId;
|
|
101
100
|
}();
|
package/lib/memo.js
CHANGED
|
@@ -12,7 +12,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
12
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
13
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
/**
|
|
18
18
|
* Type of {@link Memo}.
|
|
@@ -74,7 +74,7 @@ var Memo = exports.Memo = /*#__PURE__*/function () {
|
|
|
74
74
|
/**
|
|
75
75
|
* Contains memo type: `MemoNone`, `MemoID`, `MemoText`, `MemoHash` or `MemoReturn`
|
|
76
76
|
*/
|
|
77
|
-
_createClass(Memo, [{
|
|
77
|
+
return _createClass(Memo, [{
|
|
78
78
|
key: "type",
|
|
79
79
|
get: function get() {
|
|
80
80
|
return this._type;
|
|
@@ -266,5 +266,4 @@ var Memo = exports.Memo = /*#__PURE__*/function () {
|
|
|
266
266
|
throw new Error('Unknown type');
|
|
267
267
|
}
|
|
268
268
|
}]);
|
|
269
|
-
return Memo;
|
|
270
269
|
}();
|
package/lib/muxed_account.js
CHANGED
|
@@ -13,7 +13,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
/**
|
|
19
19
|
* Represents a muxed account for transactions and operations.
|
|
@@ -76,7 +76,7 @@ var MuxedAccount = exports.MuxedAccount = /*#__PURE__*/function () {
|
|
|
76
76
|
*
|
|
77
77
|
* @return {MuxedAccount}
|
|
78
78
|
*/
|
|
79
|
-
_createClass(MuxedAccount, [{
|
|
79
|
+
return _createClass(MuxedAccount, [{
|
|
80
80
|
key: "baseAccount",
|
|
81
81
|
value:
|
|
82
82
|
/**
|
|
@@ -155,5 +155,4 @@ var MuxedAccount = exports.MuxedAccount = /*#__PURE__*/function () {
|
|
|
155
155
|
return new MuxedAccount(new _account.Account(gAddress, sequenceNum), id);
|
|
156
156
|
}
|
|
157
157
|
}]);
|
|
158
|
-
return MuxedAccount;
|
|
159
158
|
}();
|
package/lib/numbers/int128.js
CHANGED
|
@@ -9,7 +9,7 @@ var _jsXdr = require("@stellar/js-xdr");
|
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -19,7 +19,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
19
19
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
21
|
var Int128 = exports.Int128 = /*#__PURE__*/function (_LargeInt) {
|
|
22
|
-
_inherits(Int128, _LargeInt);
|
|
23
22
|
/**
|
|
24
23
|
* Construct a signed 128-bit integer that can be XDR-encoded.
|
|
25
24
|
*
|
|
@@ -33,7 +32,8 @@ var Int128 = exports.Int128 = /*#__PURE__*/function (_LargeInt) {
|
|
|
33
32
|
}
|
|
34
33
|
return _callSuper(this, Int128, [args]);
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
_inherits(Int128, _LargeInt);
|
|
36
|
+
return _createClass(Int128, [{
|
|
37
37
|
key: "unsigned",
|
|
38
38
|
get: function get() {
|
|
39
39
|
return false;
|
|
@@ -44,6 +44,5 @@ var Int128 = exports.Int128 = /*#__PURE__*/function (_LargeInt) {
|
|
|
44
44
|
return 128;
|
|
45
45
|
}
|
|
46
46
|
}]);
|
|
47
|
-
return Int128;
|
|
48
47
|
}(_jsXdr.LargeInt);
|
|
49
48
|
Int128.defineIntBoundaries();
|
package/lib/numbers/int256.js
CHANGED
|
@@ -9,7 +9,7 @@ var _jsXdr = require("@stellar/js-xdr");
|
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -19,7 +19,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
19
19
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
21
|
var Int256 = exports.Int256 = /*#__PURE__*/function (_LargeInt) {
|
|
22
|
-
_inherits(Int256, _LargeInt);
|
|
23
22
|
/**
|
|
24
23
|
* Construct a signed 256-bit integer that can be XDR-encoded.
|
|
25
24
|
*
|
|
@@ -33,7 +32,8 @@ var Int256 = exports.Int256 = /*#__PURE__*/function (_LargeInt) {
|
|
|
33
32
|
}
|
|
34
33
|
return _callSuper(this, Int256, [args]);
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
_inherits(Int256, _LargeInt);
|
|
36
|
+
return _createClass(Int256, [{
|
|
37
37
|
key: "unsigned",
|
|
38
38
|
get: function get() {
|
|
39
39
|
return false;
|
|
@@ -44,6 +44,5 @@ var Int256 = exports.Int256 = /*#__PURE__*/function (_LargeInt) {
|
|
|
44
44
|
return 256;
|
|
45
45
|
}
|
|
46
46
|
}]);
|
|
47
|
-
return Int256;
|
|
48
47
|
}(_jsXdr.LargeInt);
|
|
49
48
|
Int256.defineIntBoundaries();
|
package/lib/numbers/sc_int.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.ScInt = void 0;
|
|
|
8
8
|
var _xdr_large_int = require("./xdr_large_int");
|
|
9
9
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -90,7 +90,6 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
|
|
|
90
90
|
* @throws {SyntaxError} if a string `value` can't be parsed as a big integer
|
|
91
91
|
*/
|
|
92
92
|
var ScInt = exports.ScInt = /*#__PURE__*/function (_XdrLargeInt) {
|
|
93
|
-
_inherits(ScInt, _XdrLargeInt);
|
|
94
93
|
function ScInt(value, opts) {
|
|
95
94
|
var _opts$type;
|
|
96
95
|
_classCallCheck(this, ScInt);
|
|
@@ -117,6 +116,7 @@ var ScInt = exports.ScInt = /*#__PURE__*/function (_XdrLargeInt) {
|
|
|
117
116
|
}
|
|
118
117
|
return _callSuper(this, ScInt, [type, value]);
|
|
119
118
|
}
|
|
119
|
+
_inherits(ScInt, _XdrLargeInt);
|
|
120
120
|
return _createClass(ScInt);
|
|
121
121
|
}(_xdr_large_int.XdrLargeInt);
|
|
122
122
|
function nearestBigIntSize(bigI) {
|
package/lib/numbers/uint128.js
CHANGED
|
@@ -9,7 +9,7 @@ var _jsXdr = require("@stellar/js-xdr");
|
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -19,7 +19,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
19
19
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
21
|
var Uint128 = exports.Uint128 = /*#__PURE__*/function (_LargeInt) {
|
|
22
|
-
_inherits(Uint128, _LargeInt);
|
|
23
22
|
/**
|
|
24
23
|
* Construct an unsigned 128-bit integer that can be XDR-encoded.
|
|
25
24
|
*
|
|
@@ -33,7 +32,8 @@ var Uint128 = exports.Uint128 = /*#__PURE__*/function (_LargeInt) {
|
|
|
33
32
|
}
|
|
34
33
|
return _callSuper(this, Uint128, [args]);
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
_inherits(Uint128, _LargeInt);
|
|
36
|
+
return _createClass(Uint128, [{
|
|
37
37
|
key: "unsigned",
|
|
38
38
|
get: function get() {
|
|
39
39
|
return true;
|
|
@@ -44,6 +44,5 @@ var Uint128 = exports.Uint128 = /*#__PURE__*/function (_LargeInt) {
|
|
|
44
44
|
return 128;
|
|
45
45
|
}
|
|
46
46
|
}]);
|
|
47
|
-
return Uint128;
|
|
48
47
|
}(_jsXdr.LargeInt);
|
|
49
48
|
Uint128.defineIntBoundaries();
|