@stellar/stellar-base 12.1.0 → 13.0.0-beta.1
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 +20 -0
- package/dist/stellar-base.js +760 -118
- package/dist/stellar-base.min.js +1 -1
- package/lib/asset.js +1 -1
- package/lib/auth.js +14 -9
- package/lib/generated/curr_generated.js +728 -103
- package/lib/generated/next_generated.js +793 -107
- package/lib/invocation.js +2 -1
- package/lib/operation.js +6 -1
- package/lib/operations/invoke_host_function.js +9 -3
- package/package.json +11 -11
- package/types/curr.d.ts +1472 -195
- package/types/index.d.ts +6 -1
- package/types/next.d.ts +1642 -195
package/dist/stellar-base.js
CHANGED
|
@@ -1919,7 +1919,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1919
1919
|
// EXTERNAL MODULE: ./node_modules/@stellar/js-xdr/dist/xdr.js
|
|
1920
1920
|
var xdr = __webpack_require__(3740);
|
|
1921
1921
|
;// CONCATENATED MODULE: ./src/generated/curr_generated.js
|
|
1922
|
-
// Automatically generated by xdrgen
|
|
1922
|
+
// Automatically generated by xdrgen on 2024-09-12T11:09:00-08:00
|
|
1923
1923
|
// DO NOT EDIT or your changes may be overwritten
|
|
1924
1924
|
|
|
1925
1925
|
/* jshint maxstatements:2147483647 */
|
|
@@ -3697,6 +3697,250 @@ var types = xdr.config(function (xdr) {
|
|
|
3697
3697
|
envelopeTypeSorobanAuthorization: 9
|
|
3698
3698
|
});
|
|
3699
3699
|
|
|
3700
|
+
// === xdr source ============================================================
|
|
3701
|
+
//
|
|
3702
|
+
// enum BucketListType
|
|
3703
|
+
// {
|
|
3704
|
+
// LIVE = 0,
|
|
3705
|
+
// HOT_ARCHIVE = 1,
|
|
3706
|
+
// COLD_ARCHIVE = 2
|
|
3707
|
+
// };
|
|
3708
|
+
//
|
|
3709
|
+
// ===========================================================================
|
|
3710
|
+
xdr["enum"]("BucketListType", {
|
|
3711
|
+
live: 0,
|
|
3712
|
+
hotArchive: 1,
|
|
3713
|
+
coldArchive: 2
|
|
3714
|
+
});
|
|
3715
|
+
|
|
3716
|
+
// === xdr source ============================================================
|
|
3717
|
+
//
|
|
3718
|
+
// enum BucketEntryType
|
|
3719
|
+
// {
|
|
3720
|
+
// METAENTRY =
|
|
3721
|
+
// -1, // At-and-after protocol 11: bucket metadata, should come first.
|
|
3722
|
+
// LIVEENTRY = 0, // Before protocol 11: created-or-updated;
|
|
3723
|
+
// // At-and-after protocol 11: only updated.
|
|
3724
|
+
// DEADENTRY = 1,
|
|
3725
|
+
// INITENTRY = 2 // At-and-after protocol 11: only created.
|
|
3726
|
+
// };
|
|
3727
|
+
//
|
|
3728
|
+
// ===========================================================================
|
|
3729
|
+
xdr["enum"]("BucketEntryType", {
|
|
3730
|
+
metaentry: -1,
|
|
3731
|
+
liveentry: 0,
|
|
3732
|
+
deadentry: 1,
|
|
3733
|
+
initentry: 2
|
|
3734
|
+
});
|
|
3735
|
+
|
|
3736
|
+
// === xdr source ============================================================
|
|
3737
|
+
//
|
|
3738
|
+
// enum HotArchiveBucketEntryType
|
|
3739
|
+
// {
|
|
3740
|
+
// HOT_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first.
|
|
3741
|
+
// HOT_ARCHIVE_ARCHIVED = 0, // Entry is Archived
|
|
3742
|
+
// HOT_ARCHIVE_LIVE = 1, // Entry was previously HOT_ARCHIVE_ARCHIVED, or HOT_ARCHIVE_DELETED, but
|
|
3743
|
+
// // has been added back to the live BucketList.
|
|
3744
|
+
// // Does not need to be persisted.
|
|
3745
|
+
// HOT_ARCHIVE_DELETED = 2 // Entry deleted (Note: must be persisted in archive)
|
|
3746
|
+
// };
|
|
3747
|
+
//
|
|
3748
|
+
// ===========================================================================
|
|
3749
|
+
xdr["enum"]("HotArchiveBucketEntryType", {
|
|
3750
|
+
hotArchiveMetaentry: -1,
|
|
3751
|
+
hotArchiveArchived: 0,
|
|
3752
|
+
hotArchiveLive: 1,
|
|
3753
|
+
hotArchiveDeleted: 2
|
|
3754
|
+
});
|
|
3755
|
+
|
|
3756
|
+
// === xdr source ============================================================
|
|
3757
|
+
//
|
|
3758
|
+
// enum ColdArchiveBucketEntryType
|
|
3759
|
+
// {
|
|
3760
|
+
// COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first.
|
|
3761
|
+
// COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch
|
|
3762
|
+
// COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch
|
|
3763
|
+
// COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound
|
|
3764
|
+
// COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry
|
|
3765
|
+
// };
|
|
3766
|
+
//
|
|
3767
|
+
// ===========================================================================
|
|
3768
|
+
xdr["enum"]("ColdArchiveBucketEntryType", {
|
|
3769
|
+
coldArchiveMetaentry: -1,
|
|
3770
|
+
coldArchiveArchivedLeaf: 0,
|
|
3771
|
+
coldArchiveDeletedLeaf: 1,
|
|
3772
|
+
coldArchiveBoundaryLeaf: 2,
|
|
3773
|
+
coldArchiveHash: 3
|
|
3774
|
+
});
|
|
3775
|
+
|
|
3776
|
+
// === xdr source ============================================================
|
|
3777
|
+
//
|
|
3778
|
+
// union switch (int v)
|
|
3779
|
+
// {
|
|
3780
|
+
// case 0:
|
|
3781
|
+
// void;
|
|
3782
|
+
// case 1:
|
|
3783
|
+
// BucketListType bucketListType;
|
|
3784
|
+
// }
|
|
3785
|
+
//
|
|
3786
|
+
// ===========================================================================
|
|
3787
|
+
xdr.union("BucketMetadataExt", {
|
|
3788
|
+
switchOn: xdr["int"](),
|
|
3789
|
+
switchName: "v",
|
|
3790
|
+
switches: [[0, xdr["void"]()], [1, "bucketListType"]],
|
|
3791
|
+
arms: {
|
|
3792
|
+
bucketListType: xdr.lookup("BucketListType")
|
|
3793
|
+
}
|
|
3794
|
+
});
|
|
3795
|
+
|
|
3796
|
+
// === xdr source ============================================================
|
|
3797
|
+
//
|
|
3798
|
+
// struct BucketMetadata
|
|
3799
|
+
// {
|
|
3800
|
+
// // Indicates the protocol version used to create / merge this bucket.
|
|
3801
|
+
// uint32 ledgerVersion;
|
|
3802
|
+
//
|
|
3803
|
+
// // reserved for future use
|
|
3804
|
+
// union switch (int v)
|
|
3805
|
+
// {
|
|
3806
|
+
// case 0:
|
|
3807
|
+
// void;
|
|
3808
|
+
// case 1:
|
|
3809
|
+
// BucketListType bucketListType;
|
|
3810
|
+
// }
|
|
3811
|
+
// ext;
|
|
3812
|
+
// };
|
|
3813
|
+
//
|
|
3814
|
+
// ===========================================================================
|
|
3815
|
+
xdr.struct("BucketMetadata", [["ledgerVersion", xdr.lookup("Uint32")], ["ext", xdr.lookup("BucketMetadataExt")]]);
|
|
3816
|
+
|
|
3817
|
+
// === xdr source ============================================================
|
|
3818
|
+
//
|
|
3819
|
+
// union BucketEntry switch (BucketEntryType type)
|
|
3820
|
+
// {
|
|
3821
|
+
// case LIVEENTRY:
|
|
3822
|
+
// case INITENTRY:
|
|
3823
|
+
// LedgerEntry liveEntry;
|
|
3824
|
+
//
|
|
3825
|
+
// case DEADENTRY:
|
|
3826
|
+
// LedgerKey deadEntry;
|
|
3827
|
+
// case METAENTRY:
|
|
3828
|
+
// BucketMetadata metaEntry;
|
|
3829
|
+
// };
|
|
3830
|
+
//
|
|
3831
|
+
// ===========================================================================
|
|
3832
|
+
xdr.union("BucketEntry", {
|
|
3833
|
+
switchOn: xdr.lookup("BucketEntryType"),
|
|
3834
|
+
switchName: "type",
|
|
3835
|
+
switches: [["liveentry", "liveEntry"], ["initentry", "liveEntry"], ["deadentry", "deadEntry"], ["metaentry", "metaEntry"]],
|
|
3836
|
+
arms: {
|
|
3837
|
+
liveEntry: xdr.lookup("LedgerEntry"),
|
|
3838
|
+
deadEntry: xdr.lookup("LedgerKey"),
|
|
3839
|
+
metaEntry: xdr.lookup("BucketMetadata")
|
|
3840
|
+
}
|
|
3841
|
+
});
|
|
3842
|
+
|
|
3843
|
+
// === xdr source ============================================================
|
|
3844
|
+
//
|
|
3845
|
+
// union HotArchiveBucketEntry switch (HotArchiveBucketEntryType type)
|
|
3846
|
+
// {
|
|
3847
|
+
// case HOT_ARCHIVE_ARCHIVED:
|
|
3848
|
+
// LedgerEntry archivedEntry;
|
|
3849
|
+
//
|
|
3850
|
+
// case HOT_ARCHIVE_LIVE:
|
|
3851
|
+
// case HOT_ARCHIVE_DELETED:
|
|
3852
|
+
// LedgerKey key;
|
|
3853
|
+
// case HOT_ARCHIVE_METAENTRY:
|
|
3854
|
+
// BucketMetadata metaEntry;
|
|
3855
|
+
// };
|
|
3856
|
+
//
|
|
3857
|
+
// ===========================================================================
|
|
3858
|
+
xdr.union("HotArchiveBucketEntry", {
|
|
3859
|
+
switchOn: xdr.lookup("HotArchiveBucketEntryType"),
|
|
3860
|
+
switchName: "type",
|
|
3861
|
+
switches: [["hotArchiveArchived", "archivedEntry"], ["hotArchiveLive", "key"], ["hotArchiveDeleted", "key"], ["hotArchiveMetaentry", "metaEntry"]],
|
|
3862
|
+
arms: {
|
|
3863
|
+
archivedEntry: xdr.lookup("LedgerEntry"),
|
|
3864
|
+
key: xdr.lookup("LedgerKey"),
|
|
3865
|
+
metaEntry: xdr.lookup("BucketMetadata")
|
|
3866
|
+
}
|
|
3867
|
+
});
|
|
3868
|
+
|
|
3869
|
+
// === xdr source ============================================================
|
|
3870
|
+
//
|
|
3871
|
+
// struct ColdArchiveArchivedLeaf
|
|
3872
|
+
// {
|
|
3873
|
+
// uint32 index;
|
|
3874
|
+
// LedgerEntry archivedEntry;
|
|
3875
|
+
// };
|
|
3876
|
+
//
|
|
3877
|
+
// ===========================================================================
|
|
3878
|
+
xdr.struct("ColdArchiveArchivedLeaf", [["index", xdr.lookup("Uint32")], ["archivedEntry", xdr.lookup("LedgerEntry")]]);
|
|
3879
|
+
|
|
3880
|
+
// === xdr source ============================================================
|
|
3881
|
+
//
|
|
3882
|
+
// struct ColdArchiveDeletedLeaf
|
|
3883
|
+
// {
|
|
3884
|
+
// uint32 index;
|
|
3885
|
+
// LedgerKey deletedKey;
|
|
3886
|
+
// };
|
|
3887
|
+
//
|
|
3888
|
+
// ===========================================================================
|
|
3889
|
+
xdr.struct("ColdArchiveDeletedLeaf", [["index", xdr.lookup("Uint32")], ["deletedKey", xdr.lookup("LedgerKey")]]);
|
|
3890
|
+
|
|
3891
|
+
// === xdr source ============================================================
|
|
3892
|
+
//
|
|
3893
|
+
// struct ColdArchiveBoundaryLeaf
|
|
3894
|
+
// {
|
|
3895
|
+
// uint32 index;
|
|
3896
|
+
// bool isLowerBound;
|
|
3897
|
+
// };
|
|
3898
|
+
//
|
|
3899
|
+
// ===========================================================================
|
|
3900
|
+
xdr.struct("ColdArchiveBoundaryLeaf", [["index", xdr.lookup("Uint32")], ["isLowerBound", xdr.bool()]]);
|
|
3901
|
+
|
|
3902
|
+
// === xdr source ============================================================
|
|
3903
|
+
//
|
|
3904
|
+
// struct ColdArchiveHashEntry
|
|
3905
|
+
// {
|
|
3906
|
+
// uint32 index;
|
|
3907
|
+
// uint32 level;
|
|
3908
|
+
// Hash hash;
|
|
3909
|
+
// };
|
|
3910
|
+
//
|
|
3911
|
+
// ===========================================================================
|
|
3912
|
+
xdr.struct("ColdArchiveHashEntry", [["index", xdr.lookup("Uint32")], ["level", xdr.lookup("Uint32")], ["hash", xdr.lookup("Hash")]]);
|
|
3913
|
+
|
|
3914
|
+
// === xdr source ============================================================
|
|
3915
|
+
//
|
|
3916
|
+
// union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type)
|
|
3917
|
+
// {
|
|
3918
|
+
// case COLD_ARCHIVE_METAENTRY:
|
|
3919
|
+
// BucketMetadata metaEntry;
|
|
3920
|
+
// case COLD_ARCHIVE_ARCHIVED_LEAF:
|
|
3921
|
+
// ColdArchiveArchivedLeaf archivedLeaf;
|
|
3922
|
+
// case COLD_ARCHIVE_DELETED_LEAF:
|
|
3923
|
+
// ColdArchiveDeletedLeaf deletedLeaf;
|
|
3924
|
+
// case COLD_ARCHIVE_BOUNDARY_LEAF:
|
|
3925
|
+
// ColdArchiveBoundaryLeaf boundaryLeaf;
|
|
3926
|
+
// case COLD_ARCHIVE_HASH:
|
|
3927
|
+
// ColdArchiveHashEntry hashEntry;
|
|
3928
|
+
// };
|
|
3929
|
+
//
|
|
3930
|
+
// ===========================================================================
|
|
3931
|
+
xdr.union("ColdArchiveBucketEntry", {
|
|
3932
|
+
switchOn: xdr.lookup("ColdArchiveBucketEntryType"),
|
|
3933
|
+
switchName: "type",
|
|
3934
|
+
switches: [["coldArchiveMetaentry", "metaEntry"], ["coldArchiveArchivedLeaf", "archivedLeaf"], ["coldArchiveDeletedLeaf", "deletedLeaf"], ["coldArchiveBoundaryLeaf", "boundaryLeaf"], ["coldArchiveHash", "hashEntry"]],
|
|
3935
|
+
arms: {
|
|
3936
|
+
metaEntry: xdr.lookup("BucketMetadata"),
|
|
3937
|
+
archivedLeaf: xdr.lookup("ColdArchiveArchivedLeaf"),
|
|
3938
|
+
deletedLeaf: xdr.lookup("ColdArchiveDeletedLeaf"),
|
|
3939
|
+
boundaryLeaf: xdr.lookup("ColdArchiveBoundaryLeaf"),
|
|
3940
|
+
hashEntry: xdr.lookup("ColdArchiveHashEntry")
|
|
3941
|
+
}
|
|
3942
|
+
});
|
|
3943
|
+
|
|
3700
3944
|
// === xdr source ============================================================
|
|
3701
3945
|
//
|
|
3702
3946
|
// typedef opaque UpgradeType<128>;
|
|
@@ -3980,87 +4224,6 @@ var types = xdr.config(function (xdr) {
|
|
|
3980
4224
|
// ===========================================================================
|
|
3981
4225
|
xdr.struct("ConfigUpgradeSet", [["updatedEntry", xdr.varArray(xdr.lookup("ConfigSettingEntry"), 2147483647)]]);
|
|
3982
4226
|
|
|
3983
|
-
// === xdr source ============================================================
|
|
3984
|
-
//
|
|
3985
|
-
// enum BucketEntryType
|
|
3986
|
-
// {
|
|
3987
|
-
// METAENTRY =
|
|
3988
|
-
// -1, // At-and-after protocol 11: bucket metadata, should come first.
|
|
3989
|
-
// LIVEENTRY = 0, // Before protocol 11: created-or-updated;
|
|
3990
|
-
// // At-and-after protocol 11: only updated.
|
|
3991
|
-
// DEADENTRY = 1,
|
|
3992
|
-
// INITENTRY = 2 // At-and-after protocol 11: only created.
|
|
3993
|
-
// };
|
|
3994
|
-
//
|
|
3995
|
-
// ===========================================================================
|
|
3996
|
-
xdr["enum"]("BucketEntryType", {
|
|
3997
|
-
metaentry: -1,
|
|
3998
|
-
liveentry: 0,
|
|
3999
|
-
deadentry: 1,
|
|
4000
|
-
initentry: 2
|
|
4001
|
-
});
|
|
4002
|
-
|
|
4003
|
-
// === xdr source ============================================================
|
|
4004
|
-
//
|
|
4005
|
-
// union switch (int v)
|
|
4006
|
-
// {
|
|
4007
|
-
// case 0:
|
|
4008
|
-
// void;
|
|
4009
|
-
// }
|
|
4010
|
-
//
|
|
4011
|
-
// ===========================================================================
|
|
4012
|
-
xdr.union("BucketMetadataExt", {
|
|
4013
|
-
switchOn: xdr["int"](),
|
|
4014
|
-
switchName: "v",
|
|
4015
|
-
switches: [[0, xdr["void"]()]],
|
|
4016
|
-
arms: {}
|
|
4017
|
-
});
|
|
4018
|
-
|
|
4019
|
-
// === xdr source ============================================================
|
|
4020
|
-
//
|
|
4021
|
-
// struct BucketMetadata
|
|
4022
|
-
// {
|
|
4023
|
-
// // Indicates the protocol version used to create / merge this bucket.
|
|
4024
|
-
// uint32 ledgerVersion;
|
|
4025
|
-
//
|
|
4026
|
-
// // reserved for future use
|
|
4027
|
-
// union switch (int v)
|
|
4028
|
-
// {
|
|
4029
|
-
// case 0:
|
|
4030
|
-
// void;
|
|
4031
|
-
// }
|
|
4032
|
-
// ext;
|
|
4033
|
-
// };
|
|
4034
|
-
//
|
|
4035
|
-
// ===========================================================================
|
|
4036
|
-
xdr.struct("BucketMetadata", [["ledgerVersion", xdr.lookup("Uint32")], ["ext", xdr.lookup("BucketMetadataExt")]]);
|
|
4037
|
-
|
|
4038
|
-
// === xdr source ============================================================
|
|
4039
|
-
//
|
|
4040
|
-
// union BucketEntry switch (BucketEntryType type)
|
|
4041
|
-
// {
|
|
4042
|
-
// case LIVEENTRY:
|
|
4043
|
-
// case INITENTRY:
|
|
4044
|
-
// LedgerEntry liveEntry;
|
|
4045
|
-
//
|
|
4046
|
-
// case DEADENTRY:
|
|
4047
|
-
// LedgerKey deadEntry;
|
|
4048
|
-
// case METAENTRY:
|
|
4049
|
-
// BucketMetadata metaEntry;
|
|
4050
|
-
// };
|
|
4051
|
-
//
|
|
4052
|
-
// ===========================================================================
|
|
4053
|
-
xdr.union("BucketEntry", {
|
|
4054
|
-
switchOn: xdr.lookup("BucketEntryType"),
|
|
4055
|
-
switchName: "type",
|
|
4056
|
-
switches: [["liveentry", "liveEntry"], ["initentry", "liveEntry"], ["deadentry", "deadEntry"], ["metaentry", "metaEntry"]],
|
|
4057
|
-
arms: {
|
|
4058
|
-
liveEntry: xdr.lookup("LedgerEntry"),
|
|
4059
|
-
deadEntry: xdr.lookup("LedgerKey"),
|
|
4060
|
-
metaEntry: xdr.lookup("BucketMetadata")
|
|
4061
|
-
}
|
|
4062
|
-
});
|
|
4063
|
-
|
|
4064
4227
|
// === xdr source ============================================================
|
|
4065
4228
|
//
|
|
4066
4229
|
// enum TxSetComponentType
|
|
@@ -4512,6 +4675,13 @@ var types = xdr.config(function (xdr) {
|
|
|
4512
4675
|
// ===========================================================================
|
|
4513
4676
|
xdr.struct("DiagnosticEvent", [["inSuccessfulContractCall", xdr.bool()], ["event", xdr.lookup("ContractEvent")]]);
|
|
4514
4677
|
|
|
4678
|
+
// === xdr source ============================================================
|
|
4679
|
+
//
|
|
4680
|
+
// typedef DiagnosticEvent DiagnosticEvents<>;
|
|
4681
|
+
//
|
|
4682
|
+
// ===========================================================================
|
|
4683
|
+
xdr.typedef("DiagnosticEvents", xdr.varArray(xdr.lookup("DiagnosticEvent"), 2147483647));
|
|
4684
|
+
|
|
4515
4685
|
// === xdr source ============================================================
|
|
4516
4686
|
//
|
|
4517
4687
|
// struct SorobanTransactionMetaExtV1
|
|
@@ -4966,7 +5136,12 @@ var types = xdr.config(function (xdr) {
|
|
|
4966
5136
|
// SEND_MORE_EXTENDED = 20,
|
|
4967
5137
|
//
|
|
4968
5138
|
// FLOOD_ADVERT = 18,
|
|
4969
|
-
// FLOOD_DEMAND = 19
|
|
5139
|
+
// FLOOD_DEMAND = 19,
|
|
5140
|
+
//
|
|
5141
|
+
// TIME_SLICED_SURVEY_REQUEST = 21,
|
|
5142
|
+
// TIME_SLICED_SURVEY_RESPONSE = 22,
|
|
5143
|
+
// TIME_SLICED_SURVEY_START_COLLECTING = 23,
|
|
5144
|
+
// TIME_SLICED_SURVEY_STOP_COLLECTING = 24
|
|
4970
5145
|
// };
|
|
4971
5146
|
//
|
|
4972
5147
|
// ===========================================================================
|
|
@@ -4990,7 +5165,11 @@ var types = xdr.config(function (xdr) {
|
|
|
4990
5165
|
sendMore: 16,
|
|
4991
5166
|
sendMoreExtended: 20,
|
|
4992
5167
|
floodAdvert: 18,
|
|
4993
|
-
floodDemand: 19
|
|
5168
|
+
floodDemand: 19,
|
|
5169
|
+
timeSlicedSurveyRequest: 21,
|
|
5170
|
+
timeSlicedSurveyResponse: 22,
|
|
5171
|
+
timeSlicedSurveyStartCollecting: 23,
|
|
5172
|
+
timeSlicedSurveyStopCollecting: 24
|
|
4994
5173
|
});
|
|
4995
5174
|
|
|
4996
5175
|
// === xdr source ============================================================
|
|
@@ -5008,12 +5187,14 @@ var types = xdr.config(function (xdr) {
|
|
|
5008
5187
|
//
|
|
5009
5188
|
// enum SurveyMessageCommandType
|
|
5010
5189
|
// {
|
|
5011
|
-
// SURVEY_TOPOLOGY = 0
|
|
5190
|
+
// SURVEY_TOPOLOGY = 0,
|
|
5191
|
+
// TIME_SLICED_SURVEY_TOPOLOGY = 1
|
|
5012
5192
|
// };
|
|
5013
5193
|
//
|
|
5014
5194
|
// ===========================================================================
|
|
5015
5195
|
xdr["enum"]("SurveyMessageCommandType", {
|
|
5016
|
-
surveyTopology: 0
|
|
5196
|
+
surveyTopology: 0,
|
|
5197
|
+
timeSlicedSurveyTopology: 1
|
|
5017
5198
|
});
|
|
5018
5199
|
|
|
5019
5200
|
// === xdr source ============================================================
|
|
@@ -5021,15 +5202,63 @@ var types = xdr.config(function (xdr) {
|
|
|
5021
5202
|
// enum SurveyMessageResponseType
|
|
5022
5203
|
// {
|
|
5023
5204
|
// SURVEY_TOPOLOGY_RESPONSE_V0 = 0,
|
|
5024
|
-
// SURVEY_TOPOLOGY_RESPONSE_V1 = 1
|
|
5205
|
+
// SURVEY_TOPOLOGY_RESPONSE_V1 = 1,
|
|
5206
|
+
// SURVEY_TOPOLOGY_RESPONSE_V2 = 2
|
|
5025
5207
|
// };
|
|
5026
5208
|
//
|
|
5027
5209
|
// ===========================================================================
|
|
5028
5210
|
xdr["enum"]("SurveyMessageResponseType", {
|
|
5029
5211
|
surveyTopologyResponseV0: 0,
|
|
5030
|
-
surveyTopologyResponseV1: 1
|
|
5212
|
+
surveyTopologyResponseV1: 1,
|
|
5213
|
+
surveyTopologyResponseV2: 2
|
|
5031
5214
|
});
|
|
5032
5215
|
|
|
5216
|
+
// === xdr source ============================================================
|
|
5217
|
+
//
|
|
5218
|
+
// struct TimeSlicedSurveyStartCollectingMessage
|
|
5219
|
+
// {
|
|
5220
|
+
// NodeID surveyorID;
|
|
5221
|
+
// uint32 nonce;
|
|
5222
|
+
// uint32 ledgerNum;
|
|
5223
|
+
// };
|
|
5224
|
+
//
|
|
5225
|
+
// ===========================================================================
|
|
5226
|
+
xdr.struct("TimeSlicedSurveyStartCollectingMessage", [["surveyorId", xdr.lookup("NodeId")], ["nonce", xdr.lookup("Uint32")], ["ledgerNum", xdr.lookup("Uint32")]]);
|
|
5227
|
+
|
|
5228
|
+
// === xdr source ============================================================
|
|
5229
|
+
//
|
|
5230
|
+
// struct SignedTimeSlicedSurveyStartCollectingMessage
|
|
5231
|
+
// {
|
|
5232
|
+
// Signature signature;
|
|
5233
|
+
// TimeSlicedSurveyStartCollectingMessage startCollecting;
|
|
5234
|
+
// };
|
|
5235
|
+
//
|
|
5236
|
+
// ===========================================================================
|
|
5237
|
+
xdr.struct("SignedTimeSlicedSurveyStartCollectingMessage", [["signature", xdr.lookup("Signature")], ["startCollecting", xdr.lookup("TimeSlicedSurveyStartCollectingMessage")]]);
|
|
5238
|
+
|
|
5239
|
+
// === xdr source ============================================================
|
|
5240
|
+
//
|
|
5241
|
+
// struct TimeSlicedSurveyStopCollectingMessage
|
|
5242
|
+
// {
|
|
5243
|
+
// NodeID surveyorID;
|
|
5244
|
+
// uint32 nonce;
|
|
5245
|
+
// uint32 ledgerNum;
|
|
5246
|
+
// };
|
|
5247
|
+
//
|
|
5248
|
+
// ===========================================================================
|
|
5249
|
+
xdr.struct("TimeSlicedSurveyStopCollectingMessage", [["surveyorId", xdr.lookup("NodeId")], ["nonce", xdr.lookup("Uint32")], ["ledgerNum", xdr.lookup("Uint32")]]);
|
|
5250
|
+
|
|
5251
|
+
// === xdr source ============================================================
|
|
5252
|
+
//
|
|
5253
|
+
// struct SignedTimeSlicedSurveyStopCollectingMessage
|
|
5254
|
+
// {
|
|
5255
|
+
// Signature signature;
|
|
5256
|
+
// TimeSlicedSurveyStopCollectingMessage stopCollecting;
|
|
5257
|
+
// };
|
|
5258
|
+
//
|
|
5259
|
+
// ===========================================================================
|
|
5260
|
+
xdr.struct("SignedTimeSlicedSurveyStopCollectingMessage", [["signature", xdr.lookup("Signature")], ["stopCollecting", xdr.lookup("TimeSlicedSurveyStopCollectingMessage")]]);
|
|
5261
|
+
|
|
5033
5262
|
// === xdr source ============================================================
|
|
5034
5263
|
//
|
|
5035
5264
|
// struct SurveyRequestMessage
|
|
@@ -5044,6 +5273,19 @@ var types = xdr.config(function (xdr) {
|
|
|
5044
5273
|
// ===========================================================================
|
|
5045
5274
|
xdr.struct("SurveyRequestMessage", [["surveyorPeerId", xdr.lookup("NodeId")], ["surveyedPeerId", xdr.lookup("NodeId")], ["ledgerNum", xdr.lookup("Uint32")], ["encryptionKey", xdr.lookup("Curve25519Public")], ["commandType", xdr.lookup("SurveyMessageCommandType")]]);
|
|
5046
5275
|
|
|
5276
|
+
// === xdr source ============================================================
|
|
5277
|
+
//
|
|
5278
|
+
// struct TimeSlicedSurveyRequestMessage
|
|
5279
|
+
// {
|
|
5280
|
+
// SurveyRequestMessage request;
|
|
5281
|
+
// uint32 nonce;
|
|
5282
|
+
// uint32 inboundPeersIndex;
|
|
5283
|
+
// uint32 outboundPeersIndex;
|
|
5284
|
+
// };
|
|
5285
|
+
//
|
|
5286
|
+
// ===========================================================================
|
|
5287
|
+
xdr.struct("TimeSlicedSurveyRequestMessage", [["request", xdr.lookup("SurveyRequestMessage")], ["nonce", xdr.lookup("Uint32")], ["inboundPeersIndex", xdr.lookup("Uint32")], ["outboundPeersIndex", xdr.lookup("Uint32")]]);
|
|
5288
|
+
|
|
5047
5289
|
// === xdr source ============================================================
|
|
5048
5290
|
//
|
|
5049
5291
|
// struct SignedSurveyRequestMessage
|
|
@@ -5055,6 +5297,17 @@ var types = xdr.config(function (xdr) {
|
|
|
5055
5297
|
// ===========================================================================
|
|
5056
5298
|
xdr.struct("SignedSurveyRequestMessage", [["requestSignature", xdr.lookup("Signature")], ["request", xdr.lookup("SurveyRequestMessage")]]);
|
|
5057
5299
|
|
|
5300
|
+
// === xdr source ============================================================
|
|
5301
|
+
//
|
|
5302
|
+
// struct SignedTimeSlicedSurveyRequestMessage
|
|
5303
|
+
// {
|
|
5304
|
+
// Signature requestSignature;
|
|
5305
|
+
// TimeSlicedSurveyRequestMessage request;
|
|
5306
|
+
// };
|
|
5307
|
+
//
|
|
5308
|
+
// ===========================================================================
|
|
5309
|
+
xdr.struct("SignedTimeSlicedSurveyRequestMessage", [["requestSignature", xdr.lookup("Signature")], ["request", xdr.lookup("TimeSlicedSurveyRequestMessage")]]);
|
|
5310
|
+
|
|
5058
5311
|
// === xdr source ============================================================
|
|
5059
5312
|
//
|
|
5060
5313
|
// typedef opaque EncryptedBody<64000>;
|
|
@@ -5076,6 +5329,17 @@ var types = xdr.config(function (xdr) {
|
|
|
5076
5329
|
// ===========================================================================
|
|
5077
5330
|
xdr.struct("SurveyResponseMessage", [["surveyorPeerId", xdr.lookup("NodeId")], ["surveyedPeerId", xdr.lookup("NodeId")], ["ledgerNum", xdr.lookup("Uint32")], ["commandType", xdr.lookup("SurveyMessageCommandType")], ["encryptedBody", xdr.lookup("EncryptedBody")]]);
|
|
5078
5331
|
|
|
5332
|
+
// === xdr source ============================================================
|
|
5333
|
+
//
|
|
5334
|
+
// struct TimeSlicedSurveyResponseMessage
|
|
5335
|
+
// {
|
|
5336
|
+
// SurveyResponseMessage response;
|
|
5337
|
+
// uint32 nonce;
|
|
5338
|
+
// };
|
|
5339
|
+
//
|
|
5340
|
+
// ===========================================================================
|
|
5341
|
+
xdr.struct("TimeSlicedSurveyResponseMessage", [["response", xdr.lookup("SurveyResponseMessage")], ["nonce", xdr.lookup("Uint32")]]);
|
|
5342
|
+
|
|
5079
5343
|
// === xdr source ============================================================
|
|
5080
5344
|
//
|
|
5081
5345
|
// struct SignedSurveyResponseMessage
|
|
@@ -5087,6 +5351,17 @@ var types = xdr.config(function (xdr) {
|
|
|
5087
5351
|
// ===========================================================================
|
|
5088
5352
|
xdr.struct("SignedSurveyResponseMessage", [["responseSignature", xdr.lookup("Signature")], ["response", xdr.lookup("SurveyResponseMessage")]]);
|
|
5089
5353
|
|
|
5354
|
+
// === xdr source ============================================================
|
|
5355
|
+
//
|
|
5356
|
+
// struct SignedTimeSlicedSurveyResponseMessage
|
|
5357
|
+
// {
|
|
5358
|
+
// Signature responseSignature;
|
|
5359
|
+
// TimeSlicedSurveyResponseMessage response;
|
|
5360
|
+
// };
|
|
5361
|
+
//
|
|
5362
|
+
// ===========================================================================
|
|
5363
|
+
xdr.struct("SignedTimeSlicedSurveyResponseMessage", [["responseSignature", xdr.lookup("Signature")], ["response", xdr.lookup("TimeSlicedSurveyResponseMessage")]]);
|
|
5364
|
+
|
|
5090
5365
|
// === xdr source ============================================================
|
|
5091
5366
|
//
|
|
5092
5367
|
// struct PeerStats
|
|
@@ -5120,6 +5395,49 @@ var types = xdr.config(function (xdr) {
|
|
|
5120
5395
|
// ===========================================================================
|
|
5121
5396
|
xdr.typedef("PeerStatList", xdr.varArray(xdr.lookup("PeerStats"), 25));
|
|
5122
5397
|
|
|
5398
|
+
// === xdr source ============================================================
|
|
5399
|
+
//
|
|
5400
|
+
// struct TimeSlicedNodeData
|
|
5401
|
+
// {
|
|
5402
|
+
// uint32 addedAuthenticatedPeers;
|
|
5403
|
+
// uint32 droppedAuthenticatedPeers;
|
|
5404
|
+
// uint32 totalInboundPeerCount;
|
|
5405
|
+
// uint32 totalOutboundPeerCount;
|
|
5406
|
+
//
|
|
5407
|
+
// // SCP stats
|
|
5408
|
+
// uint32 p75SCPFirstToSelfLatencyMs;
|
|
5409
|
+
// uint32 p75SCPSelfToOtherLatencyMs;
|
|
5410
|
+
//
|
|
5411
|
+
// // How many times the node lost sync in the time slice
|
|
5412
|
+
// uint32 lostSyncCount;
|
|
5413
|
+
//
|
|
5414
|
+
// // Config data
|
|
5415
|
+
// bool isValidator;
|
|
5416
|
+
// uint32 maxInboundPeerCount;
|
|
5417
|
+
// uint32 maxOutboundPeerCount;
|
|
5418
|
+
// };
|
|
5419
|
+
//
|
|
5420
|
+
// ===========================================================================
|
|
5421
|
+
xdr.struct("TimeSlicedNodeData", [["addedAuthenticatedPeers", xdr.lookup("Uint32")], ["droppedAuthenticatedPeers", xdr.lookup("Uint32")], ["totalInboundPeerCount", xdr.lookup("Uint32")], ["totalOutboundPeerCount", xdr.lookup("Uint32")], ["p75ScpFirstToSelfLatencyMs", xdr.lookup("Uint32")], ["p75ScpSelfToOtherLatencyMs", xdr.lookup("Uint32")], ["lostSyncCount", xdr.lookup("Uint32")], ["isValidator", xdr.bool()], ["maxInboundPeerCount", xdr.lookup("Uint32")], ["maxOutboundPeerCount", xdr.lookup("Uint32")]]);
|
|
5422
|
+
|
|
5423
|
+
// === xdr source ============================================================
|
|
5424
|
+
//
|
|
5425
|
+
// struct TimeSlicedPeerData
|
|
5426
|
+
// {
|
|
5427
|
+
// PeerStats peerStats;
|
|
5428
|
+
// uint32 averageLatencyMs;
|
|
5429
|
+
// };
|
|
5430
|
+
//
|
|
5431
|
+
// ===========================================================================
|
|
5432
|
+
xdr.struct("TimeSlicedPeerData", [["peerStats", xdr.lookup("PeerStats")], ["averageLatencyMs", xdr.lookup("Uint32")]]);
|
|
5433
|
+
|
|
5434
|
+
// === xdr source ============================================================
|
|
5435
|
+
//
|
|
5436
|
+
// typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>;
|
|
5437
|
+
//
|
|
5438
|
+
// ===========================================================================
|
|
5439
|
+
xdr.typedef("TimeSlicedPeerDataList", xdr.varArray(xdr.lookup("TimeSlicedPeerData"), 25));
|
|
5440
|
+
|
|
5123
5441
|
// === xdr source ============================================================
|
|
5124
5442
|
//
|
|
5125
5443
|
// struct TopologyResponseBodyV0
|
|
@@ -5151,6 +5469,18 @@ var types = xdr.config(function (xdr) {
|
|
|
5151
5469
|
// ===========================================================================
|
|
5152
5470
|
xdr.struct("TopologyResponseBodyV1", [["inboundPeers", xdr.lookup("PeerStatList")], ["outboundPeers", xdr.lookup("PeerStatList")], ["totalInboundPeerCount", xdr.lookup("Uint32")], ["totalOutboundPeerCount", xdr.lookup("Uint32")], ["maxInboundPeerCount", xdr.lookup("Uint32")], ["maxOutboundPeerCount", xdr.lookup("Uint32")]]);
|
|
5153
5471
|
|
|
5472
|
+
// === xdr source ============================================================
|
|
5473
|
+
//
|
|
5474
|
+
// struct TopologyResponseBodyV2
|
|
5475
|
+
// {
|
|
5476
|
+
// TimeSlicedPeerDataList inboundPeers;
|
|
5477
|
+
// TimeSlicedPeerDataList outboundPeers;
|
|
5478
|
+
// TimeSlicedNodeData nodeData;
|
|
5479
|
+
// };
|
|
5480
|
+
//
|
|
5481
|
+
// ===========================================================================
|
|
5482
|
+
xdr.struct("TopologyResponseBodyV2", [["inboundPeers", xdr.lookup("TimeSlicedPeerDataList")], ["outboundPeers", xdr.lookup("TimeSlicedPeerDataList")], ["nodeData", xdr.lookup("TimeSlicedNodeData")]]);
|
|
5483
|
+
|
|
5154
5484
|
// === xdr source ============================================================
|
|
5155
5485
|
//
|
|
5156
5486
|
// union SurveyResponseBody switch (SurveyMessageResponseType type)
|
|
@@ -5159,16 +5489,19 @@ var types = xdr.config(function (xdr) {
|
|
|
5159
5489
|
// TopologyResponseBodyV0 topologyResponseBodyV0;
|
|
5160
5490
|
// case SURVEY_TOPOLOGY_RESPONSE_V1:
|
|
5161
5491
|
// TopologyResponseBodyV1 topologyResponseBodyV1;
|
|
5492
|
+
// case SURVEY_TOPOLOGY_RESPONSE_V2:
|
|
5493
|
+
// TopologyResponseBodyV2 topologyResponseBodyV2;
|
|
5162
5494
|
// };
|
|
5163
5495
|
//
|
|
5164
5496
|
// ===========================================================================
|
|
5165
5497
|
xdr.union("SurveyResponseBody", {
|
|
5166
5498
|
switchOn: xdr.lookup("SurveyMessageResponseType"),
|
|
5167
5499
|
switchName: "type",
|
|
5168
|
-
switches: [["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"]],
|
|
5500
|
+
switches: [["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"], ["surveyTopologyResponseV2", "topologyResponseBodyV2"]],
|
|
5169
5501
|
arms: {
|
|
5170
5502
|
topologyResponseBodyV0: xdr.lookup("TopologyResponseBodyV0"),
|
|
5171
|
-
topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1")
|
|
5503
|
+
topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1"),
|
|
5504
|
+
topologyResponseBodyV2: xdr.lookup("TopologyResponseBodyV2")
|
|
5172
5505
|
}
|
|
5173
5506
|
});
|
|
5174
5507
|
|
|
@@ -5253,6 +5586,20 @@ var types = xdr.config(function (xdr) {
|
|
|
5253
5586
|
// case SURVEY_RESPONSE:
|
|
5254
5587
|
// SignedSurveyResponseMessage signedSurveyResponseMessage;
|
|
5255
5588
|
//
|
|
5589
|
+
// case TIME_SLICED_SURVEY_REQUEST:
|
|
5590
|
+
// SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage;
|
|
5591
|
+
//
|
|
5592
|
+
// case TIME_SLICED_SURVEY_RESPONSE:
|
|
5593
|
+
// SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage;
|
|
5594
|
+
//
|
|
5595
|
+
// case TIME_SLICED_SURVEY_START_COLLECTING:
|
|
5596
|
+
// SignedTimeSlicedSurveyStartCollectingMessage
|
|
5597
|
+
// signedTimeSlicedSurveyStartCollectingMessage;
|
|
5598
|
+
//
|
|
5599
|
+
// case TIME_SLICED_SURVEY_STOP_COLLECTING:
|
|
5600
|
+
// SignedTimeSlicedSurveyStopCollectingMessage
|
|
5601
|
+
// signedTimeSlicedSurveyStopCollectingMessage;
|
|
5602
|
+
//
|
|
5256
5603
|
// // SCP
|
|
5257
5604
|
// case GET_SCP_QUORUMSET:
|
|
5258
5605
|
// uint256 qSetHash;
|
|
@@ -5277,7 +5624,7 @@ var types = xdr.config(function (xdr) {
|
|
|
5277
5624
|
xdr.union("StellarMessage", {
|
|
5278
5625
|
switchOn: xdr.lookup("MessageType"),
|
|
5279
5626
|
switchName: "type",
|
|
5280
|
-
switches: [["errorMsg", "error"], ["hello", "hello"], ["auth", "auth"], ["dontHave", "dontHave"], ["getPeers", xdr["void"]()], ["peers", "peers"], ["getTxSet", "txSetHash"], ["txSet", "txSet"], ["generalizedTxSet", "generalizedTxSet"], ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], ["sendMoreExtended", "sendMoreExtendedMessage"], ["floodAdvert", "floodAdvert"], ["floodDemand", "floodDemand"]],
|
|
5627
|
+
switches: [["errorMsg", "error"], ["hello", "hello"], ["auth", "auth"], ["dontHave", "dontHave"], ["getPeers", xdr["void"]()], ["peers", "peers"], ["getTxSet", "txSetHash"], ["txSet", "txSet"], ["generalizedTxSet", "generalizedTxSet"], ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], ["timeSlicedSurveyRequest", "signedTimeSlicedSurveyRequestMessage"], ["timeSlicedSurveyResponse", "signedTimeSlicedSurveyResponseMessage"], ["timeSlicedSurveyStartCollecting", "signedTimeSlicedSurveyStartCollectingMessage"], ["timeSlicedSurveyStopCollecting", "signedTimeSlicedSurveyStopCollectingMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], ["sendMoreExtended", "sendMoreExtendedMessage"], ["floodAdvert", "floodAdvert"], ["floodDemand", "floodDemand"]],
|
|
5281
5628
|
arms: {
|
|
5282
5629
|
error: xdr.lookup("Error"),
|
|
5283
5630
|
hello: xdr.lookup("Hello"),
|
|
@@ -5290,6 +5637,10 @@ var types = xdr.config(function (xdr) {
|
|
|
5290
5637
|
transaction: xdr.lookup("TransactionEnvelope"),
|
|
5291
5638
|
signedSurveyRequestMessage: xdr.lookup("SignedSurveyRequestMessage"),
|
|
5292
5639
|
signedSurveyResponseMessage: xdr.lookup("SignedSurveyResponseMessage"),
|
|
5640
|
+
signedTimeSlicedSurveyRequestMessage: xdr.lookup("SignedTimeSlicedSurveyRequestMessage"),
|
|
5641
|
+
signedTimeSlicedSurveyResponseMessage: xdr.lookup("SignedTimeSlicedSurveyResponseMessage"),
|
|
5642
|
+
signedTimeSlicedSurveyStartCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStartCollectingMessage"),
|
|
5643
|
+
signedTimeSlicedSurveyStopCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStopCollectingMessage"),
|
|
5293
5644
|
qSetHash: xdr.lookup("Uint256"),
|
|
5294
5645
|
qSet: xdr.lookup("ScpQuorumSet"),
|
|
5295
5646
|
envelope: xdr.lookup("ScpEnvelope"),
|
|
@@ -5841,14 +6192,16 @@ var types = xdr.config(function (xdr) {
|
|
|
5841
6192
|
// {
|
|
5842
6193
|
// HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0,
|
|
5843
6194
|
// HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1,
|
|
5844
|
-
// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2
|
|
6195
|
+
// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2,
|
|
6196
|
+
// HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3
|
|
5845
6197
|
// };
|
|
5846
6198
|
//
|
|
5847
6199
|
// ===========================================================================
|
|
5848
6200
|
xdr["enum"]("HostFunctionType", {
|
|
5849
6201
|
hostFunctionTypeInvokeContract: 0,
|
|
5850
6202
|
hostFunctionTypeCreateContract: 1,
|
|
5851
|
-
hostFunctionTypeUploadContractWasm: 2
|
|
6203
|
+
hostFunctionTypeUploadContractWasm: 2,
|
|
6204
|
+
hostFunctionTypeCreateContractV2: 3
|
|
5852
6205
|
});
|
|
5853
6206
|
|
|
5854
6207
|
// === xdr source ============================================================
|
|
@@ -5912,6 +6265,19 @@ var types = xdr.config(function (xdr) {
|
|
|
5912
6265
|
// ===========================================================================
|
|
5913
6266
|
xdr.struct("CreateContractArgs", [["contractIdPreimage", xdr.lookup("ContractIdPreimage")], ["executable", xdr.lookup("ContractExecutable")]]);
|
|
5914
6267
|
|
|
6268
|
+
// === xdr source ============================================================
|
|
6269
|
+
//
|
|
6270
|
+
// struct CreateContractArgsV2
|
|
6271
|
+
// {
|
|
6272
|
+
// ContractIDPreimage contractIDPreimage;
|
|
6273
|
+
// ContractExecutable executable;
|
|
6274
|
+
// // Arguments of the contract's constructor.
|
|
6275
|
+
// SCVal constructorArgs<>;
|
|
6276
|
+
// };
|
|
6277
|
+
//
|
|
6278
|
+
// ===========================================================================
|
|
6279
|
+
xdr.struct("CreateContractArgsV2", [["contractIdPreimage", xdr.lookup("ContractIdPreimage")], ["executable", xdr.lookup("ContractExecutable")], ["constructorArgs", xdr.varArray(xdr.lookup("ScVal"), 2147483647)]]);
|
|
6280
|
+
|
|
5915
6281
|
// === xdr source ============================================================
|
|
5916
6282
|
//
|
|
5917
6283
|
// struct InvokeContractArgs {
|
|
@@ -5933,17 +6299,20 @@ var types = xdr.config(function (xdr) {
|
|
|
5933
6299
|
// CreateContractArgs createContract;
|
|
5934
6300
|
// case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM:
|
|
5935
6301
|
// opaque wasm<>;
|
|
6302
|
+
// case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2:
|
|
6303
|
+
// CreateContractArgsV2 createContractV2;
|
|
5936
6304
|
// };
|
|
5937
6305
|
//
|
|
5938
6306
|
// ===========================================================================
|
|
5939
6307
|
xdr.union("HostFunction", {
|
|
5940
6308
|
switchOn: xdr.lookup("HostFunctionType"),
|
|
5941
6309
|
switchName: "type",
|
|
5942
|
-
switches: [["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"]],
|
|
6310
|
+
switches: [["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"], ["hostFunctionTypeCreateContractV2", "createContractV2"]],
|
|
5943
6311
|
arms: {
|
|
5944
6312
|
invokeContract: xdr.lookup("InvokeContractArgs"),
|
|
5945
6313
|
createContract: xdr.lookup("CreateContractArgs"),
|
|
5946
|
-
wasm: xdr.varOpaque()
|
|
6314
|
+
wasm: xdr.varOpaque(),
|
|
6315
|
+
createContractV2: xdr.lookup("CreateContractArgsV2")
|
|
5947
6316
|
}
|
|
5948
6317
|
});
|
|
5949
6318
|
|
|
@@ -5952,13 +6321,15 @@ var types = xdr.config(function (xdr) {
|
|
|
5952
6321
|
// enum SorobanAuthorizedFunctionType
|
|
5953
6322
|
// {
|
|
5954
6323
|
// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0,
|
|
5955
|
-
// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1
|
|
6324
|
+
// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1,
|
|
6325
|
+
// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2
|
|
5956
6326
|
// };
|
|
5957
6327
|
//
|
|
5958
6328
|
// ===========================================================================
|
|
5959
6329
|
xdr["enum"]("SorobanAuthorizedFunctionType", {
|
|
5960
6330
|
sorobanAuthorizedFunctionTypeContractFn: 0,
|
|
5961
|
-
sorobanAuthorizedFunctionTypeCreateContractHostFn: 1
|
|
6331
|
+
sorobanAuthorizedFunctionTypeCreateContractHostFn: 1,
|
|
6332
|
+
sorobanAuthorizedFunctionTypeCreateContractV2HostFn: 2
|
|
5962
6333
|
});
|
|
5963
6334
|
|
|
5964
6335
|
// === xdr source ============================================================
|
|
@@ -5967,18 +6338,29 @@ var types = xdr.config(function (xdr) {
|
|
|
5967
6338
|
// {
|
|
5968
6339
|
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN:
|
|
5969
6340
|
// InvokeContractArgs contractFn;
|
|
6341
|
+
// // This variant of auth payload for creating new contract instances
|
|
6342
|
+
// // doesn't allow specifying the constructor arguments, creating contracts
|
|
6343
|
+
// // with constructors that take arguments is only possible by authorizing
|
|
6344
|
+
// // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN`
|
|
6345
|
+
// // (protocol 22+).
|
|
5970
6346
|
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
|
|
5971
6347
|
// CreateContractArgs createContractHostFn;
|
|
6348
|
+
// // This variant of auth payload for creating new contract instances
|
|
6349
|
+
// // is only accepted in and after protocol 22. It allows authorizing the
|
|
6350
|
+
// // contract constructor arguments.
|
|
6351
|
+
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN:
|
|
6352
|
+
// CreateContractArgsV2 createContractV2HostFn;
|
|
5972
6353
|
// };
|
|
5973
6354
|
//
|
|
5974
6355
|
// ===========================================================================
|
|
5975
6356
|
xdr.union("SorobanAuthorizedFunction", {
|
|
5976
6357
|
switchOn: xdr.lookup("SorobanAuthorizedFunctionType"),
|
|
5977
6358
|
switchName: "type",
|
|
5978
|
-
switches: [["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"]],
|
|
6359
|
+
switches: [["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"], ["sorobanAuthorizedFunctionTypeCreateContractV2HostFn", "createContractV2HostFn"]],
|
|
5979
6360
|
arms: {
|
|
5980
6361
|
contractFn: xdr.lookup("InvokeContractArgs"),
|
|
5981
|
-
createContractHostFn: xdr.lookup("CreateContractArgs")
|
|
6362
|
+
createContractHostFn: xdr.lookup("CreateContractArgs"),
|
|
6363
|
+
createContractV2HostFn: xdr.lookup("CreateContractArgsV2")
|
|
5982
6364
|
}
|
|
5983
6365
|
});
|
|
5984
6366
|
|
|
@@ -6509,6 +6891,110 @@ var types = xdr.config(function (xdr) {
|
|
|
6509
6891
|
// ===========================================================================
|
|
6510
6892
|
xdr.struct("LedgerFootprint", [["readOnly", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ["readWrite", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)]]);
|
|
6511
6893
|
|
|
6894
|
+
// === xdr source ============================================================
|
|
6895
|
+
//
|
|
6896
|
+
// enum ArchivalProofType
|
|
6897
|
+
// {
|
|
6898
|
+
// EXISTENCE = 0,
|
|
6899
|
+
// NONEXISTENCE = 1
|
|
6900
|
+
// };
|
|
6901
|
+
//
|
|
6902
|
+
// ===========================================================================
|
|
6903
|
+
xdr["enum"]("ArchivalProofType", {
|
|
6904
|
+
existence: 0,
|
|
6905
|
+
nonexistence: 1
|
|
6906
|
+
});
|
|
6907
|
+
|
|
6908
|
+
// === xdr source ============================================================
|
|
6909
|
+
//
|
|
6910
|
+
// struct ArchivalProofNode
|
|
6911
|
+
// {
|
|
6912
|
+
// uint32 index;
|
|
6913
|
+
// Hash hash;
|
|
6914
|
+
// };
|
|
6915
|
+
//
|
|
6916
|
+
// ===========================================================================
|
|
6917
|
+
xdr.struct("ArchivalProofNode", [["index", xdr.lookup("Uint32")], ["hash", xdr.lookup("Hash")]]);
|
|
6918
|
+
|
|
6919
|
+
// === xdr source ============================================================
|
|
6920
|
+
//
|
|
6921
|
+
// typedef ArchivalProofNode ProofLevel<>;
|
|
6922
|
+
//
|
|
6923
|
+
// ===========================================================================
|
|
6924
|
+
xdr.typedef("ProofLevel", xdr.varArray(xdr.lookup("ArchivalProofNode"), 2147483647));
|
|
6925
|
+
|
|
6926
|
+
// === xdr source ============================================================
|
|
6927
|
+
//
|
|
6928
|
+
// struct NonexistenceProofBody
|
|
6929
|
+
// {
|
|
6930
|
+
// ColdArchiveBucketEntry entriesToProve<>;
|
|
6931
|
+
//
|
|
6932
|
+
// // Vector of vectors, where proofLevels[level]
|
|
6933
|
+
// // contains all HashNodes that correspond with that level
|
|
6934
|
+
// ProofLevel proofLevels<>;
|
|
6935
|
+
// };
|
|
6936
|
+
//
|
|
6937
|
+
// ===========================================================================
|
|
6938
|
+
xdr.struct("NonexistenceProofBody", [["entriesToProve", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)]]);
|
|
6939
|
+
|
|
6940
|
+
// === xdr source ============================================================
|
|
6941
|
+
//
|
|
6942
|
+
// struct ExistenceProofBody
|
|
6943
|
+
// {
|
|
6944
|
+
// LedgerKey keysToProve<>;
|
|
6945
|
+
//
|
|
6946
|
+
// // Bounds for each key being proved, where bound[n]
|
|
6947
|
+
// // corresponds to keysToProve[n]
|
|
6948
|
+
// ColdArchiveBucketEntry lowBoundEntries<>;
|
|
6949
|
+
// ColdArchiveBucketEntry highBoundEntries<>;
|
|
6950
|
+
//
|
|
6951
|
+
// // Vector of vectors, where proofLevels[level]
|
|
6952
|
+
// // contains all HashNodes that correspond with that level
|
|
6953
|
+
// ProofLevel proofLevels<>;
|
|
6954
|
+
// };
|
|
6955
|
+
//
|
|
6956
|
+
// ===========================================================================
|
|
6957
|
+
xdr.struct("ExistenceProofBody", [["keysToProve", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ["lowBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["highBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)]]);
|
|
6958
|
+
|
|
6959
|
+
// === xdr source ============================================================
|
|
6960
|
+
//
|
|
6961
|
+
// union switch (ArchivalProofType t)
|
|
6962
|
+
// {
|
|
6963
|
+
// case EXISTENCE:
|
|
6964
|
+
// NonexistenceProofBody nonexistenceProof;
|
|
6965
|
+
// case NONEXISTENCE:
|
|
6966
|
+
// ExistenceProofBody existenceProof;
|
|
6967
|
+
// }
|
|
6968
|
+
//
|
|
6969
|
+
// ===========================================================================
|
|
6970
|
+
xdr.union("ArchivalProofBody", {
|
|
6971
|
+
switchOn: xdr.lookup("ArchivalProofType"),
|
|
6972
|
+
switchName: "t",
|
|
6973
|
+
switches: [["existence", "nonexistenceProof"], ["nonexistence", "existenceProof"]],
|
|
6974
|
+
arms: {
|
|
6975
|
+
nonexistenceProof: xdr.lookup("NonexistenceProofBody"),
|
|
6976
|
+
existenceProof: xdr.lookup("ExistenceProofBody")
|
|
6977
|
+
}
|
|
6978
|
+
});
|
|
6979
|
+
|
|
6980
|
+
// === xdr source ============================================================
|
|
6981
|
+
//
|
|
6982
|
+
// struct ArchivalProof
|
|
6983
|
+
// {
|
|
6984
|
+
// uint32 epoch; // AST Subtree for this proof
|
|
6985
|
+
//
|
|
6986
|
+
// union switch (ArchivalProofType t)
|
|
6987
|
+
// {
|
|
6988
|
+
// case EXISTENCE:
|
|
6989
|
+
// NonexistenceProofBody nonexistenceProof;
|
|
6990
|
+
// case NONEXISTENCE:
|
|
6991
|
+
// ExistenceProofBody existenceProof;
|
|
6992
|
+
// } body;
|
|
6993
|
+
// };
|
|
6994
|
+
//
|
|
6995
|
+
// ===========================================================================
|
|
6996
|
+
xdr.struct("ArchivalProof", [["epoch", xdr.lookup("Uint32")], ["body", xdr.lookup("ArchivalProofBody")]]);
|
|
6997
|
+
|
|
6512
6998
|
// === xdr source ============================================================
|
|
6513
6999
|
//
|
|
6514
7000
|
// struct SorobanResources
|
|
@@ -9082,6 +9568,56 @@ var types = xdr.config(function (xdr) {
|
|
|
9082
9568
|
// ===========================================================================
|
|
9083
9569
|
xdr.struct("HmacSha256Mac", [["mac", xdr.opaque(32)]]);
|
|
9084
9570
|
|
|
9571
|
+
// === xdr source ============================================================
|
|
9572
|
+
//
|
|
9573
|
+
// struct ShortHashSeed
|
|
9574
|
+
// {
|
|
9575
|
+
// opaque seed[16];
|
|
9576
|
+
// };
|
|
9577
|
+
//
|
|
9578
|
+
// ===========================================================================
|
|
9579
|
+
xdr.struct("ShortHashSeed", [["seed", xdr.opaque(16)]]);
|
|
9580
|
+
|
|
9581
|
+
// === xdr source ============================================================
|
|
9582
|
+
//
|
|
9583
|
+
// enum BinaryFuseFilterType
|
|
9584
|
+
// {
|
|
9585
|
+
// BINARY_FUSE_FILTER_8_BIT = 0,
|
|
9586
|
+
// BINARY_FUSE_FILTER_16_BIT = 1,
|
|
9587
|
+
// BINARY_FUSE_FILTER_32_BIT = 2
|
|
9588
|
+
// };
|
|
9589
|
+
//
|
|
9590
|
+
// ===========================================================================
|
|
9591
|
+
xdr["enum"]("BinaryFuseFilterType", {
|
|
9592
|
+
binaryFuseFilter8Bit: 0,
|
|
9593
|
+
binaryFuseFilter16Bit: 1,
|
|
9594
|
+
binaryFuseFilter32Bit: 2
|
|
9595
|
+
});
|
|
9596
|
+
|
|
9597
|
+
// === xdr source ============================================================
|
|
9598
|
+
//
|
|
9599
|
+
// struct SerializedBinaryFuseFilter
|
|
9600
|
+
// {
|
|
9601
|
+
// BinaryFuseFilterType type;
|
|
9602
|
+
//
|
|
9603
|
+
// // Seed used to hash input to filter
|
|
9604
|
+
// ShortHashSeed inputHashSeed;
|
|
9605
|
+
//
|
|
9606
|
+
// // Seed used for internal filter hash operations
|
|
9607
|
+
// ShortHashSeed filterSeed;
|
|
9608
|
+
// uint32 segmentLength;
|
|
9609
|
+
// uint32 segementLengthMask;
|
|
9610
|
+
// uint32 segmentCount;
|
|
9611
|
+
// uint32 segmentCountLength;
|
|
9612
|
+
// uint32 fingerprintLength; // Length in terms of element count, not bytes
|
|
9613
|
+
//
|
|
9614
|
+
// // Array of uint8_t, uint16_t, or uint32_t depending on filter type
|
|
9615
|
+
// opaque fingerprints<>;
|
|
9616
|
+
// };
|
|
9617
|
+
//
|
|
9618
|
+
// ===========================================================================
|
|
9619
|
+
xdr.struct("SerializedBinaryFuseFilter", [["type", xdr.lookup("BinaryFuseFilterType")], ["inputHashSeed", xdr.lookup("ShortHashSeed")], ["filterSeed", xdr.lookup("ShortHashSeed")], ["segmentLength", xdr.lookup("Uint32")], ["segementLengthMask", xdr.lookup("Uint32")], ["segmentCount", xdr.lookup("Uint32")], ["segmentCountLength", xdr.lookup("Uint32")], ["fingerprintLength", xdr.lookup("Uint32")], ["fingerprints", xdr.varOpaque()]]);
|
|
9620
|
+
|
|
9085
9621
|
// === xdr source ============================================================
|
|
9086
9622
|
//
|
|
9087
9623
|
// enum SCValType
|
|
@@ -9544,12 +10080,25 @@ var types = xdr.config(function (xdr) {
|
|
|
9544
10080
|
scEnvMetaKindInterfaceVersion: 0
|
|
9545
10081
|
});
|
|
9546
10082
|
|
|
10083
|
+
// === xdr source ============================================================
|
|
10084
|
+
//
|
|
10085
|
+
// struct {
|
|
10086
|
+
// uint32 protocol;
|
|
10087
|
+
// uint32 preRelease;
|
|
10088
|
+
// }
|
|
10089
|
+
//
|
|
10090
|
+
// ===========================================================================
|
|
10091
|
+
xdr.struct("ScEnvMetaEntryInterfaceVersion", [["protocol", xdr.lookup("Uint32")], ["preRelease", xdr.lookup("Uint32")]]);
|
|
10092
|
+
|
|
9547
10093
|
// === xdr source ============================================================
|
|
9548
10094
|
//
|
|
9549
10095
|
// union SCEnvMetaEntry switch (SCEnvMetaKind kind)
|
|
9550
10096
|
// {
|
|
9551
10097
|
// case SC_ENV_META_KIND_INTERFACE_VERSION:
|
|
9552
|
-
//
|
|
10098
|
+
// struct {
|
|
10099
|
+
// uint32 protocol;
|
|
10100
|
+
// uint32 preRelease;
|
|
10101
|
+
// } interfaceVersion;
|
|
9553
10102
|
// };
|
|
9554
10103
|
//
|
|
9555
10104
|
// ===========================================================================
|
|
@@ -9558,7 +10107,7 @@ var types = xdr.config(function (xdr) {
|
|
|
9558
10107
|
switchName: "kind",
|
|
9559
10108
|
switches: [["scEnvMetaKindInterfaceVersion", "interfaceVersion"]],
|
|
9560
10109
|
arms: {
|
|
9561
|
-
interfaceVersion: xdr.lookup("
|
|
10110
|
+
interfaceVersion: xdr.lookup("ScEnvMetaEntryInterfaceVersion")
|
|
9562
10111
|
}
|
|
9563
10112
|
});
|
|
9564
10113
|
|
|
@@ -10235,7 +10784,58 @@ var types = xdr.config(function (xdr) {
|
|
|
10235
10784
|
// // point on a 256-bit elliptic curve
|
|
10236
10785
|
// Sec1DecodePointUncompressed = 43,
|
|
10237
10786
|
// // Cost of verifying an ECDSA Secp256r1 signature
|
|
10238
|
-
// VerifyEcdsaSecp256r1Sig = 44
|
|
10787
|
+
// VerifyEcdsaSecp256r1Sig = 44,
|
|
10788
|
+
//
|
|
10789
|
+
// // Cost of encoding a BLS12-381 Fp (base field element)
|
|
10790
|
+
// Bls12381EncodeFp = 45,
|
|
10791
|
+
// // Cost of decoding a BLS12-381 Fp (base field element)
|
|
10792
|
+
// Bls12381DecodeFp = 46,
|
|
10793
|
+
// // Cost of checking a G1 point lies on the curve
|
|
10794
|
+
// Bls12381G1CheckPointOnCurve = 47,
|
|
10795
|
+
// // Cost of checking a G1 point belongs to the correct subgroup
|
|
10796
|
+
// Bls12381G1CheckPointInSubgroup = 48,
|
|
10797
|
+
// // Cost of checking a G2 point lies on the curve
|
|
10798
|
+
// Bls12381G2CheckPointOnCurve = 49,
|
|
10799
|
+
// // Cost of checking a G2 point belongs to the correct subgroup
|
|
10800
|
+
// Bls12381G2CheckPointInSubgroup = 50,
|
|
10801
|
+
// // Cost of converting a BLS12-381 G1 point from projective to affine coordinates
|
|
10802
|
+
// Bls12381G1ProjectiveToAffine = 51,
|
|
10803
|
+
// // Cost of converting a BLS12-381 G2 point from projective to affine coordinates
|
|
10804
|
+
// Bls12381G2ProjectiveToAffine = 52,
|
|
10805
|
+
// // Cost of performing BLS12-381 G1 point addition
|
|
10806
|
+
// Bls12381G1Add = 53,
|
|
10807
|
+
// // Cost of performing BLS12-381 G1 scalar multiplication
|
|
10808
|
+
// Bls12381G1Mul = 54,
|
|
10809
|
+
// // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM)
|
|
10810
|
+
// Bls12381G1Msm = 55,
|
|
10811
|
+
// // Cost of mapping a BLS12-381 Fp field element to a G1 point
|
|
10812
|
+
// Bls12381MapFpToG1 = 56,
|
|
10813
|
+
// // Cost of hashing to a BLS12-381 G1 point
|
|
10814
|
+
// Bls12381HashToG1 = 57,
|
|
10815
|
+
// // Cost of performing BLS12-381 G2 point addition
|
|
10816
|
+
// Bls12381G2Add = 58,
|
|
10817
|
+
// // Cost of performing BLS12-381 G2 scalar multiplication
|
|
10818
|
+
// Bls12381G2Mul = 59,
|
|
10819
|
+
// // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM)
|
|
10820
|
+
// Bls12381G2Msm = 60,
|
|
10821
|
+
// // Cost of mapping a BLS12-381 Fp2 field element to a G2 point
|
|
10822
|
+
// Bls12381MapFp2ToG2 = 61,
|
|
10823
|
+
// // Cost of hashing to a BLS12-381 G2 point
|
|
10824
|
+
// Bls12381HashToG2 = 62,
|
|
10825
|
+
// // Cost of performing BLS12-381 pairing operation
|
|
10826
|
+
// Bls12381Pairing = 63,
|
|
10827
|
+
// // Cost of converting a BLS12-381 scalar element from U256
|
|
10828
|
+
// Bls12381FrFromU256 = 64,
|
|
10829
|
+
// // Cost of converting a BLS12-381 scalar element to U256
|
|
10830
|
+
// Bls12381FrToU256 = 65,
|
|
10831
|
+
// // Cost of performing BLS12-381 scalar element addition/subtraction
|
|
10832
|
+
// Bls12381FrAddSub = 66,
|
|
10833
|
+
// // Cost of performing BLS12-381 scalar element multiplication
|
|
10834
|
+
// Bls12381FrMul = 67,
|
|
10835
|
+
// // Cost of performing BLS12-381 scalar element exponentiation
|
|
10836
|
+
// Bls12381FrPow = 68,
|
|
10837
|
+
// // Cost of performing BLS12-381 scalar element inversion
|
|
10838
|
+
// Bls12381FrInv = 69
|
|
10239
10839
|
// };
|
|
10240
10840
|
//
|
|
10241
10841
|
// ===========================================================================
|
|
@@ -10284,7 +10884,32 @@ var types = xdr.config(function (xdr) {
|
|
|
10284
10884
|
instantiateWasmExports: 41,
|
|
10285
10885
|
instantiateWasmDataSegmentBytes: 42,
|
|
10286
10886
|
sec1DecodePointUncompressed: 43,
|
|
10287
|
-
verifyEcdsaSecp256r1Sig: 44
|
|
10887
|
+
verifyEcdsaSecp256r1Sig: 44,
|
|
10888
|
+
bls12381EncodeFp: 45,
|
|
10889
|
+
bls12381DecodeFp: 46,
|
|
10890
|
+
bls12381G1CheckPointOnCurve: 47,
|
|
10891
|
+
bls12381G1CheckPointInSubgroup: 48,
|
|
10892
|
+
bls12381G2CheckPointOnCurve: 49,
|
|
10893
|
+
bls12381G2CheckPointInSubgroup: 50,
|
|
10894
|
+
bls12381G1ProjectiveToAffine: 51,
|
|
10895
|
+
bls12381G2ProjectiveToAffine: 52,
|
|
10896
|
+
bls12381G1Add: 53,
|
|
10897
|
+
bls12381G1Mul: 54,
|
|
10898
|
+
bls12381G1Msm: 55,
|
|
10899
|
+
bls12381MapFpToG1: 56,
|
|
10900
|
+
bls12381HashToG1: 57,
|
|
10901
|
+
bls12381G2Add: 58,
|
|
10902
|
+
bls12381G2Mul: 59,
|
|
10903
|
+
bls12381G2Msm: 60,
|
|
10904
|
+
bls12381MapFp2ToG2: 61,
|
|
10905
|
+
bls12381HashToG2: 62,
|
|
10906
|
+
bls12381Pairing: 63,
|
|
10907
|
+
bls12381FrFromU256: 64,
|
|
10908
|
+
bls12381FrToU256: 65,
|
|
10909
|
+
bls12381FrAddSub: 66,
|
|
10910
|
+
bls12381FrMul: 67,
|
|
10911
|
+
bls12381FrPow: 68,
|
|
10912
|
+
bls12381FrInv: 69
|
|
10288
10913
|
});
|
|
10289
10914
|
|
|
10290
10915
|
// === xdr source ============================================================
|
|
@@ -11532,7 +12157,7 @@ var Asset = /*#__PURE__*/function () {
|
|
|
11532
12157
|
*/
|
|
11533
12158
|
}], [{
|
|
11534
12159
|
key: "native",
|
|
11535
|
-
value: function
|
|
12160
|
+
value: function _native() {
|
|
11536
12161
|
return new Asset('XLM');
|
|
11537
12162
|
}
|
|
11538
12163
|
|
|
@@ -17002,7 +17627,8 @@ function invokeContractFunction(opts) {
|
|
|
17002
17627
|
}
|
|
17003
17628
|
|
|
17004
17629
|
/**
|
|
17005
|
-
* Returns an operation that creates a custom WASM contract
|
|
17630
|
+
* Returns an operation that creates a custom WASM contract and atomically
|
|
17631
|
+
* invokes its constructor.
|
|
17006
17632
|
*
|
|
17007
17633
|
* @function
|
|
17008
17634
|
* @alias Operation.createCustomContract
|
|
@@ -17012,6 +17638,9 @@ function invokeContractFunction(opts) {
|
|
|
17012
17638
|
* @param {Uint8Array|Buffer} opts.wasmHash - the SHA-256 hash of the contract
|
|
17013
17639
|
* WASM you're uploading (see {@link hash} and
|
|
17014
17640
|
* {@link Operation.uploadContractWasm})
|
|
17641
|
+
* @param {xdr.ScVal[]} [opts.constructorArgs] - the optional parameters to pass
|
|
17642
|
+
* to the constructor of this contract (see {@link nativeToScVal} for ways to
|
|
17643
|
+
* easily create these parameters from native JS values)
|
|
17015
17644
|
* @param {Uint8Array|Buffer} [opts.salt] - an optional, 32-byte salt to
|
|
17016
17645
|
* distinguish deployment instances of the same wasm from the same user (if
|
|
17017
17646
|
* omitted, one will be generated for you)
|
|
@@ -17026,6 +17655,7 @@ function invokeContractFunction(opts) {
|
|
|
17026
17655
|
* https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#function
|
|
17027
17656
|
*/
|
|
17028
17657
|
function createCustomContract(opts) {
|
|
17658
|
+
var _opts$constructorArgs;
|
|
17029
17659
|
var salt = invoke_host_function_Buffer.from(opts.salt || getSalty());
|
|
17030
17660
|
if (!opts.wasmHash || opts.wasmHash.length !== 32) {
|
|
17031
17661
|
throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(opts.wasmHash));
|
|
@@ -17036,12 +17666,13 @@ function createCustomContract(opts) {
|
|
|
17036
17666
|
return this.invokeHostFunction({
|
|
17037
17667
|
source: opts.source,
|
|
17038
17668
|
auth: opts.auth,
|
|
17039
|
-
func: src_xdr.HostFunction.
|
|
17669
|
+
func: src_xdr.HostFunction.hostFunctionTypeCreateContractV2(new src_xdr.CreateContractArgsV2({
|
|
17040
17670
|
executable: src_xdr.ContractExecutable.contractExecutableWasm(invoke_host_function_Buffer.from(opts.wasmHash)),
|
|
17041
17671
|
contractIdPreimage: src_xdr.ContractIdPreimage.contractIdPreimageFromAddress(new src_xdr.ContractIdPreimageFromAddress({
|
|
17042
17672
|
address: opts.address.toScAddress(),
|
|
17043
17673
|
salt: salt
|
|
17044
|
-
}))
|
|
17674
|
+
})),
|
|
17675
|
+
constructorArgs: (_opts$constructorArgs = opts.constructorArgs) !== null && _opts$constructorArgs !== void 0 ? _opts$constructorArgs : []
|
|
17045
17676
|
}))
|
|
17046
17677
|
});
|
|
17047
17678
|
}
|
|
@@ -17331,7 +17962,12 @@ var AuthClawbackEnabledFlag = 1 << 3;
|
|
|
17331
17962
|
* * `{@link Operation.setTrustLineFlags}`
|
|
17332
17963
|
* * `{@link Operation.liquidityPoolDeposit}`
|
|
17333
17964
|
* * `{@link Operation.liquidityPoolWithdraw}`
|
|
17334
|
-
* * `{@link Operation.invokeHostFunction}
|
|
17965
|
+
* * `{@link Operation.invokeHostFunction}`, which has the following additional
|
|
17966
|
+
* "pseudo-operations" that make building host functions easier:
|
|
17967
|
+
* - `{@link Operation.createStellarAssetContract}`
|
|
17968
|
+
* - `{@link Operation.invokeContractFunction}`
|
|
17969
|
+
* - `{@link Operation.createCustomContract}`
|
|
17970
|
+
* - `{@link Operation.uploadContractWasm}`
|
|
17335
17971
|
* * `{@link Operation.extendFootprintTtlOp}`
|
|
17336
17972
|
* * `{@link Operation.restoreFootprint}`
|
|
17337
17973
|
*
|
|
@@ -21327,6 +21963,10 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
|
|
|
21327
21963
|
* authorization entry that you can pass along to
|
|
21328
21964
|
* {@link Operation.invokeHostFunction}
|
|
21329
21965
|
*
|
|
21966
|
+
* @note If using the `SigningCallback` variation, the signer is assumed to be
|
|
21967
|
+
* the entry's credential address. If you need a different key to sign the
|
|
21968
|
+
* entry, you will need to use different method (e.g., fork this code).
|
|
21969
|
+
*
|
|
21330
21970
|
* @see authorizeInvocation
|
|
21331
21971
|
* @example
|
|
21332
21972
|
* import {
|
|
@@ -21410,7 +22050,7 @@ function authorizeEntry(_x, _x2, _x3) {
|
|
|
21410
22050
|
* @see authorizeEntry
|
|
21411
22051
|
*/
|
|
21412
22052
|
function _authorizeEntry() {
|
|
21413
|
-
_authorizeEntry = _asyncToGenerator(
|
|
22053
|
+
_authorizeEntry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(entry, signer, validUntilLedgerSeq) {
|
|
21414
22054
|
var networkPassphrase,
|
|
21415
22055
|
clone,
|
|
21416
22056
|
addrAuth,
|
|
@@ -21444,7 +22084,7 @@ function _authorizeEntry() {
|
|
|
21444
22084
|
}));
|
|
21445
22085
|
payload = hashing_hash(preimage.toXDR());
|
|
21446
22086
|
if (!(typeof signer === 'function')) {
|
|
21447
|
-
_context.next =
|
|
22087
|
+
_context.next = 18;
|
|
21448
22088
|
break;
|
|
21449
22089
|
}
|
|
21450
22090
|
_context.t0 = auth_Buffer;
|
|
@@ -21453,18 +22093,19 @@ function _authorizeEntry() {
|
|
|
21453
22093
|
case 13:
|
|
21454
22094
|
_context.t1 = _context.sent;
|
|
21455
22095
|
signature = _context.t0.from.call(_context.t0, _context.t1);
|
|
21456
|
-
|
|
22096
|
+
publicKey = Address.fromScAddress(addrAuth.address()).toString();
|
|
22097
|
+
_context.next = 20;
|
|
21457
22098
|
break;
|
|
21458
|
-
case 17:
|
|
21459
|
-
signature = auth_Buffer.from(signer.sign(payload));
|
|
21460
22099
|
case 18:
|
|
21461
|
-
|
|
22100
|
+
signature = auth_Buffer.from(signer.sign(payload));
|
|
22101
|
+
publicKey = signer.publicKey();
|
|
22102
|
+
case 20:
|
|
21462
22103
|
if (Keypair.fromPublicKey(publicKey).verify(payload, signature)) {
|
|
21463
|
-
_context.next =
|
|
22104
|
+
_context.next = 22;
|
|
21464
22105
|
break;
|
|
21465
22106
|
}
|
|
21466
22107
|
throw new Error("signature doesn't match payload");
|
|
21467
|
-
case
|
|
22108
|
+
case 22:
|
|
21468
22109
|
// This structure is defined here:
|
|
21469
22110
|
// https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#stellar-account-signatures
|
|
21470
22111
|
//
|
|
@@ -21481,7 +22122,7 @@ function _authorizeEntry() {
|
|
|
21481
22122
|
});
|
|
21482
22123
|
addrAuth.signature(src_xdr.ScVal.scvVec([sigScVal]));
|
|
21483
22124
|
return _context.abrupt("return", clone);
|
|
21484
|
-
case
|
|
22125
|
+
case 25:
|
|
21485
22126
|
case "end":
|
|
21486
22127
|
return _context.stop();
|
|
21487
22128
|
}
|
|
@@ -21684,7 +22325,8 @@ function buildInvocationTree(root) {
|
|
|
21684
22325
|
* @param {xdr.SorobanAuthorizedInvocation} [parent] this `node`s parent node,
|
|
21685
22326
|
* if any (i.e. this doesn't exist at the root)
|
|
21686
22327
|
*
|
|
21687
|
-
* @returns {boolean
|
|
22328
|
+
* @returns {boolean|null|void} returning exactly `false` is a hint to stop
|
|
22329
|
+
* exploring, other values are ignored
|
|
21688
22330
|
*/
|
|
21689
22331
|
|
|
21690
22332
|
/**
|