diff --git a/package.json b/package.json index 16cac02ba..d37601fc0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test:browser": "karma start ./config/karma.conf.js", "docs": "jsdoc -c ./config/.jsdoc.json --verbose", "lint": "eslint -c ./config/.eslintrc.js src/ && dtslint --localTs node_modules/typescript/lib types/", - "preversion": "yarn clean && yarn pretty && yarn lint && yarn build:prod && yarn test", + "preversion": "yarn clean && yarn fmt && yarn lint && yarn build:prod && yarn test", "fmt": "prettier --config ./config/prettier.config.js --ignore-path ./config/.prettierignore --write './**/*.js'", "prepare": "yarn build:prod", "clean": "rm -rf lib/ dist/ coverage/ .nyc_output/" diff --git a/src/generated/curr_generated.js b/src/generated/curr_generated.js index 26852ebb8..575fbdecc 100644 --- a/src/generated/curr_generated.js +++ b/src/generated/curr_generated.js @@ -2847,18 +2847,23 @@ xdr.struct("Hello", [ ["nonce", xdr.lookup("Uint256")], ]); +// === xdr source ============================================================ +// +// const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100; +// +// =========================================================================== +xdr.const("AUTH_MSG_FLAG_PULL_MODE_REQUESTED", 100); + // === xdr source ============================================================ // // struct Auth // { -// // Empty message, just to confirm -// // establishment of MAC keys. -// int unused; +// int flags; // }; // // =========================================================================== xdr.struct("Auth", [ - ["unused", xdr.int()], + ["flags", xdr.int()], ]); // === xdr source ============================================================ @@ -2951,7 +2956,9 @@ xdr.struct("PeerAddress", [ // SURVEY_REQUEST = 14, // SURVEY_RESPONSE = 15, // -// SEND_MORE = 16 +// SEND_MORE = 16, +// FLOOD_ADVERT = 18, +// FLOOD_DEMAND = 19 // }; // // =========================================================================== @@ -2973,6 +2980,8 @@ xdr.enum("MessageType", { surveyRequest: 14, surveyResponse: 15, sendMore: 16, + floodAdvert: 18, + floodDemand: 19, }); // === xdr source ============================================================ @@ -3164,6 +3173,58 @@ xdr.union("SurveyResponseBody", { }, }); +// === xdr source ============================================================ +// +// const TX_ADVERT_VECTOR_MAX_SIZE = 1000; +// +// =========================================================================== +xdr.const("TX_ADVERT_VECTOR_MAX_SIZE", 1000); + +// === xdr source ============================================================ +// +// typedef Hash TxAdvertVector; +// +// =========================================================================== +xdr.typedef("TxAdvertVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))); + +// === xdr source ============================================================ +// +// struct FloodAdvert +// { +// TxAdvertVector txHashes; +// }; +// +// =========================================================================== +xdr.struct("FloodAdvert", [ + ["txHashes", xdr.lookup("TxAdvertVector")], +]); + +// === xdr source ============================================================ +// +// const TX_DEMAND_VECTOR_MAX_SIZE = 1000; +// +// =========================================================================== +xdr.const("TX_DEMAND_VECTOR_MAX_SIZE", 1000); + +// === xdr source ============================================================ +// +// typedef Hash TxDemandVector; +// +// =========================================================================== +xdr.typedef("TxDemandVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))); + +// === xdr source ============================================================ +// +// struct FloodDemand +// { +// TxDemandVector txHashes; +// }; +// +// =========================================================================== +xdr.struct("FloodDemand", [ + ["txHashes", xdr.lookup("TxDemandVector")], +]); + // === xdr source ============================================================ // // union StellarMessage switch (MessageType type) @@ -3208,6 +3269,12 @@ xdr.union("SurveyResponseBody", { // uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest // case SEND_MORE: // SendMore sendMoreMessage; +// +// // Pull mode +// case FLOOD_ADVERT: +// FloodAdvert floodAdvert; +// case FLOOD_DEMAND: +// FloodDemand floodDemand; // }; // // =========================================================================== @@ -3232,6 +3299,8 @@ xdr.union("StellarMessage", { ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], + ["floodAdvert", "floodAdvert"], + ["floodDemand", "floodDemand"], ], arms: { error: xdr.lookup("Error"), @@ -3250,6 +3319,8 @@ xdr.union("StellarMessage", { envelope: xdr.lookup("ScpEnvelope"), getScpLedgerSeq: xdr.lookup("Uint32"), sendMoreMessage: xdr.lookup("SendMore"), + floodAdvert: xdr.lookup("FloodAdvert"), + floodDemand: xdr.lookup("FloodDemand"), }, }); diff --git a/src/generated/next_generated.js b/src/generated/next_generated.js index 6f91b4a3d..25b8de063 100644 --- a/src/generated/next_generated.js +++ b/src/generated/next_generated.js @@ -252,13 +252,6 @@ xdr.struct("ScpQuorumSet", [ ["innerSets", xdr.varArray(xdr.lookup("ScpQuorumSet"), 2147483647)], ]); -// === xdr source ============================================================ -// -// typedef PublicKey AccountID; -// -// =========================================================================== -xdr.typedef("AccountId", xdr.lookup("PublicKey")); - // === xdr source ============================================================ // // typedef opaque Thresholds[4]; @@ -287,20 +280,6 @@ xdr.typedef("String64", xdr.string(64)); // =========================================================================== xdr.typedef("SequenceNumber", xdr.lookup("Int64")); -// === xdr source ============================================================ -// -// typedef uint64 TimePoint; -// -// =========================================================================== -xdr.typedef("TimePoint", xdr.lookup("Uint64")); - -// === xdr source ============================================================ -// -// typedef uint64 Duration; -// -// =========================================================================== -xdr.typedef("Duration", xdr.lookup("Uint64")); - // === xdr source ============================================================ // // typedef opaque DataValue<64>; @@ -490,7 +469,8 @@ xdr.enum("ThresholdIndices", { // CLAIMABLE_BALANCE = 4, // LIQUIDITY_POOL = 5, // CONTRACT_DATA = 6, -// CONFIG_SETTING = 7 +// CONTRACT_CODE = 7, +// CONFIG_SETTING = 8 // }; // // =========================================================================== @@ -502,7 +482,8 @@ xdr.enum("LedgerEntryType", { claimableBalance: 4, liquidityPool: 5, contractData: 6, - configSetting: 7, + contractCode: 7, + configSetting: 8, }); // === xdr source ============================================================ @@ -1512,89 +1493,220 @@ xdr.struct("ContractDataEntry", [ // === xdr source ============================================================ // -// enum ConfigSettingType +// struct ContractCodeEntry { +// ExtensionPoint ext; +// +// Hash hash; +// opaque code; +// }; +// +// =========================================================================== +xdr.struct("ContractCodeEntry", [ + ["ext", xdr.lookup("ExtensionPoint")], + ["hash", xdr.lookup("Hash")], + ["code", xdr.varOpaque(SCVAL_LIMIT)], +]); + +// === xdr source ============================================================ +// +// enum ConfigSettingID // { -// CONFIG_SETTING_TYPE_UINT32 = 0 +// CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, +// CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, +// CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, +// CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, +// CONFIG_SETTING_CONTRACT_META_DATA_V0 = 4, +// CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, +// CONFIG_SETTING_CONTRACT_HOST_LOGIC_VERSION = 6 // }; // // =========================================================================== -xdr.enum("ConfigSettingType", { - configSettingTypeUint32: 0, +xdr.enum("ConfigSettingId", { + configSettingContractMaxSizeBytes: 0, + configSettingContractComputeV0: 1, + configSettingContractLedgerCostV0: 2, + configSettingContractHistoricalDataV0: 3, + configSettingContractMetaDataV0: 4, + configSettingContractBandwidthV0: 5, + configSettingContractHostLogicVersion: 6, }); // === xdr source ============================================================ // -// union ConfigSetting switch (ConfigSettingType type) +// struct ConfigSettingContractComputeV0 // { -// case CONFIG_SETTING_TYPE_UINT32: -// uint32 uint32Val; +// // Maximum instructions per ledger +// int64 ledgerMaxInstructions; +// // Maximum instructions per transaction +// int64 txMaxInstructions; +// // Cost of 10000 instructions +// int64 feeRatePerInstructionsIncrement; +// +// // Memory limit per contract/host function invocation. Unlike +// // instructions, there is no fee for memory and it's not +// // accumulated between operations - the same limit is applied +// // to every operation. +// uint32 memoryLimit; // }; // // =========================================================================== -xdr.union("ConfigSetting", { - switchOn: xdr.lookup("ConfigSettingType"), - switchName: "type", - switches: [ - ["configSettingTypeUint32", "uint32Val"], - ], - arms: { - uint32Val: xdr.lookup("Uint32"), - }, -}); +xdr.struct("ConfigSettingContractComputeV0", [ + ["ledgerMaxInstructions", xdr.lookup("Int64")], + ["txMaxInstructions", xdr.lookup("Int64")], + ["feeRatePerInstructionsIncrement", xdr.lookup("Int64")], + ["memoryLimit", xdr.lookup("Uint32")], +]); // === xdr source ============================================================ // -// enum ConfigSettingID +// struct ConfigSettingContractLedgerCostV0 // { -// CONFIG_SETTING_CONTRACT_MAX_SIZE = 0 +// // Maximum number of ledger entry read operations per ledger +// uint32 ledgerMaxReadLedgerEntries; +// // Maximum number of bytes that can be read per ledger +// uint32 ledgerMaxReadBytes; +// // Maximum number of ledger entry write operations per ledger +// uint32 ledgerMaxWriteLedgerEntries; +// // Maximum number of bytes that can be written per ledger +// uint32 ledgerMaxWriteBytes; +// +// // Maximum number of ledger entry read operations per transaction +// uint32 txMaxReadLedgerEntries; +// // Maximum number of bytes that can be read per transaction +// uint32 txMaxReadBytes; +// // Maximum number of ledger entry write operations per transaction +// uint32 txMaxWriteLedgerEntries; +// // Maximum number of bytes that can be written per transaction +// uint32 txMaxWriteBytes; +// +// int64 feeReadLedgerEntry; // Fee per ledger entry read +// int64 feeWriteLedgerEntry; // Fee per ledger entry write +// +// int64 feeRead1KB; // Fee for reading 1KB +// int64 feeWrite1KB; // Fee for writing 1KB +// +// // Bucket list fees grow slowly up to that size +// int64 bucketListSizeBytes; +// // Fee rate in stroops when the bucket list is empty +// int64 bucketListFeeRateLow; +// // Fee rate in stroops when the bucket list reached bucketListSizeBytes +// int64 bucketListFeeRateHigh; +// // Rate multiplier for any additional data past the first bucketListSizeBytes +// uint32 bucketListGrowthFactor; // }; // // =========================================================================== -xdr.enum("ConfigSettingId", { - configSettingContractMaxSize: 0, -}); +xdr.struct("ConfigSettingContractLedgerCostV0", [ + ["ledgerMaxReadLedgerEntries", xdr.lookup("Uint32")], + ["ledgerMaxReadBytes", xdr.lookup("Uint32")], + ["ledgerMaxWriteLedgerEntries", xdr.lookup("Uint32")], + ["ledgerMaxWriteBytes", xdr.lookup("Uint32")], + ["txMaxReadLedgerEntries", xdr.lookup("Uint32")], + ["txMaxReadBytes", xdr.lookup("Uint32")], + ["txMaxWriteLedgerEntries", xdr.lookup("Uint32")], + ["txMaxWriteBytes", xdr.lookup("Uint32")], + ["feeReadLedgerEntry", xdr.lookup("Int64")], + ["feeWriteLedgerEntry", xdr.lookup("Int64")], + ["feeRead1Kb", xdr.lookup("Int64")], + ["feeWrite1Kb", xdr.lookup("Int64")], + ["bucketListSizeBytes", xdr.lookup("Int64")], + ["bucketListFeeRateLow", xdr.lookup("Int64")], + ["bucketListFeeRateHigh", xdr.lookup("Int64")], + ["bucketListGrowthFactor", xdr.lookup("Uint32")], +]); // === xdr source ============================================================ // -// union switch (int v) -// { -// case 0: -// void; -// } +// struct ConfigSettingContractHistoricalDataV0 +// { +// int64 feeHistorical1KB; // Fee for storing 1KB in archives +// }; // // =========================================================================== -xdr.union("ConfigSettingEntryExt", { - switchOn: xdr.int(), - switchName: "v", - switches: [ - [0, xdr.void()], - ], - arms: { - }, -}); +xdr.struct("ConfigSettingContractHistoricalDataV0", [ + ["feeHistorical1Kb", xdr.lookup("Int64")], +]); // === xdr source ============================================================ // -// struct ConfigSettingEntry +// struct ConfigSettingContractMetaDataV0 // { -// union switch (int v) -// { -// case 0: -// void; -// } -// ext; +// // Maximum size of extended meta data produced by a transaction +// uint32 txMaxExtendedMetaDataSizeBytes; +// // Fee for generating 1KB of extended meta data +// int64 feeExtendedMetaData1KB; +// }; +// +// =========================================================================== +xdr.struct("ConfigSettingContractMetaDataV0", [ + ["txMaxExtendedMetaDataSizeBytes", xdr.lookup("Uint32")], + ["feeExtendedMetaData1Kb", xdr.lookup("Int64")], +]); + +// === xdr source ============================================================ +// +// struct ConfigSettingContractBandwidthV0 +// { +// // Maximum size in bytes to propagate per ledger +// uint32 ledgerMaxPropagateSizeBytes; +// // Maximum size in bytes for a transaction +// uint32 txMaxSizeBytes; // -// ConfigSettingID configSettingID; -// ConfigSetting setting; +// // Fee for propagating 1KB of data +// int64 feePropagateData1KB; // }; // // =========================================================================== -xdr.struct("ConfigSettingEntry", [ - ["ext", xdr.lookup("ConfigSettingEntryExt")], - ["configSettingId", xdr.lookup("ConfigSettingId")], - ["setting", xdr.lookup("ConfigSetting")], +xdr.struct("ConfigSettingContractBandwidthV0", [ + ["ledgerMaxPropagateSizeBytes", xdr.lookup("Uint32")], + ["txMaxSizeBytes", xdr.lookup("Uint32")], + ["feePropagateData1Kb", xdr.lookup("Int64")], ]); +// === xdr source ============================================================ +// +// union ConfigSettingEntry switch (ConfigSettingID configSettingID) +// { +// case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: +// uint32 contractMaxSizeBytes; +// case CONFIG_SETTING_CONTRACT_COMPUTE_V0: +// ConfigSettingContractComputeV0 contractCompute; +// case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: +// ConfigSettingContractLedgerCostV0 contractLedgerCost; +// case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: +// ConfigSettingContractHistoricalDataV0 contractHistoricalData; +// case CONFIG_SETTING_CONTRACT_META_DATA_V0: +// ConfigSettingContractMetaDataV0 contractMetaData; +// case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: +// ConfigSettingContractBandwidthV0 contractBandwidth; +// case CONFIG_SETTING_CONTRACT_HOST_LOGIC_VERSION: +// uint32 contractHostLogicVersion; +// }; +// +// =========================================================================== +xdr.union("ConfigSettingEntry", { + switchOn: xdr.lookup("ConfigSettingId"), + switchName: "configSettingId", + switches: [ + ["configSettingContractMaxSizeBytes", "contractMaxSizeBytes"], + ["configSettingContractComputeV0", "contractCompute"], + ["configSettingContractLedgerCostV0", "contractLedgerCost"], + ["configSettingContractHistoricalDataV0", "contractHistoricalData"], + ["configSettingContractMetaDataV0", "contractMetaData"], + ["configSettingContractBandwidthV0", "contractBandwidth"], + ["configSettingContractHostLogicVersion", "contractHostLogicVersion"], + ], + arms: { + contractMaxSizeBytes: xdr.lookup("Uint32"), + contractCompute: xdr.lookup("ConfigSettingContractComputeV0"), + contractLedgerCost: xdr.lookup("ConfigSettingContractLedgerCostV0"), + contractHistoricalData: xdr.lookup("ConfigSettingContractHistoricalDataV0"), + contractMetaData: xdr.lookup("ConfigSettingContractMetaDataV0"), + contractBandwidth: xdr.lookup("ConfigSettingContractBandwidthV0"), + contractHostLogicVersion: xdr.lookup("Uint32"), + }, +}); + // === xdr source ============================================================ // // union switch (int v) @@ -1652,6 +1764,8 @@ xdr.struct("LedgerEntryExtensionV1", [ // LiquidityPoolEntry liquidityPool; // case CONTRACT_DATA: // ContractDataEntry contractData; +// case CONTRACT_CODE: +// ContractCodeEntry contractCode; // case CONFIG_SETTING: // ConfigSettingEntry configSetting; // } @@ -1668,6 +1782,7 @@ xdr.union("LedgerEntryData", { ["claimableBalance", "claimableBalance"], ["liquidityPool", "liquidityPool"], ["contractData", "contractData"], + ["contractCode", "contractCode"], ["configSetting", "configSetting"], ], arms: { @@ -1678,6 +1793,7 @@ xdr.union("LedgerEntryData", { claimableBalance: xdr.lookup("ClaimableBalanceEntry"), liquidityPool: xdr.lookup("LiquidityPoolEntry"), contractData: xdr.lookup("ContractDataEntry"), + contractCode: xdr.lookup("ContractCodeEntry"), configSetting: xdr.lookup("ConfigSettingEntry"), }, }); @@ -1727,6 +1843,8 @@ xdr.union("LedgerEntryExt", { // LiquidityPoolEntry liquidityPool; // case CONTRACT_DATA: // ContractDataEntry contractData; +// case CONTRACT_CODE: +// ContractCodeEntry contractCode; // case CONFIG_SETTING: // ConfigSettingEntry configSetting; // } @@ -1842,6 +1960,18 @@ xdr.struct("LedgerKeyContractData", [ ["key", xdr.lookup("ScVal")], ]); +// === xdr source ============================================================ +// +// struct +// { +// Hash hash; +// } +// +// =========================================================================== +xdr.struct("LedgerKeyContractCode", [ + ["hash", xdr.lookup("Hash")], +]); + // === xdr source ============================================================ // // struct @@ -1902,6 +2032,11 @@ xdr.struct("LedgerKeyConfigSetting", [ // Hash contractID; // SCVal key; // } contractData; +// case CONTRACT_CODE: +// struct +// { +// Hash hash; +// } contractCode; // case CONFIG_SETTING: // struct // { @@ -1921,6 +2056,7 @@ xdr.union("LedgerKey", { ["claimableBalance", "claimableBalance"], ["liquidityPool", "liquidityPool"], ["contractData", "contractData"], + ["contractCode", "contractCode"], ["configSetting", "configSetting"], ], arms: { @@ -1931,6 +2067,7 @@ xdr.union("LedgerKey", { claimableBalance: xdr.lookup("LedgerKeyClaimableBalance"), liquidityPool: xdr.lookup("LedgerKeyLiquidityPool"), contractData: xdr.lookup("LedgerKeyContractData"), + contractCode: xdr.lookup("LedgerKeyContractCode"), configSetting: xdr.lookup("LedgerKeyConfigSetting"), }, }); @@ -1948,7 +2085,11 @@ xdr.union("LedgerKey", { // ENVELOPE_TYPE_OP_ID = 6, // ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7, // ENVELOPE_TYPE_CONTRACT_ID_FROM_ED25519 = 8, -// ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT = 9 +// ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT = 9, +// ENVELOPE_TYPE_CONTRACT_ID_FROM_ASSET = 10, +// ENVELOPE_TYPE_CONTRACT_ID_FROM_SOURCE_ACCOUNT = 11, +// ENVELOPE_TYPE_CREATE_CONTRACT_ARGS = 12, +// ENVELOPE_TYPE_CONTRACT_AUTH = 13 // }; // // =========================================================================== @@ -1963,6 +2104,10 @@ xdr.enum("EnvelopeType", { envelopeTypePoolRevokeOpId: 7, envelopeTypeContractIdFromEd25519: 8, envelopeTypeContractIdFromContract: 9, + envelopeTypeContractIdFromAsset: 10, + envelopeTypeContractIdFromSourceAccount: 11, + envelopeTypeCreateContractArgs: 12, + envelopeTypeContractAuth: 13, }); // === xdr source ============================================================ @@ -2234,16 +2379,15 @@ xdr.enum("LedgerUpgradeType", { // === xdr source ============================================================ // -// struct -// { -// ConfigSettingID id; // id to update -// ConfigSetting setting; // new value -// } +// struct ConfigUpgradeSetKey { +// Hash contractID; +// Hash contentHash; +// }; // // =========================================================================== -xdr.struct("LedgerUpgradeConfigSetting", [ - ["id", xdr.lookup("ConfigSettingId")], - ["setting", xdr.lookup("ConfigSetting")], +xdr.struct("ConfigUpgradeSetKey", [ + ["contractId", xdr.lookup("Hash")], + ["contentHash", xdr.lookup("Hash")], ]); // === xdr source ============================================================ @@ -2261,11 +2405,7 @@ xdr.struct("LedgerUpgradeConfigSetting", [ // case LEDGER_UPGRADE_FLAGS: // uint32 newFlags; // update flags // case LEDGER_UPGRADE_CONFIG: -// struct -// { -// ConfigSettingID id; // id to update -// ConfigSetting setting; // new value -// } configSetting; +// ConfigUpgradeSetKey newConfig; // }; // // =========================================================================== @@ -2278,7 +2418,7 @@ xdr.union("LedgerUpgrade", { ["ledgerUpgradeMaxTxSetSize", "newMaxTxSetSize"], ["ledgerUpgradeBaseReserve", "newBaseReserve"], ["ledgerUpgradeFlags", "newFlags"], - ["ledgerUpgradeConfig", "configSetting"], + ["ledgerUpgradeConfig", "newConfig"], ], arms: { newLedgerVersion: xdr.lookup("Uint32"), @@ -2286,10 +2426,21 @@ xdr.union("LedgerUpgrade", { newMaxTxSetSize: xdr.lookup("Uint32"), newBaseReserve: xdr.lookup("Uint32"), newFlags: xdr.lookup("Uint32"), - configSetting: xdr.lookup("LedgerUpgradeConfigSetting"), + newConfig: xdr.lookup("ConfigUpgradeSetKey"), }, }); +// === xdr source ============================================================ +// +// struct ConfigUpgradeSet { +// ConfigSettingEntry updatedEntry<>; +// }; +// +// =========================================================================== +xdr.struct("ConfigUpgradeSet", [ + ["updatedEntry", xdr.varArray(xdr.lookup("ConfigSettingEntry"), 2147483647)], +]); + // === xdr source ============================================================ // // enum BucketEntryType @@ -2619,6 +2770,75 @@ xdr.struct("TransactionHistoryResultEntry", [ ["ext", xdr.lookup("TransactionHistoryResultEntryExt")], ]); +// === xdr source ============================================================ +// +// struct TransactionResultPairV2 +// { +// Hash transactionHash; +// Hash hashOfMetaHashes; // hash of hashes in TransactionMetaV3 +// // TransactionResult is in the meta +// }; +// +// =========================================================================== +xdr.struct("TransactionResultPairV2", [ + ["transactionHash", xdr.lookup("Hash")], + ["hashOfMetaHashes", xdr.lookup("Hash")], +]); + +// === xdr source ============================================================ +// +// struct TransactionResultSetV2 +// { +// TransactionResultPairV2 results<>; +// }; +// +// =========================================================================== +xdr.struct("TransactionResultSetV2", [ + ["results", xdr.varArray(xdr.lookup("TransactionResultPairV2"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// union switch (int v) +// { +// case 0: +// void; +// } +// +// =========================================================================== +xdr.union("TransactionHistoryResultEntryV2Ext", { + switchOn: xdr.int(), + switchName: "v", + switches: [ + [0, xdr.void()], + ], + arms: { + }, +}); + +// === xdr source ============================================================ +// +// struct TransactionHistoryResultEntryV2 +// { +// uint32 ledgerSeq; +// TransactionResultSetV2 txResultSet; +// +// // reserved for future use +// union switch (int v) +// { +// case 0: +// void; +// } +// ext; +// }; +// +// =========================================================================== +xdr.struct("TransactionHistoryResultEntryV2", [ + ["ledgerSeq", xdr.lookup("Uint32")], + ["txResultSet", xdr.lookup("TransactionResultSetV2")], + ["ext", xdr.lookup("TransactionHistoryResultEntryV2Ext")], +]); + // === xdr source ============================================================ // // union switch (int v) @@ -2812,87 +3032,263 @@ xdr.struct("TransactionMetaV2", [ // === xdr source ============================================================ // -// union TransactionMeta switch (int v) +// enum ContractEventType // { -// case 0: -// OperationMeta operations<>; -// case 1: -// TransactionMetaV1 v1; -// case 2: -// TransactionMetaV2 v2; +// SYSTEM = 0, +// CONTRACT = 1, +// DIAGNOSTIC = 2 // }; // // =========================================================================== -xdr.union("TransactionMeta", { +xdr.enum("ContractEventType", { + system: 0, + contract: 1, + diagnostic: 2, +}); + +// === xdr source ============================================================ +// +// struct +// { +// SCVec topics; +// SCVal data; +// } +// +// =========================================================================== +xdr.struct("ContractEventV0", [ + ["topics", xdr.lookup("ScVec")], + ["data", xdr.lookup("ScVal")], +]); + +// === xdr source ============================================================ +// +// union switch (int v) +// { +// case 0: +// struct +// { +// SCVec topics; +// SCVal data; +// } v0; +// } +// +// =========================================================================== +xdr.union("ContractEventBody", { switchOn: xdr.int(), switchName: "v", switches: [ - [0, "operations"], - [1, "v1"], - [2, "v2"], + [0, "v0"], ], arms: { - operations: xdr.varArray(xdr.lookup("OperationMeta"), 2147483647), - v1: xdr.lookup("TransactionMetaV1"), - v2: xdr.lookup("TransactionMetaV2"), + v0: xdr.lookup("ContractEventV0"), }, }); // === xdr source ============================================================ // -// struct TransactionResultMeta +// struct ContractEvent // { -// TransactionResultPair result; -// LedgerEntryChanges feeProcessing; -// TransactionMeta txApplyProcessing; +// // We can use this to add more fields, or because it +// // is first, to change ContractEvent into a union. +// ExtensionPoint ext; +// +// Hash* contractID; +// ContractEventType type; +// +// union switch (int v) +// { +// case 0: +// struct +// { +// SCVec topics; +// SCVal data; +// } v0; +// } +// body; // }; // // =========================================================================== -xdr.struct("TransactionResultMeta", [ - ["result", xdr.lookup("TransactionResultPair")], - ["feeProcessing", xdr.lookup("LedgerEntryChanges")], - ["txApplyProcessing", xdr.lookup("TransactionMeta")], +xdr.struct("ContractEvent", [ + ["ext", xdr.lookup("ExtensionPoint")], + ["contractId", xdr.option(xdr.lookup("Hash"))], + ["type", xdr.lookup("ContractEventType")], + ["body", xdr.lookup("ContractEventBody")], ]); // === xdr source ============================================================ // -// struct UpgradeEntryMeta +// struct DiagnosticEvent // { -// LedgerUpgrade upgrade; -// LedgerEntryChanges changes; +// bool inSuccessfulContractCall; +// ContractEvent event; // }; // // =========================================================================== -xdr.struct("UpgradeEntryMeta", [ - ["upgrade", xdr.lookup("LedgerUpgrade")], - ["changes", xdr.lookup("LedgerEntryChanges")], +xdr.struct("DiagnosticEvent", [ + ["inSuccessfulContractCall", xdr.bool()], + ["event", xdr.lookup("ContractEvent")], ]); // === xdr source ============================================================ // -// struct LedgerCloseMetaV0 +// struct OperationDiagnosticEvents // { -// LedgerHeaderHistoryEntry ledgerHeader; -// // NB: txSet is sorted in "Hash order" -// TransactionSet txSet; -// -// // NB: transactions are sorted in apply order here -// // fees for all transactions are processed first -// // followed by applying transactions -// TransactionResultMeta txProcessing<>; -// -// // upgrades are applied last -// UpgradeEntryMeta upgradesProcessing<>; -// -// // other misc information attached to the ledger close -// SCPHistoryEntry scpInfo<>; +// DiagnosticEvent events<>; // }; // // =========================================================================== -xdr.struct("LedgerCloseMetaV0", [ - ["ledgerHeader", xdr.lookup("LedgerHeaderHistoryEntry")], - ["txSet", xdr.lookup("TransactionSet")], - ["txProcessing", xdr.varArray(xdr.lookup("TransactionResultMeta"), 2147483647)], +xdr.struct("OperationDiagnosticEvents", [ + ["events", xdr.varArray(xdr.lookup("DiagnosticEvent"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// struct OperationEvents +// { +// ContractEvent events<>; +// }; +// +// =========================================================================== +xdr.struct("OperationEvents", [ + ["events", xdr.varArray(xdr.lookup("ContractEvent"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// struct TransactionMetaV3 +// { +// LedgerEntryChanges txChangesBefore; // tx level changes before operations +// // are applied if any +// OperationMeta operations<>; // meta for each operation +// LedgerEntryChanges txChangesAfter; // tx level changes after operations are +// // applied if any +// OperationEvents events<>; // custom events populated by the +// // contracts themselves. One list per operation. +// TransactionResult txResult; +// +// Hash hashes[3]; // stores sha256(txChangesBefore, operations, txChangesAfter), +// // sha256(events), and sha256(txResult) +// +// // Diagnostics events that are not hashed. One list per operation. +// // This will contain all contract and diagnostic events. Even ones +// // that were emitted in a failed contract call. +// OperationDiagnosticEvents diagnosticEvents<>; +// }; +// +// =========================================================================== +xdr.struct("TransactionMetaV3", [ + ["txChangesBefore", xdr.lookup("LedgerEntryChanges")], + ["operations", xdr.varArray(xdr.lookup("OperationMeta"), 2147483647)], + ["txChangesAfter", xdr.lookup("LedgerEntryChanges")], + ["events", xdr.varArray(xdr.lookup("OperationEvents"), 2147483647)], + ["txResult", xdr.lookup("TransactionResult")], + ["hashes", xdr.array(xdr.lookup("Hash"), 3)], + ["diagnosticEvents", xdr.varArray(xdr.lookup("OperationDiagnosticEvents"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// union TransactionMeta switch (int v) +// { +// case 0: +// OperationMeta operations<>; +// case 1: +// TransactionMetaV1 v1; +// case 2: +// TransactionMetaV2 v2; +// case 3: +// TransactionMetaV3 v3; +// }; +// +// =========================================================================== +xdr.union("TransactionMeta", { + switchOn: xdr.int(), + switchName: "v", + switches: [ + [0, "operations"], + [1, "v1"], + [2, "v2"], + [3, "v3"], + ], + arms: { + operations: xdr.varArray(xdr.lookup("OperationMeta"), 2147483647), + v1: xdr.lookup("TransactionMetaV1"), + v2: xdr.lookup("TransactionMetaV2"), + v3: xdr.lookup("TransactionMetaV3"), + }, +}); + +// === xdr source ============================================================ +// +// struct TransactionResultMeta +// { +// TransactionResultPair result; +// LedgerEntryChanges feeProcessing; +// TransactionMeta txApplyProcessing; +// }; +// +// =========================================================================== +xdr.struct("TransactionResultMeta", [ + ["result", xdr.lookup("TransactionResultPair")], + ["feeProcessing", xdr.lookup("LedgerEntryChanges")], + ["txApplyProcessing", xdr.lookup("TransactionMeta")], +]); + +// === xdr source ============================================================ +// +// struct TransactionResultMetaV2 +// { +// TransactionResultPairV2 result; +// LedgerEntryChanges feeProcessing; +// TransactionMeta txApplyProcessing; +// }; +// +// =========================================================================== +xdr.struct("TransactionResultMetaV2", [ + ["result", xdr.lookup("TransactionResultPairV2")], + ["feeProcessing", xdr.lookup("LedgerEntryChanges")], + ["txApplyProcessing", xdr.lookup("TransactionMeta")], +]); + +// === xdr source ============================================================ +// +// struct UpgradeEntryMeta +// { +// LedgerUpgrade upgrade; +// LedgerEntryChanges changes; +// }; +// +// =========================================================================== +xdr.struct("UpgradeEntryMeta", [ + ["upgrade", xdr.lookup("LedgerUpgrade")], + ["changes", xdr.lookup("LedgerEntryChanges")], +]); + +// === xdr source ============================================================ +// +// struct LedgerCloseMetaV0 +// { +// LedgerHeaderHistoryEntry ledgerHeader; +// // NB: txSet is sorted in "Hash order" +// TransactionSet txSet; +// +// // NB: transactions are sorted in apply order here +// // fees for all transactions are processed first +// // followed by applying transactions +// TransactionResultMeta txProcessing<>; +// +// // upgrades are applied last +// UpgradeEntryMeta upgradesProcessing<>; +// +// // other misc information attached to the ledger close +// SCPHistoryEntry scpInfo<>; +// }; +// +// =========================================================================== +xdr.struct("LedgerCloseMetaV0", [ + ["ledgerHeader", xdr.lookup("LedgerHeaderHistoryEntry")], + ["txSet", xdr.lookup("TransactionSet")], + ["txProcessing", xdr.varArray(xdr.lookup("TransactionResultMeta"), 2147483647)], ["upgradesProcessing", xdr.varArray(xdr.lookup("UpgradeEntryMeta"), 2147483647)], ["scpInfo", xdr.varArray(xdr.lookup("ScpHistoryEntry"), 2147483647)], ]); @@ -2926,6 +3322,35 @@ xdr.struct("LedgerCloseMetaV1", [ ["scpInfo", xdr.varArray(xdr.lookup("ScpHistoryEntry"), 2147483647)], ]); +// === xdr source ============================================================ +// +// struct LedgerCloseMetaV2 +// { +// LedgerHeaderHistoryEntry ledgerHeader; +// +// GeneralizedTransactionSet txSet; +// +// // NB: transactions are sorted in apply order here +// // fees for all transactions are processed first +// // followed by applying transactions +// TransactionResultMetaV2 txProcessing<>; +// +// // upgrades are applied last +// UpgradeEntryMeta upgradesProcessing<>; +// +// // other misc information attached to the ledger close +// SCPHistoryEntry scpInfo<>; +// }; +// +// =========================================================================== +xdr.struct("LedgerCloseMetaV2", [ + ["ledgerHeader", xdr.lookup("LedgerHeaderHistoryEntry")], + ["txSet", xdr.lookup("GeneralizedTransactionSet")], + ["txProcessing", xdr.varArray(xdr.lookup("TransactionResultMetaV2"), 2147483647)], + ["upgradesProcessing", xdr.varArray(xdr.lookup("UpgradeEntryMeta"), 2147483647)], + ["scpInfo", xdr.varArray(xdr.lookup("ScpHistoryEntry"), 2147483647)], +]); + // === xdr source ============================================================ // // union LedgerCloseMeta switch (int v) @@ -2934,6 +3359,8 @@ xdr.struct("LedgerCloseMetaV1", [ // LedgerCloseMetaV0 v0; // case 1: // LedgerCloseMetaV1 v1; +// case 2: +// LedgerCloseMetaV2 v2; // }; // // =========================================================================== @@ -2943,10 +3370,12 @@ xdr.union("LedgerCloseMeta", { switches: [ [0, "v0"], [1, "v1"], + [2, "v2"], ], arms: { v0: xdr.lookup("LedgerCloseMetaV0"), v1: xdr.lookup("LedgerCloseMetaV1"), + v2: xdr.lookup("LedgerCloseMetaV2"), }, }); @@ -3040,18 +3469,23 @@ xdr.struct("Hello", [ ["nonce", xdr.lookup("Uint256")], ]); +// === xdr source ============================================================ +// +// const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100; +// +// =========================================================================== +xdr.const("AUTH_MSG_FLAG_PULL_MODE_REQUESTED", 100); + // === xdr source ============================================================ // // struct Auth // { -// // Empty message, just to confirm -// // establishment of MAC keys. -// int unused; +// int flags; // }; // // =========================================================================== xdr.struct("Auth", [ - ["unused", xdr.int()], + ["flags", xdr.int()], ]); // === xdr source ============================================================ @@ -3144,7 +3578,9 @@ xdr.struct("PeerAddress", [ // SURVEY_REQUEST = 14, // SURVEY_RESPONSE = 15, // -// SEND_MORE = 16 +// SEND_MORE = 16, +// FLOOD_ADVERT = 18, +// FLOOD_DEMAND = 19 // }; // // =========================================================================== @@ -3166,6 +3602,8 @@ xdr.enum("MessageType", { surveyRequest: 14, surveyResponse: 15, sendMore: 16, + floodAdvert: 18, + floodDemand: 19, }); // === xdr source ============================================================ @@ -3194,6 +3632,20 @@ xdr.enum("SurveyMessageCommandType", { surveyTopology: 0, }); +// === xdr source ============================================================ +// +// enum SurveyMessageResponseType +// { +// SURVEY_TOPOLOGY_RESPONSE_V0 = 0, +// SURVEY_TOPOLOGY_RESPONSE_V1 = 1 +// }; +// +// =========================================================================== +xdr.enum("SurveyMessageResponseType", { + surveyTopologyResponseV0: 0, + surveyTopologyResponseV1: 1, +}); + // === xdr source ============================================================ // // struct SurveyRequestMessage @@ -3320,43 +3772,123 @@ xdr.typedef("PeerStatList", xdr.varArray(xdr.lookup("PeerStats"), 25)); // === xdr source ============================================================ // -// struct TopologyResponseBody +// struct TopologyResponseBodyV0 +// { +// PeerStatList inboundPeers; +// PeerStatList outboundPeers; +// +// uint32 totalInboundPeerCount; +// uint32 totalOutboundPeerCount; +// }; +// +// =========================================================================== +xdr.struct("TopologyResponseBodyV0", [ + ["inboundPeers", xdr.lookup("PeerStatList")], + ["outboundPeers", xdr.lookup("PeerStatList")], + ["totalInboundPeerCount", xdr.lookup("Uint32")], + ["totalOutboundPeerCount", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct TopologyResponseBodyV1 // { // PeerStatList inboundPeers; // PeerStatList outboundPeers; // // uint32 totalInboundPeerCount; // uint32 totalOutboundPeerCount; +// +// uint32 maxInboundPeerCount; +// uint32 maxOutboundPeerCount; // }; // // =========================================================================== -xdr.struct("TopologyResponseBody", [ +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")], ]); // === xdr source ============================================================ // -// union SurveyResponseBody switch (SurveyMessageCommandType type) +// union SurveyResponseBody switch (SurveyMessageResponseType type) // { -// case SURVEY_TOPOLOGY: -// TopologyResponseBody topologyResponseBody; +// case SURVEY_TOPOLOGY_RESPONSE_V0: +// TopologyResponseBodyV0 topologyResponseBodyV0; +// case SURVEY_TOPOLOGY_RESPONSE_V1: +// TopologyResponseBodyV1 topologyResponseBodyV1; // }; // // =========================================================================== xdr.union("SurveyResponseBody", { - switchOn: xdr.lookup("SurveyMessageCommandType"), + switchOn: xdr.lookup("SurveyMessageResponseType"), switchName: "type", switches: [ - ["surveyTopology", "topologyResponseBody"], + ["surveyTopologyResponseV0", "topologyResponseBodyV0"], + ["surveyTopologyResponseV1", "topologyResponseBodyV1"], ], arms: { - topologyResponseBody: xdr.lookup("TopologyResponseBody"), + topologyResponseBodyV0: xdr.lookup("TopologyResponseBodyV0"), + topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1"), }, }); +// === xdr source ============================================================ +// +// const TX_ADVERT_VECTOR_MAX_SIZE = 1000; +// +// =========================================================================== +xdr.const("TX_ADVERT_VECTOR_MAX_SIZE", 1000); + +// === xdr source ============================================================ +// +// typedef Hash TxAdvertVector; +// +// =========================================================================== +xdr.typedef("TxAdvertVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))); + +// === xdr source ============================================================ +// +// struct FloodAdvert +// { +// TxAdvertVector txHashes; +// }; +// +// =========================================================================== +xdr.struct("FloodAdvert", [ + ["txHashes", xdr.lookup("TxAdvertVector")], +]); + +// === xdr source ============================================================ +// +// const TX_DEMAND_VECTOR_MAX_SIZE = 1000; +// +// =========================================================================== +xdr.const("TX_DEMAND_VECTOR_MAX_SIZE", 1000); + +// === xdr source ============================================================ +// +// typedef Hash TxDemandVector; +// +// =========================================================================== +xdr.typedef("TxDemandVector", xdr.varArray(xdr.lookup("Hash"), xdr.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))); + +// === xdr source ============================================================ +// +// struct FloodDemand +// { +// TxDemandVector txHashes; +// }; +// +// =========================================================================== +xdr.struct("FloodDemand", [ + ["txHashes", xdr.lookup("TxDemandVector")], +]); + // === xdr source ============================================================ // // union StellarMessage switch (MessageType type) @@ -3401,6 +3933,12 @@ xdr.union("SurveyResponseBody", { // uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest // case SEND_MORE: // SendMore sendMoreMessage; +// +// // Pull mode +// case FLOOD_ADVERT: +// FloodAdvert floodAdvert; +// case FLOOD_DEMAND: +// FloodDemand floodDemand; // }; // // =========================================================================== @@ -3425,6 +3963,8 @@ xdr.union("StellarMessage", { ["scpMessage", "envelope"], ["getScpState", "getScpLedgerSeq"], ["sendMore", "sendMoreMessage"], + ["floodAdvert", "floodAdvert"], + ["floodDemand", "floodDemand"], ], arms: { error: xdr.lookup("Error"), @@ -3443,6 +3983,8 @@ xdr.union("StellarMessage", { envelope: xdr.lookup("ScpEnvelope"), getScpLedgerSeq: xdr.lookup("Uint32"), sendMoreMessage: xdr.lookup("SendMore"), + floodAdvert: xdr.lookup("FloodAdvert"), + floodDemand: xdr.lookup("FloodDemand"), }, }); @@ -4103,54 +4645,236 @@ xdr.struct("LiquidityPoolWithdrawOp", [ // === xdr source ============================================================ // -// enum HostFunction +// enum HostFunctionType // { -// HOST_FN_CALL = 0, -// HOST_FN_CREATE_CONTRACT = 1 +// HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, +// HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, +// HOST_FUNCTION_TYPE_INSTALL_CONTRACT_CODE = 2 // }; // // =========================================================================== -xdr.enum("HostFunction", { - hostFnCall: 0, - hostFnCreateContract: 1, +xdr.enum("HostFunctionType", { + hostFunctionTypeInvokeContract: 0, + hostFunctionTypeCreateContract: 1, + hostFunctionTypeInstallContractCode: 2, }); // === xdr source ============================================================ // -// struct InvokeHostFunctionOp +// enum ContractIDType // { -// // The host function to invoke -// HostFunction function; -// -// // Parameters to the host function -// SCVec parameters; -// -// // The footprint for this invocation -// LedgerFootprint footprint; +// CONTRACT_ID_FROM_SOURCE_ACCOUNT = 0, +// CONTRACT_ID_FROM_ED25519_PUBLIC_KEY = 1, +// CONTRACT_ID_FROM_ASSET = 2 // }; // // =========================================================================== -xdr.struct("InvokeHostFunctionOp", [ - ["function", xdr.lookup("HostFunction")], - ["parameters", xdr.lookup("ScVec")], - ["footprint", xdr.lookup("LedgerFootprint")], +xdr.enum("ContractIdType", { + contractIdFromSourceAccount: 0, + contractIdFromEd25519PublicKey: 1, + contractIdFromAsset: 2, +}); + +// === xdr source ============================================================ +// +// enum ContractIDPublicKeyType +// { +// CONTRACT_ID_PUBLIC_KEY_SOURCE_ACCOUNT = 0, +// CONTRACT_ID_PUBLIC_KEY_ED25519 = 1 +// }; +// +// =========================================================================== +xdr.enum("ContractIdPublicKeyType", { + contractIdPublicKeySourceAccount: 0, + contractIdPublicKeyEd25519: 1, +}); + +// === xdr source ============================================================ +// +// struct InstallContractCodeArgs +// { +// opaque code; +// }; +// +// =========================================================================== +xdr.struct("InstallContractCodeArgs", [ + ["code", xdr.varOpaque(SCVAL_LIMIT)], ]); // === xdr source ============================================================ // -// union switch (OperationType type) +// struct // { -// case CREATE_ACCOUNT: -// CreateAccountOp createAccountOp; -// case PAYMENT: -// PaymentOp paymentOp; -// case PATH_PAYMENT_STRICT_RECEIVE: -// PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; -// case MANAGE_SELL_OFFER: -// ManageSellOfferOp manageSellOfferOp; -// case CREATE_PASSIVE_SELL_OFFER: -// CreatePassiveSellOfferOp createPassiveSellOfferOp; -// case SET_OPTIONS: +// uint256 key; +// Signature signature; +// uint256 salt; +// } +// +// =========================================================================== +xdr.struct("ContractIdFromEd25519PublicKey", [ + ["key", xdr.lookup("Uint256")], + ["signature", xdr.lookup("Signature")], + ["salt", xdr.lookup("Uint256")], +]); + +// === xdr source ============================================================ +// +// union ContractID switch (ContractIDType type) +// { +// case CONTRACT_ID_FROM_SOURCE_ACCOUNT: +// uint256 salt; +// case CONTRACT_ID_FROM_ED25519_PUBLIC_KEY: +// struct +// { +// uint256 key; +// Signature signature; +// uint256 salt; +// } fromEd25519PublicKey; +// case CONTRACT_ID_FROM_ASSET: +// Asset asset; +// }; +// +// =========================================================================== +xdr.union("ContractId", { + switchOn: xdr.lookup("ContractIdType"), + switchName: "type", + switches: [ + ["contractIdFromSourceAccount", "salt"], + ["contractIdFromEd25519PublicKey", "fromEd25519PublicKey"], + ["contractIdFromAsset", "asset"], + ], + arms: { + salt: xdr.lookup("Uint256"), + fromEd25519PublicKey: xdr.lookup("ContractIdFromEd25519PublicKey"), + asset: xdr.lookup("Asset"), + }, +}); + +// === xdr source ============================================================ +// +// struct CreateContractArgs +// { +// ContractID contractID; +// SCContractExecutable source; +// }; +// +// =========================================================================== +xdr.struct("CreateContractArgs", [ + ["contractId", xdr.lookup("ContractId")], + ["source", xdr.lookup("ScContractExecutable")], +]); + +// === xdr source ============================================================ +// +// union HostFunction switch (HostFunctionType type) +// { +// case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: +// SCVec invokeArgs; +// case HOST_FUNCTION_TYPE_CREATE_CONTRACT: +// CreateContractArgs createContractArgs; +// case HOST_FUNCTION_TYPE_INSTALL_CONTRACT_CODE: +// InstallContractCodeArgs installContractCodeArgs; +// }; +// +// =========================================================================== +xdr.union("HostFunction", { + switchOn: xdr.lookup("HostFunctionType"), + switchName: "type", + switches: [ + ["hostFunctionTypeInvokeContract", "invokeArgs"], + ["hostFunctionTypeCreateContract", "createContractArgs"], + ["hostFunctionTypeInstallContractCode", "installContractCodeArgs"], + ], + arms: { + invokeArgs: xdr.lookup("ScVec"), + createContractArgs: xdr.lookup("CreateContractArgs"), + installContractCodeArgs: xdr.lookup("InstallContractCodeArgs"), + }, +}); + +// === xdr source ============================================================ +// +// struct AuthorizedInvocation +// { +// Hash contractID; +// SCSymbol functionName; +// SCVec args; +// AuthorizedInvocation subInvocations<>; +// }; +// +// =========================================================================== +xdr.struct("AuthorizedInvocation", [ + ["contractId", xdr.lookup("Hash")], + ["functionName", xdr.lookup("ScSymbol")], + ["args", xdr.lookup("ScVec")], + ["subInvocations", xdr.varArray(xdr.lookup("AuthorizedInvocation"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// struct AddressWithNonce +// { +// SCAddress address; +// uint64 nonce; +// }; +// +// =========================================================================== +xdr.struct("AddressWithNonce", [ + ["address", xdr.lookup("ScAddress")], + ["nonce", xdr.lookup("Uint64")], +]); + +// === xdr source ============================================================ +// +// struct ContractAuth +// { +// AddressWithNonce* addressWithNonce; // not present for invoker +// AuthorizedInvocation rootInvocation; +// SCVec signatureArgs; +// }; +// +// =========================================================================== +xdr.struct("ContractAuth", [ + ["addressWithNonce", xdr.option(xdr.lookup("AddressWithNonce"))], + ["rootInvocation", xdr.lookup("AuthorizedInvocation")], + ["signatureArgs", xdr.lookup("ScVec")], +]); + +// === xdr source ============================================================ +// +// struct InvokeHostFunctionOp +// { +// // The host function to invoke +// HostFunction function; +// // The footprint for this invocation +// LedgerFootprint footprint; +// // Per-address authorizations for this host fn +// // Currently only supported for INVOKE_CONTRACT function +// ContractAuth auth<>; +// }; +// +// =========================================================================== +xdr.struct("InvokeHostFunctionOp", [ + ["function", xdr.lookup("HostFunction")], + ["footprint", xdr.lookup("LedgerFootprint")], + ["auth", xdr.varArray(xdr.lookup("ContractAuth"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// union switch (OperationType type) +// { +// case CREATE_ACCOUNT: +// CreateAccountOp createAccountOp; +// case PAYMENT: +// PaymentOp paymentOp; +// case PATH_PAYMENT_STRICT_RECEIVE: +// PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; +// case MANAGE_SELL_OFFER: +// ManageSellOfferOp manageSellOfferOp; +// case CREATE_PASSIVE_SELL_OFFER: +// CreatePassiveSellOfferOp createPassiveSellOfferOp; +// case SET_OPTIONS: // SetOptionsOp setOptionsOp; // case CHANGE_TRUST: // ChangeTrustOp changeTrustOp; @@ -4361,12 +5085,14 @@ xdr.struct("HashIdPreimageRevokeId", [ // // struct // { +// Hash networkID; // uint256 ed25519; // uint256 salt; // } // // =========================================================================== xdr.struct("HashIdPreimageEd25519ContractId", [ + ["networkId", xdr.lookup("Hash")], ["ed25519", xdr.lookup("Uint256")], ["salt", xdr.lookup("Uint256")], ]); @@ -4375,16 +5101,80 @@ xdr.struct("HashIdPreimageEd25519ContractId", [ // // struct // { +// Hash networkID; // Hash contractID; // uint256 salt; // } // // =========================================================================== xdr.struct("HashIdPreimageContractId", [ + ["networkId", xdr.lookup("Hash")], ["contractId", xdr.lookup("Hash")], ["salt", xdr.lookup("Uint256")], ]); +// === xdr source ============================================================ +// +// struct +// { +// Hash networkID; +// Asset asset; +// } +// +// =========================================================================== +xdr.struct("HashIdPreimageFromAsset", [ + ["networkId", xdr.lookup("Hash")], + ["asset", xdr.lookup("Asset")], +]); + +// === xdr source ============================================================ +// +// struct +// { +// Hash networkID; +// AccountID sourceAccount; +// uint256 salt; +// } +// +// =========================================================================== +xdr.struct("HashIdPreimageSourceAccountContractId", [ + ["networkId", xdr.lookup("Hash")], + ["sourceAccount", xdr.lookup("AccountId")], + ["salt", xdr.lookup("Uint256")], +]); + +// === xdr source ============================================================ +// +// struct +// { +// Hash networkID; +// SCContractExecutable source; +// uint256 salt; +// } +// +// =========================================================================== +xdr.struct("HashIdPreimageCreateContractArgs", [ + ["networkId", xdr.lookup("Hash")], + ["source", xdr.lookup("ScContractExecutable")], + ["salt", xdr.lookup("Uint256")], +]); + +// === xdr source ============================================================ +// +// struct +// { +// Hash networkID; +// uint64 nonce; +// AuthorizedInvocation invocation; +// } +// +// =========================================================================== +xdr.struct("HashIdPreimageContractAuth", [ + ["networkId", xdr.lookup("Hash")], + ["nonce", xdr.lookup("Uint64")], + ["invocation", xdr.lookup("AuthorizedInvocation")], +]); + // === xdr source ============================================================ // // union HashIDPreimage switch (EnvelopeType type) @@ -4408,15 +5198,44 @@ xdr.struct("HashIdPreimageContractId", [ // case ENVELOPE_TYPE_CONTRACT_ID_FROM_ED25519: // struct // { +// Hash networkID; // uint256 ed25519; // uint256 salt; // } ed25519ContractID; // case ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT: // struct // { +// Hash networkID; // Hash contractID; // uint256 salt; // } contractID; +// case ENVELOPE_TYPE_CONTRACT_ID_FROM_ASSET: +// struct +// { +// Hash networkID; +// Asset asset; +// } fromAsset; +// case ENVELOPE_TYPE_CONTRACT_ID_FROM_SOURCE_ACCOUNT: +// struct +// { +// Hash networkID; +// AccountID sourceAccount; +// uint256 salt; +// } sourceAccountContractID; +// case ENVELOPE_TYPE_CREATE_CONTRACT_ARGS: +// struct +// { +// Hash networkID; +// SCContractExecutable source; +// uint256 salt; +// } createContractArgs; +// case ENVELOPE_TYPE_CONTRACT_AUTH: +// struct +// { +// Hash networkID; +// uint64 nonce; +// AuthorizedInvocation invocation; +// } contractAuth; // }; // // =========================================================================== @@ -4428,12 +5247,20 @@ xdr.union("HashIdPreimage", { ["envelopeTypePoolRevokeOpId", "revokeId"], ["envelopeTypeContractIdFromEd25519", "ed25519ContractId"], ["envelopeTypeContractIdFromContract", "contractId"], + ["envelopeTypeContractIdFromAsset", "fromAsset"], + ["envelopeTypeContractIdFromSourceAccount", "sourceAccountContractId"], + ["envelopeTypeCreateContractArgs", "createContractArgs"], + ["envelopeTypeContractAuth", "contractAuth"], ], arms: { operationId: xdr.lookup("HashIdPreimageOperationId"), revokeId: xdr.lookup("HashIdPreimageRevokeId"), ed25519ContractId: xdr.lookup("HashIdPreimageEd25519ContractId"), contractId: xdr.lookup("HashIdPreimageContractId"), + fromAsset: xdr.lookup("HashIdPreimageFromAsset"), + sourceAccountContractId: xdr.lookup("HashIdPreimageSourceAccountContractId"), + createContractArgs: xdr.lookup("HashIdPreimageCreateContractArgs"), + contractAuth: xdr.lookup("HashIdPreimageContractAuth"), }, }); @@ -6610,7 +7437,7 @@ xdr.enum("InvokeHostFunctionResultCode", { // union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) // { // case INVOKE_HOST_FUNCTION_SUCCESS: -// void; +// SCVal success; // case INVOKE_HOST_FUNCTION_MALFORMED: // case INVOKE_HOST_FUNCTION_TRAPPED: // void; @@ -6621,11 +7448,12 @@ xdr.union("InvokeHostFunctionResult", { switchOn: xdr.lookup("InvokeHostFunctionResultCode"), switchName: "code", switches: [ - ["invokeHostFunctionSuccess", xdr.void()], + ["invokeHostFunctionSuccess", "success"], ["invokeHostFunctionMalformed", xdr.void()], ["invokeHostFunctionTrapped", xdr.void()], ], arms: { + success: xdr.lookup("ScVal"), }, }); @@ -7209,6 +8037,20 @@ xdr.typedef("Uint64", xdr.uhyper()); // =========================================================================== xdr.typedef("Int64", xdr.hyper()); +// === xdr source ============================================================ +// +// typedef uint64 TimePoint; +// +// =========================================================================== +xdr.typedef("TimePoint", xdr.lookup("Uint64")); + +// === xdr source ============================================================ +// +// typedef uint64 Duration; +// +// =========================================================================== +xdr.typedef("Duration", xdr.lookup("Uint64")); + // === xdr source ============================================================ // // union ExtensionPoint switch (int v) @@ -7377,6 +8219,13 @@ xdr.typedef("SignatureHint", xdr.opaque(4)); // =========================================================================== xdr.typedef("NodeId", xdr.lookup("PublicKey")); +// === xdr source ============================================================ +// +// typedef PublicKey AccountID; +// +// =========================================================================== +xdr.typedef("AccountId", xdr.lookup("PublicKey")); + // === xdr source ============================================================ // // struct Curve25519Secret @@ -7425,55 +8274,88 @@ xdr.struct("HmacSha256Mac", [ ["mac", xdr.opaque(32)], ]); -// === xdr source ============================================================ -// -// typedef string SCSymbol<10>; -// -// =========================================================================== -xdr.typedef("ScSymbol", xdr.string(10)); - // === xdr source ============================================================ // // enum SCValType // { -// SCV_U63 = 0, -// SCV_U32 = 1, -// SCV_I32 = 2, -// SCV_STATIC = 3, -// SCV_OBJECT = 4, -// SCV_SYMBOL = 5, -// SCV_BITSET = 6, -// SCV_STATUS = 7 +// SCV_BOOL = 0, +// SCV_VOID = 1, +// SCV_STATUS = 2, +// +// // 32 bits is the smallest type in WASM or XDR; no need for u8/u16. +// SCV_U32 = 3, +// SCV_I32 = 4, +// +// // 64 bits is naturally supported by both WASM and XDR also. +// SCV_U64 = 5, +// SCV_I64 = 6, +// +// // Time-related u64 subtypes with their own functions and formatting. +// SCV_TIMEPOINT = 7, +// SCV_DURATION = 8, +// +// // 128 bits is naturally supported by Rust and we use it for Soroban +// // fixed-point arithmetic prices / balances / similar "quantities". These +// // are represented in XDR as a pair of 2 u64s, unlike {u,i}256 which is +// // represented as an array of 32 bytes. +// SCV_U128 = 9, +// SCV_I128 = 10, +// +// // 256 bits is the size of sha256 output, ed25519 keys, and the EVM machine +// // word, so for interop use we include this even though it requires a small +// // amount of Rust guest and/or host library code. +// SCV_U256 = 11, +// SCV_I256 = 12, +// +// // TODO: possibly allocate subtypes of i64, i128 and/or u256 for +// // fixed-precision with a specific number of decimals. +// +// // Bytes come in 3 flavors, 2 of which have meaningfully different +// // formatting and validity-checking / domain-restriction. +// SCV_BYTES = 13, +// SCV_STRING = 14, +// SCV_SYMBOL = 15, +// +// // Vecs and maps are just polymorphic containers of other ScVals. +// SCV_VEC = 16, +// SCV_MAP = 17, +// +// // SCContractExecutable and SCAddressType are types that gets used separately from +// // SCVal so we do not flatten their structures into separate SCVal cases. +// SCV_CONTRACT_EXECUTABLE = 18, +// SCV_ADDRESS = 19, +// +// // SCV_LEDGER_KEY_CONTRACT_EXECUTABLE and SCV_LEDGER_KEY_NONCE are unique +// // symbolic SCVals used as the key for ledger entries for a contract's code +// // and an address' nonce, respectively. +// SCV_LEDGER_KEY_CONTRACT_EXECUTABLE = 20, +// SCV_LEDGER_KEY_NONCE = 21 // }; // // =========================================================================== xdr.enum("ScValType", { - scvU63: 0, - scvU32: 1, - scvI32: 2, - scvStatic: 3, - scvObject: 4, - scvSymbol: 5, - scvBitset: 6, - scvStatus: 7, -}); - -// === xdr source ============================================================ -// -// enum SCStatic -// { -// SCS_VOID = 0, -// SCS_TRUE = 1, -// SCS_FALSE = 2, -// SCS_LEDGER_KEY_CONTRACT_CODE = 3 -// }; -// -// =========================================================================== -xdr.enum("ScStatic", { - scsVoid: 0, - scsTrue: 1, - scsFalse: 2, - scsLedgerKeyContractCode: 3, + scvBool: 0, + scvVoid: 1, + scvStatus: 2, + scvU32: 3, + scvI32: 4, + scvU64: 5, + scvI64: 6, + scvTimepoint: 7, + scvDuration: 8, + scvU128: 9, + scvI128: 10, + scvU256: 11, + scvI256: 12, + scvBytes: 13, + scvString: 14, + scvSymbol: 15, + scvVec: 16, + scvMap: 17, + scvContractExecutable: 18, + scvAddress: 19, + scvLedgerKeyContractExecutable: 20, + scvLedgerKeyNonce: 21, }); // === xdr source ============================================================ @@ -7487,7 +8369,9 @@ xdr.enum("ScStatic", { // SST_HOST_FUNCTION_ERROR = 4, // SST_HOST_STORAGE_ERROR = 5, // SST_HOST_CONTEXT_ERROR = 6, -// SST_VM_ERROR = 7 +// SST_VM_ERROR = 7, +// SST_CONTRACT_ERROR = 8, +// SST_HOST_AUTH_ERROR = 9 // // TODO: add more // }; // @@ -7501,6 +8385,8 @@ xdr.enum("ScStatusType", { sstHostStorageError: 5, sstHostContextError: 6, sstVmError: 7, + sstContractError: 8, + sstHostAuthError: 9, }); // === xdr source ============================================================ @@ -7603,6 +8489,24 @@ xdr.enum("ScHostStorageErrorCode", { hostStorageGetOnDeletedKey: 5, }); +// === xdr source ============================================================ +// +// enum SCHostAuthErrorCode +// { +// HOST_AUTH_UNKNOWN_ERROR = 0, +// HOST_AUTH_NONCE_ERROR = 1, +// HOST_AUTH_DUPLICATE_AUTHORIZATION = 2, +// HOST_AUTH_NOT_AUTHORIZED = 3 +// }; +// +// =========================================================================== +xdr.enum("ScHostAuthErrorCode", { + hostAuthUnknownError: 0, + hostAuthNonceError: 1, + hostAuthDuplicateAuthorization: 2, + hostAuthNotAuthorized: 3, +}); + // === xdr source ============================================================ // // enum SCHostContextErrorCode @@ -7687,17 +8591,21 @@ xdr.enum("ScUnknownErrorCode", { // case SST_UNKNOWN_ERROR: // SCUnknownErrorCode unknownCode; // case SST_HOST_VALUE_ERROR: -// SCHostValErrorCode errorCode; +// SCHostValErrorCode valCode; // case SST_HOST_OBJECT_ERROR: -// SCHostObjErrorCode errorCode; +// SCHostObjErrorCode objCode; // case SST_HOST_FUNCTION_ERROR: -// SCHostFnErrorCode errorCode; +// SCHostFnErrorCode fnCode; // case SST_HOST_STORAGE_ERROR: -// SCHostStorageErrorCode errorCode; +// SCHostStorageErrorCode storageCode; // case SST_HOST_CONTEXT_ERROR: -// SCHostContextErrorCode errorCode; +// SCHostContextErrorCode contextCode; // case SST_VM_ERROR: -// SCVmErrorCode errorCode; +// SCVmErrorCode vmCode; +// case SST_CONTRACT_ERROR: +// uint32 contractCode; +// case SST_HOST_AUTH_ERROR: +// SCHostAuthErrorCode authCode; // }; // // =========================================================================== @@ -7707,302 +8615,352 @@ xdr.union("ScStatus", { switches: [ ["sstOk", xdr.void()], ["sstUnknownError", "unknownCode"], - ["sstHostValueError", "errorCode"], - ["sstHostObjectError", "errorCode"], - ["sstHostFunctionError", "errorCode"], - ["sstHostStorageError", "errorCode"], - ["sstHostContextError", "errorCode"], - ["sstVmError", "errorCode"], + ["sstHostValueError", "valCode"], + ["sstHostObjectError", "objCode"], + ["sstHostFunctionError", "fnCode"], + ["sstHostStorageError", "storageCode"], + ["sstHostContextError", "contextCode"], + ["sstVmError", "vmCode"], + ["sstContractError", "contractCode"], + ["sstHostAuthError", "authCode"], ], arms: { unknownCode: xdr.lookup("ScUnknownErrorCode"), - errorCode: xdr.lookup("ScHostValErrorCode"), - errorCode: xdr.lookup("ScHostObjErrorCode"), - errorCode: xdr.lookup("ScHostFnErrorCode"), - errorCode: xdr.lookup("ScHostStorageErrorCode"), - errorCode: xdr.lookup("ScHostContextErrorCode"), - errorCode: xdr.lookup("ScVmErrorCode"), + valCode: xdr.lookup("ScHostValErrorCode"), + objCode: xdr.lookup("ScHostObjErrorCode"), + fnCode: xdr.lookup("ScHostFnErrorCode"), + storageCode: xdr.lookup("ScHostStorageErrorCode"), + contextCode: xdr.lookup("ScHostContextErrorCode"), + vmCode: xdr.lookup("ScVmErrorCode"), + contractCode: xdr.lookup("Uint32"), + authCode: xdr.lookup("ScHostAuthErrorCode"), }, }); // === xdr source ============================================================ // -// union SCVal switch (SCValType type) -// { -// case SCV_U63: -// int64 u63; -// case SCV_U32: -// uint32 u32; -// case SCV_I32: -// int32 i32; -// case SCV_STATIC: -// SCStatic ic; -// case SCV_OBJECT: -// SCObject* obj; -// case SCV_SYMBOL: -// SCSymbol sym; -// case SCV_BITSET: -// uint64 bits; -// case SCV_STATUS: -// SCStatus status; +// struct UInt128Parts { +// uint64 hi; +// uint64 lo; // }; // // =========================================================================== -xdr.union("ScVal", { - switchOn: xdr.lookup("ScValType"), - switchName: "type", - switches: [ - ["scvU63", "u63"], - ["scvU32", "u32"], - ["scvI32", "i32"], - ["scvStatic", "ic"], - ["scvObject", "obj"], - ["scvSymbol", "sym"], - ["scvBitset", "bits"], - ["scvStatus", "status"], - ], - arms: { - u63: xdr.lookup("Int64"), - u32: xdr.lookup("Uint32"), - i32: xdr.lookup("Int32"), - ic: xdr.lookup("ScStatic"), - obj: xdr.option(xdr.lookup("ScObject")), - sym: xdr.lookup("ScSymbol"), - bits: xdr.lookup("Uint64"), - status: xdr.lookup("ScStatus"), - }, -}); +xdr.struct("UInt128Parts", [ + ["hi", xdr.lookup("Uint64")], + ["lo", xdr.lookup("Uint64")], +]); // === xdr source ============================================================ // -// enum SCObjectType -// { -// // We have a few objects that represent non-stellar-specific concepts -// // like general-purpose maps, vectors, numbers, blobs. -// -// SCO_VEC = 0, -// SCO_MAP = 1, -// SCO_U64 = 2, -// SCO_I64 = 3, -// SCO_BYTES = 4, -// SCO_BIG_INT = 5, -// SCO_HASH = 6, -// SCO_PUBLIC_KEY = 7, -// SCO_CONTRACT_CODE = 8 -// -// // TODO: add more +// struct Int128Parts { +// int64 hi; +// uint64 lo; // }; // // =========================================================================== -xdr.enum("ScObjectType", { - scoVec: 0, - scoMap: 1, - scoU64: 2, - scoI64: 3, - scoBytes: 4, - scoBigInt: 5, - scoHash: 6, - scoPublicKey: 7, - scoContractCode: 8, -}); +xdr.struct("Int128Parts", [ + ["hi", xdr.lookup("Int64")], + ["lo", xdr.lookup("Uint64")], +]); // === xdr source ============================================================ // -// struct SCMapEntry -// { -// SCVal key; -// SCVal val; +// struct UInt256Parts { +// uint64 hi_hi; +// uint64 hi_lo; +// uint64 lo_hi; +// uint64 lo_lo; // }; // // =========================================================================== -xdr.struct("ScMapEntry", [ - ["key", xdr.lookup("ScVal")], - ["val", xdr.lookup("ScVal")], +xdr.struct("UInt256Parts", [ + ["hiHi", xdr.lookup("Uint64")], + ["hiLo", xdr.lookup("Uint64")], + ["loHi", xdr.lookup("Uint64")], + ["loLo", xdr.lookup("Uint64")], ]); // === xdr source ============================================================ // -// const SCVAL_LIMIT = 256000; -// -// =========================================================================== -xdr.const("SCVAL_LIMIT", 256000); - -// === xdr source ============================================================ -// -// typedef SCVal SCVec; -// -// =========================================================================== -xdr.typedef("ScVec", xdr.varArray(xdr.lookup("ScVal"), xdr.lookup("SCVAL_LIMIT"))); - -// === xdr source ============================================================ -// -// typedef SCMapEntry SCMap; +// struct Int256Parts { +// int64 hi_hi; +// uint64 hi_lo; +// uint64 lo_hi; +// uint64 lo_lo; +// }; // // =========================================================================== -xdr.typedef("ScMap", xdr.varArray(xdr.lookup("ScMapEntry"), xdr.lookup("SCVAL_LIMIT"))); +xdr.struct("Int256Parts", [ + ["hiHi", xdr.lookup("Int64")], + ["hiLo", xdr.lookup("Uint64")], + ["loHi", xdr.lookup("Uint64")], + ["loLo", xdr.lookup("Uint64")], +]); // === xdr source ============================================================ // -// enum SCNumSign +// enum SCContractExecutableType // { -// NEGATIVE = -1, -// ZERO = 0, -// POSITIVE = 1 +// SCCONTRACT_EXECUTABLE_WASM_REF = 0, +// SCCONTRACT_EXECUTABLE_TOKEN = 1 // }; // // =========================================================================== -xdr.enum("ScNumSign", { - negative: -1, - zero: 0, - positive: 1, +xdr.enum("ScContractExecutableType", { + sccontractExecutableWasmRef: 0, + sccontractExecutableToken: 1, }); // === xdr source ============================================================ // -// union SCBigInt switch (SCNumSign sign) +// union SCContractExecutable switch (SCContractExecutableType type) // { -// case ZERO: +// case SCCONTRACT_EXECUTABLE_WASM_REF: +// Hash wasm_id; +// case SCCONTRACT_EXECUTABLE_TOKEN: // void; -// case POSITIVE: -// case NEGATIVE: -// opaque magnitude<256000>; // }; // // =========================================================================== -xdr.union("ScBigInt", { - switchOn: xdr.lookup("ScNumSign"), - switchName: "sign", +xdr.union("ScContractExecutable", { + switchOn: xdr.lookup("ScContractExecutableType"), + switchName: "type", switches: [ - ["zero", xdr.void()], - ["positive", "magnitude"], - ["negative", "magnitude"], + ["sccontractExecutableWasmRef", "wasmId"], + ["sccontractExecutableToken", xdr.void()], ], arms: { - magnitude: xdr.varOpaque(256000), + wasmId: xdr.lookup("Hash"), }, }); // === xdr source ============================================================ // -// enum SCHashType +// enum SCAddressType // { -// SCHASH_SHA256 = 0 +// SC_ADDRESS_TYPE_ACCOUNT = 0, +// SC_ADDRESS_TYPE_CONTRACT = 1 // }; // // =========================================================================== -xdr.enum("ScHashType", { - schashSha256: 0, +xdr.enum("ScAddressType", { + scAddressTypeAccount: 0, + scAddressTypeContract: 1, }); // === xdr source ============================================================ // -// union SCHash switch (SCHashType type) +// union SCAddress switch (SCAddressType type) // { -// case SCHASH_SHA256: -// Hash sha256; +// case SC_ADDRESS_TYPE_ACCOUNT: +// AccountID accountId; +// case SC_ADDRESS_TYPE_CONTRACT: +// Hash contractId; // }; // // =========================================================================== -xdr.union("ScHash", { - switchOn: xdr.lookup("ScHashType"), +xdr.union("ScAddress", { + switchOn: xdr.lookup("ScAddressType"), switchName: "type", switches: [ - ["schashSha256", "sha256"], + ["scAddressTypeAccount", "accountId"], + ["scAddressTypeContract", "contractId"], ], arms: { - sha256: xdr.lookup("Hash"), + accountId: xdr.lookup("AccountId"), + contractId: xdr.lookup("Hash"), }, }); // === xdr source ============================================================ // -// enum SCContractCodeType -// { -// SCCONTRACT_CODE_WASM = 0, -// SCCONTRACT_CODE_TOKEN = 1 -// }; +// const SCVAL_LIMIT = 256000; // // =========================================================================== -xdr.enum("ScContractCodeType", { - sccontractCodeWasm: 0, - sccontractCodeToken: 1, -}); +xdr.const("SCVAL_LIMIT", 256000); // === xdr source ============================================================ // -// union SCContractCode switch (SCContractCodeType type) -// { -// case SCCONTRACT_CODE_WASM: -// opaque wasm; -// case SCCONTRACT_CODE_TOKEN: -// void; +// const SCSYMBOL_LIMIT = 32; +// +// =========================================================================== +xdr.const("SCSYMBOL_LIMIT", 32); + +// === xdr source ============================================================ +// +// typedef SCVal SCVec; +// +// =========================================================================== +xdr.typedef("ScVec", xdr.varArray(xdr.lookup("ScVal"), xdr.lookup("SCVAL_LIMIT"))); + +// === xdr source ============================================================ +// +// typedef SCMapEntry SCMap; +// +// =========================================================================== +xdr.typedef("ScMap", xdr.varArray(xdr.lookup("ScMapEntry"), xdr.lookup("SCVAL_LIMIT"))); + +// === xdr source ============================================================ +// +// typedef opaque SCBytes; +// +// =========================================================================== +xdr.typedef("ScBytes", xdr.varOpaque(SCVAL_LIMIT)); + +// === xdr source ============================================================ +// +// typedef string SCString; +// +// =========================================================================== +xdr.typedef("ScString", xdr.string(SCVAL_LIMIT)); + +// === xdr source ============================================================ +// +// typedef string SCSymbol; +// +// =========================================================================== +xdr.typedef("ScSymbol", xdr.string(SCSYMBOL_LIMIT)); + +// === xdr source ============================================================ +// +// struct SCNonceKey { +// SCAddress nonce_address; // }; // // =========================================================================== -xdr.union("ScContractCode", { - switchOn: xdr.lookup("ScContractCodeType"), - switchName: "type", - switches: [ - ["sccontractCodeWasm", "wasm"], - ["sccontractCodeToken", xdr.void()], - ], - arms: { - wasm: xdr.varOpaque(SCVAL_LIMIT), - }, -}); +xdr.struct("ScNonceKey", [ + ["nonceAddress", xdr.lookup("ScAddress")], +]); // === xdr source ============================================================ // -// union SCObject switch (SCObjectType type) +// union SCVal switch (SCValType type) // { -// case SCO_VEC: -// SCVec vec; -// case SCO_MAP: -// SCMap map; -// case SCO_U64: +// +// case SCV_BOOL: +// bool b; +// case SCV_VOID: +// void; +// case SCV_STATUS: +// SCStatus error; +// +// case SCV_U32: +// uint32 u32; +// case SCV_I32: +// int32 i32; +// +// case SCV_U64: // uint64 u64; -// case SCO_I64: +// case SCV_I64: // int64 i64; -// case SCO_BYTES: -// opaque bin; -// case SCO_BIG_INT: -// SCBigInt bigInt; -// case SCO_HASH: -// SCHash hash; -// case SCO_PUBLIC_KEY: -// PublicKey publicKey; -// case SCO_CONTRACT_CODE: -// SCContractCode contractCode; +// case SCV_TIMEPOINT: +// TimePoint timepoint; +// case SCV_DURATION: +// Duration duration; +// +// case SCV_U128: +// UInt128Parts u128; +// case SCV_I128: +// Int128Parts i128; +// +// case SCV_U256: +// UInt256Parts u256; +// case SCV_I256: +// Int256Parts i256; +// +// case SCV_BYTES: +// SCBytes bytes; +// case SCV_STRING: +// SCString str; +// case SCV_SYMBOL: +// SCSymbol sym; +// +// // Vec and Map are recursive so need to live +// // behind an option, due to xdrpp limitations. +// case SCV_VEC: +// SCVec *vec; +// case SCV_MAP: +// SCMap *map; +// +// case SCV_CONTRACT_EXECUTABLE: +// SCContractExecutable exec; +// case SCV_ADDRESS: +// SCAddress address; +// +// // Special SCVals reserved for system-constructed contract-data +// // ledger keys, not generally usable elsewhere. +// case SCV_LEDGER_KEY_CONTRACT_EXECUTABLE: +// void; +// case SCV_LEDGER_KEY_NONCE: +// SCNonceKey nonce_key; // }; // // =========================================================================== -xdr.union("ScObject", { - switchOn: xdr.lookup("ScObjectType"), +xdr.union("ScVal", { + switchOn: xdr.lookup("ScValType"), switchName: "type", switches: [ - ["scoVec", "vec"], - ["scoMap", "map"], - ["scoU64", "u64"], - ["scoI64", "i64"], - ["scoBytes", "bin"], - ["scoBigInt", "bigInt"], - ["scoHash", "hash"], - ["scoPublicKey", "publicKey"], - ["scoContractCode", "contractCode"], + ["scvBool", "b"], + ["scvVoid", xdr.void()], + ["scvStatus", "error"], + ["scvU32", "u32"], + ["scvI32", "i32"], + ["scvU64", "u64"], + ["scvI64", "i64"], + ["scvTimepoint", "timepoint"], + ["scvDuration", "duration"], + ["scvU128", "u128"], + ["scvI128", "i128"], + ["scvU256", "u256"], + ["scvI256", "i256"], + ["scvBytes", "bytes"], + ["scvString", "str"], + ["scvSymbol", "sym"], + ["scvVec", "vec"], + ["scvMap", "map"], + ["scvContractExecutable", "exec"], + ["scvAddress", "address"], + ["scvLedgerKeyContractExecutable", xdr.void()], + ["scvLedgerKeyNonce", "nonceKey"], ], arms: { - vec: xdr.lookup("ScVec"), - map: xdr.lookup("ScMap"), + b: xdr.bool(), + error: xdr.lookup("ScStatus"), + u32: xdr.lookup("Uint32"), + i32: xdr.lookup("Int32"), u64: xdr.lookup("Uint64"), i64: xdr.lookup("Int64"), - bin: xdr.varOpaque(SCVAL_LIMIT), - bigInt: xdr.lookup("ScBigInt"), - hash: xdr.lookup("ScHash"), - publicKey: xdr.lookup("PublicKey"), - contractCode: xdr.lookup("ScContractCode"), + timepoint: xdr.lookup("TimePoint"), + duration: xdr.lookup("Duration"), + u128: xdr.lookup("UInt128Parts"), + i128: xdr.lookup("Int128Parts"), + u256: xdr.lookup("UInt256Parts"), + i256: xdr.lookup("Int256Parts"), + bytes: xdr.lookup("ScBytes"), + str: xdr.lookup("ScString"), + sym: xdr.lookup("ScSymbol"), + vec: xdr.option(xdr.lookup("ScVec")), + map: xdr.option(xdr.lookup("ScMap")), + exec: xdr.lookup("ScContractExecutable"), + address: xdr.lookup("ScAddress"), + nonceKey: xdr.lookup("ScNonceKey"), }, }); +// === xdr source ============================================================ +// +// struct SCMapEntry +// { +// SCVal key; +// SCVal val; +// }; +// +// =========================================================================== +xdr.struct("ScMapEntry", [ + ["key", xdr.lookup("ScVal")], + ["val", xdr.lookup("ScVal")], +]); + // === xdr source ============================================================ // // enum SCEnvMetaKind @@ -8035,21 +8993,37 @@ xdr.union("ScEnvMetaEntry", { }, }); +// === xdr source ============================================================ +// +// const SC_SPEC_DOC_LIMIT = 1024; +// +// =========================================================================== +xdr.const("SC_SPEC_DOC_LIMIT", 1024); + // === xdr source ============================================================ // // enum SCSpecType // { +// SC_SPEC_TYPE_VAL = 0, +// // // Types with no parameters. -// SC_SPEC_TYPE_U32 = 1, -// SC_SPEC_TYPE_I32 = 2, -// SC_SPEC_TYPE_U64 = 3, -// SC_SPEC_TYPE_I64 = 4, -// SC_SPEC_TYPE_BOOL = 5, -// SC_SPEC_TYPE_SYMBOL = 6, -// SC_SPEC_TYPE_BITSET = 7, -// SC_SPEC_TYPE_STATUS = 8, -// SC_SPEC_TYPE_BYTES = 9, -// SC_SPEC_TYPE_BIG_INT = 10, +// SC_SPEC_TYPE_BOOL = 1, +// SC_SPEC_TYPE_VOID = 2, +// SC_SPEC_TYPE_STATUS = 3, +// SC_SPEC_TYPE_U32 = 4, +// SC_SPEC_TYPE_I32 = 5, +// SC_SPEC_TYPE_U64 = 6, +// SC_SPEC_TYPE_I64 = 7, +// SC_SPEC_TYPE_TIMEPOINT = 8, +// SC_SPEC_TYPE_DURATION = 9, +// SC_SPEC_TYPE_U128 = 10, +// SC_SPEC_TYPE_I128 = 11, +// SC_SPEC_TYPE_U256 = 12, +// SC_SPEC_TYPE_I256 = 13, +// SC_SPEC_TYPE_BYTES = 14, +// SC_SPEC_TYPE_STRING = 16, +// SC_SPEC_TYPE_SYMBOL = 17, +// SC_SPEC_TYPE_ADDRESS = 19, // // // Types with parameters. // SC_SPEC_TYPE_OPTION = 1000, @@ -8058,6 +9032,7 @@ xdr.union("ScEnvMetaEntry", { // SC_SPEC_TYPE_SET = 1003, // SC_SPEC_TYPE_MAP = 1004, // SC_SPEC_TYPE_TUPLE = 1005, +// SC_SPEC_TYPE_BYTES_N = 1006, // // // User defined types. // SC_SPEC_TYPE_UDT = 2000 @@ -8065,22 +9040,31 @@ xdr.union("ScEnvMetaEntry", { // // =========================================================================== xdr.enum("ScSpecType", { - scSpecTypeU32: 1, - scSpecTypeI32: 2, - scSpecTypeU64: 3, - scSpecTypeI64: 4, - scSpecTypeBool: 5, - scSpecTypeSymbol: 6, - scSpecTypeBitset: 7, - scSpecTypeStatus: 8, - scSpecTypeBytes: 9, - scSpecTypeBigInt: 10, + scSpecTypeVal: 0, + scSpecTypeBool: 1, + scSpecTypeVoid: 2, + scSpecTypeStatus: 3, + scSpecTypeU32: 4, + scSpecTypeI32: 5, + scSpecTypeU64: 6, + scSpecTypeI64: 7, + scSpecTypeTimepoint: 8, + scSpecTypeDuration: 9, + scSpecTypeU128: 10, + scSpecTypeI128: 11, + scSpecTypeU256: 12, + scSpecTypeI256: 13, + scSpecTypeBytes: 14, + scSpecTypeString: 16, + scSpecTypeSymbol: 17, + scSpecTypeAddress: 19, scSpecTypeOption: 1000, scSpecTypeResult: 1001, scSpecTypeVec: 1002, scSpecTypeSet: 1003, scSpecTypeMap: 1004, scSpecTypeTuple: 1005, + scSpecTypeBytesN: 1006, scSpecTypeUdt: 2000, }); @@ -8160,6 +9144,18 @@ xdr.struct("ScSpecTypeTuple", [ ["valueTypes", xdr.varArray(xdr.lookup("ScSpecTypeDef"), 12)], ]); +// === xdr source ============================================================ +// +// struct SCSpecTypeBytesN +// { +// uint32 n; +// }; +// +// =========================================================================== +xdr.struct("ScSpecTypeBytesN", [ + ["n", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct SCSpecTypeUDT @@ -8176,16 +9172,24 @@ xdr.struct("ScSpecTypeUdt", [ // // union SCSpecTypeDef switch (SCSpecType type) // { -// case SC_SPEC_TYPE_U64: -// case SC_SPEC_TYPE_I64: -// case SC_SPEC_TYPE_U32: -// case SC_SPEC_TYPE_I32: +// case SC_SPEC_TYPE_VAL: // case SC_SPEC_TYPE_BOOL: -// case SC_SPEC_TYPE_SYMBOL: -// case SC_SPEC_TYPE_BITSET: +// case SC_SPEC_TYPE_VOID: // case SC_SPEC_TYPE_STATUS: +// case SC_SPEC_TYPE_U32: +// case SC_SPEC_TYPE_I32: +// case SC_SPEC_TYPE_U64: +// case SC_SPEC_TYPE_I64: +// case SC_SPEC_TYPE_TIMEPOINT: +// case SC_SPEC_TYPE_DURATION: +// case SC_SPEC_TYPE_U128: +// case SC_SPEC_TYPE_I128: +// case SC_SPEC_TYPE_U256: +// case SC_SPEC_TYPE_I256: // case SC_SPEC_TYPE_BYTES: -// case SC_SPEC_TYPE_BIG_INT: +// case SC_SPEC_TYPE_STRING: +// case SC_SPEC_TYPE_SYMBOL: +// case SC_SPEC_TYPE_ADDRESS: // void; // case SC_SPEC_TYPE_OPTION: // SCSpecTypeOption option; @@ -8199,6 +9203,8 @@ xdr.struct("ScSpecTypeUdt", [ // SCSpecTypeSet set; // case SC_SPEC_TYPE_TUPLE: // SCSpecTypeTuple tuple; +// case SC_SPEC_TYPE_BYTES_N: +// SCSpecTypeBytesN bytesN; // case SC_SPEC_TYPE_UDT: // SCSpecTypeUDT udt; // }; @@ -8208,22 +9214,31 @@ xdr.union("ScSpecTypeDef", { switchOn: xdr.lookup("ScSpecType"), switchName: "type", switches: [ - ["scSpecTypeU64", xdr.void()], - ["scSpecTypeI64", xdr.void()], - ["scSpecTypeU32", xdr.void()], - ["scSpecTypeI32", xdr.void()], + ["scSpecTypeVal", xdr.void()], ["scSpecTypeBool", xdr.void()], - ["scSpecTypeSymbol", xdr.void()], - ["scSpecTypeBitset", xdr.void()], + ["scSpecTypeVoid", xdr.void()], ["scSpecTypeStatus", xdr.void()], + ["scSpecTypeU32", xdr.void()], + ["scSpecTypeI32", xdr.void()], + ["scSpecTypeU64", xdr.void()], + ["scSpecTypeI64", xdr.void()], + ["scSpecTypeTimepoint", xdr.void()], + ["scSpecTypeDuration", xdr.void()], + ["scSpecTypeU128", xdr.void()], + ["scSpecTypeI128", xdr.void()], + ["scSpecTypeU256", xdr.void()], + ["scSpecTypeI256", xdr.void()], ["scSpecTypeBytes", xdr.void()], - ["scSpecTypeBigInt", xdr.void()], + ["scSpecTypeString", xdr.void()], + ["scSpecTypeSymbol", xdr.void()], + ["scSpecTypeAddress", xdr.void()], ["scSpecTypeOption", "option"], ["scSpecTypeResult", "result"], ["scSpecTypeVec", "vec"], ["scSpecTypeMap", "map"], ["scSpecTypeSet", "set"], ["scSpecTypeTuple", "tuple"], + ["scSpecTypeBytesN", "bytesN"], ["scSpecTypeUdt", "udt"], ], arms: { @@ -8233,6 +9248,7 @@ xdr.union("ScSpecTypeDef", { map: xdr.lookup("ScSpecTypeMap"), set: xdr.lookup("ScSpecTypeSet"), tuple: xdr.lookup("ScSpecTypeTuple"), + bytesN: xdr.lookup("ScSpecTypeBytesN"), udt: xdr.lookup("ScSpecTypeUdt"), }, }); @@ -8241,12 +9257,14 @@ xdr.union("ScSpecTypeDef", { // // struct SCSpecUDTStructFieldV0 // { +// string doc; // string name<30>; // SCSpecTypeDef type; // }; // // =========================================================================== xdr.struct("ScSpecUdtStructFieldV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], ["name", xdr.string(30)], ["type", xdr.lookup("ScSpecTypeDef")], ]); @@ -8255,58 +9273,206 @@ xdr.struct("ScSpecUdtStructFieldV0", [ // // struct SCSpecUDTStructV0 // { +// string doc; +// string lib<80>; // string name<60>; // SCSpecUDTStructFieldV0 fields<40>; // }; // // =========================================================================== xdr.struct("ScSpecUdtStructV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["lib", xdr.string(80)], ["name", xdr.string(60)], ["fields", xdr.varArray(xdr.lookup("ScSpecUdtStructFieldV0"), 40)], ]); // === xdr source ============================================================ // -// struct SCSpecUDTUnionCaseV0 +// struct SCSpecUDTUnionCaseVoidV0 +// { +// string doc; +// string name<60>; +// }; +// +// =========================================================================== +xdr.struct("ScSpecUdtUnionCaseVoidV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["name", xdr.string(60)], +]); + +// === xdr source ============================================================ +// +// struct SCSpecUDTUnionCaseTupleV0 // { +// string doc; // string name<60>; -// SCSpecTypeDef *type; +// SCSpecTypeDef type<12>; // }; // // =========================================================================== -xdr.struct("ScSpecUdtUnionCaseV0", [ +xdr.struct("ScSpecUdtUnionCaseTupleV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], ["name", xdr.string(60)], - ["type", xdr.option(xdr.lookup("ScSpecTypeDef"))], + ["type", xdr.varArray(xdr.lookup("ScSpecTypeDef"), 12)], ]); +// === xdr source ============================================================ +// +// enum SCSpecUDTUnionCaseV0Kind +// { +// SC_SPEC_UDT_UNION_CASE_VOID_V0 = 0, +// SC_SPEC_UDT_UNION_CASE_TUPLE_V0 = 1 +// }; +// +// =========================================================================== +xdr.enum("ScSpecUdtUnionCaseV0Kind", { + scSpecUdtUnionCaseVoidV0: 0, + scSpecUdtUnionCaseTupleV0: 1, +}); + +// === xdr source ============================================================ +// +// union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) +// { +// case SC_SPEC_UDT_UNION_CASE_VOID_V0: +// SCSpecUDTUnionCaseVoidV0 voidCase; +// case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: +// SCSpecUDTUnionCaseTupleV0 tupleCase; +// }; +// +// =========================================================================== +xdr.union("ScSpecUdtUnionCaseV0", { + switchOn: xdr.lookup("ScSpecUdtUnionCaseV0Kind"), + switchName: "kind", + switches: [ + ["scSpecUdtUnionCaseVoidV0", "voidCase"], + ["scSpecUdtUnionCaseTupleV0", "tupleCase"], + ], + arms: { + voidCase: xdr.lookup("ScSpecUdtUnionCaseVoidV0"), + tupleCase: xdr.lookup("ScSpecUdtUnionCaseTupleV0"), + }, +}); + // === xdr source ============================================================ // // struct SCSpecUDTUnionV0 // { +// string doc; +// string lib<80>; // string name<60>; // SCSpecUDTUnionCaseV0 cases<50>; // }; // // =========================================================================== xdr.struct("ScSpecUdtUnionV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["lib", xdr.string(80)], ["name", xdr.string(60)], ["cases", xdr.varArray(xdr.lookup("ScSpecUdtUnionCaseV0"), 50)], ]); +// === xdr source ============================================================ +// +// struct SCSpecUDTEnumCaseV0 +// { +// string doc; +// string name<60>; +// uint32 value; +// }; +// +// =========================================================================== +xdr.struct("ScSpecUdtEnumCaseV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["name", xdr.string(60)], + ["value", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct SCSpecUDTEnumV0 +// { +// string doc; +// string lib<80>; +// string name<60>; +// SCSpecUDTEnumCaseV0 cases<50>; +// }; +// +// =========================================================================== +xdr.struct("ScSpecUdtEnumV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["lib", xdr.string(80)], + ["name", xdr.string(60)], + ["cases", xdr.varArray(xdr.lookup("ScSpecUdtEnumCaseV0"), 50)], +]); + +// === xdr source ============================================================ +// +// struct SCSpecUDTErrorEnumCaseV0 +// { +// string doc; +// string name<60>; +// uint32 value; +// }; +// +// =========================================================================== +xdr.struct("ScSpecUdtErrorEnumCaseV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["name", xdr.string(60)], + ["value", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct SCSpecUDTErrorEnumV0 +// { +// string doc; +// string lib<80>; +// string name<60>; +// SCSpecUDTErrorEnumCaseV0 cases<50>; +// }; +// +// =========================================================================== +xdr.struct("ScSpecUdtErrorEnumV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["lib", xdr.string(80)], + ["name", xdr.string(60)], + ["cases", xdr.varArray(xdr.lookup("ScSpecUdtErrorEnumCaseV0"), 50)], +]); + +// === xdr source ============================================================ +// +// struct SCSpecFunctionInputV0 +// { +// string doc; +// string name<30>; +// SCSpecTypeDef type; +// }; +// +// =========================================================================== +xdr.struct("ScSpecFunctionInputV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], + ["name", xdr.string(30)], + ["type", xdr.lookup("ScSpecTypeDef")], +]); + // === xdr source ============================================================ // // struct SCSpecFunctionV0 // { +// string doc; // SCSymbol name; -// SCSpecTypeDef inputTypes<10>; -// SCSpecTypeDef outputTypes<1>; +// SCSpecFunctionInputV0 inputs<10>; +// SCSpecTypeDef outputs<1>; // }; // // =========================================================================== xdr.struct("ScSpecFunctionV0", [ + ["doc", xdr.string(SC_SPEC_DOC_LIMIT)], ["name", xdr.lookup("ScSymbol")], - ["inputTypes", xdr.varArray(xdr.lookup("ScSpecTypeDef"), 10)], - ["outputTypes", xdr.varArray(xdr.lookup("ScSpecTypeDef"), 1)], + ["inputs", xdr.varArray(xdr.lookup("ScSpecFunctionInputV0"), 10)], + ["outputs", xdr.varArray(xdr.lookup("ScSpecTypeDef"), 1)], ]); // === xdr source ============================================================ @@ -8315,7 +9481,9 @@ xdr.struct("ScSpecFunctionV0", [ // { // SC_SPEC_ENTRY_FUNCTION_V0 = 0, // SC_SPEC_ENTRY_UDT_STRUCT_V0 = 1, -// SC_SPEC_ENTRY_UDT_UNION_V0 = 2 +// SC_SPEC_ENTRY_UDT_UNION_V0 = 2, +// SC_SPEC_ENTRY_UDT_ENUM_V0 = 3, +// SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0 = 4 // }; // // =========================================================================== @@ -8323,6 +9491,8 @@ xdr.enum("ScSpecEntryKind", { scSpecEntryFunctionV0: 0, scSpecEntryUdtStructV0: 1, scSpecEntryUdtUnionV0: 2, + scSpecEntryUdtEnumV0: 3, + scSpecEntryUdtErrorEnumV0: 4, }); // === xdr source ============================================================ @@ -8335,6 +9505,10 @@ xdr.enum("ScSpecEntryKind", { // SCSpecUDTStructV0 udtStructV0; // case SC_SPEC_ENTRY_UDT_UNION_V0: // SCSpecUDTUnionV0 udtUnionV0; +// case SC_SPEC_ENTRY_UDT_ENUM_V0: +// SCSpecUDTEnumV0 udtEnumV0; +// case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0: +// SCSpecUDTErrorEnumV0 udtErrorEnumV0; // }; // // =========================================================================== @@ -8345,11 +9519,15 @@ xdr.union("ScSpecEntry", { ["scSpecEntryFunctionV0", "functionV0"], ["scSpecEntryUdtStructV0", "udtStructV0"], ["scSpecEntryUdtUnionV0", "udtUnionV0"], + ["scSpecEntryUdtEnumV0", "udtEnumV0"], + ["scSpecEntryUdtErrorEnumV0", "udtErrorEnumV0"], ], arms: { functionV0: xdr.lookup("ScSpecFunctionV0"), udtStructV0: xdr.lookup("ScSpecUdtStructV0"), udtUnionV0: xdr.lookup("ScSpecUdtUnionV0"), + udtEnumV0: xdr.lookup("ScSpecUdtEnumV0"), + udtErrorEnumV0: xdr.lookup("ScSpecUdtErrorEnumV0"), }, }); diff --git a/types/curr.d.ts b/types/curr.d.ts index 8177eec99..b2f5cabf4 100644 --- a/types/curr.d.ts +++ b/types/curr.d.ts @@ -1,9958 +1,10003 @@ -// Automatically generated on 2022-08-12T12:40:00+01:00 -import { Operation } from './index'; - -export {}; - -// Hidden namespace as hack to work around name collision. -declare namespace xdrHidden { - // tslint:disable-line:strict-export-declare-modifiers - class Operation2 { - constructor(attributes: { - sourceAccount: null | xdr.MuxedAccount; - body: xdr.OperationBody; - }); - - sourceAccount(value?: null | xdr.MuxedAccount): null | xdr.MuxedAccount; - - body(value?: xdr.OperationBody): xdr.OperationBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): xdr.Operation; - - static write(value: xdr.Operation, io: Buffer): void; - - static isValid(value: xdr.Operation): boolean; - - static toXDR(value: xdr.Operation): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): xdr.Operation; - - static fromXDR(input: string, format: 'hex' | 'base64'): xdr.Operation; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } -} - -export namespace xdr { - export import Operation = xdrHidden.Operation2; // tslint:disable-line:strict-export-declare-modifiers - - interface SignedInt { - readonly MAX_VALUE: 2147483647; - readonly MIN_VALUE: -2147483648; - read(io: Buffer): number; - write(value: number, io: Buffer): void; - isValid(value: number): boolean; - toXDR(value: number): Buffer; - fromXDR(input: Buffer, format?: 'raw'): number; - fromXDR(input: string, format: 'hex' | 'base64'): number; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - interface UnsignedInt { - readonly MAX_VALUE: 4294967295; - readonly MIN_VALUE: 0; - read(io: Buffer): number; - write(value: number, io: Buffer): void; - isValid(value: number): boolean; - toXDR(value: number): Buffer; - fromXDR(input: Buffer, format?: 'raw'): number; - fromXDR(input: string, format: 'hex' | 'base64'): number; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - interface Bool { - read(io: Buffer): boolean; - write(value: boolean, io: Buffer): void; - isValid(value: boolean): boolean; - toXDR(value: boolean): Buffer; - fromXDR(input: Buffer, format?: 'raw'): boolean; - fromXDR(input: string, format: 'hex' | 'base64'): boolean; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Hyper { - low: number; - - high: number; - - unsigned: boolean; - - constructor(low: number, high: number); - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static toXDR(value: Hyper): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Hyper; - - static fromXDR(input: string, format: 'hex' | 'base64'): Hyper; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - - static readonly MAX_VALUE: Hyper; - - static readonly MIN_VALUE: Hyper; - - static read(io: Buffer): Hyper; - - static write(value: Hyper, io: Buffer): void; - - static fromString(input: string): Hyper; - - static fromBytes(low: number, high: number): Hyper; - - static isValid(value: Hyper): boolean; - } - - class UnsignedHyper { - low: number; - - high: number; - - unsigned: boolean; - - constructor(low: number, high: number); - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static toXDR(value: UnsignedHyper): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): UnsignedHyper; - - static fromXDR(input: string, format: 'hex' | 'base64'): UnsignedHyper; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - - static readonly MAX_VALUE: UnsignedHyper; - - static readonly MIN_VALUE: UnsignedHyper; - - static read(io: Buffer): UnsignedHyper; - - static write(value: UnsignedHyper, io: Buffer): void; - - static fromString(input: string): UnsignedHyper; - - static fromBytes(low: number, high: number): UnsignedHyper; - - static isValid(value: UnsignedHyper): boolean; - } - - class XDRString { - constructor(maxLength: 4294967295); - - read(io: Buffer): Buffer; - - readString(io: Buffer): string; - - write(value: string | Buffer, io: Buffer): void; - - isValid(value: string | number[] | Buffer): boolean; - - toXDR(value: string | Buffer): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): Buffer; - - fromXDR(input: string, format: 'hex' | 'base64'): Buffer; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class XDRArray { - read(io: Buffer): Buffer; - - write(value: T[], io: Buffer): void; - - isValid(value: T[]): boolean; - - toXDR(value: T[]): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): T[]; - - fromXDR(input: string, format: 'hex' | 'base64'): T[]; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Opaque { - constructor(length: number); - - read(io: Buffer): Buffer; - - write(value: Buffer, io: Buffer): void; - - isValid(value: Buffer): boolean; - - toXDR(value: Buffer): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): Buffer; - - fromXDR(input: string, format: 'hex' | 'base64'): Buffer; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class VarOpaque extends Opaque {} - - class Option { - constructor(childType: { - read(io: any): any; - write(value: any, io: Buffer): void; - isValid(value: any): boolean; - }); - - read(io: Buffer): any; - - write(value: any, io: Buffer): void; - - isValid(value: any): boolean; - - toXDR(value: any): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): any; - - fromXDR(input: string, format: 'hex' | 'base64'): any; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementType { - readonly name: - | 'scpStPrepare' - | 'scpStConfirm' - | 'scpStExternalize' - | 'scpStNominate'; - - readonly value: 0 | 1 | 2 | 3; - - static scpStPrepare(): ScpStatementType; - - static scpStConfirm(): ScpStatementType; - - static scpStExternalize(): ScpStatementType; - - static scpStNominate(): ScpStatementType; - } - - class AssetType { - readonly name: - | 'assetTypeNative' - | 'assetTypeCreditAlphanum4' - | 'assetTypeCreditAlphanum12' - | 'assetTypePoolShare'; - - readonly value: 0 | 1 | 2 | 3; - - static assetTypeNative(): AssetType; - - static assetTypeCreditAlphanum4(): AssetType; - - static assetTypeCreditAlphanum12(): AssetType; - - static assetTypePoolShare(): AssetType; - } - - class ThresholdIndices { - readonly name: - | 'thresholdMasterWeight' - | 'thresholdLow' - | 'thresholdMed' - | 'thresholdHigh'; - - readonly value: 0 | 1 | 2 | 3; - - static thresholdMasterWeight(): ThresholdIndices; - - static thresholdLow(): ThresholdIndices; - - static thresholdMed(): ThresholdIndices; - - static thresholdHigh(): ThresholdIndices; - } - - class LedgerEntryType { - readonly name: - | 'account' - | 'trustline' - | 'offer' - | 'data' - | 'claimableBalance' - | 'liquidityPool'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5; - - static account(): LedgerEntryType; - - static trustline(): LedgerEntryType; - - static offer(): LedgerEntryType; - - static data(): LedgerEntryType; - - static claimableBalance(): LedgerEntryType; - - static liquidityPool(): LedgerEntryType; - } - - class AccountFlags { - readonly name: - | 'authRequiredFlag' - | 'authRevocableFlag' - | 'authImmutableFlag' - | 'authClawbackEnabledFlag'; - - readonly value: 1 | 2 | 4 | 8; - - static authRequiredFlag(): AccountFlags; - - static authRevocableFlag(): AccountFlags; - - static authImmutableFlag(): AccountFlags; - - static authClawbackEnabledFlag(): AccountFlags; - } - - class TrustLineFlags { - readonly name: - | 'authorizedFlag' - | 'authorizedToMaintainLiabilitiesFlag' - | 'trustlineClawbackEnabledFlag'; - - readonly value: 1 | 2 | 4; - - static authorizedFlag(): TrustLineFlags; - - static authorizedToMaintainLiabilitiesFlag(): TrustLineFlags; - - static trustlineClawbackEnabledFlag(): TrustLineFlags; - } - - class LiquidityPoolType { - readonly name: 'liquidityPoolConstantProduct'; - - readonly value: 0; - - static liquidityPoolConstantProduct(): LiquidityPoolType; - } - - class OfferEntryFlags { - readonly name: 'passiveFlag'; - - readonly value: 1; - - static passiveFlag(): OfferEntryFlags; - } - - class ClaimPredicateType { - readonly name: - | 'claimPredicateUnconditional' - | 'claimPredicateAnd' - | 'claimPredicateOr' - | 'claimPredicateNot' - | 'claimPredicateBeforeAbsoluteTime' - | 'claimPredicateBeforeRelativeTime'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5; - - static claimPredicateUnconditional(): ClaimPredicateType; - - static claimPredicateAnd(): ClaimPredicateType; - - static claimPredicateOr(): ClaimPredicateType; - - static claimPredicateNot(): ClaimPredicateType; - - static claimPredicateBeforeAbsoluteTime(): ClaimPredicateType; - - static claimPredicateBeforeRelativeTime(): ClaimPredicateType; - } - - class ClaimantType { - readonly name: 'claimantTypeV0'; - - readonly value: 0; - - static claimantTypeV0(): ClaimantType; - } - - class ClaimableBalanceIdType { - readonly name: 'claimableBalanceIdTypeV0'; - - readonly value: 0; - - static claimableBalanceIdTypeV0(): ClaimableBalanceIdType; - } - - class ClaimableBalanceFlags { - readonly name: 'claimableBalanceClawbackEnabledFlag'; - - readonly value: 1; - - static claimableBalanceClawbackEnabledFlag(): ClaimableBalanceFlags; - } - - class EnvelopeType { - readonly name: - | 'envelopeTypeTxV0' - | 'envelopeTypeScp' - | 'envelopeTypeTx' - | 'envelopeTypeAuth' - | 'envelopeTypeScpvalue' - | 'envelopeTypeTxFeeBump' - | 'envelopeTypeOpId' - | 'envelopeTypePoolRevokeOpId'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; - - static envelopeTypeTxV0(): EnvelopeType; - - static envelopeTypeScp(): EnvelopeType; - - static envelopeTypeTx(): EnvelopeType; - - static envelopeTypeAuth(): EnvelopeType; - - static envelopeTypeScpvalue(): EnvelopeType; - - static envelopeTypeTxFeeBump(): EnvelopeType; - - static envelopeTypeOpId(): EnvelopeType; - - static envelopeTypePoolRevokeOpId(): EnvelopeType; - } - - class StellarValueType { - readonly name: 'stellarValueBasic' | 'stellarValueSigned'; - - readonly value: 0 | 1; - - static stellarValueBasic(): StellarValueType; - - static stellarValueSigned(): StellarValueType; - } - - class LedgerHeaderFlags { - readonly name: - | 'disableLiquidityPoolTradingFlag' - | 'disableLiquidityPoolDepositFlag' - | 'disableLiquidityPoolWithdrawalFlag'; - - readonly value: 1 | 2 | 4; - - static disableLiquidityPoolTradingFlag(): LedgerHeaderFlags; - - static disableLiquidityPoolDepositFlag(): LedgerHeaderFlags; - - static disableLiquidityPoolWithdrawalFlag(): LedgerHeaderFlags; - } - - class LedgerUpgradeType { - readonly name: - | 'ledgerUpgradeVersion' - | 'ledgerUpgradeBaseFee' - | 'ledgerUpgradeMaxTxSetSize' - | 'ledgerUpgradeBaseReserve' - | 'ledgerUpgradeFlags'; - - readonly value: 1 | 2 | 3 | 4 | 5; - - static ledgerUpgradeVersion(): LedgerUpgradeType; - - static ledgerUpgradeBaseFee(): LedgerUpgradeType; - - static ledgerUpgradeMaxTxSetSize(): LedgerUpgradeType; - - static ledgerUpgradeBaseReserve(): LedgerUpgradeType; - - static ledgerUpgradeFlags(): LedgerUpgradeType; - } - - class BucketEntryType { - readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; - - readonly value: -1 | 0 | 1 | 2; - - static metaentry(): BucketEntryType; - - static liveentry(): BucketEntryType; - - static deadentry(): BucketEntryType; - - static initentry(): BucketEntryType; - } - - class TxSetComponentType { - readonly name: 'txsetCompTxsMaybeDiscountedFee'; - - readonly value: 0; - - static txsetCompTxsMaybeDiscountedFee(): TxSetComponentType; - } - - class LedgerEntryChangeType { - readonly name: - | 'ledgerEntryCreated' - | 'ledgerEntryUpdated' - | 'ledgerEntryRemoved' - | 'ledgerEntryState'; - - readonly value: 0 | 1 | 2 | 3; - - static ledgerEntryCreated(): LedgerEntryChangeType; - - static ledgerEntryUpdated(): LedgerEntryChangeType; - - static ledgerEntryRemoved(): LedgerEntryChangeType; - - static ledgerEntryState(): LedgerEntryChangeType; - } - - class ErrorCode { - readonly name: 'errMisc' | 'errData' | 'errConf' | 'errAuth' | 'errLoad'; - - readonly value: 0 | 1 | 2 | 3 | 4; - - static errMisc(): ErrorCode; - - static errData(): ErrorCode; - - static errConf(): ErrorCode; - - static errAuth(): ErrorCode; - - static errLoad(): ErrorCode; - } - - class IpAddrType { - readonly name: 'iPv4' | 'iPv6'; - - readonly value: 0 | 1; - - static iPv4(): IpAddrType; - - static iPv6(): IpAddrType; - } - - class MessageType { - readonly name: - | 'errorMsg' - | 'auth' - | 'dontHave' - | 'getPeers' - | 'peers' - | 'getTxSet' - | 'txSet' - | 'generalizedTxSet' - | 'transaction' - | 'getScpQuorumset' - | 'scpQuorumset' - | 'scpMessage' - | 'getScpState' - | 'hello' - | 'surveyRequest' - | 'surveyResponse' - | 'sendMore'; - - readonly value: - | 0 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 17 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16; - - static errorMsg(): MessageType; - - static auth(): MessageType; - - static dontHave(): MessageType; - - static getPeers(): MessageType; - - static peers(): MessageType; - - static getTxSet(): MessageType; - - static txSet(): MessageType; - - static generalizedTxSet(): MessageType; - - static transaction(): MessageType; - - static getScpQuorumset(): MessageType; - - static scpQuorumset(): MessageType; - - static scpMessage(): MessageType; - - static getScpState(): MessageType; - - static hello(): MessageType; - - static surveyRequest(): MessageType; - - static surveyResponse(): MessageType; - - static sendMore(): MessageType; - } - - class SurveyMessageCommandType { - readonly name: 'surveyTopology'; - - readonly value: 0; - - static surveyTopology(): SurveyMessageCommandType; - } - - class OperationType { - readonly name: - | 'createAccount' - | 'payment' - | 'pathPaymentStrictReceive' - | 'manageSellOffer' - | 'createPassiveSellOffer' - | 'setOptions' - | 'changeTrust' - | 'allowTrust' - | 'accountMerge' - | 'inflation' - | 'manageData' - | 'bumpSequence' - | 'manageBuyOffer' - | 'pathPaymentStrictSend' - | 'createClaimableBalance' - | 'claimClaimableBalance' - | 'beginSponsoringFutureReserves' - | 'endSponsoringFutureReserves' - | 'revokeSponsorship' - | 'clawback' - | 'clawbackClaimableBalance' - | 'setTrustLineFlags' - | 'liquidityPoolDeposit' - | 'liquidityPoolWithdraw'; - - readonly value: - | 0 - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 17 - | 18 - | 19 - | 20 - | 21 - | 22 - | 23; - - static createAccount(): OperationType; - - static payment(): OperationType; - - static pathPaymentStrictReceive(): OperationType; - - static manageSellOffer(): OperationType; - - static createPassiveSellOffer(): OperationType; - - static setOptions(): OperationType; - - static changeTrust(): OperationType; - - static allowTrust(): OperationType; - - static accountMerge(): OperationType; - - static inflation(): OperationType; - - static manageData(): OperationType; - - static bumpSequence(): OperationType; - - static manageBuyOffer(): OperationType; - - static pathPaymentStrictSend(): OperationType; - - static createClaimableBalance(): OperationType; - - static claimClaimableBalance(): OperationType; - - static beginSponsoringFutureReserves(): OperationType; - - static endSponsoringFutureReserves(): OperationType; - - static revokeSponsorship(): OperationType; - - static clawback(): OperationType; - - static clawbackClaimableBalance(): OperationType; - - static setTrustLineFlags(): OperationType; - - static liquidityPoolDeposit(): OperationType; - - static liquidityPoolWithdraw(): OperationType; - } - - class RevokeSponsorshipType { - readonly name: 'revokeSponsorshipLedgerEntry' | 'revokeSponsorshipSigner'; - - readonly value: 0 | 1; - - static revokeSponsorshipLedgerEntry(): RevokeSponsorshipType; - - static revokeSponsorshipSigner(): RevokeSponsorshipType; - } - - class MemoType { - readonly name: - | 'memoNone' - | 'memoText' - | 'memoId' - | 'memoHash' - | 'memoReturn'; - - readonly value: 0 | 1 | 2 | 3 | 4; - - static memoNone(): MemoType; - - static memoText(): MemoType; - - static memoId(): MemoType; - - static memoHash(): MemoType; - - static memoReturn(): MemoType; - } - - class PreconditionType { - readonly name: 'precondNone' | 'precondTime' | 'precondV2'; - - readonly value: 0 | 1 | 2; - - static precondNone(): PreconditionType; - - static precondTime(): PreconditionType; - - static precondV2(): PreconditionType; - } - - class ClaimAtomType { - readonly name: - | 'claimAtomTypeV0' - | 'claimAtomTypeOrderBook' - | 'claimAtomTypeLiquidityPool'; - - readonly value: 0 | 1 | 2; - - static claimAtomTypeV0(): ClaimAtomType; - - static claimAtomTypeOrderBook(): ClaimAtomType; - - static claimAtomTypeLiquidityPool(): ClaimAtomType; - } - - class CreateAccountResultCode { - readonly name: - | 'createAccountSuccess' - | 'createAccountMalformed' - | 'createAccountUnderfunded' - | 'createAccountLowReserve' - | 'createAccountAlreadyExist'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static createAccountSuccess(): CreateAccountResultCode; - - static createAccountMalformed(): CreateAccountResultCode; - - static createAccountUnderfunded(): CreateAccountResultCode; - - static createAccountLowReserve(): CreateAccountResultCode; - - static createAccountAlreadyExist(): CreateAccountResultCode; - } - - class PaymentResultCode { - readonly name: - | 'paymentSuccess' - | 'paymentMalformed' - | 'paymentUnderfunded' - | 'paymentSrcNoTrust' - | 'paymentSrcNotAuthorized' - | 'paymentNoDestination' - | 'paymentNoTrust' - | 'paymentNotAuthorized' - | 'paymentLineFull' - | 'paymentNoIssuer'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9; - - static paymentSuccess(): PaymentResultCode; - - static paymentMalformed(): PaymentResultCode; - - static paymentUnderfunded(): PaymentResultCode; - - static paymentSrcNoTrust(): PaymentResultCode; - - static paymentSrcNotAuthorized(): PaymentResultCode; - - static paymentNoDestination(): PaymentResultCode; - - static paymentNoTrust(): PaymentResultCode; - - static paymentNotAuthorized(): PaymentResultCode; - - static paymentLineFull(): PaymentResultCode; - - static paymentNoIssuer(): PaymentResultCode; - } - - class PathPaymentStrictReceiveResultCode { - readonly name: - | 'pathPaymentStrictReceiveSuccess' - | 'pathPaymentStrictReceiveMalformed' - | 'pathPaymentStrictReceiveUnderfunded' - | 'pathPaymentStrictReceiveSrcNoTrust' - | 'pathPaymentStrictReceiveSrcNotAuthorized' - | 'pathPaymentStrictReceiveNoDestination' - | 'pathPaymentStrictReceiveNoTrust' - | 'pathPaymentStrictReceiveNotAuthorized' - | 'pathPaymentStrictReceiveLineFull' - | 'pathPaymentStrictReceiveNoIssuer' - | 'pathPaymentStrictReceiveTooFewOffers' - | 'pathPaymentStrictReceiveOfferCrossSelf' - | 'pathPaymentStrictReceiveOverSendmax'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static pathPaymentStrictReceiveSuccess(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoIssuer(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResultCode; - } - - class PathPaymentStrictSendResultCode { - readonly name: - | 'pathPaymentStrictSendSuccess' - | 'pathPaymentStrictSendMalformed' - | 'pathPaymentStrictSendUnderfunded' - | 'pathPaymentStrictSendSrcNoTrust' - | 'pathPaymentStrictSendSrcNotAuthorized' - | 'pathPaymentStrictSendNoDestination' - | 'pathPaymentStrictSendNoTrust' - | 'pathPaymentStrictSendNotAuthorized' - | 'pathPaymentStrictSendLineFull' - | 'pathPaymentStrictSendNoIssuer' - | 'pathPaymentStrictSendTooFewOffers' - | 'pathPaymentStrictSendOfferCrossSelf' - | 'pathPaymentStrictSendUnderDestmin'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static pathPaymentStrictSendSuccess(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoIssuer(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResultCode; - } - - class ManageSellOfferResultCode { - readonly name: - | 'manageSellOfferSuccess' - | 'manageSellOfferMalformed' - | 'manageSellOfferSellNoTrust' - | 'manageSellOfferBuyNoTrust' - | 'manageSellOfferSellNotAuthorized' - | 'manageSellOfferBuyNotAuthorized' - | 'manageSellOfferLineFull' - | 'manageSellOfferUnderfunded' - | 'manageSellOfferCrossSelf' - | 'manageSellOfferSellNoIssuer' - | 'manageSellOfferBuyNoIssuer' - | 'manageSellOfferNotFound' - | 'manageSellOfferLowReserve'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static manageSellOfferSuccess(): ManageSellOfferResultCode; - - static manageSellOfferMalformed(): ManageSellOfferResultCode; - - static manageSellOfferSellNoTrust(): ManageSellOfferResultCode; - - static manageSellOfferBuyNoTrust(): ManageSellOfferResultCode; - - static manageSellOfferSellNotAuthorized(): ManageSellOfferResultCode; - - static manageSellOfferBuyNotAuthorized(): ManageSellOfferResultCode; - - static manageSellOfferLineFull(): ManageSellOfferResultCode; - - static manageSellOfferUnderfunded(): ManageSellOfferResultCode; - - static manageSellOfferCrossSelf(): ManageSellOfferResultCode; - - static manageSellOfferSellNoIssuer(): ManageSellOfferResultCode; - - static manageSellOfferBuyNoIssuer(): ManageSellOfferResultCode; - - static manageSellOfferNotFound(): ManageSellOfferResultCode; - - static manageSellOfferLowReserve(): ManageSellOfferResultCode; - } - - class ManageOfferEffect { - readonly name: - | 'manageOfferCreated' - | 'manageOfferUpdated' - | 'manageOfferDeleted'; - - readonly value: 0 | 1 | 2; - - static manageOfferCreated(): ManageOfferEffect; - - static manageOfferUpdated(): ManageOfferEffect; - - static manageOfferDeleted(): ManageOfferEffect; - } - - class ManageBuyOfferResultCode { - readonly name: - | 'manageBuyOfferSuccess' - | 'manageBuyOfferMalformed' - | 'manageBuyOfferSellNoTrust' - | 'manageBuyOfferBuyNoTrust' - | 'manageBuyOfferSellNotAuthorized' - | 'manageBuyOfferBuyNotAuthorized' - | 'manageBuyOfferLineFull' - | 'manageBuyOfferUnderfunded' - | 'manageBuyOfferCrossSelf' - | 'manageBuyOfferSellNoIssuer' - | 'manageBuyOfferBuyNoIssuer' - | 'manageBuyOfferNotFound' - | 'manageBuyOfferLowReserve'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static manageBuyOfferSuccess(): ManageBuyOfferResultCode; - - static manageBuyOfferMalformed(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNoTrust(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNoTrust(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResultCode; - - static manageBuyOfferLineFull(): ManageBuyOfferResultCode; - - static manageBuyOfferUnderfunded(): ManageBuyOfferResultCode; - - static manageBuyOfferCrossSelf(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNoIssuer(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResultCode; - - static manageBuyOfferNotFound(): ManageBuyOfferResultCode; - - static manageBuyOfferLowReserve(): ManageBuyOfferResultCode; - } - - class SetOptionsResultCode { - readonly name: - | 'setOptionsSuccess' - | 'setOptionsLowReserve' - | 'setOptionsTooManySigners' - | 'setOptionsBadFlags' - | 'setOptionsInvalidInflation' - | 'setOptionsCantChange' - | 'setOptionsUnknownFlag' - | 'setOptionsThresholdOutOfRange' - | 'setOptionsBadSigner' - | 'setOptionsInvalidHomeDomain' - | 'setOptionsAuthRevocableRequired'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10; - - static setOptionsSuccess(): SetOptionsResultCode; - - static setOptionsLowReserve(): SetOptionsResultCode; - - static setOptionsTooManySigners(): SetOptionsResultCode; - - static setOptionsBadFlags(): SetOptionsResultCode; - - static setOptionsInvalidInflation(): SetOptionsResultCode; - - static setOptionsCantChange(): SetOptionsResultCode; - - static setOptionsUnknownFlag(): SetOptionsResultCode; - - static setOptionsThresholdOutOfRange(): SetOptionsResultCode; - - static setOptionsBadSigner(): SetOptionsResultCode; - - static setOptionsInvalidHomeDomain(): SetOptionsResultCode; - - static setOptionsAuthRevocableRequired(): SetOptionsResultCode; - } - - class ChangeTrustResultCode { - readonly name: - | 'changeTrustSuccess' - | 'changeTrustMalformed' - | 'changeTrustNoIssuer' - | 'changeTrustInvalidLimit' - | 'changeTrustLowReserve' - | 'changeTrustSelfNotAllowed' - | 'changeTrustTrustLineMissing' - | 'changeTrustCannotDelete' - | 'changeTrustNotAuthMaintainLiabilities'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8; - - static changeTrustSuccess(): ChangeTrustResultCode; - - static changeTrustMalformed(): ChangeTrustResultCode; - - static changeTrustNoIssuer(): ChangeTrustResultCode; - - static changeTrustInvalidLimit(): ChangeTrustResultCode; - - static changeTrustLowReserve(): ChangeTrustResultCode; - - static changeTrustSelfNotAllowed(): ChangeTrustResultCode; - - static changeTrustTrustLineMissing(): ChangeTrustResultCode; - - static changeTrustCannotDelete(): ChangeTrustResultCode; - - static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResultCode; - } - - class AllowTrustResultCode { - readonly name: - | 'allowTrustSuccess' - | 'allowTrustMalformed' - | 'allowTrustNoTrustLine' - | 'allowTrustTrustNotRequired' - | 'allowTrustCantRevoke' - | 'allowTrustSelfNotAllowed' - | 'allowTrustLowReserve'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; - - static allowTrustSuccess(): AllowTrustResultCode; - - static allowTrustMalformed(): AllowTrustResultCode; - - static allowTrustNoTrustLine(): AllowTrustResultCode; - - static allowTrustTrustNotRequired(): AllowTrustResultCode; - - static allowTrustCantRevoke(): AllowTrustResultCode; - - static allowTrustSelfNotAllowed(): AllowTrustResultCode; - - static allowTrustLowReserve(): AllowTrustResultCode; - } - - class AccountMergeResultCode { - readonly name: - | 'accountMergeSuccess' - | 'accountMergeMalformed' - | 'accountMergeNoAccount' - | 'accountMergeImmutableSet' - | 'accountMergeHasSubEntries' - | 'accountMergeSeqnumTooFar' - | 'accountMergeDestFull' - | 'accountMergeIsSponsor'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; - - static accountMergeSuccess(): AccountMergeResultCode; - - static accountMergeMalformed(): AccountMergeResultCode; - - static accountMergeNoAccount(): AccountMergeResultCode; - - static accountMergeImmutableSet(): AccountMergeResultCode; - - static accountMergeHasSubEntries(): AccountMergeResultCode; - - static accountMergeSeqnumTooFar(): AccountMergeResultCode; - - static accountMergeDestFull(): AccountMergeResultCode; - - static accountMergeIsSponsor(): AccountMergeResultCode; - } - - class InflationResultCode { - readonly name: 'inflationSuccess' | 'inflationNotTime'; - - readonly value: 0 | -1; - - static inflationSuccess(): InflationResultCode; - - static inflationNotTime(): InflationResultCode; - } - - class ManageDataResultCode { - readonly name: - | 'manageDataSuccess' - | 'manageDataNotSupportedYet' - | 'manageDataNameNotFound' - | 'manageDataLowReserve' - | 'manageDataInvalidName'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static manageDataSuccess(): ManageDataResultCode; - - static manageDataNotSupportedYet(): ManageDataResultCode; - - static manageDataNameNotFound(): ManageDataResultCode; - - static manageDataLowReserve(): ManageDataResultCode; - - static manageDataInvalidName(): ManageDataResultCode; - } - - class BumpSequenceResultCode { - readonly name: 'bumpSequenceSuccess' | 'bumpSequenceBadSeq'; - - readonly value: 0 | -1; - - static bumpSequenceSuccess(): BumpSequenceResultCode; - - static bumpSequenceBadSeq(): BumpSequenceResultCode; - } - - class CreateClaimableBalanceResultCode { - readonly name: - | 'createClaimableBalanceSuccess' - | 'createClaimableBalanceMalformed' - | 'createClaimableBalanceLowReserve' - | 'createClaimableBalanceNoTrust' - | 'createClaimableBalanceNotAuthorized' - | 'createClaimableBalanceUnderfunded'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static createClaimableBalanceSuccess(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceMalformed(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceLowReserve(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceNoTrust(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResultCode; - } - - class ClaimClaimableBalanceResultCode { - readonly name: - | 'claimClaimableBalanceSuccess' - | 'claimClaimableBalanceDoesNotExist' - | 'claimClaimableBalanceCannotClaim' - | 'claimClaimableBalanceLineFull' - | 'claimClaimableBalanceNoTrust' - | 'claimClaimableBalanceNotAuthorized'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResultCode; - } - - class BeginSponsoringFutureReservesResultCode { - readonly name: - | 'beginSponsoringFutureReservesSuccess' - | 'beginSponsoringFutureReservesMalformed' - | 'beginSponsoringFutureReservesAlreadySponsored' - | 'beginSponsoringFutureReservesRecursive'; - - readonly value: 0 | -1 | -2 | -3; - - static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResultCode; - } - - class EndSponsoringFutureReservesResultCode { - readonly name: - | 'endSponsoringFutureReservesSuccess' - | 'endSponsoringFutureReservesNotSponsored'; - - readonly value: 0 | -1; - - static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResultCode; - - static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResultCode; - } - - class RevokeSponsorshipResultCode { - readonly name: - | 'revokeSponsorshipSuccess' - | 'revokeSponsorshipDoesNotExist' - | 'revokeSponsorshipNotSponsor' - | 'revokeSponsorshipLowReserve' - | 'revokeSponsorshipOnlyTransferable' - | 'revokeSponsorshipMalformed'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static revokeSponsorshipSuccess(): RevokeSponsorshipResultCode; - - static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResultCode; - - static revokeSponsorshipNotSponsor(): RevokeSponsorshipResultCode; - - static revokeSponsorshipLowReserve(): RevokeSponsorshipResultCode; - - static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResultCode; - - static revokeSponsorshipMalformed(): RevokeSponsorshipResultCode; - } - - class ClawbackResultCode { - readonly name: - | 'clawbackSuccess' - | 'clawbackMalformed' - | 'clawbackNotClawbackEnabled' - | 'clawbackNoTrust' - | 'clawbackUnderfunded'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static clawbackSuccess(): ClawbackResultCode; - - static clawbackMalformed(): ClawbackResultCode; - - static clawbackNotClawbackEnabled(): ClawbackResultCode; - - static clawbackNoTrust(): ClawbackResultCode; - - static clawbackUnderfunded(): ClawbackResultCode; - } - - class ClawbackClaimableBalanceResultCode { - readonly name: - | 'clawbackClaimableBalanceSuccess' - | 'clawbackClaimableBalanceDoesNotExist' - | 'clawbackClaimableBalanceNotIssuer' - | 'clawbackClaimableBalanceNotClawbackEnabled'; - - readonly value: 0 | -1 | -2 | -3; - - static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResultCode; - } - - class SetTrustLineFlagsResultCode { - readonly name: - | 'setTrustLineFlagsSuccess' - | 'setTrustLineFlagsMalformed' - | 'setTrustLineFlagsNoTrustLine' - | 'setTrustLineFlagsCantRevoke' - | 'setTrustLineFlagsInvalidState' - | 'setTrustLineFlagsLowReserve'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static setTrustLineFlagsSuccess(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsMalformed(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResultCode; - } - - class LiquidityPoolDepositResultCode { - readonly name: - | 'liquidityPoolDepositSuccess' - | 'liquidityPoolDepositMalformed' - | 'liquidityPoolDepositNoTrust' - | 'liquidityPoolDepositNotAuthorized' - | 'liquidityPoolDepositUnderfunded' - | 'liquidityPoolDepositLineFull' - | 'liquidityPoolDepositBadPrice' - | 'liquidityPoolDepositPoolFull'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; - - static liquidityPoolDepositSuccess(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositMalformed(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositLineFull(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResultCode; - } - - class LiquidityPoolWithdrawResultCode { - readonly name: - | 'liquidityPoolWithdrawSuccess' - | 'liquidityPoolWithdrawMalformed' - | 'liquidityPoolWithdrawNoTrust' - | 'liquidityPoolWithdrawUnderfunded' - | 'liquidityPoolWithdrawLineFull' - | 'liquidityPoolWithdrawUnderMinimum'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResultCode; - } - - class OperationResultCode { - readonly name: - | 'opInner' - | 'opBadAuth' - | 'opNoAccount' - | 'opNotSupported' - | 'opTooManySubentries' - | 'opExceededWorkLimit' - | 'opTooManySponsoring'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; - - static opInner(): OperationResultCode; - - static opBadAuth(): OperationResultCode; - - static opNoAccount(): OperationResultCode; - - static opNotSupported(): OperationResultCode; - - static opTooManySubentries(): OperationResultCode; - - static opExceededWorkLimit(): OperationResultCode; - - static opTooManySponsoring(): OperationResultCode; - } - - class TransactionResultCode { - readonly name: - | 'txFeeBumpInnerSuccess' - | 'txSuccess' - | 'txFailed' - | 'txTooEarly' - | 'txTooLate' - | 'txMissingOperation' - | 'txBadSeq' - | 'txBadAuth' - | 'txInsufficientBalance' - | 'txNoAccount' - | 'txInsufficientFee' - | 'txBadAuthExtra' - | 'txInternalError' - | 'txNotSupported' - | 'txFeeBumpInnerFailed' - | 'txBadSponsorship' - | 'txBadMinSeqAgeOrGap' - | 'txMalformed'; - - readonly value: - | 1 - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12 - | -13 - | -14 - | -15 - | -16; - - static txFeeBumpInnerSuccess(): TransactionResultCode; - - static txSuccess(): TransactionResultCode; - - static txFailed(): TransactionResultCode; - - static txTooEarly(): TransactionResultCode; - - static txTooLate(): TransactionResultCode; - - static txMissingOperation(): TransactionResultCode; - - static txBadSeq(): TransactionResultCode; - - static txBadAuth(): TransactionResultCode; - - static txInsufficientBalance(): TransactionResultCode; - - static txNoAccount(): TransactionResultCode; - - static txInsufficientFee(): TransactionResultCode; - - static txBadAuthExtra(): TransactionResultCode; - - static txInternalError(): TransactionResultCode; - - static txNotSupported(): TransactionResultCode; - - static txFeeBumpInnerFailed(): TransactionResultCode; - - static txBadSponsorship(): TransactionResultCode; - - static txBadMinSeqAgeOrGap(): TransactionResultCode; - - static txMalformed(): TransactionResultCode; - } - - class CryptoKeyType { - readonly name: - | 'keyTypeEd25519' - | 'keyTypePreAuthTx' - | 'keyTypeHashX' - | 'keyTypeEd25519SignedPayload' - | 'keyTypeMuxedEd25519'; - - readonly value: 0 | 1 | 2 | 3 | 256; - - static keyTypeEd25519(): CryptoKeyType; - - static keyTypePreAuthTx(): CryptoKeyType; - - static keyTypeHashX(): CryptoKeyType; - - static keyTypeEd25519SignedPayload(): CryptoKeyType; - - static keyTypeMuxedEd25519(): CryptoKeyType; - } - - class PublicKeyType { - readonly name: 'publicKeyTypeEd25519'; - - readonly value: 0; - - static publicKeyTypeEd25519(): PublicKeyType; - } - - class SignerKeyType { - readonly name: - | 'signerKeyTypeEd25519' - | 'signerKeyTypePreAuthTx' - | 'signerKeyTypeHashX' - | 'signerKeyTypeEd25519SignedPayload'; - - readonly value: 0 | 1 | 2 | 3; - - static signerKeyTypeEd25519(): SignerKeyType; - - static signerKeyTypePreAuthTx(): SignerKeyType; - - static signerKeyTypeHashX(): SignerKeyType; - - static signerKeyTypeEd25519SignedPayload(): SignerKeyType; - } - - const Value: VarOpaque; - - type AccountId = PublicKey; - - const Thresholds: Opaque; - - const String32: XDRString; - - const String64: XDRString; - - type SequenceNumber = Int64; - - type TimePoint = Uint64; - - type Duration = Uint64; - - const DataValue: VarOpaque; - - type PoolId = typeof Hash; - - const AssetCode4: Opaque; - - const AssetCode12: Opaque; - - type SponsorshipDescriptor = undefined | AccountId; - - const UpgradeType: VarOpaque; - - const LedgerEntryChanges: XDRArray; - - const EncryptedBody: VarOpaque; - - const PeerStatList: XDRArray; - - const Hash: Opaque; - - const Uint256: Opaque; - - const Uint32: UnsignedInt; - - const Int32: SignedInt; - - class Uint64 extends UnsignedHyper {} - - class Int64 extends Hyper {} - - const Signature: VarOpaque; - - const SignatureHint: Opaque; - - type NodeId = PublicKey; - - class ScpBallot { - constructor(attributes: { counter: number; value: Buffer }); - - counter(value?: number): number; - - value(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpBallot; - - static write(value: ScpBallot, io: Buffer): void; - - static isValid(value: ScpBallot): boolean; - - static toXDR(value: ScpBallot): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpBallot; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpBallot; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpNomination { - constructor(attributes: { - quorumSetHash: Buffer; - votes: Buffer[]; - accepted: Buffer[]; - }); - - quorumSetHash(value?: Buffer): Buffer; - - votes(value?: Buffer[]): Buffer[]; - - accepted(value?: Buffer[]): Buffer[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpNomination; - - static write(value: ScpNomination, io: Buffer): void; - - static isValid(value: ScpNomination): boolean; - - static toXDR(value: ScpNomination): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpNomination; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpNomination; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementPrepare { - constructor(attributes: { - quorumSetHash: Buffer; - ballot: ScpBallot; - prepared: null | ScpBallot; - preparedPrime: null | ScpBallot; - nC: number; - nH: number; - }); - - quorumSetHash(value?: Buffer): Buffer; - - ballot(value?: ScpBallot): ScpBallot; - - prepared(value?: null | ScpBallot): null | ScpBallot; - - preparedPrime(value?: null | ScpBallot): null | ScpBallot; - - nC(value?: number): number; - - nH(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementPrepare; - - static write(value: ScpStatementPrepare, io: Buffer): void; - - static isValid(value: ScpStatementPrepare): boolean; - - static toXDR(value: ScpStatementPrepare): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementPrepare; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementPrepare; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementConfirm { - constructor(attributes: { - ballot: ScpBallot; - nPrepared: number; - nCommit: number; - nH: number; - quorumSetHash: Buffer; - }); - - ballot(value?: ScpBallot): ScpBallot; - - nPrepared(value?: number): number; - - nCommit(value?: number): number; - - nH(value?: number): number; - - quorumSetHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementConfirm; - - static write(value: ScpStatementConfirm, io: Buffer): void; - - static isValid(value: ScpStatementConfirm): boolean; - - static toXDR(value: ScpStatementConfirm): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementConfirm; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementConfirm; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementExternalize { - constructor(attributes: { - commit: ScpBallot; - nH: number; - commitQuorumSetHash: Buffer; - }); - - commit(value?: ScpBallot): ScpBallot; - - nH(value?: number): number; - - commitQuorumSetHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementExternalize; - - static write(value: ScpStatementExternalize, io: Buffer): void; - - static isValid(value: ScpStatementExternalize): boolean; - - static toXDR(value: ScpStatementExternalize): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementExternalize; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementExternalize; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatement { - constructor(attributes: { - nodeId: NodeId; - slotIndex: Uint64; - pledges: ScpStatementPledges; - }); - - nodeId(value?: NodeId): NodeId; - - slotIndex(value?: Uint64): Uint64; - - pledges(value?: ScpStatementPledges): ScpStatementPledges; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatement; - - static write(value: ScpStatement, io: Buffer): void; - - static isValid(value: ScpStatement): boolean; - - static toXDR(value: ScpStatement): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatement; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpStatement; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpEnvelope { - constructor(attributes: { statement: ScpStatement; signature: Buffer }); - - statement(value?: ScpStatement): ScpStatement; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpEnvelope; - - static write(value: ScpEnvelope, io: Buffer): void; - - static isValid(value: ScpEnvelope): boolean; - - static toXDR(value: ScpEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpEnvelope; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpQuorumSet { - constructor(attributes: { - threshold: number; - validators: NodeId[]; - innerSets: ScpQuorumSet[]; - }); - - threshold(value?: number): number; - - validators(value?: NodeId[]): NodeId[]; - - innerSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpQuorumSet; - - static write(value: ScpQuorumSet, io: Buffer): void; - - static isValid(value: ScpQuorumSet): boolean; - - static toXDR(value: ScpQuorumSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpQuorumSet; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpQuorumSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AlphaNum4 { - constructor(attributes: { assetCode: Buffer; issuer: AccountId }); - - assetCode(value?: Buffer): Buffer; - - issuer(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AlphaNum4; - - static write(value: AlphaNum4, io: Buffer): void; - - static isValid(value: AlphaNum4): boolean; - - static toXDR(value: AlphaNum4): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AlphaNum4; - - static fromXDR(input: string, format: 'hex' | 'base64'): AlphaNum4; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AlphaNum12 { - constructor(attributes: { assetCode: Buffer; issuer: AccountId }); - - assetCode(value?: Buffer): Buffer; - - issuer(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AlphaNum12; - - static write(value: AlphaNum12, io: Buffer): void; - - static isValid(value: AlphaNum12): boolean; - - static toXDR(value: AlphaNum12): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AlphaNum12; - - static fromXDR(input: string, format: 'hex' | 'base64'): AlphaNum12; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Price { - constructor(attributes: { n: number; d: number }); - - n(value?: number): number; - - d(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Price; - - static write(value: Price, io: Buffer): void; - - static isValid(value: Price): boolean; - - static toXDR(value: Price): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Price; - - static fromXDR(input: string, format: 'hex' | 'base64'): Price; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Liabilities { - constructor(attributes: { buying: Int64; selling: Int64 }); - - buying(value?: Int64): Int64; - - selling(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Liabilities; - - static write(value: Liabilities, io: Buffer): void; - - static isValid(value: Liabilities): boolean; - - static toXDR(value: Liabilities): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Liabilities; - - static fromXDR(input: string, format: 'hex' | 'base64'): Liabilities; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Signer { - constructor(attributes: { key: SignerKey; weight: number }); - - key(value?: SignerKey): SignerKey; - - weight(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Signer; - - static write(value: Signer, io: Buffer): void; - - static isValid(value: Signer): boolean; - - static toXDR(value: Signer): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Signer; - - static fromXDR(input: string, format: 'hex' | 'base64'): Signer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV3 { - constructor(attributes: { - ext: ExtensionPoint; - seqLedger: number; - seqTime: TimePoint; - }); - - ext(value?: ExtensionPoint): ExtensionPoint; - - seqLedger(value?: number): number; - - seqTime(value?: TimePoint): TimePoint; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV3; - - static write(value: AccountEntryExtensionV3, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV3): boolean; - - static toXDR(value: AccountEntryExtensionV3): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV3; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV3; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV2 { - constructor(attributes: { - numSponsored: number; - numSponsoring: number; - signerSponsoringIDs: SponsorshipDescriptor[]; - ext: AccountEntryExtensionV2Ext; - }); - - numSponsored(value?: number): number; - - numSponsoring(value?: number): number; - - signerSponsoringIDs( - value?: SponsorshipDescriptor[] - ): SponsorshipDescriptor[]; - - ext(value?: AccountEntryExtensionV2Ext): AccountEntryExtensionV2Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV2; - - static write(value: AccountEntryExtensionV2, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV2): boolean; - - static toXDR(value: AccountEntryExtensionV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV2; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV1 { - constructor(attributes: { - liabilities: Liabilities; - ext: AccountEntryExtensionV1Ext; - }); - - liabilities(value?: Liabilities): Liabilities; - - ext(value?: AccountEntryExtensionV1Ext): AccountEntryExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV1; - - static write(value: AccountEntryExtensionV1, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV1): boolean; - - static toXDR(value: AccountEntryExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntry { - constructor(attributes: { - accountId: AccountId; - balance: Int64; - seqNum: SequenceNumber; - numSubEntries: number; - inflationDest: null | AccountId; - flags: number; - homeDomain: string | Buffer; - thresholds: Buffer; - signers: Signer[]; - ext: AccountEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - balance(value?: Int64): Int64; - - seqNum(value?: SequenceNumber): SequenceNumber; - - numSubEntries(value?: number): number; - - inflationDest(value?: null | AccountId): null | AccountId; - - flags(value?: number): number; - - homeDomain(value?: string | Buffer): string | Buffer; - - thresholds(value?: Buffer): Buffer; - - signers(value?: Signer[]): Signer[]; - - ext(value?: AccountEntryExt): AccountEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntry; - - static write(value: AccountEntry, io: Buffer): void; - - static isValid(value: AccountEntry): boolean; - - static toXDR(value: AccountEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExtensionV2 { - constructor(attributes: { - liquidityPoolUseCount: number; - ext: TrustLineEntryExtensionV2Ext; - }); - - liquidityPoolUseCount(value?: number): number; - - ext(value?: TrustLineEntryExtensionV2Ext): TrustLineEntryExtensionV2Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExtensionV2; - - static write(value: TrustLineEntryExtensionV2, io: Buffer): void; - - static isValid(value: TrustLineEntryExtensionV2): boolean; - - static toXDR(value: TrustLineEntryExtensionV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExtensionV2; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryExtensionV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryV1 { - constructor(attributes: { - liabilities: Liabilities; - ext: TrustLineEntryV1Ext; - }); - - liabilities(value?: Liabilities): Liabilities; - - ext(value?: TrustLineEntryV1Ext): TrustLineEntryV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryV1; - - static write(value: TrustLineEntryV1, io: Buffer): void; - - static isValid(value: TrustLineEntryV1): boolean; - - static toXDR(value: TrustLineEntryV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntryV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntry { - constructor(attributes: { - accountId: AccountId; - asset: TrustLineAsset; - balance: Int64; - limit: Int64; - flags: number; - ext: TrustLineEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - asset(value?: TrustLineAsset): TrustLineAsset; - - balance(value?: Int64): Int64; - - limit(value?: Int64): Int64; - - flags(value?: number): number; - - ext(value?: TrustLineEntryExt): TrustLineEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntry; - - static write(value: TrustLineEntry, io: Buffer): void; - - static isValid(value: TrustLineEntry): boolean; - - static toXDR(value: TrustLineEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OfferEntry { - constructor(attributes: { - sellerId: AccountId; - offerId: Int64; - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - flags: number; - ext: OfferEntryExt; - }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - flags(value?: number): number; - - ext(value?: OfferEntryExt): OfferEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OfferEntry; - - static write(value: OfferEntry, io: Buffer): void; - - static isValid(value: OfferEntry): boolean; - - static toXDR(value: OfferEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OfferEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): OfferEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DataEntry { - constructor(attributes: { - accountId: AccountId; - dataName: string | Buffer; - dataValue: Buffer; - ext: DataEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - dataName(value?: string | Buffer): string | Buffer; - - dataValue(value?: Buffer): Buffer; - - ext(value?: DataEntryExt): DataEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DataEntry; - - static write(value: DataEntry, io: Buffer): void; - - static isValid(value: DataEntry): boolean; - - static toXDR(value: DataEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DataEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): DataEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimantV0 { - constructor(attributes: { - destination: AccountId; - predicate: ClaimPredicate; - }); - - destination(value?: AccountId): AccountId; - - predicate(value?: ClaimPredicate): ClaimPredicate; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimantV0; - - static write(value: ClaimantV0, io: Buffer): void; - - static isValid(value: ClaimantV0): boolean; - - static toXDR(value: ClaimantV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimantV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimantV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExtensionV1 { - constructor(attributes: { - ext: ClaimableBalanceEntryExtensionV1Ext; - flags: number; - }); - - ext( - value?: ClaimableBalanceEntryExtensionV1Ext - ): ClaimableBalanceEntryExtensionV1Ext; - - flags(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExtensionV1; - - static write(value: ClaimableBalanceEntryExtensionV1, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExtensionV1): boolean; - - static toXDR(value: ClaimableBalanceEntryExtensionV1): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClaimableBalanceEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntry { - constructor(attributes: { - balanceId: ClaimableBalanceId; - claimants: Claimant[]; - asset: Asset; - amount: Int64; - ext: ClaimableBalanceEntryExt; - }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - claimants(value?: Claimant[]): Claimant[]; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - ext(value?: ClaimableBalanceEntryExt): ClaimableBalanceEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntry; - - static write(value: ClaimableBalanceEntry, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntry): boolean; - - static toXDR(value: ClaimableBalanceEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolConstantProductParameters { - constructor(attributes: { assetA: Asset; assetB: Asset; fee: number }); - - assetA(value?: Asset): Asset; - - assetB(value?: Asset): Asset; - - fee(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolConstantProductParameters; - - static write( - value: LiquidityPoolConstantProductParameters, - io: Buffer - ): void; - - static isValid(value: LiquidityPoolConstantProductParameters): boolean; - - static toXDR(value: LiquidityPoolConstantProductParameters): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): LiquidityPoolConstantProductParameters; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolConstantProductParameters; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntryConstantProduct { - constructor(attributes: { - params: LiquidityPoolConstantProductParameters; - reserveA: Int64; - reserveB: Int64; - totalPoolShares: Int64; - poolSharesTrustLineCount: Int64; - }); - - params( - value?: LiquidityPoolConstantProductParameters - ): LiquidityPoolConstantProductParameters; - - reserveA(value?: Int64): Int64; - - reserveB(value?: Int64): Int64; - - totalPoolShares(value?: Int64): Int64; - - poolSharesTrustLineCount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntryConstantProduct; - - static write(value: LiquidityPoolEntryConstantProduct, io: Buffer): void; - - static isValid(value: LiquidityPoolEntryConstantProduct): boolean; - - static toXDR(value: LiquidityPoolEntryConstantProduct): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): LiquidityPoolEntryConstantProduct; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolEntryConstantProduct; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntry { - constructor(attributes: { - liquidityPoolId: PoolId; - body: LiquidityPoolEntryBody; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - body(value?: LiquidityPoolEntryBody): LiquidityPoolEntryBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntry; - - static write(value: LiquidityPoolEntry, io: Buffer): void; - - static isValid(value: LiquidityPoolEntry): boolean; - - static toXDR(value: LiquidityPoolEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): LiquidityPoolEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExtensionV1 { - constructor(attributes: { - sponsoringId: SponsorshipDescriptor; - ext: LedgerEntryExtensionV1Ext; - }); - - sponsoringId(value?: SponsorshipDescriptor): SponsorshipDescriptor; - - ext(value?: LedgerEntryExtensionV1Ext): LedgerEntryExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExtensionV1; - - static write(value: LedgerEntryExtensionV1, io: Buffer): void; - - static isValid(value: LedgerEntryExtensionV1): boolean; - - static toXDR(value: LedgerEntryExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntry { - constructor(attributes: { - lastModifiedLedgerSeq: number; - data: LedgerEntryData; - ext: LedgerEntryExt; - }); - - lastModifiedLedgerSeq(value?: number): number; - - data(value?: LedgerEntryData): LedgerEntryData; - - ext(value?: LedgerEntryExt): LedgerEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntry; - - static write(value: LedgerEntry, io: Buffer): void; - - static isValid(value: LedgerEntry): boolean; - - static toXDR(value: LedgerEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyAccount { - constructor(attributes: { accountId: AccountId }); - - accountId(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyAccount; - - static write(value: LedgerKeyAccount, io: Buffer): void; - - static isValid(value: LedgerKeyAccount): boolean; - - static toXDR(value: LedgerKeyAccount): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyAccount; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyAccount; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyTrustLine { - constructor(attributes: { accountId: AccountId; asset: TrustLineAsset }); - - accountId(value?: AccountId): AccountId; - - asset(value?: TrustLineAsset): TrustLineAsset; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyTrustLine; - - static write(value: LedgerKeyTrustLine, io: Buffer): void; - - static isValid(value: LedgerKeyTrustLine): boolean; - - static toXDR(value: LedgerKeyTrustLine): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyTrustLine; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyTrustLine; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyOffer { - constructor(attributes: { sellerId: AccountId; offerId: Int64 }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyOffer; - - static write(value: LedgerKeyOffer, io: Buffer): void; - - static isValid(value: LedgerKeyOffer): boolean; - - static toXDR(value: LedgerKeyOffer): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyOffer; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyOffer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyData { - constructor(attributes: { - accountId: AccountId; - dataName: string | Buffer; - }); - - accountId(value?: AccountId): AccountId; - - dataName(value?: string | Buffer): string | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyData; - - static write(value: LedgerKeyData, io: Buffer): void; - - static isValid(value: LedgerKeyData): boolean; - - static toXDR(value: LedgerKeyData): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyData; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyData; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyClaimableBalance { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyClaimableBalance; - - static write(value: LedgerKeyClaimableBalance, io: Buffer): void; - - static isValid(value: LedgerKeyClaimableBalance): boolean; - - static toXDR(value: LedgerKeyClaimableBalance): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyClaimableBalance; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyClaimableBalance; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyLiquidityPool { - constructor(attributes: { liquidityPoolId: PoolId }); - - liquidityPoolId(value?: PoolId): PoolId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyLiquidityPool; - - static write(value: LedgerKeyLiquidityPool, io: Buffer): void; - - static isValid(value: LedgerKeyLiquidityPool): boolean; - - static toXDR(value: LedgerKeyLiquidityPool): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyLiquidityPool; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyLiquidityPool; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseValueSignature { - constructor(attributes: { nodeId: NodeId; signature: Buffer }); - - nodeId(value?: NodeId): NodeId; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseValueSignature; - - static write(value: LedgerCloseValueSignature, io: Buffer): void; - - static isValid(value: LedgerCloseValueSignature): boolean; - - static toXDR(value: LedgerCloseValueSignature): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseValueSignature; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerCloseValueSignature; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarValue { - constructor(attributes: { - txSetHash: Buffer; - closeTime: TimePoint; - upgrades: Buffer[]; - ext: StellarValueExt; - }); - - txSetHash(value?: Buffer): Buffer; - - closeTime(value?: TimePoint): TimePoint; - - upgrades(value?: Buffer[]): Buffer[]; - - ext(value?: StellarValueExt): StellarValueExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarValue; - - static write(value: StellarValue, io: Buffer): void; - - static isValid(value: StellarValue): boolean; - - static toXDR(value: StellarValue): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarValue; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarValue; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExtensionV1 { - constructor(attributes: { flags: number; ext: LedgerHeaderExtensionV1Ext }); - - flags(value?: number): number; - - ext(value?: LedgerHeaderExtensionV1Ext): LedgerHeaderExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExtensionV1; - - static write(value: LedgerHeaderExtensionV1, io: Buffer): void; - - static isValid(value: LedgerHeaderExtensionV1): boolean; - - static toXDR(value: LedgerHeaderExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeader { - constructor(attributes: { - ledgerVersion: number; - previousLedgerHash: Buffer; - scpValue: StellarValue; - txSetResultHash: Buffer; - bucketListHash: Buffer; - ledgerSeq: number; - totalCoins: Int64; - feePool: Int64; - inflationSeq: number; - idPool: Uint64; - baseFee: number; - baseReserve: number; - maxTxSetSize: number; - skipList: Buffer[]; - ext: LedgerHeaderExt; - }); - - ledgerVersion(value?: number): number; - - previousLedgerHash(value?: Buffer): Buffer; - - scpValue(value?: StellarValue): StellarValue; - - txSetResultHash(value?: Buffer): Buffer; - - bucketListHash(value?: Buffer): Buffer; - - ledgerSeq(value?: number): number; - - totalCoins(value?: Int64): Int64; - - feePool(value?: Int64): Int64; - - inflationSeq(value?: number): number; - - idPool(value?: Uint64): Uint64; - - baseFee(value?: number): number; - - baseReserve(value?: number): number; - - maxTxSetSize(value?: number): number; - - skipList(value?: Buffer[]): Buffer[]; - - ext(value?: LedgerHeaderExt): LedgerHeaderExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeader; - - static write(value: LedgerHeader, io: Buffer): void; - - static isValid(value: LedgerHeader): boolean; - - static toXDR(value: LedgerHeader): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeader; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerHeader; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketMetadata { - constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); - - ledgerVersion(value?: number): number; - - ext(value?: BucketMetadataExt): BucketMetadataExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadata; - - static write(value: BucketMetadata, io: Buffer): void; - - static isValid(value: BucketMetadata): boolean; - - static toXDR(value: BucketMetadata): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TxSetComponentTxsMaybeDiscountedFee { - constructor(attributes: { - baseFee: null | Int64; - txes: TransactionEnvelope[]; - }); - - baseFee(value?: null | Int64): null | Int64; - - txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TxSetComponentTxsMaybeDiscountedFee; - - static write(value: TxSetComponentTxsMaybeDiscountedFee, io: Buffer): void; - - static isValid(value: TxSetComponentTxsMaybeDiscountedFee): boolean; - - static toXDR(value: TxSetComponentTxsMaybeDiscountedFee): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TxSetComponentTxsMaybeDiscountedFee; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TxSetComponentTxsMaybeDiscountedFee; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSet { - constructor(attributes: { - previousLedgerHash: Buffer; - txes: TransactionEnvelope[]; - }); - - previousLedgerHash(value?: Buffer): Buffer; - - txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSet; - - static write(value: TransactionSet, io: Buffer): void; - - static isValid(value: TransactionSet): boolean; - - static toXDR(value: TransactionSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSet; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSetV1 { - constructor(attributes: { - previousLedgerHash: Buffer; - phases: TransactionPhase[]; - }); - - previousLedgerHash(value?: Buffer): Buffer; - - phases(value?: TransactionPhase[]): TransactionPhase[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSetV1; - - static write(value: TransactionSetV1, io: Buffer): void; - - static isValid(value: TransactionSetV1): boolean; - - static toXDR(value: TransactionSetV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSetV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionSetV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultPair { - constructor(attributes: { - transactionHash: Buffer; - result: TransactionResult; - }); - - transactionHash(value?: Buffer): Buffer; - - result(value?: TransactionResult): TransactionResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultPair; - - static write(value: TransactionResultPair, io: Buffer): void; - - static isValid(value: TransactionResultPair): boolean; - - static toXDR(value: TransactionResultPair): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultPair; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultPair; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultSet { - constructor(attributes: { results: TransactionResultPair[] }); - - results(value?: TransactionResultPair[]): TransactionResultPair[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultSet; - - static write(value: TransactionResultSet, io: Buffer): void; - - static isValid(value: TransactionResultSet): boolean; - - static toXDR(value: TransactionResultSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultSet; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryEntry { - constructor(attributes: { - ledgerSeq: number; - txSet: TransactionSet; - ext: TransactionHistoryEntryExt; - }); - - ledgerSeq(value?: number): number; - - txSet(value?: TransactionSet): TransactionSet; - - ext(value?: TransactionHistoryEntryExt): TransactionHistoryEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryEntry; - - static write(value: TransactionHistoryEntry, io: Buffer): void; - - static isValid(value: TransactionHistoryEntry): boolean; - - static toXDR(value: TransactionHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionHistoryEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryResultEntry { - constructor(attributes: { - ledgerSeq: number; - txResultSet: TransactionResultSet; - ext: TransactionHistoryResultEntryExt; - }); - - ledgerSeq(value?: number): number; - - txResultSet(value?: TransactionResultSet): TransactionResultSet; - - ext( - value?: TransactionHistoryResultEntryExt - ): TransactionHistoryResultEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryResultEntry; - - static write(value: TransactionHistoryResultEntry, io: Buffer): void; - - static isValid(value: TransactionHistoryResultEntry): boolean; - - static toXDR(value: TransactionHistoryResultEntry): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionHistoryResultEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryResultEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderHistoryEntry { - constructor(attributes: { - hash: Buffer; - header: LedgerHeader; - ext: LedgerHeaderHistoryEntryExt; - }); - - hash(value?: Buffer): Buffer; - - header(value?: LedgerHeader): LedgerHeader; - - ext(value?: LedgerHeaderHistoryEntryExt): LedgerHeaderHistoryEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderHistoryEntry; - - static write(value: LedgerHeaderHistoryEntry, io: Buffer): void; - - static isValid(value: LedgerHeaderHistoryEntry): boolean; - - static toXDR(value: LedgerHeaderHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderHistoryEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerScpMessages { - constructor(attributes: { ledgerSeq: number; messages: ScpEnvelope[] }); - - ledgerSeq(value?: number): number; - - messages(value?: ScpEnvelope[]): ScpEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerScpMessages; - - static write(value: LedgerScpMessages, io: Buffer): void; - - static isValid(value: LedgerScpMessages): boolean; - - static toXDR(value: LedgerScpMessages): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerScpMessages; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerScpMessages; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpHistoryEntryV0 { - constructor(attributes: { - quorumSets: ScpQuorumSet[]; - ledgerMessages: LedgerScpMessages; - }); - - quorumSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; - - ledgerMessages(value?: LedgerScpMessages): LedgerScpMessages; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpHistoryEntryV0; - - static write(value: ScpHistoryEntryV0, io: Buffer): void; - - static isValid(value: ScpHistoryEntryV0): boolean; - - static toXDR(value: ScpHistoryEntryV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpHistoryEntryV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpHistoryEntryV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationMeta { - constructor(attributes: { changes: LedgerEntryChange[] }); - - changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationMeta; - - static write(value: OperationMeta, io: Buffer): void; - - static isValid(value: OperationMeta): boolean; - - static toXDR(value: OperationMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMetaV1 { - constructor(attributes: { - txChanges: LedgerEntryChange[]; - operations: OperationMeta[]; - }); - - txChanges(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - operations(value?: OperationMeta[]): OperationMeta[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMetaV1; - - static write(value: TransactionMetaV1, io: Buffer): void; - - static isValid(value: TransactionMetaV1): boolean; - - static toXDR(value: TransactionMetaV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMetaV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMetaV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMetaV2 { - constructor(attributes: { - txChangesBefore: LedgerEntryChange[]; - operations: OperationMeta[]; - txChangesAfter: LedgerEntryChange[]; - }); - - txChangesBefore(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - operations(value?: OperationMeta[]): OperationMeta[]; - - txChangesAfter(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMetaV2; - - static write(value: TransactionMetaV2, io: Buffer): void; - - static isValid(value: TransactionMetaV2): boolean; - - static toXDR(value: TransactionMetaV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMetaV2; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMetaV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultMeta { - constructor(attributes: { - result: TransactionResultPair; - feeProcessing: LedgerEntryChange[]; - txApplyProcessing: TransactionMeta; - }); - - result(value?: TransactionResultPair): TransactionResultPair; - - feeProcessing(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - txApplyProcessing(value?: TransactionMeta): TransactionMeta; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultMeta; - - static write(value: TransactionResultMeta, io: Buffer): void; - - static isValid(value: TransactionResultMeta): boolean; - - static toXDR(value: TransactionResultMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultMeta; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class UpgradeEntryMeta { - constructor(attributes: { - upgrade: LedgerUpgrade; - changes: LedgerEntryChange[]; - }); - - upgrade(value?: LedgerUpgrade): LedgerUpgrade; - - changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): UpgradeEntryMeta; - - static write(value: UpgradeEntryMeta, io: Buffer): void; - - static isValid(value: UpgradeEntryMeta): boolean; - - static toXDR(value: UpgradeEntryMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): UpgradeEntryMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): UpgradeEntryMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMetaV0 { - constructor(attributes: { - ledgerHeader: LedgerHeaderHistoryEntry; - txSet: TransactionSet; - txProcessing: TransactionResultMeta[]; - upgradesProcessing: UpgradeEntryMeta[]; - scpInfo: ScpHistoryEntry[]; - }); - - ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; - - txSet(value?: TransactionSet): TransactionSet; - - txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; - - upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; - - scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMetaV0; - - static write(value: LedgerCloseMetaV0, io: Buffer): void; - - static isValid(value: LedgerCloseMetaV0): boolean; - - static toXDR(value: LedgerCloseMetaV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMetaV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMetaV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMetaV1 { - constructor(attributes: { - ledgerHeader: LedgerHeaderHistoryEntry; - txSet: GeneralizedTransactionSet; - txProcessing: TransactionResultMeta[]; - upgradesProcessing: UpgradeEntryMeta[]; - scpInfo: ScpHistoryEntry[]; - }); - - ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; - - txSet(value?: GeneralizedTransactionSet): GeneralizedTransactionSet; - - txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; - - upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; - - scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMetaV1; - - static write(value: LedgerCloseMetaV1, io: Buffer): void; - - static isValid(value: LedgerCloseMetaV1): boolean; - - static toXDR(value: LedgerCloseMetaV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMetaV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMetaV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Error { - constructor(attributes: { code: ErrorCode; msg: string | Buffer }); - - code(value?: ErrorCode): ErrorCode; - - msg(value?: string | Buffer): string | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Error; - - static write(value: Error, io: Buffer): void; - - static isValid(value: Error): boolean; - - static toXDR(value: Error): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Error; - - static fromXDR(input: string, format: 'hex' | 'base64'): Error; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SendMore { - constructor(attributes: { numMessages: number }); - - numMessages(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SendMore; - - static write(value: SendMore, io: Buffer): void; - - static isValid(value: SendMore): boolean; - - static toXDR(value: SendMore): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SendMore; - - static fromXDR(input: string, format: 'hex' | 'base64'): SendMore; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthCert { - constructor(attributes: { - pubkey: Curve25519Public; - expiration: Uint64; - sig: Buffer; - }); - - pubkey(value?: Curve25519Public): Curve25519Public; - - expiration(value?: Uint64): Uint64; - - sig(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthCert; - - static write(value: AuthCert, io: Buffer): void; - - static isValid(value: AuthCert): boolean; - - static toXDR(value: AuthCert): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthCert; - - static fromXDR(input: string, format: 'hex' | 'base64'): AuthCert; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Hello { - constructor(attributes: { - ledgerVersion: number; - overlayVersion: number; - overlayMinVersion: number; - networkId: Buffer; - versionStr: string | Buffer; - listeningPort: number; - peerId: NodeId; - cert: AuthCert; - nonce: Buffer; - }); - - ledgerVersion(value?: number): number; - - overlayVersion(value?: number): number; - - overlayMinVersion(value?: number): number; - - networkId(value?: Buffer): Buffer; - - versionStr(value?: string | Buffer): string | Buffer; - - listeningPort(value?: number): number; - - peerId(value?: NodeId): NodeId; - - cert(value?: AuthCert): AuthCert; - - nonce(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Hello; - - static write(value: Hello, io: Buffer): void; - - static isValid(value: Hello): boolean; - - static toXDR(value: Hello): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Hello; - - static fromXDR(input: string, format: 'hex' | 'base64'): Hello; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Auth { - constructor(attributes: { unused: number }); - - unused(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Auth; - - static write(value: Auth, io: Buffer): void; - - static isValid(value: Auth): boolean; - - static toXDR(value: Auth): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Auth; - - static fromXDR(input: string, format: 'hex' | 'base64'): Auth; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerAddress { - constructor(attributes: { - ip: PeerAddressIp; - port: number; - numFailures: number; - }); - - ip(value?: PeerAddressIp): PeerAddressIp; - - port(value?: number): number; - - numFailures(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerAddress; - - static write(value: PeerAddress, io: Buffer): void; - - static isValid(value: PeerAddress): boolean; - - static toXDR(value: PeerAddress): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerAddress; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerAddress; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DontHave { - constructor(attributes: { type: MessageType; reqHash: Buffer }); - - type(value?: MessageType): MessageType; - - reqHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DontHave; - - static write(value: DontHave, io: Buffer): void; - - static isValid(value: DontHave): boolean; - - static toXDR(value: DontHave): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DontHave; - - static fromXDR(input: string, format: 'hex' | 'base64'): DontHave; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyRequestMessage { - constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; - ledgerNum: number; - encryptionKey: Curve25519Public; - commandType: SurveyMessageCommandType; - }); - - surveyorPeerId(value?: NodeId): NodeId; - - surveyedPeerId(value?: NodeId): NodeId; - - ledgerNum(value?: number): number; - - encryptionKey(value?: Curve25519Public): Curve25519Public; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyRequestMessage; - - static write(value: SurveyRequestMessage, io: Buffer): void; - - static isValid(value: SurveyRequestMessage): boolean; - - static toXDR(value: SurveyRequestMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyRequestMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SurveyRequestMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignedSurveyRequestMessage { - constructor(attributes: { - requestSignature: Buffer; - request: SurveyRequestMessage; - }); - - requestSignature(value?: Buffer): Buffer; - - request(value?: SurveyRequestMessage): SurveyRequestMessage; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignedSurveyRequestMessage; - - static write(value: SignedSurveyRequestMessage, io: Buffer): void; - - static isValid(value: SignedSurveyRequestMessage): boolean; - - static toXDR(value: SignedSurveyRequestMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignedSurveyRequestMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignedSurveyRequestMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyResponseMessage { - constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; - ledgerNum: number; - commandType: SurveyMessageCommandType; - encryptedBody: Buffer; - }); - - surveyorPeerId(value?: NodeId): NodeId; - - surveyedPeerId(value?: NodeId): NodeId; - - ledgerNum(value?: number): number; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - - encryptedBody(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyResponseMessage; - - static write(value: SurveyResponseMessage, io: Buffer): void; - - static isValid(value: SurveyResponseMessage): boolean; - - static toXDR(value: SurveyResponseMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyResponseMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SurveyResponseMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignedSurveyResponseMessage { - constructor(attributes: { - responseSignature: Buffer; - response: SurveyResponseMessage; - }); - - responseSignature(value?: Buffer): Buffer; - - response(value?: SurveyResponseMessage): SurveyResponseMessage; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignedSurveyResponseMessage; - - static write(value: SignedSurveyResponseMessage, io: Buffer): void; - - static isValid(value: SignedSurveyResponseMessage): boolean; - - static toXDR(value: SignedSurveyResponseMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignedSurveyResponseMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignedSurveyResponseMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerStats { - constructor(attributes: { - id: NodeId; - versionStr: string | Buffer; - messagesRead: Uint64; - messagesWritten: Uint64; - bytesRead: Uint64; - bytesWritten: Uint64; - secondsConnected: Uint64; - uniqueFloodBytesRecv: Uint64; - duplicateFloodBytesRecv: Uint64; - uniqueFetchBytesRecv: Uint64; - duplicateFetchBytesRecv: Uint64; - uniqueFloodMessageRecv: Uint64; - duplicateFloodMessageRecv: Uint64; - uniqueFetchMessageRecv: Uint64; - duplicateFetchMessageRecv: Uint64; - }); - - id(value?: NodeId): NodeId; - - versionStr(value?: string | Buffer): string | Buffer; - - messagesRead(value?: Uint64): Uint64; - - messagesWritten(value?: Uint64): Uint64; - - bytesRead(value?: Uint64): Uint64; - - bytesWritten(value?: Uint64): Uint64; - - secondsConnected(value?: Uint64): Uint64; - - uniqueFloodBytesRecv(value?: Uint64): Uint64; - - duplicateFloodBytesRecv(value?: Uint64): Uint64; - - uniqueFetchBytesRecv(value?: Uint64): Uint64; - - duplicateFetchBytesRecv(value?: Uint64): Uint64; - - uniqueFloodMessageRecv(value?: Uint64): Uint64; - - duplicateFloodMessageRecv(value?: Uint64): Uint64; - - uniqueFetchMessageRecv(value?: Uint64): Uint64; - - duplicateFetchMessageRecv(value?: Uint64): Uint64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerStats; - - static write(value: PeerStats, io: Buffer): void; - - static isValid(value: PeerStats): boolean; - - static toXDR(value: PeerStats): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerStats; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerStats; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TopologyResponseBody { - constructor(attributes: { - inboundPeers: PeerStats[]; - outboundPeers: PeerStats[]; - totalInboundPeerCount: number; - totalOutboundPeerCount: number; - }); - - inboundPeers(value?: PeerStats[]): PeerStats[]; - - outboundPeers(value?: PeerStats[]): PeerStats[]; - - totalInboundPeerCount(value?: number): number; - - totalOutboundPeerCount(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TopologyResponseBody; - - static write(value: TopologyResponseBody, io: Buffer): void; - - static isValid(value: TopologyResponseBody): boolean; - - static toXDR(value: TopologyResponseBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TopologyResponseBody; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TopologyResponseBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthenticatedMessageV0 { - constructor(attributes: { - sequence: Uint64; - message: StellarMessage; - mac: HmacSha256Mac; - }); - - sequence(value?: Uint64): Uint64; - - message(value?: StellarMessage): StellarMessage; - - mac(value?: HmacSha256Mac): HmacSha256Mac; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthenticatedMessageV0; - - static write(value: AuthenticatedMessageV0, io: Buffer): void; - - static isValid(value: AuthenticatedMessageV0): boolean; - - static toXDR(value: AuthenticatedMessageV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthenticatedMessageV0; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AuthenticatedMessageV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class MuxedAccountMed25519 { - constructor(attributes: { id: Uint64; ed25519: Buffer }); - - id(value?: Uint64): Uint64; - - ed25519(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): MuxedAccountMed25519; - - static write(value: MuxedAccountMed25519, io: Buffer): void; - - static isValid(value: MuxedAccountMed25519): boolean; - - static toXDR(value: MuxedAccountMed25519): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): MuxedAccountMed25519; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): MuxedAccountMed25519; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DecoratedSignature { - constructor(attributes: { hint: Buffer; signature: Buffer }); - - hint(value?: Buffer): Buffer; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DecoratedSignature; - - static write(value: DecoratedSignature, io: Buffer): void; - - static isValid(value: DecoratedSignature): boolean; - - static toXDR(value: DecoratedSignature): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DecoratedSignature; - - static fromXDR(input: string, format: 'hex' | 'base64'): DecoratedSignature; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateAccountOp { - constructor(attributes: { destination: AccountId; startingBalance: Int64 }); - - destination(value?: AccountId): AccountId; - - startingBalance(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateAccountOp; - - static write(value: CreateAccountOp, io: Buffer): void; - - static isValid(value: CreateAccountOp): boolean; - - static toXDR(value: CreateAccountOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateAccountOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): CreateAccountOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PaymentOp { - constructor(attributes: { - destination: MuxedAccount; - asset: Asset; - amount: Int64; - }); - - destination(value?: MuxedAccount): MuxedAccount; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PaymentOp; - - static write(value: PaymentOp, io: Buffer): void; - - static isValid(value: PaymentOp): boolean; - - static toXDR(value: PaymentOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PaymentOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): PaymentOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveOp { - constructor(attributes: { - sendAsset: Asset; - sendMax: Int64; - destination: MuxedAccount; - destAsset: Asset; - destAmount: Int64; - path: Asset[]; - }); - - sendAsset(value?: Asset): Asset; - - sendMax(value?: Int64): Int64; - - destination(value?: MuxedAccount): MuxedAccount; - - destAsset(value?: Asset): Asset; - - destAmount(value?: Int64): Int64; - - path(value?: Asset[]): Asset[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveOp; - - static write(value: PathPaymentStrictReceiveOp, io: Buffer): void; - - static isValid(value: PathPaymentStrictReceiveOp): boolean; - - static toXDR(value: PathPaymentStrictReceiveOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictReceiveOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendOp { - constructor(attributes: { - sendAsset: Asset; - sendAmount: Int64; - destination: MuxedAccount; - destAsset: Asset; - destMin: Int64; - path: Asset[]; - }); - - sendAsset(value?: Asset): Asset; - - sendAmount(value?: Int64): Int64; - - destination(value?: MuxedAccount): MuxedAccount; - - destAsset(value?: Asset): Asset; - - destMin(value?: Int64): Int64; - - path(value?: Asset[]): Asset[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendOp; - - static write(value: PathPaymentStrictSendOp, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendOp): boolean; - - static toXDR(value: PathPaymentStrictSendOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictSendOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageSellOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - offerId: Int64; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageSellOfferOp; - - static write(value: ManageSellOfferOp, io: Buffer): void; - - static isValid(value: ManageSellOfferOp): boolean; - - static toXDR(value: ManageSellOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageSellOfferOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageSellOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageBuyOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - buyAmount: Int64; - price: Price; - offerId: Int64; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - buyAmount(value?: Int64): Int64; - - price(value?: Price): Price; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageBuyOfferOp; - - static write(value: ManageBuyOfferOp, io: Buffer): void; - - static isValid(value: ManageBuyOfferOp): boolean; - - static toXDR(value: ManageBuyOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageBuyOfferOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageBuyOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreatePassiveSellOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreatePassiveSellOfferOp; - - static write(value: CreatePassiveSellOfferOp, io: Buffer): void; - - static isValid(value: CreatePassiveSellOfferOp): boolean; - - static toXDR(value: CreatePassiveSellOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreatePassiveSellOfferOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreatePassiveSellOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetOptionsOp { - constructor(attributes: { - inflationDest: null | AccountId; - clearFlags: null | number; - setFlags: null | number; - masterWeight: null | number; - lowThreshold: null | number; - medThreshold: null | number; - highThreshold: null | number; - homeDomain: null | string | Buffer; - signer: null | Signer; - }); - - inflationDest(value?: null | AccountId): null | AccountId; - - clearFlags(value?: null | number): null | number; - - setFlags(value?: null | number): null | number; - - masterWeight(value?: null | number): null | number; - - lowThreshold(value?: null | number): null | number; - - medThreshold(value?: null | number): null | number; - - highThreshold(value?: null | number): null | number; - - homeDomain(value?: null | string | Buffer): null | string | Buffer; - - signer(value?: null | Signer): null | Signer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetOptionsOp; - - static write(value: SetOptionsOp, io: Buffer): void; - - static isValid(value: SetOptionsOp): boolean; - - static toXDR(value: SetOptionsOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetOptionsOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): SetOptionsOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustOp { - constructor(attributes: { line: ChangeTrustAsset; limit: Int64 }); - - line(value?: ChangeTrustAsset): ChangeTrustAsset; - - limit(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustOp; - - static write(value: ChangeTrustOp, io: Buffer): void; - - static isValid(value: ChangeTrustOp): boolean; - - static toXDR(value: ChangeTrustOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AllowTrustOp { - constructor(attributes: { - trustor: AccountId; - asset: AssetCode; - authorize: number; - }); - - trustor(value?: AccountId): AccountId; - - asset(value?: AssetCode): AssetCode; - - authorize(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AllowTrustOp; - - static write(value: AllowTrustOp, io: Buffer): void; - - static isValid(value: AllowTrustOp): boolean; - - static toXDR(value: AllowTrustOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AllowTrustOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): AllowTrustOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageDataOp { - constructor(attributes: { - dataName: string | Buffer; - dataValue: null | Buffer; - }); - - dataName(value?: string | Buffer): string | Buffer; - - dataValue(value?: null | Buffer): null | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageDataOp; - - static write(value: ManageDataOp, io: Buffer): void; - - static isValid(value: ManageDataOp): boolean; - - static toXDR(value: ManageDataOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageDataOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageDataOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BumpSequenceOp { - constructor(attributes: { bumpTo: SequenceNumber }); - - bumpTo(value?: SequenceNumber): SequenceNumber; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BumpSequenceOp; - - static write(value: BumpSequenceOp, io: Buffer): void; - - static isValid(value: BumpSequenceOp): boolean; - - static toXDR(value: BumpSequenceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BumpSequenceOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): BumpSequenceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateClaimableBalanceOp { - constructor(attributes: { - asset: Asset; - amount: Int64; - claimants: Claimant[]; - }); - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - claimants(value?: Claimant[]): Claimant[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateClaimableBalanceOp; - - static write(value: CreateClaimableBalanceOp, io: Buffer): void; - - static isValid(value: CreateClaimableBalanceOp): boolean; - - static toXDR(value: CreateClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimClaimableBalanceOp { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimClaimableBalanceOp; - - static write(value: ClaimClaimableBalanceOp, io: Buffer): void; - - static isValid(value: ClaimClaimableBalanceOp): boolean; - - static toXDR(value: ClaimClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BeginSponsoringFutureReservesOp { - constructor(attributes: { sponsoredId: AccountId }); - - sponsoredId(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BeginSponsoringFutureReservesOp; - - static write(value: BeginSponsoringFutureReservesOp, io: Buffer): void; - - static isValid(value: BeginSponsoringFutureReservesOp): boolean; - - static toXDR(value: BeginSponsoringFutureReservesOp): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): BeginSponsoringFutureReservesOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): BeginSponsoringFutureReservesOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipOpSigner { - constructor(attributes: { accountId: AccountId; signerKey: SignerKey }); - - accountId(value?: AccountId): AccountId; - - signerKey(value?: SignerKey): SignerKey; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipOpSigner; - - static write(value: RevokeSponsorshipOpSigner, io: Buffer): void; - - static isValid(value: RevokeSponsorshipOpSigner): boolean; - - static toXDR(value: RevokeSponsorshipOpSigner): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipOpSigner; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipOpSigner; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackOp { - constructor(attributes: { - asset: Asset; - from: MuxedAccount; - amount: Int64; - }); - - asset(value?: Asset): Asset; - - from(value?: MuxedAccount): MuxedAccount; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackOp; - - static write(value: ClawbackOp, io: Buffer): void; - - static isValid(value: ClawbackOp): boolean; - - static toXDR(value: ClawbackOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClawbackOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackClaimableBalanceOp { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackClaimableBalanceOp; - - static write(value: ClawbackClaimableBalanceOp, io: Buffer): void; - - static isValid(value: ClawbackClaimableBalanceOp): boolean; - - static toXDR(value: ClawbackClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClawbackClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetTrustLineFlagsOp { - constructor(attributes: { - trustor: AccountId; - asset: Asset; - clearFlags: number; - setFlags: number; - }); - - trustor(value?: AccountId): AccountId; - - asset(value?: Asset): Asset; - - clearFlags(value?: number): number; - - setFlags(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetTrustLineFlagsOp; - - static write(value: SetTrustLineFlagsOp, io: Buffer): void; - - static isValid(value: SetTrustLineFlagsOp): boolean; - - static toXDR(value: SetTrustLineFlagsOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetTrustLineFlagsOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SetTrustLineFlagsOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolDepositOp { - constructor(attributes: { - liquidityPoolId: PoolId; - maxAmountA: Int64; - maxAmountB: Int64; - minPrice: Price; - maxPrice: Price; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - maxAmountA(value?: Int64): Int64; - - maxAmountB(value?: Int64): Int64; - - minPrice(value?: Price): Price; - - maxPrice(value?: Price): Price; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolDepositOp; - - static write(value: LiquidityPoolDepositOp, io: Buffer): void; - - static isValid(value: LiquidityPoolDepositOp): boolean; - - static toXDR(value: LiquidityPoolDepositOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolDepositOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolDepositOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolWithdrawOp { - constructor(attributes: { - liquidityPoolId: PoolId; - amount: Int64; - minAmountA: Int64; - minAmountB: Int64; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - amount(value?: Int64): Int64; - - minAmountA(value?: Int64): Int64; - - minAmountB(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolWithdrawOp; - - static write(value: LiquidityPoolWithdrawOp, io: Buffer): void; - - static isValid(value: LiquidityPoolWithdrawOp): boolean; - - static toXDR(value: LiquidityPoolWithdrawOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolWithdrawOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolWithdrawOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Operation2 { - constructor(attributes: { - sourceAccount: null | MuxedAccount; - body: OperationBody; - }); - - sourceAccount(value?: null | MuxedAccount): null | MuxedAccount; - - body(value?: OperationBody): OperationBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Operation; - - static write(value: Operation, io: Buffer): void; - - static isValid(value: Operation): boolean; - - static toXDR(value: Operation): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Operation; - - static fromXDR(input: string, format: 'hex' | 'base64'): Operation; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageOperationId { - constructor(attributes: { - sourceAccount: AccountId; - seqNum: SequenceNumber; - opNum: number; - }); - - sourceAccount(value?: AccountId): AccountId; - - seqNum(value?: SequenceNumber): SequenceNumber; - - opNum(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageOperationId; - - static write(value: HashIdPreimageOperationId, io: Buffer): void; - - static isValid(value: HashIdPreimageOperationId): boolean; - - static toXDR(value: HashIdPreimageOperationId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimageOperationId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageOperationId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageRevokeId { - constructor(attributes: { - sourceAccount: AccountId; - seqNum: SequenceNumber; - opNum: number; - liquidityPoolId: PoolId; - asset: Asset; - }); - - sourceAccount(value?: AccountId): AccountId; - - seqNum(value?: SequenceNumber): SequenceNumber; - - opNum(value?: number): number; - - liquidityPoolId(value?: PoolId): PoolId; - - asset(value?: Asset): Asset; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageRevokeId; - - static write(value: HashIdPreimageRevokeId, io: Buffer): void; - - static isValid(value: HashIdPreimageRevokeId): boolean; - - static toXDR(value: HashIdPreimageRevokeId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimageRevokeId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageRevokeId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TimeBounds { - constructor(attributes: { minTime: TimePoint; maxTime: TimePoint }); - - minTime(value?: TimePoint): TimePoint; - - maxTime(value?: TimePoint): TimePoint; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TimeBounds; - - static write(value: TimeBounds, io: Buffer): void; - - static isValid(value: TimeBounds): boolean; - - static toXDR(value: TimeBounds): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TimeBounds; - - static fromXDR(input: string, format: 'hex' | 'base64'): TimeBounds; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerBounds { - constructor(attributes: { minLedger: number; maxLedger: number }); - - minLedger(value?: number): number; - - maxLedger(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerBounds; - - static write(value: LedgerBounds, io: Buffer): void; - - static isValid(value: LedgerBounds): boolean; - - static toXDR(value: LedgerBounds): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerBounds; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerBounds; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PreconditionsV2 { - constructor(attributes: { - timeBounds: null | TimeBounds; - ledgerBounds: null | LedgerBounds; - minSeqNum: null | SequenceNumber; - minSeqAge: Duration; - minSeqLedgerGap: number; - extraSigners: SignerKey[]; - }); - - timeBounds(value?: null | TimeBounds): null | TimeBounds; - - ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; - - minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; - - minSeqAge(value?: Duration): Duration; - - minSeqLedgerGap(value?: number): number; - - extraSigners(value?: SignerKey[]): SignerKey[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PreconditionsV2; - - static write(value: PreconditionsV2, io: Buffer): void; - - static isValid(value: PreconditionsV2): boolean; - - static toXDR(value: PreconditionsV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PreconditionsV2; - - static fromXDR(input: string, format: 'hex' | 'base64'): PreconditionsV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0 { - constructor(attributes: { - sourceAccountEd25519: Buffer; - fee: number; - seqNum: SequenceNumber; - timeBounds: null | TimeBounds; - memo: Memo; - operations: Operation[]; - ext: TransactionV0Ext; - }); - - sourceAccountEd25519(value?: Buffer): Buffer; - - fee(value?: number): number; - - seqNum(value?: SequenceNumber): SequenceNumber; - - timeBounds(value?: null | TimeBounds): null | TimeBounds; - - memo(value?: Memo): Memo; - - operations(value?: Operation[]): Operation[]; - - ext(value?: TransactionV0Ext): TransactionV0Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0; - - static write(value: TransactionV0, io: Buffer): void; - - static isValid(value: TransactionV0): boolean; - - static toXDR(value: TransactionV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0Envelope { - constructor(attributes: { - tx: TransactionV0; - signatures: DecoratedSignature[]; - }); - - tx(value?: TransactionV0): TransactionV0; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0Envelope; - - static write(value: TransactionV0Envelope, io: Buffer): void; - - static isValid(value: TransactionV0Envelope): boolean; - - static toXDR(value: TransactionV0Envelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0Envelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionV0Envelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Transaction { - constructor(attributes: { - sourceAccount: MuxedAccount; - fee: number; - seqNum: SequenceNumber; - cond: Preconditions; - memo: Memo; - operations: Operation[]; - ext: TransactionExt; - }); - - sourceAccount(value?: MuxedAccount): MuxedAccount; - - fee(value?: number): number; - - seqNum(value?: SequenceNumber): SequenceNumber; - - cond(value?: Preconditions): Preconditions; - - memo(value?: Memo): Memo; - - operations(value?: Operation[]): Operation[]; - - ext(value?: TransactionExt): TransactionExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Transaction; - - static write(value: Transaction, io: Buffer): void; - - static isValid(value: Transaction): boolean; - - static toXDR(value: Transaction): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Transaction; - - static fromXDR(input: string, format: 'hex' | 'base64'): Transaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV1Envelope { - constructor(attributes: { - tx: Transaction; - signatures: DecoratedSignature[]; - }); - - tx(value?: Transaction): Transaction; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV1Envelope; - - static write(value: TransactionV1Envelope, io: Buffer): void; - - static isValid(value: TransactionV1Envelope): boolean; - - static toXDR(value: TransactionV1Envelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV1Envelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionV1Envelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransaction { - constructor(attributes: { - feeSource: MuxedAccount; - fee: Int64; - innerTx: FeeBumpTransactionInnerTx; - ext: FeeBumpTransactionExt; - }); - - feeSource(value?: MuxedAccount): MuxedAccount; - - fee(value?: Int64): Int64; - - innerTx(value?: FeeBumpTransactionInnerTx): FeeBumpTransactionInnerTx; - - ext(value?: FeeBumpTransactionExt): FeeBumpTransactionExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransaction; - - static write(value: FeeBumpTransaction, io: Buffer): void; - - static isValid(value: FeeBumpTransaction): boolean; - - static toXDR(value: FeeBumpTransaction): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransaction; - - static fromXDR(input: string, format: 'hex' | 'base64'): FeeBumpTransaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionEnvelope { - constructor(attributes: { - tx: FeeBumpTransaction; - signatures: DecoratedSignature[]; - }); - - tx(value?: FeeBumpTransaction): FeeBumpTransaction; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionEnvelope; - - static write(value: FeeBumpTransactionEnvelope, io: Buffer): void; - - static isValid(value: FeeBumpTransactionEnvelope): boolean; - - static toXDR(value: FeeBumpTransactionEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionEnvelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSignaturePayload { - constructor(attributes: { - networkId: Buffer; - taggedTransaction: TransactionSignaturePayloadTaggedTransaction; - }); - - networkId(value?: Buffer): Buffer; - - taggedTransaction( - value?: TransactionSignaturePayloadTaggedTransaction - ): TransactionSignaturePayloadTaggedTransaction; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSignaturePayload; - - static write(value: TransactionSignaturePayload, io: Buffer): void; - - static isValid(value: TransactionSignaturePayload): boolean; - - static toXDR(value: TransactionSignaturePayload): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSignaturePayload; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionSignaturePayload; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimOfferAtomV0 { - constructor(attributes: { - sellerEd25519: Buffer; - offerId: Int64; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - sellerEd25519(value?: Buffer): Buffer; - - offerId(value?: Int64): Int64; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimOfferAtomV0; - - static write(value: ClaimOfferAtomV0, io: Buffer): void; - - static isValid(value: ClaimOfferAtomV0): boolean; - - static toXDR(value: ClaimOfferAtomV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimOfferAtomV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimOfferAtomV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimOfferAtom { - constructor(attributes: { - sellerId: AccountId; - offerId: Int64; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimOfferAtom; - - static write(value: ClaimOfferAtom, io: Buffer): void; - - static isValid(value: ClaimOfferAtom): boolean; - - static toXDR(value: ClaimOfferAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimOfferAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimOfferAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimLiquidityAtom { - constructor(attributes: { - liquidityPoolId: PoolId; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimLiquidityAtom; - - static write(value: ClaimLiquidityAtom, io: Buffer): void; - - static isValid(value: ClaimLiquidityAtom): boolean; - - static toXDR(value: ClaimLiquidityAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimLiquidityAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimLiquidityAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SimplePaymentResult { - constructor(attributes: { - destination: AccountId; - asset: Asset; - amount: Int64; - }); - - destination(value?: AccountId): AccountId; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SimplePaymentResult; - - static write(value: SimplePaymentResult, io: Buffer): void; - - static isValid(value: SimplePaymentResult): boolean; - - static toXDR(value: SimplePaymentResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SimplePaymentResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SimplePaymentResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveResultSuccess { - constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); - - offers(value?: ClaimAtom[]): ClaimAtom[]; - - last(value?: SimplePaymentResult): SimplePaymentResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveResultSuccess; - - static write( - value: PathPaymentStrictReceiveResultSuccess, - io: Buffer - ): void; - - static isValid(value: PathPaymentStrictReceiveResultSuccess): boolean; - - static toXDR(value: PathPaymentStrictReceiveResultSuccess): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictReceiveResultSuccess; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveResultSuccess; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendResultSuccess { - constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); - - offers(value?: ClaimAtom[]): ClaimAtom[]; - - last(value?: SimplePaymentResult): SimplePaymentResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendResultSuccess; - - static write(value: PathPaymentStrictSendResultSuccess, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendResultSuccess): boolean; - - static toXDR(value: PathPaymentStrictSendResultSuccess): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictSendResultSuccess; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendResultSuccess; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageOfferSuccessResult { - constructor(attributes: { - offersClaimed: ClaimAtom[]; - offer: ManageOfferSuccessResultOffer; - }); - - offersClaimed(value?: ClaimAtom[]): ClaimAtom[]; - - offer(value?: ManageOfferSuccessResultOffer): ManageOfferSuccessResultOffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageOfferSuccessResult; - - static write(value: ManageOfferSuccessResult, io: Buffer): void; - - static isValid(value: ManageOfferSuccessResult): boolean; - - static toXDR(value: ManageOfferSuccessResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageOfferSuccessResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageOfferSuccessResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InflationPayout { - constructor(attributes: { destination: AccountId; amount: Int64 }); - - destination(value?: AccountId): AccountId; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InflationPayout; - - static write(value: InflationPayout, io: Buffer): void; - - static isValid(value: InflationPayout): boolean; - - static toXDR(value: InflationPayout): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InflationPayout; - - static fromXDR(input: string, format: 'hex' | 'base64'): InflationPayout; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResult { - constructor(attributes: { - feeCharged: Int64; - result: InnerTransactionResultResult; - ext: InnerTransactionResultExt; - }); - - feeCharged(value?: Int64): Int64; - - result(value?: InnerTransactionResultResult): InnerTransactionResultResult; - - ext(value?: InnerTransactionResultExt): InnerTransactionResultExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResult; - - static write(value: InnerTransactionResult, io: Buffer): void; - - static isValid(value: InnerTransactionResult): boolean; - - static toXDR(value: InnerTransactionResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultPair { - constructor(attributes: { - transactionHash: Buffer; - result: InnerTransactionResult; - }); - - transactionHash(value?: Buffer): Buffer; - - result(value?: InnerTransactionResult): InnerTransactionResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultPair; - - static write(value: InnerTransactionResultPair, io: Buffer): void; - - static isValid(value: InnerTransactionResultPair): boolean; - - static toXDR(value: InnerTransactionResultPair): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultPair; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultPair; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResult { - constructor(attributes: { - feeCharged: Int64; - result: TransactionResultResult; - ext: TransactionResultExt; - }); - - feeCharged(value?: Int64): Int64; - - result(value?: TransactionResultResult): TransactionResultResult; - - ext(value?: TransactionResultExt): TransactionResultExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResult; - - static write(value: TransactionResult, io: Buffer): void; - - static isValid(value: TransactionResult): boolean; - - static toXDR(value: TransactionResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignerKeyEd25519SignedPayload { - constructor(attributes: { ed25519: Buffer; payload: Buffer }); - - ed25519(value?: Buffer): Buffer; - - payload(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignerKeyEd25519SignedPayload; - - static write(value: SignerKeyEd25519SignedPayload, io: Buffer): void; - - static isValid(value: SignerKeyEd25519SignedPayload): boolean; - - static toXDR(value: SignerKeyEd25519SignedPayload): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): SignerKeyEd25519SignedPayload; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignerKeyEd25519SignedPayload; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Curve25519Secret { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Curve25519Secret; - - static write(value: Curve25519Secret, io: Buffer): void; - - static isValid(value: Curve25519Secret): boolean; - - static toXDR(value: Curve25519Secret): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Curve25519Secret; - - static fromXDR(input: string, format: 'hex' | 'base64'): Curve25519Secret; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Curve25519Public { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Curve25519Public; - - static write(value: Curve25519Public, io: Buffer): void; - - static isValid(value: Curve25519Public): boolean; - - static toXDR(value: Curve25519Public): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Curve25519Public; - - static fromXDR(input: string, format: 'hex' | 'base64'): Curve25519Public; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HmacSha256Key { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HmacSha256Key; - - static write(value: HmacSha256Key, io: Buffer): void; - - static isValid(value: HmacSha256Key): boolean; - - static toXDR(value: HmacSha256Key): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Key; - - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Key; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HmacSha256Mac { - constructor(attributes: { mac: Buffer }); - - mac(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HmacSha256Mac; - - static write(value: HmacSha256Mac, io: Buffer): void; - - static isValid(value: HmacSha256Mac): boolean; - - static toXDR(value: HmacSha256Mac): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Mac; - - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Mac; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementPledges { - switch(): ScpStatementType; - - prepare(value?: ScpStatementPrepare): ScpStatementPrepare; - - confirm(value?: ScpStatementConfirm): ScpStatementConfirm; - - externalize(value?: ScpStatementExternalize): ScpStatementExternalize; - - nominate(value?: ScpNomination): ScpNomination; - - static scpStPrepare(value: ScpStatementPrepare): ScpStatementPledges; - - static scpStConfirm(value: ScpStatementConfirm): ScpStatementPledges; - - static scpStExternalize( - value: ScpStatementExternalize - ): ScpStatementPledges; - - static scpStNominate(value: ScpNomination): ScpStatementPledges; - - value(): - | ScpStatementPrepare - | ScpStatementConfirm - | ScpStatementExternalize - | ScpNomination; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementPledges; - - static write(value: ScpStatementPledges, io: Buffer): void; - - static isValid(value: ScpStatementPledges): boolean; - - static toXDR(value: ScpStatementPledges): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementPledges; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementPledges; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AssetCode { - switch(): AssetType; - - assetCode4(value?: Buffer): Buffer; - - assetCode12(value?: Buffer): Buffer; - - static assetTypeCreditAlphanum4(value: Buffer): AssetCode; - - static assetTypeCreditAlphanum12(value: Buffer): AssetCode; - - value(): Buffer | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AssetCode; - - static write(value: AssetCode, io: Buffer): void; - - static isValid(value: AssetCode): boolean; - - static toXDR(value: AssetCode): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AssetCode; - - static fromXDR(input: string, format: 'hex' | 'base64'): AssetCode; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Asset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - static assetTypeNative(): Asset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): Asset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): Asset; - - value(): AlphaNum4 | AlphaNum12 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Asset; - - static write(value: Asset, io: Buffer): void; - - static isValid(value: Asset): boolean; - - static toXDR(value: Asset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Asset; - - static fromXDR(input: string, format: 'hex' | 'base64'): Asset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV2Ext { - switch(): number; - - v3(value?: AccountEntryExtensionV3): AccountEntryExtensionV3; - - static 0(): AccountEntryExtensionV2Ext; - - static 3(value: AccountEntryExtensionV3): AccountEntryExtensionV2Ext; - - value(): AccountEntryExtensionV3 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV2Ext; - - static write(value: AccountEntryExtensionV2Ext, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV2Ext): boolean; - - static toXDR(value: AccountEntryExtensionV2Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV2Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV2Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV1Ext { - switch(): number; - - v2(value?: AccountEntryExtensionV2): AccountEntryExtensionV2; - - static 0(): AccountEntryExtensionV1Ext; - - static 2(value: AccountEntryExtensionV2): AccountEntryExtensionV1Ext; - - value(): AccountEntryExtensionV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV1Ext; - - static write(value: AccountEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV1Ext): boolean; - - static toXDR(value: AccountEntryExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExt { - switch(): number; - - v1(value?: AccountEntryExtensionV1): AccountEntryExtensionV1; - - static 0(): AccountEntryExt; - - static 1(value: AccountEntryExtensionV1): AccountEntryExt; - - value(): AccountEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExt; - - static write(value: AccountEntryExt, io: Buffer): void; - - static isValid(value: AccountEntryExt): boolean; - - static toXDR(value: AccountEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineAsset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - liquidityPoolId(value?: PoolId): PoolId; - - static assetTypeNative(): TrustLineAsset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): TrustLineAsset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): TrustLineAsset; - - static assetTypePoolShare(value: PoolId): TrustLineAsset; - - value(): AlphaNum4 | AlphaNum12 | PoolId | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineAsset; - - static write(value: TrustLineAsset, io: Buffer): void; - - static isValid(value: TrustLineAsset): boolean; - - static toXDR(value: TrustLineAsset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineAsset; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineAsset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExtensionV2Ext { - switch(): number; - - static 0(): TrustLineEntryExtensionV2Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExtensionV2Ext; - - static write(value: TrustLineEntryExtensionV2Ext, io: Buffer): void; - - static isValid(value: TrustLineEntryExtensionV2Ext): boolean; - - static toXDR(value: TrustLineEntryExtensionV2Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExtensionV2Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryExtensionV2Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryV1Ext { - switch(): number; - - v2(value?: TrustLineEntryExtensionV2): TrustLineEntryExtensionV2; - - static 0(): TrustLineEntryV1Ext; - - static 2(value: TrustLineEntryExtensionV2): TrustLineEntryV1Ext; - - value(): TrustLineEntryExtensionV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryV1Ext; - - static write(value: TrustLineEntryV1Ext, io: Buffer): void; - - static isValid(value: TrustLineEntryV1Ext): boolean; - - static toXDR(value: TrustLineEntryV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExt { - switch(): number; - - v1(value?: TrustLineEntryV1): TrustLineEntryV1; - - static 0(): TrustLineEntryExt; - - static 1(value: TrustLineEntryV1): TrustLineEntryExt; - - value(): TrustLineEntryV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExt; - - static write(value: TrustLineEntryExt, io: Buffer): void; - - static isValid(value: TrustLineEntryExt): boolean; - - static toXDR(value: TrustLineEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OfferEntryExt { - switch(): number; - - static 0(): OfferEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OfferEntryExt; - - static write(value: OfferEntryExt, io: Buffer): void; - - static isValid(value: OfferEntryExt): boolean; - - static toXDR(value: OfferEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OfferEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): OfferEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DataEntryExt { - switch(): number; - - static 0(): DataEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DataEntryExt; - - static write(value: DataEntryExt, io: Buffer): void; - - static isValid(value: DataEntryExt): boolean; - - static toXDR(value: DataEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DataEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): DataEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimPredicate { - switch(): ClaimPredicateType; - - andPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; - - orPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; - - notPredicate(value?: null | ClaimPredicate): null | ClaimPredicate; - - absBefore(value?: Int64): Int64; - - relBefore(value?: Int64): Int64; - - static claimPredicateUnconditional(): ClaimPredicate; - - static claimPredicateAnd(value: ClaimPredicate[]): ClaimPredicate; - - static claimPredicateOr(value: ClaimPredicate[]): ClaimPredicate; - - static claimPredicateNot(value: null | ClaimPredicate): ClaimPredicate; - - static claimPredicateBeforeAbsoluteTime(value: Int64): ClaimPredicate; - - static claimPredicateBeforeRelativeTime(value: Int64): ClaimPredicate; - - value(): - | ClaimPredicate[] - | ClaimPredicate[] - | null - | ClaimPredicate - | Int64 - | Int64 - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimPredicate; - - static write(value: ClaimPredicate, io: Buffer): void; - - static isValid(value: ClaimPredicate): boolean; - - static toXDR(value: ClaimPredicate): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimPredicate; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimPredicate; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Claimant { - switch(): ClaimantType; - - v0(value?: ClaimantV0): ClaimantV0; - - static claimantTypeV0(value: ClaimantV0): Claimant; - - value(): ClaimantV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Claimant; - - static write(value: Claimant, io: Buffer): void; - - static isValid(value: Claimant): boolean; - - static toXDR(value: Claimant): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Claimant; - - static fromXDR(input: string, format: 'hex' | 'base64'): Claimant; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceId { - switch(): ClaimableBalanceIdType; - - v0(value?: Buffer): Buffer; - - static claimableBalanceIdTypeV0(value: Buffer): ClaimableBalanceId; - - value(): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceId; - - static write(value: ClaimableBalanceId, io: Buffer): void; - - static isValid(value: ClaimableBalanceId): boolean; - - static toXDR(value: ClaimableBalanceId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceId; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimableBalanceId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExtensionV1Ext { - switch(): number; - - static 0(): ClaimableBalanceEntryExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExtensionV1Ext; - - static write(value: ClaimableBalanceEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExtensionV1Ext): boolean; - - static toXDR(value: ClaimableBalanceEntryExtensionV1Ext): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClaimableBalanceEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExt { - switch(): number; - - v1( - value?: ClaimableBalanceEntryExtensionV1 - ): ClaimableBalanceEntryExtensionV1; - - static 0(): ClaimableBalanceEntryExt; - - static 1(value: ClaimableBalanceEntryExtensionV1): ClaimableBalanceEntryExt; - - value(): ClaimableBalanceEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExt; - - static write(value: ClaimableBalanceEntryExt, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExt): boolean; - - static toXDR(value: ClaimableBalanceEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntryBody { - switch(): LiquidityPoolType; - - constantProduct( - value?: LiquidityPoolEntryConstantProduct - ): LiquidityPoolEntryConstantProduct; - - static liquidityPoolConstantProduct( - value: LiquidityPoolEntryConstantProduct - ): LiquidityPoolEntryBody; - - value(): LiquidityPoolEntryConstantProduct; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntryBody; - - static write(value: LiquidityPoolEntryBody, io: Buffer): void; - - static isValid(value: LiquidityPoolEntryBody): boolean; - - static toXDR(value: LiquidityPoolEntryBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolEntryBody; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolEntryBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExtensionV1Ext { - switch(): number; - - static 0(): LedgerEntryExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExtensionV1Ext; - - static write(value: LedgerEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: LedgerEntryExtensionV1Ext): boolean; - - static toXDR(value: LedgerEntryExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryData { - switch(): LedgerEntryType; - - account(value?: AccountEntry): AccountEntry; - - trustLine(value?: TrustLineEntry): TrustLineEntry; - - offer(value?: OfferEntry): OfferEntry; - - data(value?: DataEntry): DataEntry; - - claimableBalance(value?: ClaimableBalanceEntry): ClaimableBalanceEntry; - - liquidityPool(value?: LiquidityPoolEntry): LiquidityPoolEntry; - - static account(value: AccountEntry): LedgerEntryData; - - static trustline(value: TrustLineEntry): LedgerEntryData; - - static offer(value: OfferEntry): LedgerEntryData; - - static data(value: DataEntry): LedgerEntryData; - - static claimableBalance(value: ClaimableBalanceEntry): LedgerEntryData; - - static liquidityPool(value: LiquidityPoolEntry): LedgerEntryData; - - value(): - | AccountEntry - | TrustLineEntry - | OfferEntry - | DataEntry - | ClaimableBalanceEntry - | LiquidityPoolEntry; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryData; - - static write(value: LedgerEntryData, io: Buffer): void; - - static isValid(value: LedgerEntryData): boolean; - - static toXDR(value: LedgerEntryData): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryData; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryData; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExt { - switch(): number; - - v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; - - static 0(): LedgerEntryExt; - - static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; - - value(): LedgerEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExt; - - static write(value: LedgerEntryExt, io: Buffer): void; - - static isValid(value: LedgerEntryExt): boolean; - - static toXDR(value: LedgerEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKey { - switch(): LedgerEntryType; - - account(value?: LedgerKeyAccount): LedgerKeyAccount; - - trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; - - offer(value?: LedgerKeyOffer): LedgerKeyOffer; - - data(value?: LedgerKeyData): LedgerKeyData; - - claimableBalance( - value?: LedgerKeyClaimableBalance - ): LedgerKeyClaimableBalance; - - liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; - - static account(value: LedgerKeyAccount): LedgerKey; - - static trustline(value: LedgerKeyTrustLine): LedgerKey; - - static offer(value: LedgerKeyOffer): LedgerKey; - - static data(value: LedgerKeyData): LedgerKey; - - static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; - - static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; - - value(): - | LedgerKeyAccount - | LedgerKeyTrustLine - | LedgerKeyOffer - | LedgerKeyData - | LedgerKeyClaimableBalance - | LedgerKeyLiquidityPool; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKey; - - static write(value: LedgerKey, io: Buffer): void; - - static isValid(value: LedgerKey): boolean; - - static toXDR(value: LedgerKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarValueExt { - switch(): StellarValueType; - - lcValueSignature( - value?: LedgerCloseValueSignature - ): LedgerCloseValueSignature; - - static stellarValueBasic(): StellarValueExt; - - static stellarValueSigned( - value: LedgerCloseValueSignature - ): StellarValueExt; - - value(): LedgerCloseValueSignature | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarValueExt; - - static write(value: StellarValueExt, io: Buffer): void; - - static isValid(value: StellarValueExt): boolean; - - static toXDR(value: StellarValueExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarValueExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarValueExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExtensionV1Ext { - switch(): number; - - static 0(): LedgerHeaderExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExtensionV1Ext; - - static write(value: LedgerHeaderExtensionV1Ext, io: Buffer): void; - - static isValid(value: LedgerHeaderExtensionV1Ext): boolean; - - static toXDR(value: LedgerHeaderExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExt { - switch(): number; - - v1(value?: LedgerHeaderExtensionV1): LedgerHeaderExtensionV1; - - static 0(): LedgerHeaderExt; - - static 1(value: LedgerHeaderExtensionV1): LedgerHeaderExt; - - value(): LedgerHeaderExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExt; - - static write(value: LedgerHeaderExt, io: Buffer): void; - - static isValid(value: LedgerHeaderExt): boolean; - - static toXDR(value: LedgerHeaderExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerHeaderExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerUpgrade { - switch(): LedgerUpgradeType; - - newLedgerVersion(value?: number): number; - - newBaseFee(value?: number): number; - - newMaxTxSetSize(value?: number): number; - - newBaseReserve(value?: number): number; - - newFlags(value?: number): number; - - static ledgerUpgradeVersion(value: number): LedgerUpgrade; - - static ledgerUpgradeBaseFee(value: number): LedgerUpgrade; - - static ledgerUpgradeMaxTxSetSize(value: number): LedgerUpgrade; - - static ledgerUpgradeBaseReserve(value: number): LedgerUpgrade; - - static ledgerUpgradeFlags(value: number): LedgerUpgrade; - - value(): number | number | number | number | number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerUpgrade; - - static write(value: LedgerUpgrade, io: Buffer): void; - - static isValid(value: LedgerUpgrade): boolean; - - static toXDR(value: LedgerUpgrade): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerUpgrade; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerUpgrade; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketMetadataExt { - switch(): number; - - static 0(): BucketMetadataExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadataExt; - - static write(value: BucketMetadataExt, io: Buffer): void; - - static isValid(value: BucketMetadataExt): boolean; - - static toXDR(value: BucketMetadataExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketEntry { - switch(): BucketEntryType; - - liveEntry(value?: LedgerEntry): LedgerEntry; - - deadEntry(value?: LedgerKey): LedgerKey; - - metaEntry(value?: BucketMetadata): BucketMetadata; - - static liveentry(value: LedgerEntry): BucketEntry; - - static initentry(value: LedgerEntry): BucketEntry; - - static deadentry(value: LedgerKey): BucketEntry; - - static metaentry(value: BucketMetadata): BucketEntry; - - value(): LedgerEntry | LedgerKey | BucketMetadata; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketEntry; - - static write(value: BucketEntry, io: Buffer): void; - - static isValid(value: BucketEntry): boolean; - - static toXDR(value: BucketEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TxSetComponent { - switch(): TxSetComponentType; - - txsMaybeDiscountedFee( - value?: TxSetComponentTxsMaybeDiscountedFee - ): TxSetComponentTxsMaybeDiscountedFee; - - static txsetCompTxsMaybeDiscountedFee( - value: TxSetComponentTxsMaybeDiscountedFee - ): TxSetComponent; - - value(): TxSetComponentTxsMaybeDiscountedFee; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TxSetComponent; - - static write(value: TxSetComponent, io: Buffer): void; - - static isValid(value: TxSetComponent): boolean; - - static toXDR(value: TxSetComponent): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TxSetComponent; - - static fromXDR(input: string, format: 'hex' | 'base64'): TxSetComponent; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionPhase { - switch(): number; - - v0Components(value?: TxSetComponent[]): TxSetComponent[]; - - static 0(value: TxSetComponent[]): TransactionPhase; - - value(): TxSetComponent[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionPhase; - - static write(value: TransactionPhase, io: Buffer): void; - - static isValid(value: TransactionPhase): boolean; - - static toXDR(value: TransactionPhase): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionPhase; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionPhase; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class GeneralizedTransactionSet { - switch(): number; - - v1TxSet(value?: TransactionSetV1): TransactionSetV1; - - static 1(value: TransactionSetV1): GeneralizedTransactionSet; - - value(): TransactionSetV1; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): GeneralizedTransactionSet; - - static write(value: GeneralizedTransactionSet, io: Buffer): void; - - static isValid(value: GeneralizedTransactionSet): boolean; - - static toXDR(value: GeneralizedTransactionSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): GeneralizedTransactionSet; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): GeneralizedTransactionSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryEntryExt { - switch(): number; - - generalizedTxSet( - value?: GeneralizedTransactionSet - ): GeneralizedTransactionSet; - - static 0(): TransactionHistoryEntryExt; - - static 1(value: GeneralizedTransactionSet): TransactionHistoryEntryExt; - - value(): GeneralizedTransactionSet | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryEntryExt; - - static write(value: TransactionHistoryEntryExt, io: Buffer): void; - - static isValid(value: TransactionHistoryEntryExt): boolean; - - static toXDR(value: TransactionHistoryEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionHistoryEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryResultEntryExt { - switch(): number; - - static 0(): TransactionHistoryResultEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryResultEntryExt; - - static write(value: TransactionHistoryResultEntryExt, io: Buffer): void; - - static isValid(value: TransactionHistoryResultEntryExt): boolean; - - static toXDR(value: TransactionHistoryResultEntryExt): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionHistoryResultEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryResultEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderHistoryEntryExt { - switch(): number; - - static 0(): LedgerHeaderHistoryEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderHistoryEntryExt; - - static write(value: LedgerHeaderHistoryEntryExt, io: Buffer): void; - - static isValid(value: LedgerHeaderHistoryEntryExt): boolean; - - static toXDR(value: LedgerHeaderHistoryEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderHistoryEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderHistoryEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpHistoryEntry { - switch(): number; - - v0(value?: ScpHistoryEntryV0): ScpHistoryEntryV0; - - static 0(value: ScpHistoryEntryV0): ScpHistoryEntry; - - value(): ScpHistoryEntryV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpHistoryEntry; - - static write(value: ScpHistoryEntry, io: Buffer): void; - - static isValid(value: ScpHistoryEntry): boolean; - - static toXDR(value: ScpHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpHistoryEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryChange { - switch(): LedgerEntryChangeType; - - created(value?: LedgerEntry): LedgerEntry; - - updated(value?: LedgerEntry): LedgerEntry; - - removed(value?: LedgerKey): LedgerKey; - - state(value?: LedgerEntry): LedgerEntry; - - static ledgerEntryCreated(value: LedgerEntry): LedgerEntryChange; - - static ledgerEntryUpdated(value: LedgerEntry): LedgerEntryChange; - - static ledgerEntryRemoved(value: LedgerKey): LedgerEntryChange; - - static ledgerEntryState(value: LedgerEntry): LedgerEntryChange; - - value(): LedgerEntry | LedgerEntry | LedgerKey | LedgerEntry; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryChange; - - static write(value: LedgerEntryChange, io: Buffer): void; - - static isValid(value: LedgerEntryChange): boolean; - - static toXDR(value: LedgerEntryChange): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryChange; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryChange; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMeta { - switch(): number; - - operations(value?: OperationMeta[]): OperationMeta[]; - - v1(value?: TransactionMetaV1): TransactionMetaV1; - - v2(value?: TransactionMetaV2): TransactionMetaV2; - - static 0(value: OperationMeta[]): TransactionMeta; - - static 1(value: TransactionMetaV1): TransactionMeta; - - static 2(value: TransactionMetaV2): TransactionMeta; - - value(): OperationMeta[] | TransactionMetaV1 | TransactionMetaV2; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMeta; - - static write(value: TransactionMeta, io: Buffer): void; - - static isValid(value: TransactionMeta): boolean; - - static toXDR(value: TransactionMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMeta { - switch(): number; - - v0(value?: LedgerCloseMetaV0): LedgerCloseMetaV0; - - v1(value?: LedgerCloseMetaV1): LedgerCloseMetaV1; - - static 0(value: LedgerCloseMetaV0): LedgerCloseMeta; - - static 1(value: LedgerCloseMetaV1): LedgerCloseMeta; - - value(): LedgerCloseMetaV0 | LedgerCloseMetaV1; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMeta; - - static write(value: LedgerCloseMeta, io: Buffer): void; - - static isValid(value: LedgerCloseMeta): boolean; - - static toXDR(value: LedgerCloseMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerAddressIp { - switch(): IpAddrType; - - ipv4(value?: Buffer): Buffer; - - ipv6(value?: Buffer): Buffer; - - static iPv4(value: Buffer): PeerAddressIp; - - static iPv6(value: Buffer): PeerAddressIp; - - value(): Buffer | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerAddressIp; - - static write(value: PeerAddressIp, io: Buffer): void; - - static isValid(value: PeerAddressIp): boolean; - - static toXDR(value: PeerAddressIp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerAddressIp; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerAddressIp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyResponseBody { - switch(): SurveyMessageCommandType; - - topologyResponseBody(value?: TopologyResponseBody): TopologyResponseBody; - - static surveyTopology(value: TopologyResponseBody): SurveyResponseBody; - - value(): TopologyResponseBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyResponseBody; - - static write(value: SurveyResponseBody, io: Buffer): void; - - static isValid(value: SurveyResponseBody): boolean; - - static toXDR(value: SurveyResponseBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyResponseBody; - - static fromXDR(input: string, format: 'hex' | 'base64'): SurveyResponseBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarMessage { - switch(): MessageType; - - error(value?: Error): Error; - - hello(value?: Hello): Hello; - - auth(value?: Auth): Auth; - - dontHave(value?: DontHave): DontHave; - - peers(value?: PeerAddress[]): PeerAddress[]; - - txSetHash(value?: Buffer): Buffer; - - txSet(value?: TransactionSet): TransactionSet; - - generalizedTxSet( - value?: GeneralizedTransactionSet - ): GeneralizedTransactionSet; - - transaction(value?: TransactionEnvelope): TransactionEnvelope; - - signedSurveyRequestMessage( - value?: SignedSurveyRequestMessage - ): SignedSurveyRequestMessage; - - signedSurveyResponseMessage( - value?: SignedSurveyResponseMessage - ): SignedSurveyResponseMessage; - - qSetHash(value?: Buffer): Buffer; - - qSet(value?: ScpQuorumSet): ScpQuorumSet; - - envelope(value?: ScpEnvelope): ScpEnvelope; - - getScpLedgerSeq(value?: number): number; - - sendMoreMessage(value?: SendMore): SendMore; - - static errorMsg(value: Error): StellarMessage; - - static hello(value: Hello): StellarMessage; - - static auth(value: Auth): StellarMessage; - - static dontHave(value: DontHave): StellarMessage; - - static getPeers(): StellarMessage; - - static peers(value: PeerAddress[]): StellarMessage; - - static getTxSet(value: Buffer): StellarMessage; - - static txSet(value: TransactionSet): StellarMessage; - - static generalizedTxSet(value: GeneralizedTransactionSet): StellarMessage; - - static transaction(value: TransactionEnvelope): StellarMessage; - - static surveyRequest(value: SignedSurveyRequestMessage): StellarMessage; - - static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; - - static getScpQuorumset(value: Buffer): StellarMessage; - - static scpQuorumset(value: ScpQuorumSet): StellarMessage; - - static scpMessage(value: ScpEnvelope): StellarMessage; - - static getScpState(value: number): StellarMessage; - - static sendMore(value: SendMore): StellarMessage; - - value(): - | Error - | Hello - | Auth - | DontHave - | PeerAddress[] - | Buffer - | TransactionSet - | GeneralizedTransactionSet - | TransactionEnvelope - | SignedSurveyRequestMessage - | SignedSurveyResponseMessage - | Buffer - | ScpQuorumSet - | ScpEnvelope - | number - | SendMore - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarMessage; - - static write(value: StellarMessage, io: Buffer): void; - - static isValid(value: StellarMessage): boolean; - - static toXDR(value: StellarMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarMessage; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthenticatedMessage { - switch(): number; - - v0(value?: AuthenticatedMessageV0): AuthenticatedMessageV0; - - static 0(value: AuthenticatedMessageV0): AuthenticatedMessage; - - value(): AuthenticatedMessageV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthenticatedMessage; - - static write(value: AuthenticatedMessage, io: Buffer): void; - - static isValid(value: AuthenticatedMessage): boolean; - - static toXDR(value: AuthenticatedMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthenticatedMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AuthenticatedMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolParameters { - switch(): LiquidityPoolType; - - constantProduct( - value?: LiquidityPoolConstantProductParameters - ): LiquidityPoolConstantProductParameters; - - static liquidityPoolConstantProduct( - value: LiquidityPoolConstantProductParameters - ): LiquidityPoolParameters; - - value(): LiquidityPoolConstantProductParameters; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolParameters; - - static write(value: LiquidityPoolParameters, io: Buffer): void; - - static isValid(value: LiquidityPoolParameters): boolean; - - static toXDR(value: LiquidityPoolParameters): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolParameters; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolParameters; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class MuxedAccount { - switch(): CryptoKeyType; - - ed25519(value?: Buffer): Buffer; - - med25519(value?: MuxedAccountMed25519): MuxedAccountMed25519; - - static keyTypeEd25519(value: Buffer): MuxedAccount; - - static keyTypeMuxedEd25519(value: MuxedAccountMed25519): MuxedAccount; - - value(): Buffer | MuxedAccountMed25519; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): MuxedAccount; - - static write(value: MuxedAccount, io: Buffer): void; - - static isValid(value: MuxedAccount): boolean; - - static toXDR(value: MuxedAccount): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): MuxedAccount; - - static fromXDR(input: string, format: 'hex' | 'base64'): MuxedAccount; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustAsset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - liquidityPool(value?: LiquidityPoolParameters): LiquidityPoolParameters; - - static assetTypeNative(): ChangeTrustAsset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): ChangeTrustAsset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): ChangeTrustAsset; - - static assetTypePoolShare(value: LiquidityPoolParameters): ChangeTrustAsset; - - value(): AlphaNum4 | AlphaNum12 | LiquidityPoolParameters | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustAsset; - - static write(value: ChangeTrustAsset, io: Buffer): void; - - static isValid(value: ChangeTrustAsset): boolean; - - static toXDR(value: ChangeTrustAsset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustAsset; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustAsset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipOp { - switch(): RevokeSponsorshipType; - - ledgerKey(value?: LedgerKey): LedgerKey; - - signer(value?: RevokeSponsorshipOpSigner): RevokeSponsorshipOpSigner; - - static revokeSponsorshipLedgerEntry(value: LedgerKey): RevokeSponsorshipOp; - - static revokeSponsorshipSigner( - value: RevokeSponsorshipOpSigner - ): RevokeSponsorshipOp; - - value(): LedgerKey | RevokeSponsorshipOpSigner; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipOp; - - static write(value: RevokeSponsorshipOp, io: Buffer): void; - - static isValid(value: RevokeSponsorshipOp): boolean; - - static toXDR(value: RevokeSponsorshipOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationBody { - switch(): OperationType; - - createAccountOp(value?: CreateAccountOp): CreateAccountOp; - - paymentOp(value?: PaymentOp): PaymentOp; - - pathPaymentStrictReceiveOp( - value?: PathPaymentStrictReceiveOp - ): PathPaymentStrictReceiveOp; - - manageSellOfferOp(value?: ManageSellOfferOp): ManageSellOfferOp; - - createPassiveSellOfferOp( - value?: CreatePassiveSellOfferOp - ): CreatePassiveSellOfferOp; - - setOptionsOp(value?: SetOptionsOp): SetOptionsOp; - - changeTrustOp(value?: ChangeTrustOp): ChangeTrustOp; - - allowTrustOp(value?: AllowTrustOp): AllowTrustOp; - - destination(value?: MuxedAccount): MuxedAccount; - - manageDataOp(value?: ManageDataOp): ManageDataOp; - - bumpSequenceOp(value?: BumpSequenceOp): BumpSequenceOp; - - manageBuyOfferOp(value?: ManageBuyOfferOp): ManageBuyOfferOp; - - pathPaymentStrictSendOp( - value?: PathPaymentStrictSendOp - ): PathPaymentStrictSendOp; - - createClaimableBalanceOp( - value?: CreateClaimableBalanceOp - ): CreateClaimableBalanceOp; - - claimClaimableBalanceOp( - value?: ClaimClaimableBalanceOp - ): ClaimClaimableBalanceOp; - - beginSponsoringFutureReservesOp( - value?: BeginSponsoringFutureReservesOp - ): BeginSponsoringFutureReservesOp; - - revokeSponsorshipOp(value?: RevokeSponsorshipOp): RevokeSponsorshipOp; - - clawbackOp(value?: ClawbackOp): ClawbackOp; - - clawbackClaimableBalanceOp( - value?: ClawbackClaimableBalanceOp - ): ClawbackClaimableBalanceOp; - - setTrustLineFlagsOp(value?: SetTrustLineFlagsOp): SetTrustLineFlagsOp; - - liquidityPoolDepositOp( - value?: LiquidityPoolDepositOp - ): LiquidityPoolDepositOp; - - liquidityPoolWithdrawOp( - value?: LiquidityPoolWithdrawOp - ): LiquidityPoolWithdrawOp; - - static createAccount(value: CreateAccountOp): OperationBody; - - static payment(value: PaymentOp): OperationBody; - - static pathPaymentStrictReceive( - value: PathPaymentStrictReceiveOp - ): OperationBody; - - static manageSellOffer(value: ManageSellOfferOp): OperationBody; - - static createPassiveSellOffer( - value: CreatePassiveSellOfferOp - ): OperationBody; - - static setOptions(value: SetOptionsOp): OperationBody; - - static changeTrust(value: ChangeTrustOp): OperationBody; - - static allowTrust(value: AllowTrustOp): OperationBody; - - static accountMerge(value: MuxedAccount): OperationBody; - - static inflation(): OperationBody; - - static manageData(value: ManageDataOp): OperationBody; - - static bumpSequence(value: BumpSequenceOp): OperationBody; - - static manageBuyOffer(value: ManageBuyOfferOp): OperationBody; - - static pathPaymentStrictSend(value: PathPaymentStrictSendOp): OperationBody; - - static createClaimableBalance( - value: CreateClaimableBalanceOp - ): OperationBody; - - static claimClaimableBalance(value: ClaimClaimableBalanceOp): OperationBody; - - static beginSponsoringFutureReserves( - value: BeginSponsoringFutureReservesOp - ): OperationBody; - - static endSponsoringFutureReserves(): OperationBody; - - static revokeSponsorship(value: RevokeSponsorshipOp): OperationBody; - - static clawback(value: ClawbackOp): OperationBody; - - static clawbackClaimableBalance( - value: ClawbackClaimableBalanceOp - ): OperationBody; - - static setTrustLineFlags(value: SetTrustLineFlagsOp): OperationBody; - - static liquidityPoolDeposit(value: LiquidityPoolDepositOp): OperationBody; - - static liquidityPoolWithdraw(value: LiquidityPoolWithdrawOp): OperationBody; - - value(): - | CreateAccountOp - | PaymentOp - | PathPaymentStrictReceiveOp - | ManageSellOfferOp - | CreatePassiveSellOfferOp - | SetOptionsOp - | ChangeTrustOp - | AllowTrustOp - | MuxedAccount - | ManageDataOp - | BumpSequenceOp - | ManageBuyOfferOp - | PathPaymentStrictSendOp - | CreateClaimableBalanceOp - | ClaimClaimableBalanceOp - | BeginSponsoringFutureReservesOp - | RevokeSponsorshipOp - | ClawbackOp - | ClawbackClaimableBalanceOp - | SetTrustLineFlagsOp - | LiquidityPoolDepositOp - | LiquidityPoolWithdrawOp - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationBody; - - static write(value: OperationBody, io: Buffer): void; - - static isValid(value: OperationBody): boolean; - - static toXDR(value: OperationBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationBody; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimage { - switch(): EnvelopeType; - - operationId(value?: HashIdPreimageOperationId): HashIdPreimageOperationId; - - revokeId(value?: HashIdPreimageRevokeId): HashIdPreimageRevokeId; - - static envelopeTypeOpId(value: HashIdPreimageOperationId): HashIdPreimage; - - static envelopeTypePoolRevokeOpId( - value: HashIdPreimageRevokeId - ): HashIdPreimage; - - value(): HashIdPreimageOperationId | HashIdPreimageRevokeId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimage; - - static write(value: HashIdPreimage, io: Buffer): void; - - static isValid(value: HashIdPreimage): boolean; - - static toXDR(value: HashIdPreimage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimage; - - static fromXDR(input: string, format: 'hex' | 'base64'): HashIdPreimage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Memo { - switch(): MemoType; - - text(value?: string | Buffer): string | Buffer; - - id(value?: Uint64): Uint64; - - hash(value?: Buffer): Buffer; - - retHash(value?: Buffer): Buffer; - - static memoNone(): Memo; - - static memoText(value: string | Buffer): Memo; - - static memoId(value: Uint64): Memo; - - static memoHash(value: Buffer): Memo; - - static memoReturn(value: Buffer): Memo; - - value(): string | Buffer | Uint64 | Buffer | Buffer | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Memo; - - static write(value: Memo, io: Buffer): void; - - static isValid(value: Memo): boolean; - - static toXDR(value: Memo): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Memo; - - static fromXDR(input: string, format: 'hex' | 'base64'): Memo; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Preconditions { - switch(): PreconditionType; - - timeBounds(value?: TimeBounds): TimeBounds; - - v2(value?: PreconditionsV2): PreconditionsV2; - - static precondNone(): Preconditions; - - static precondTime(value: TimeBounds): Preconditions; - - static precondV2(value: PreconditionsV2): Preconditions; - - value(): TimeBounds | PreconditionsV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Preconditions; - - static write(value: Preconditions, io: Buffer): void; - - static isValid(value: Preconditions): boolean; - - static toXDR(value: Preconditions): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Preconditions; - - static fromXDR(input: string, format: 'hex' | 'base64'): Preconditions; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0Ext { - switch(): number; - - static 0(): TransactionV0Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0Ext; - - static write(value: TransactionV0Ext, io: Buffer): void; - - static isValid(value: TransactionV0Ext): boolean; - - static toXDR(value: TransactionV0Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0Ext; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionV0Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionExt { - switch(): number; - - static 0(): TransactionExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionExt; - - static write(value: TransactionExt, io: Buffer): void; - - static isValid(value: TransactionExt): boolean; - - static toXDR(value: TransactionExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionInnerTx { - switch(): EnvelopeType; - - v1(value?: TransactionV1Envelope): TransactionV1Envelope; - - static envelopeTypeTx( - value: TransactionV1Envelope - ): FeeBumpTransactionInnerTx; - - value(): TransactionV1Envelope; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionInnerTx; - - static write(value: FeeBumpTransactionInnerTx, io: Buffer): void; - - static isValid(value: FeeBumpTransactionInnerTx): boolean; - - static toXDR(value: FeeBumpTransactionInnerTx): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionInnerTx; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionInnerTx; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionExt { - switch(): number; - - static 0(): FeeBumpTransactionExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionExt; - - static write(value: FeeBumpTransactionExt, io: Buffer): void; - - static isValid(value: FeeBumpTransactionExt): boolean; - - static toXDR(value: FeeBumpTransactionExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionEnvelope { - switch(): EnvelopeType; - - v0(value?: TransactionV0Envelope): TransactionV0Envelope; - - v1(value?: TransactionV1Envelope): TransactionV1Envelope; - - feeBump(value?: FeeBumpTransactionEnvelope): FeeBumpTransactionEnvelope; - - static envelopeTypeTxV0(value: TransactionV0Envelope): TransactionEnvelope; - - static envelopeTypeTx(value: TransactionV1Envelope): TransactionEnvelope; - - static envelopeTypeTxFeeBump( - value: FeeBumpTransactionEnvelope - ): TransactionEnvelope; - - value(): - | TransactionV0Envelope - | TransactionV1Envelope - | FeeBumpTransactionEnvelope; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionEnvelope; - - static write(value: TransactionEnvelope, io: Buffer): void; - - static isValid(value: TransactionEnvelope): boolean; - - static toXDR(value: TransactionEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionEnvelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSignaturePayloadTaggedTransaction { - switch(): EnvelopeType; - - tx(value?: Transaction): Transaction; - - feeBump(value?: FeeBumpTransaction): FeeBumpTransaction; - - static envelopeTypeTx( - value: Transaction - ): TransactionSignaturePayloadTaggedTransaction; - - static envelopeTypeTxFeeBump( - value: FeeBumpTransaction - ): TransactionSignaturePayloadTaggedTransaction; - - value(): Transaction | FeeBumpTransaction; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSignaturePayloadTaggedTransaction; - - static write( - value: TransactionSignaturePayloadTaggedTransaction, - io: Buffer - ): void; - - static isValid( - value: TransactionSignaturePayloadTaggedTransaction - ): boolean; - - static toXDR(value: TransactionSignaturePayloadTaggedTransaction): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionSignaturePayloadTaggedTransaction; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionSignaturePayloadTaggedTransaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimAtom { - switch(): ClaimAtomType; - - v0(value?: ClaimOfferAtomV0): ClaimOfferAtomV0; - - orderBook(value?: ClaimOfferAtom): ClaimOfferAtom; - - liquidityPool(value?: ClaimLiquidityAtom): ClaimLiquidityAtom; - - static claimAtomTypeV0(value: ClaimOfferAtomV0): ClaimAtom; - - static claimAtomTypeOrderBook(value: ClaimOfferAtom): ClaimAtom; - - static claimAtomTypeLiquidityPool(value: ClaimLiquidityAtom): ClaimAtom; - - value(): ClaimOfferAtomV0 | ClaimOfferAtom | ClaimLiquidityAtom; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimAtom; - - static write(value: ClaimAtom, io: Buffer): void; - - static isValid(value: ClaimAtom): boolean; - - static toXDR(value: ClaimAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateAccountResult { - switch(): CreateAccountResultCode; - - static createAccountSuccess(): CreateAccountResult; - - static createAccountMalformed(): CreateAccountResult; - - static createAccountUnderfunded(): CreateAccountResult; - - static createAccountLowReserve(): CreateAccountResult; - - static createAccountAlreadyExist(): CreateAccountResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateAccountResult; - - static write(value: CreateAccountResult, io: Buffer): void; - - static isValid(value: CreateAccountResult): boolean; - - static toXDR(value: CreateAccountResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateAccountResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateAccountResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PaymentResult { - switch(): PaymentResultCode; - - static paymentSuccess(): PaymentResult; - - static paymentMalformed(): PaymentResult; - - static paymentUnderfunded(): PaymentResult; - - static paymentSrcNoTrust(): PaymentResult; - - static paymentSrcNotAuthorized(): PaymentResult; - - static paymentNoDestination(): PaymentResult; - - static paymentNoTrust(): PaymentResult; - - static paymentNotAuthorized(): PaymentResult; - - static paymentLineFull(): PaymentResult; - - static paymentNoIssuer(): PaymentResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PaymentResult; - - static write(value: PaymentResult, io: Buffer): void; - - static isValid(value: PaymentResult): boolean; - - static toXDR(value: PaymentResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PaymentResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): PaymentResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveResult { - switch(): PathPaymentStrictReceiveResultCode; - - success( - value?: PathPaymentStrictReceiveResultSuccess - ): PathPaymentStrictReceiveResultSuccess; - - noIssuer(value?: Asset): Asset; - - static pathPaymentStrictReceiveSuccess( - value: PathPaymentStrictReceiveResultSuccess - ): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoIssuer( - value: Asset - ): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResult; - - value(): PathPaymentStrictReceiveResultSuccess | Asset | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveResult; - - static write(value: PathPaymentStrictReceiveResult, io: Buffer): void; - - static isValid(value: PathPaymentStrictReceiveResult): boolean; - - static toXDR(value: PathPaymentStrictReceiveResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictReceiveResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendResult { - switch(): PathPaymentStrictSendResultCode; - - success( - value?: PathPaymentStrictSendResultSuccess - ): PathPaymentStrictSendResultSuccess; - - noIssuer(value?: Asset): Asset; - - static pathPaymentStrictSendSuccess( - value: PathPaymentStrictSendResultSuccess - ): PathPaymentStrictSendResult; - - static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoIssuer( - value: Asset - ): PathPaymentStrictSendResult; - - static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResult; - - value(): PathPaymentStrictSendResultSuccess | Asset | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendResult; - - static write(value: PathPaymentStrictSendResult, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendResult): boolean; - - static toXDR(value: PathPaymentStrictSendResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictSendResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageOfferSuccessResultOffer { - switch(): ManageOfferEffect; - - offer(value?: OfferEntry): OfferEntry; - - static manageOfferCreated(value: OfferEntry): ManageOfferSuccessResultOffer; - - static manageOfferUpdated(value: OfferEntry): ManageOfferSuccessResultOffer; - - static manageOfferDeleted(): ManageOfferSuccessResultOffer; - - value(): OfferEntry | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageOfferSuccessResultOffer; - - static write(value: ManageOfferSuccessResultOffer, io: Buffer): void; - - static isValid(value: ManageOfferSuccessResultOffer): boolean; - - static toXDR(value: ManageOfferSuccessResultOffer): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ManageOfferSuccessResultOffer; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageOfferSuccessResultOffer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageSellOfferResult { - switch(): ManageSellOfferResultCode; - - success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; - - static manageSellOfferSuccess( - value: ManageOfferSuccessResult - ): ManageSellOfferResult; - - static manageSellOfferMalformed(): ManageSellOfferResult; - - static manageSellOfferSellNoTrust(): ManageSellOfferResult; - - static manageSellOfferBuyNoTrust(): ManageSellOfferResult; - - static manageSellOfferSellNotAuthorized(): ManageSellOfferResult; - - static manageSellOfferBuyNotAuthorized(): ManageSellOfferResult; - - static manageSellOfferLineFull(): ManageSellOfferResult; - - static manageSellOfferUnderfunded(): ManageSellOfferResult; - - static manageSellOfferCrossSelf(): ManageSellOfferResult; - - static manageSellOfferSellNoIssuer(): ManageSellOfferResult; - - static manageSellOfferBuyNoIssuer(): ManageSellOfferResult; - - static manageSellOfferNotFound(): ManageSellOfferResult; - - static manageSellOfferLowReserve(): ManageSellOfferResult; - - value(): ManageOfferSuccessResult | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageSellOfferResult; - - static write(value: ManageSellOfferResult, io: Buffer): void; - - static isValid(value: ManageSellOfferResult): boolean; - - static toXDR(value: ManageSellOfferResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageSellOfferResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageSellOfferResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageBuyOfferResult { - switch(): ManageBuyOfferResultCode; - - success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; - - static manageBuyOfferSuccess( - value: ManageOfferSuccessResult - ): ManageBuyOfferResult; - - static manageBuyOfferMalformed(): ManageBuyOfferResult; - - static manageBuyOfferSellNoTrust(): ManageBuyOfferResult; - - static manageBuyOfferBuyNoTrust(): ManageBuyOfferResult; - - static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResult; - - static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResult; - - static manageBuyOfferLineFull(): ManageBuyOfferResult; - - static manageBuyOfferUnderfunded(): ManageBuyOfferResult; - - static manageBuyOfferCrossSelf(): ManageBuyOfferResult; - - static manageBuyOfferSellNoIssuer(): ManageBuyOfferResult; - - static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResult; - - static manageBuyOfferNotFound(): ManageBuyOfferResult; - - static manageBuyOfferLowReserve(): ManageBuyOfferResult; - - value(): ManageOfferSuccessResult | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageBuyOfferResult; - - static write(value: ManageBuyOfferResult, io: Buffer): void; - - static isValid(value: ManageBuyOfferResult): boolean; - - static toXDR(value: ManageBuyOfferResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageBuyOfferResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageBuyOfferResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetOptionsResult { - switch(): SetOptionsResultCode; - - static setOptionsSuccess(): SetOptionsResult; - - static setOptionsLowReserve(): SetOptionsResult; - - static setOptionsTooManySigners(): SetOptionsResult; - - static setOptionsBadFlags(): SetOptionsResult; - - static setOptionsInvalidInflation(): SetOptionsResult; - - static setOptionsCantChange(): SetOptionsResult; - - static setOptionsUnknownFlag(): SetOptionsResult; - - static setOptionsThresholdOutOfRange(): SetOptionsResult; - - static setOptionsBadSigner(): SetOptionsResult; - - static setOptionsInvalidHomeDomain(): SetOptionsResult; - - static setOptionsAuthRevocableRequired(): SetOptionsResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetOptionsResult; - - static write(value: SetOptionsResult, io: Buffer): void; - - static isValid(value: SetOptionsResult): boolean; - - static toXDR(value: SetOptionsResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetOptionsResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): SetOptionsResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustResult { - switch(): ChangeTrustResultCode; - - static changeTrustSuccess(): ChangeTrustResult; - - static changeTrustMalformed(): ChangeTrustResult; - - static changeTrustNoIssuer(): ChangeTrustResult; - - static changeTrustInvalidLimit(): ChangeTrustResult; - - static changeTrustLowReserve(): ChangeTrustResult; - - static changeTrustSelfNotAllowed(): ChangeTrustResult; - - static changeTrustTrustLineMissing(): ChangeTrustResult; - - static changeTrustCannotDelete(): ChangeTrustResult; - - static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustResult; - - static write(value: ChangeTrustResult, io: Buffer): void; - - static isValid(value: ChangeTrustResult): boolean; - - static toXDR(value: ChangeTrustResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AllowTrustResult { - switch(): AllowTrustResultCode; - - static allowTrustSuccess(): AllowTrustResult; - - static allowTrustMalformed(): AllowTrustResult; - - static allowTrustNoTrustLine(): AllowTrustResult; - - static allowTrustTrustNotRequired(): AllowTrustResult; - - static allowTrustCantRevoke(): AllowTrustResult; - - static allowTrustSelfNotAllowed(): AllowTrustResult; - - static allowTrustLowReserve(): AllowTrustResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AllowTrustResult; - - static write(value: AllowTrustResult, io: Buffer): void; - - static isValid(value: AllowTrustResult): boolean; - - static toXDR(value: AllowTrustResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AllowTrustResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): AllowTrustResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountMergeResult { - switch(): AccountMergeResultCode; - - sourceAccountBalance(value?: Int64): Int64; - - static accountMergeSuccess(value: Int64): AccountMergeResult; - - static accountMergeMalformed(): AccountMergeResult; - - static accountMergeNoAccount(): AccountMergeResult; - - static accountMergeImmutableSet(): AccountMergeResult; - - static accountMergeHasSubEntries(): AccountMergeResult; - - static accountMergeSeqnumTooFar(): AccountMergeResult; - - static accountMergeDestFull(): AccountMergeResult; - - static accountMergeIsSponsor(): AccountMergeResult; - - value(): Int64 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountMergeResult; - - static write(value: AccountMergeResult, io: Buffer): void; - - static isValid(value: AccountMergeResult): boolean; - - static toXDR(value: AccountMergeResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountMergeResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountMergeResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InflationResult { - switch(): InflationResultCode; - - payouts(value?: InflationPayout[]): InflationPayout[]; - - static inflationSuccess(value: InflationPayout[]): InflationResult; - - static inflationNotTime(): InflationResult; - - value(): InflationPayout[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InflationResult; - - static write(value: InflationResult, io: Buffer): void; - - static isValid(value: InflationResult): boolean; - - static toXDR(value: InflationResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InflationResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): InflationResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageDataResult { - switch(): ManageDataResultCode; - - static manageDataSuccess(): ManageDataResult; - - static manageDataNotSupportedYet(): ManageDataResult; - - static manageDataNameNotFound(): ManageDataResult; - - static manageDataLowReserve(): ManageDataResult; - - static manageDataInvalidName(): ManageDataResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageDataResult; - - static write(value: ManageDataResult, io: Buffer): void; - - static isValid(value: ManageDataResult): boolean; - - static toXDR(value: ManageDataResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageDataResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageDataResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BumpSequenceResult { - switch(): BumpSequenceResultCode; - - static bumpSequenceSuccess(): BumpSequenceResult; - - static bumpSequenceBadSeq(): BumpSequenceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BumpSequenceResult; - - static write(value: BumpSequenceResult, io: Buffer): void; - - static isValid(value: BumpSequenceResult): boolean; - - static toXDR(value: BumpSequenceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BumpSequenceResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): BumpSequenceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateClaimableBalanceResult { - switch(): CreateClaimableBalanceResultCode; - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - static createClaimableBalanceSuccess( - value: ClaimableBalanceId - ): CreateClaimableBalanceResult; - - static createClaimableBalanceMalformed(): CreateClaimableBalanceResult; - - static createClaimableBalanceLowReserve(): CreateClaimableBalanceResult; - - static createClaimableBalanceNoTrust(): CreateClaimableBalanceResult; - - static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResult; - - static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResult; - - value(): ClaimableBalanceId | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateClaimableBalanceResult; - - static write(value: CreateClaimableBalanceResult, io: Buffer): void; - - static isValid(value: CreateClaimableBalanceResult): boolean; - - static toXDR(value: CreateClaimableBalanceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimClaimableBalanceResult { - switch(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimClaimableBalanceResult; - - static write(value: ClaimClaimableBalanceResult, io: Buffer): void; - - static isValid(value: ClaimClaimableBalanceResult): boolean; - - static toXDR(value: ClaimClaimableBalanceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BeginSponsoringFutureReservesResult { - switch(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BeginSponsoringFutureReservesResult; - - static write(value: BeginSponsoringFutureReservesResult, io: Buffer): void; - - static isValid(value: BeginSponsoringFutureReservesResult): boolean; - - static toXDR(value: BeginSponsoringFutureReservesResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): BeginSponsoringFutureReservesResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): BeginSponsoringFutureReservesResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class EndSponsoringFutureReservesResult { - switch(): EndSponsoringFutureReservesResultCode; - - static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResult; - - static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): EndSponsoringFutureReservesResult; - - static write(value: EndSponsoringFutureReservesResult, io: Buffer): void; - - static isValid(value: EndSponsoringFutureReservesResult): boolean; - - static toXDR(value: EndSponsoringFutureReservesResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): EndSponsoringFutureReservesResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): EndSponsoringFutureReservesResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipResult { - switch(): RevokeSponsorshipResultCode; - - static revokeSponsorshipSuccess(): RevokeSponsorshipResult; - - static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResult; - - static revokeSponsorshipNotSponsor(): RevokeSponsorshipResult; - - static revokeSponsorshipLowReserve(): RevokeSponsorshipResult; - - static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResult; - - static revokeSponsorshipMalformed(): RevokeSponsorshipResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipResult; - - static write(value: RevokeSponsorshipResult, io: Buffer): void; - - static isValid(value: RevokeSponsorshipResult): boolean; - - static toXDR(value: RevokeSponsorshipResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackResult { - switch(): ClawbackResultCode; - - static clawbackSuccess(): ClawbackResult; - - static clawbackMalformed(): ClawbackResult; - - static clawbackNotClawbackEnabled(): ClawbackResult; - - static clawbackNoTrust(): ClawbackResult; - - static clawbackUnderfunded(): ClawbackResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackResult; - - static write(value: ClawbackResult, io: Buffer): void; - - static isValid(value: ClawbackResult): boolean; - - static toXDR(value: ClawbackResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClawbackResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackClaimableBalanceResult { - switch(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackClaimableBalanceResult; - - static write(value: ClawbackClaimableBalanceResult, io: Buffer): void; - - static isValid(value: ClawbackClaimableBalanceResult): boolean; - - static toXDR(value: ClawbackClaimableBalanceResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClawbackClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClawbackClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetTrustLineFlagsResult { - switch(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsSuccess(): SetTrustLineFlagsResult; - - static setTrustLineFlagsMalformed(): SetTrustLineFlagsResult; - - static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResult; - - static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResult; - - static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResult; - - static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetTrustLineFlagsResult; - - static write(value: SetTrustLineFlagsResult, io: Buffer): void; - - static isValid(value: SetTrustLineFlagsResult): boolean; - - static toXDR(value: SetTrustLineFlagsResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetTrustLineFlagsResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SetTrustLineFlagsResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolDepositResult { - switch(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositSuccess(): LiquidityPoolDepositResult; - - static liquidityPoolDepositMalformed(): LiquidityPoolDepositResult; - - static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResult; - - static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResult; - - static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResult; - - static liquidityPoolDepositLineFull(): LiquidityPoolDepositResult; - - static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResult; - - static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolDepositResult; - - static write(value: LiquidityPoolDepositResult, io: Buffer): void; - - static isValid(value: LiquidityPoolDepositResult): boolean; - - static toXDR(value: LiquidityPoolDepositResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolDepositResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolDepositResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolWithdrawResult { - switch(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolWithdrawResult; - - static write(value: LiquidityPoolWithdrawResult, io: Buffer): void; - - static isValid(value: LiquidityPoolWithdrawResult): boolean; - - static toXDR(value: LiquidityPoolWithdrawResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolWithdrawResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolWithdrawResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationResultTr { - switch(): OperationType; - - createAccountResult(value?: CreateAccountResult): CreateAccountResult; - - paymentResult(value?: PaymentResult): PaymentResult; - - pathPaymentStrictReceiveResult( - value?: PathPaymentStrictReceiveResult - ): PathPaymentStrictReceiveResult; - - manageSellOfferResult(value?: ManageSellOfferResult): ManageSellOfferResult; - - createPassiveSellOfferResult( - value?: ManageSellOfferResult - ): ManageSellOfferResult; - - setOptionsResult(value?: SetOptionsResult): SetOptionsResult; - - changeTrustResult(value?: ChangeTrustResult): ChangeTrustResult; - - allowTrustResult(value?: AllowTrustResult): AllowTrustResult; - - accountMergeResult(value?: AccountMergeResult): AccountMergeResult; - - inflationResult(value?: InflationResult): InflationResult; - - manageDataResult(value?: ManageDataResult): ManageDataResult; - - bumpSeqResult(value?: BumpSequenceResult): BumpSequenceResult; - - manageBuyOfferResult(value?: ManageBuyOfferResult): ManageBuyOfferResult; - - pathPaymentStrictSendResult( - value?: PathPaymentStrictSendResult - ): PathPaymentStrictSendResult; - - createClaimableBalanceResult( - value?: CreateClaimableBalanceResult - ): CreateClaimableBalanceResult; - - claimClaimableBalanceResult( - value?: ClaimClaimableBalanceResult - ): ClaimClaimableBalanceResult; - - beginSponsoringFutureReservesResult( - value?: BeginSponsoringFutureReservesResult - ): BeginSponsoringFutureReservesResult; - - endSponsoringFutureReservesResult( - value?: EndSponsoringFutureReservesResult - ): EndSponsoringFutureReservesResult; - - revokeSponsorshipResult( - value?: RevokeSponsorshipResult - ): RevokeSponsorshipResult; - - clawbackResult(value?: ClawbackResult): ClawbackResult; - - clawbackClaimableBalanceResult( - value?: ClawbackClaimableBalanceResult - ): ClawbackClaimableBalanceResult; - - setTrustLineFlagsResult( - value?: SetTrustLineFlagsResult - ): SetTrustLineFlagsResult; - - liquidityPoolDepositResult( - value?: LiquidityPoolDepositResult - ): LiquidityPoolDepositResult; - - liquidityPoolWithdrawResult( - value?: LiquidityPoolWithdrawResult - ): LiquidityPoolWithdrawResult; - - static createAccount(value: CreateAccountResult): OperationResultTr; - - static payment(value: PaymentResult): OperationResultTr; - - static pathPaymentStrictReceive( - value: PathPaymentStrictReceiveResult - ): OperationResultTr; - - static manageSellOffer(value: ManageSellOfferResult): OperationResultTr; - - static createPassiveSellOffer( - value: ManageSellOfferResult - ): OperationResultTr; - - static setOptions(value: SetOptionsResult): OperationResultTr; - - static changeTrust(value: ChangeTrustResult): OperationResultTr; - - static allowTrust(value: AllowTrustResult): OperationResultTr; - - static accountMerge(value: AccountMergeResult): OperationResultTr; - - static inflation(value: InflationResult): OperationResultTr; - - static manageData(value: ManageDataResult): OperationResultTr; - - static bumpSequence(value: BumpSequenceResult): OperationResultTr; - - static manageBuyOffer(value: ManageBuyOfferResult): OperationResultTr; - - static pathPaymentStrictSend( - value: PathPaymentStrictSendResult - ): OperationResultTr; - - static createClaimableBalance( - value: CreateClaimableBalanceResult - ): OperationResultTr; - - static claimClaimableBalance( - value: ClaimClaimableBalanceResult - ): OperationResultTr; - - static beginSponsoringFutureReserves( - value: BeginSponsoringFutureReservesResult - ): OperationResultTr; - - static endSponsoringFutureReserves( - value: EndSponsoringFutureReservesResult - ): OperationResultTr; - - static revokeSponsorship(value: RevokeSponsorshipResult): OperationResultTr; - - static clawback(value: ClawbackResult): OperationResultTr; - - static clawbackClaimableBalance( - value: ClawbackClaimableBalanceResult - ): OperationResultTr; - - static setTrustLineFlags(value: SetTrustLineFlagsResult): OperationResultTr; - - static liquidityPoolDeposit( - value: LiquidityPoolDepositResult - ): OperationResultTr; - - static liquidityPoolWithdraw( - value: LiquidityPoolWithdrawResult - ): OperationResultTr; - - value(): - | CreateAccountResult - | PaymentResult - | PathPaymentStrictReceiveResult - | ManageSellOfferResult - | ManageSellOfferResult - | SetOptionsResult - | ChangeTrustResult - | AllowTrustResult - | AccountMergeResult - | InflationResult - | ManageDataResult - | BumpSequenceResult - | ManageBuyOfferResult - | PathPaymentStrictSendResult - | CreateClaimableBalanceResult - | ClaimClaimableBalanceResult - | BeginSponsoringFutureReservesResult - | EndSponsoringFutureReservesResult - | RevokeSponsorshipResult - | ClawbackResult - | ClawbackClaimableBalanceResult - | SetTrustLineFlagsResult - | LiquidityPoolDepositResult - | LiquidityPoolWithdrawResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationResultTr; - - static write(value: OperationResultTr, io: Buffer): void; - - static isValid(value: OperationResultTr): boolean; - - static toXDR(value: OperationResultTr): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationResultTr; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationResultTr; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationResult { - switch(): OperationResultCode; - - tr(value?: OperationResultTr): OperationResultTr; - - static opInner(value: OperationResultTr): OperationResult; - - static opBadAuth(): OperationResult; - - static opNoAccount(): OperationResult; - - static opNotSupported(): OperationResult; - - static opTooManySubentries(): OperationResult; - - static opExceededWorkLimit(): OperationResult; - - static opTooManySponsoring(): OperationResult; - - value(): OperationResultTr | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationResult; - - static write(value: OperationResult, io: Buffer): void; - - static isValid(value: OperationResult): boolean; - - static toXDR(value: OperationResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultResult { - switch(): TransactionResultCode; - - results(value?: OperationResult[]): OperationResult[]; - - static txSuccess(value: OperationResult[]): InnerTransactionResultResult; - - static txFailed(value: OperationResult[]): InnerTransactionResultResult; - - static txTooEarly(): InnerTransactionResultResult; - - static txTooLate(): InnerTransactionResultResult; - - static txMissingOperation(): InnerTransactionResultResult; - - static txBadSeq(): InnerTransactionResultResult; - - static txBadAuth(): InnerTransactionResultResult; - - static txInsufficientBalance(): InnerTransactionResultResult; - - static txNoAccount(): InnerTransactionResultResult; - - static txInsufficientFee(): InnerTransactionResultResult; - - static txBadAuthExtra(): InnerTransactionResultResult; - - static txInternalError(): InnerTransactionResultResult; - - static txNotSupported(): InnerTransactionResultResult; - - static txBadSponsorship(): InnerTransactionResultResult; - - static txBadMinSeqAgeOrGap(): InnerTransactionResultResult; - - static txMalformed(): InnerTransactionResultResult; - - value(): OperationResult[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultResult; - - static write(value: InnerTransactionResultResult, io: Buffer): void; - - static isValid(value: InnerTransactionResultResult): boolean; - - static toXDR(value: InnerTransactionResultResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultExt { - switch(): number; - - static 0(): InnerTransactionResultExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultExt; - - static write(value: InnerTransactionResultExt, io: Buffer): void; - - static isValid(value: InnerTransactionResultExt): boolean; - - static toXDR(value: InnerTransactionResultExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultResult { - switch(): TransactionResultCode; - - innerResultPair( - value?: InnerTransactionResultPair - ): InnerTransactionResultPair; - - results(value?: OperationResult[]): OperationResult[]; - - static txFeeBumpInnerSuccess( - value: InnerTransactionResultPair - ): TransactionResultResult; - - static txFeeBumpInnerFailed( - value: InnerTransactionResultPair - ): TransactionResultResult; - - static txSuccess(value: OperationResult[]): TransactionResultResult; - - static txFailed(value: OperationResult[]): TransactionResultResult; - - static txTooEarly(): TransactionResultResult; - - static txTooLate(): TransactionResultResult; - - static txMissingOperation(): TransactionResultResult; - - static txBadSeq(): TransactionResultResult; - - static txBadAuth(): TransactionResultResult; - - static txInsufficientBalance(): TransactionResultResult; - - static txNoAccount(): TransactionResultResult; - - static txInsufficientFee(): TransactionResultResult; - - static txBadAuthExtra(): TransactionResultResult; - - static txInternalError(): TransactionResultResult; - - static txNotSupported(): TransactionResultResult; - - static txBadSponsorship(): TransactionResultResult; - - static txBadMinSeqAgeOrGap(): TransactionResultResult; - - static txMalformed(): TransactionResultResult; - - value(): InnerTransactionResultPair | OperationResult[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultResult; - - static write(value: TransactionResultResult, io: Buffer): void; - - static isValid(value: TransactionResultResult): boolean; - - static toXDR(value: TransactionResultResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultExt { - switch(): number; - - static 0(): TransactionResultExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultExt; - - static write(value: TransactionResultExt, io: Buffer): void; - - static isValid(value: TransactionResultExt): boolean; - - static toXDR(value: TransactionResultExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ExtensionPoint { - switch(): number; - - static 0(): ExtensionPoint; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ExtensionPoint; - - static write(value: ExtensionPoint, io: Buffer): void; - - static isValid(value: ExtensionPoint): boolean; - - static toXDR(value: ExtensionPoint): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ExtensionPoint; - - static fromXDR(input: string, format: 'hex' | 'base64'): ExtensionPoint; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PublicKey { - switch(): PublicKeyType; - - ed25519(value?: Buffer): Buffer; - - static publicKeyTypeEd25519(value: Buffer): PublicKey; - - value(): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PublicKey; - - static write(value: PublicKey, io: Buffer): void; - - static isValid(value: PublicKey): boolean; - - static toXDR(value: PublicKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PublicKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): PublicKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignerKey { - switch(): SignerKeyType; - - ed25519(value?: Buffer): Buffer; - - preAuthTx(value?: Buffer): Buffer; - - hashX(value?: Buffer): Buffer; - - ed25519SignedPayload( - value?: SignerKeyEd25519SignedPayload - ): SignerKeyEd25519SignedPayload; - - static signerKeyTypeEd25519(value: Buffer): SignerKey; - - static signerKeyTypePreAuthTx(value: Buffer): SignerKey; - - static signerKeyTypeHashX(value: Buffer): SignerKey; - - static signerKeyTypeEd25519SignedPayload( - value: SignerKeyEd25519SignedPayload - ): SignerKey; - - value(): Buffer | Buffer | Buffer | SignerKeyEd25519SignedPayload; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignerKey; - - static write(value: SignerKey, io: Buffer): void; - - static isValid(value: SignerKey): boolean; - - static toXDR(value: SignerKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignerKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): SignerKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } -} +// Automatically generated on 2022-08-12T12:40:00+01:00 +import { Operation } from './index'; + +export {}; + +// Hidden namespace as hack to work around name collision. +declare namespace xdrHidden { + // tslint:disable-line:strict-export-declare-modifiers + class Operation2 { + constructor(attributes: { + sourceAccount: null | xdr.MuxedAccount; + body: xdr.OperationBody; + }); + + sourceAccount(value?: null | xdr.MuxedAccount): null | xdr.MuxedAccount; + + body(value?: xdr.OperationBody): xdr.OperationBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Operation; + + static write(value: Operation, io: Buffer): void; + + static isValid(value: Operation): boolean; + + static toXDR(value: Operation): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Operation; + + static fromXDR(input: string, format: "hex" | "base64"): Operation; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } +} + +export namespace xdr { + export import Operation = xdrHidden.Operation2; // tslint:disable-line:strict-export-declare-modifiers + + interface SignedInt { + readonly MAX_VALUE: 2147483647; + readonly MIN_VALUE: -2147483648; + read(io: Buffer): number; + write(value: number, io: Buffer): void; + isValid(value: number): boolean; + toXDR(value: number): Buffer; + fromXDR(input: Buffer, format?: "raw"): number; + fromXDR(input: string, format: "hex" | "base64"): number; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + interface UnsignedInt { + readonly MAX_VALUE: 4294967295; + readonly MIN_VALUE: 0; + read(io: Buffer): number; + write(value: number, io: Buffer): void; + isValid(value: number): boolean; + toXDR(value: number): Buffer; + fromXDR(input: Buffer, format?: "raw"): number; + fromXDR(input: string, format: "hex" | "base64"): number; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + interface Bool { + read(io: Buffer): boolean; + write(value: boolean, io: Buffer): void; + isValid(value: boolean): boolean; + toXDR(value: boolean): Buffer; + fromXDR(input: Buffer, format?: "raw"): boolean; + fromXDR(input: string, format: "hex" | "base64"): boolean; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Hyper { + low: number; + + high: number; + + unsigned: boolean; + + constructor(low: number, high: number); + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static toXDR(value: Hyper): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Hyper; + + static fromXDR(input: string, format: "hex" | "base64"): Hyper; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + + static readonly MAX_VALUE: Hyper; + + static readonly MIN_VALUE: Hyper; + + static read(io: Buffer): Hyper; + + static write(value: Hyper, io: Buffer): void; + + static fromString(input: string): Hyper; + + static fromBytes(low: number, high: number): Hyper; + + static isValid(value: Hyper): boolean; + } + + class UnsignedHyper { + low: number; + + high: number; + + unsigned: boolean; + + constructor(low: number, high: number); + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static toXDR(value: UnsignedHyper): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UnsignedHyper; + + static fromXDR(input: string, format: "hex" | "base64"): UnsignedHyper; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + + static readonly MAX_VALUE: UnsignedHyper; + + static readonly MIN_VALUE: UnsignedHyper; + + static read(io: Buffer): UnsignedHyper; + + static write(value: UnsignedHyper, io: Buffer): void; + + static fromString(input: string): UnsignedHyper; + + static fromBytes(low: number, high: number): UnsignedHyper; + + static isValid(value: UnsignedHyper): boolean; + } + + class XDRString { + constructor(maxLength: 4294967295); + + read(io: Buffer): Buffer; + + readString(io: Buffer): string; + + write(value: string | Buffer, io: Buffer): void; + + isValid(value: string | number[] | Buffer): boolean; + + toXDR(value: string | Buffer): Buffer; + + fromXDR(input: Buffer, format?: "raw"): Buffer; + + fromXDR(input: string, format: "hex" | "base64"): Buffer; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class XDRArray { + read(io: Buffer): Buffer; + + write(value: T[], io: Buffer): void; + + isValid(value: T[]): boolean; + + toXDR(value: T[]): Buffer; + + fromXDR(input: Buffer, format?: "raw"): T[]; + + fromXDR(input: string, format: "hex" | "base64"): T[]; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Opaque { + constructor(length: number); + + read(io: Buffer): Buffer; + + write(value: Buffer, io: Buffer): void; + + isValid(value: Buffer): boolean; + + toXDR(value: Buffer): Buffer; + + fromXDR(input: Buffer, format?: "raw"): Buffer; + + fromXDR(input: string, format: "hex" | "base64"): Buffer; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class VarOpaque extends Opaque {} + + class Option { + constructor(childType: { + read(io: any): any; + write(value: any, io: Buffer): void; + isValid(value: any): boolean; + }); + + read(io: Buffer): any; + + write(value: any, io: Buffer): void; + + isValid(value: any): boolean; + + toXDR(value: any): Buffer; + + fromXDR(input: Buffer, format?: "raw"): any; + + fromXDR(input: string, format: "hex" | "base64"): any; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementType { + readonly name: + | "scpStPrepare" + | "scpStConfirm" + | "scpStExternalize" + | "scpStNominate"; + + readonly value: 0 | 1 | 2 | 3; + + static scpStPrepare(): ScpStatementType; + + static scpStConfirm(): ScpStatementType; + + static scpStExternalize(): ScpStatementType; + + static scpStNominate(): ScpStatementType; + } + + class AssetType { + readonly name: + | "assetTypeNative" + | "assetTypeCreditAlphanum4" + | "assetTypeCreditAlphanum12" + | "assetTypePoolShare"; + + readonly value: 0 | 1 | 2 | 3; + + static assetTypeNative(): AssetType; + + static assetTypeCreditAlphanum4(): AssetType; + + static assetTypeCreditAlphanum12(): AssetType; + + static assetTypePoolShare(): AssetType; + } + + class ThresholdIndices { + readonly name: + | "thresholdMasterWeight" + | "thresholdLow" + | "thresholdMed" + | "thresholdHigh"; + + readonly value: 0 | 1 | 2 | 3; + + static thresholdMasterWeight(): ThresholdIndices; + + static thresholdLow(): ThresholdIndices; + + static thresholdMed(): ThresholdIndices; + + static thresholdHigh(): ThresholdIndices; + } + + class LedgerEntryType { + readonly name: + | "account" + | "trustline" + | "offer" + | "data" + | "claimableBalance" + | "liquidityPool"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5; + + static account(): LedgerEntryType; + + static trustline(): LedgerEntryType; + + static offer(): LedgerEntryType; + + static data(): LedgerEntryType; + + static claimableBalance(): LedgerEntryType; + + static liquidityPool(): LedgerEntryType; + } + + class AccountFlags { + readonly name: + | "authRequiredFlag" + | "authRevocableFlag" + | "authImmutableFlag" + | "authClawbackEnabledFlag"; + + readonly value: 1 | 2 | 4 | 8; + + static authRequiredFlag(): AccountFlags; + + static authRevocableFlag(): AccountFlags; + + static authImmutableFlag(): AccountFlags; + + static authClawbackEnabledFlag(): AccountFlags; + } + + class TrustLineFlags { + readonly name: + | "authorizedFlag" + | "authorizedToMaintainLiabilitiesFlag" + | "trustlineClawbackEnabledFlag"; + + readonly value: 1 | 2 | 4; + + static authorizedFlag(): TrustLineFlags; + + static authorizedToMaintainLiabilitiesFlag(): TrustLineFlags; + + static trustlineClawbackEnabledFlag(): TrustLineFlags; + } + + class LiquidityPoolType { + readonly name: "liquidityPoolConstantProduct"; + + readonly value: 0; + + static liquidityPoolConstantProduct(): LiquidityPoolType; + } + + class OfferEntryFlags { + readonly name: "passiveFlag"; + + readonly value: 1; + + static passiveFlag(): OfferEntryFlags; + } + + class ClaimPredicateType { + readonly name: + | "claimPredicateUnconditional" + | "claimPredicateAnd" + | "claimPredicateOr" + | "claimPredicateNot" + | "claimPredicateBeforeAbsoluteTime" + | "claimPredicateBeforeRelativeTime"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5; + + static claimPredicateUnconditional(): ClaimPredicateType; + + static claimPredicateAnd(): ClaimPredicateType; + + static claimPredicateOr(): ClaimPredicateType; + + static claimPredicateNot(): ClaimPredicateType; + + static claimPredicateBeforeAbsoluteTime(): ClaimPredicateType; + + static claimPredicateBeforeRelativeTime(): ClaimPredicateType; + } + + class ClaimantType { + readonly name: "claimantTypeV0"; + + readonly value: 0; + + static claimantTypeV0(): ClaimantType; + } + + class ClaimableBalanceIdType { + readonly name: "claimableBalanceIdTypeV0"; + + readonly value: 0; + + static claimableBalanceIdTypeV0(): ClaimableBalanceIdType; + } + + class ClaimableBalanceFlags { + readonly name: "claimableBalanceClawbackEnabledFlag"; + + readonly value: 1; + + static claimableBalanceClawbackEnabledFlag(): ClaimableBalanceFlags; + } + + class EnvelopeType { + readonly name: + | "envelopeTypeTxV0" + | "envelopeTypeScp" + | "envelopeTypeTx" + | "envelopeTypeAuth" + | "envelopeTypeScpvalue" + | "envelopeTypeTxFeeBump" + | "envelopeTypeOpId" + | "envelopeTypePoolRevokeOpId"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; + + static envelopeTypeTxV0(): EnvelopeType; + + static envelopeTypeScp(): EnvelopeType; + + static envelopeTypeTx(): EnvelopeType; + + static envelopeTypeAuth(): EnvelopeType; + + static envelopeTypeScpvalue(): EnvelopeType; + + static envelopeTypeTxFeeBump(): EnvelopeType; + + static envelopeTypeOpId(): EnvelopeType; + + static envelopeTypePoolRevokeOpId(): EnvelopeType; + } + + class StellarValueType { + readonly name: "stellarValueBasic" | "stellarValueSigned"; + + readonly value: 0 | 1; + + static stellarValueBasic(): StellarValueType; + + static stellarValueSigned(): StellarValueType; + } + + class LedgerHeaderFlags { + readonly name: + | "disableLiquidityPoolTradingFlag" + | "disableLiquidityPoolDepositFlag" + | "disableLiquidityPoolWithdrawalFlag"; + + readonly value: 1 | 2 | 4; + + static disableLiquidityPoolTradingFlag(): LedgerHeaderFlags; + + static disableLiquidityPoolDepositFlag(): LedgerHeaderFlags; + + static disableLiquidityPoolWithdrawalFlag(): LedgerHeaderFlags; + } + + class LedgerUpgradeType { + readonly name: + | "ledgerUpgradeVersion" + | "ledgerUpgradeBaseFee" + | "ledgerUpgradeMaxTxSetSize" + | "ledgerUpgradeBaseReserve" + | "ledgerUpgradeFlags"; + + readonly value: 1 | 2 | 3 | 4 | 5; + + static ledgerUpgradeVersion(): LedgerUpgradeType; + + static ledgerUpgradeBaseFee(): LedgerUpgradeType; + + static ledgerUpgradeMaxTxSetSize(): LedgerUpgradeType; + + static ledgerUpgradeBaseReserve(): LedgerUpgradeType; + + static ledgerUpgradeFlags(): LedgerUpgradeType; + } + + class BucketEntryType { + readonly name: "metaentry" | "liveentry" | "deadentry" | "initentry"; + + readonly value: -1 | 0 | 1 | 2; + + static metaentry(): BucketEntryType; + + static liveentry(): BucketEntryType; + + static deadentry(): BucketEntryType; + + static initentry(): BucketEntryType; + } + + class TxSetComponentType { + readonly name: "txsetCompTxsMaybeDiscountedFee"; + + readonly value: 0; + + static txsetCompTxsMaybeDiscountedFee(): TxSetComponentType; + } + + class LedgerEntryChangeType { + readonly name: + | "ledgerEntryCreated" + | "ledgerEntryUpdated" + | "ledgerEntryRemoved" + | "ledgerEntryState"; + + readonly value: 0 | 1 | 2 | 3; + + static ledgerEntryCreated(): LedgerEntryChangeType; + + static ledgerEntryUpdated(): LedgerEntryChangeType; + + static ledgerEntryRemoved(): LedgerEntryChangeType; + + static ledgerEntryState(): LedgerEntryChangeType; + } + + class ErrorCode { + readonly name: "errMisc" | "errData" | "errConf" | "errAuth" | "errLoad"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static errMisc(): ErrorCode; + + static errData(): ErrorCode; + + static errConf(): ErrorCode; + + static errAuth(): ErrorCode; + + static errLoad(): ErrorCode; + } + + class IpAddrType { + readonly name: "iPv4" | "iPv6"; + + readonly value: 0 | 1; + + static iPv4(): IpAddrType; + + static iPv6(): IpAddrType; + } + + class MessageType { + readonly name: + | "errorMsg" + | "auth" + | "dontHave" + | "getPeers" + | "peers" + | "getTxSet" + | "txSet" + | "generalizedTxSet" + | "transaction" + | "getScpQuorumset" + | "scpQuorumset" + | "scpMessage" + | "getScpState" + | "hello" + | "surveyRequest" + | "surveyResponse" + | "sendMore" + | "floodAdvert" + | "floodDemand"; + + readonly value: + | 0 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 17 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 18 + | 19; + + static errorMsg(): MessageType; + + static auth(): MessageType; + + static dontHave(): MessageType; + + static getPeers(): MessageType; + + static peers(): MessageType; + + static getTxSet(): MessageType; + + static txSet(): MessageType; + + static generalizedTxSet(): MessageType; + + static transaction(): MessageType; + + static getScpQuorumset(): MessageType; + + static scpQuorumset(): MessageType; + + static scpMessage(): MessageType; + + static getScpState(): MessageType; + + static hello(): MessageType; + + static surveyRequest(): MessageType; + + static surveyResponse(): MessageType; + + static sendMore(): MessageType; + + static floodAdvert(): MessageType; + + static floodDemand(): MessageType; + } + + class SurveyMessageCommandType { + readonly name: "surveyTopology"; + + readonly value: 0; + + static surveyTopology(): SurveyMessageCommandType; + } + + class OperationType { + readonly name: + | "createAccount" + | "payment" + | "pathPaymentStrictReceive" + | "manageSellOffer" + | "createPassiveSellOffer" + | "setOptions" + | "changeTrust" + | "allowTrust" + | "accountMerge" + | "inflation" + | "manageData" + | "bumpSequence" + | "manageBuyOffer" + | "pathPaymentStrictSend" + | "createClaimableBalance" + | "claimClaimableBalance" + | "beginSponsoringFutureReserves" + | "endSponsoringFutureReserves" + | "revokeSponsorship" + | "clawback" + | "clawbackClaimableBalance" + | "setTrustLineFlags" + | "liquidityPoolDeposit" + | "liquidityPoolWithdraw"; + + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20 + | 21 + | 22 + | 23; + + static createAccount(): OperationType; + + static payment(): OperationType; + + static pathPaymentStrictReceive(): OperationType; + + static manageSellOffer(): OperationType; + + static createPassiveSellOffer(): OperationType; + + static setOptions(): OperationType; + + static changeTrust(): OperationType; + + static allowTrust(): OperationType; + + static accountMerge(): OperationType; + + static inflation(): OperationType; + + static manageData(): OperationType; + + static bumpSequence(): OperationType; + + static manageBuyOffer(): OperationType; + + static pathPaymentStrictSend(): OperationType; + + static createClaimableBalance(): OperationType; + + static claimClaimableBalance(): OperationType; + + static beginSponsoringFutureReserves(): OperationType; + + static endSponsoringFutureReserves(): OperationType; + + static revokeSponsorship(): OperationType; + + static clawback(): OperationType; + + static clawbackClaimableBalance(): OperationType; + + static setTrustLineFlags(): OperationType; + + static liquidityPoolDeposit(): OperationType; + + static liquidityPoolWithdraw(): OperationType; + } + + class RevokeSponsorshipType { + readonly name: "revokeSponsorshipLedgerEntry" | "revokeSponsorshipSigner"; + + readonly value: 0 | 1; + + static revokeSponsorshipLedgerEntry(): RevokeSponsorshipType; + + static revokeSponsorshipSigner(): RevokeSponsorshipType; + } + + class MemoType { + readonly name: + | "memoNone" + | "memoText" + | "memoId" + | "memoHash" + | "memoReturn"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static memoNone(): MemoType; + + static memoText(): MemoType; + + static memoId(): MemoType; + + static memoHash(): MemoType; + + static memoReturn(): MemoType; + } + + class PreconditionType { + readonly name: "precondNone" | "precondTime" | "precondV2"; + + readonly value: 0 | 1 | 2; + + static precondNone(): PreconditionType; + + static precondTime(): PreconditionType; + + static precondV2(): PreconditionType; + } + + class ClaimAtomType { + readonly name: + | "claimAtomTypeV0" + | "claimAtomTypeOrderBook" + | "claimAtomTypeLiquidityPool"; + + readonly value: 0 | 1 | 2; + + static claimAtomTypeV0(): ClaimAtomType; + + static claimAtomTypeOrderBook(): ClaimAtomType; + + static claimAtomTypeLiquidityPool(): ClaimAtomType; + } + + class CreateAccountResultCode { + readonly name: + | "createAccountSuccess" + | "createAccountMalformed" + | "createAccountUnderfunded" + | "createAccountLowReserve" + | "createAccountAlreadyExist"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static createAccountSuccess(): CreateAccountResultCode; + + static createAccountMalformed(): CreateAccountResultCode; + + static createAccountUnderfunded(): CreateAccountResultCode; + + static createAccountLowReserve(): CreateAccountResultCode; + + static createAccountAlreadyExist(): CreateAccountResultCode; + } + + class PaymentResultCode { + readonly name: + | "paymentSuccess" + | "paymentMalformed" + | "paymentUnderfunded" + | "paymentSrcNoTrust" + | "paymentSrcNotAuthorized" + | "paymentNoDestination" + | "paymentNoTrust" + | "paymentNotAuthorized" + | "paymentLineFull" + | "paymentNoIssuer"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9; + + static paymentSuccess(): PaymentResultCode; + + static paymentMalformed(): PaymentResultCode; + + static paymentUnderfunded(): PaymentResultCode; + + static paymentSrcNoTrust(): PaymentResultCode; + + static paymentSrcNotAuthorized(): PaymentResultCode; + + static paymentNoDestination(): PaymentResultCode; + + static paymentNoTrust(): PaymentResultCode; + + static paymentNotAuthorized(): PaymentResultCode; + + static paymentLineFull(): PaymentResultCode; + + static paymentNoIssuer(): PaymentResultCode; + } + + class PathPaymentStrictReceiveResultCode { + readonly name: + | "pathPaymentStrictReceiveSuccess" + | "pathPaymentStrictReceiveMalformed" + | "pathPaymentStrictReceiveUnderfunded" + | "pathPaymentStrictReceiveSrcNoTrust" + | "pathPaymentStrictReceiveSrcNotAuthorized" + | "pathPaymentStrictReceiveNoDestination" + | "pathPaymentStrictReceiveNoTrust" + | "pathPaymentStrictReceiveNotAuthorized" + | "pathPaymentStrictReceiveLineFull" + | "pathPaymentStrictReceiveNoIssuer" + | "pathPaymentStrictReceiveTooFewOffers" + | "pathPaymentStrictReceiveOfferCrossSelf" + | "pathPaymentStrictReceiveOverSendmax"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static pathPaymentStrictReceiveSuccess(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoIssuer(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResultCode; + } + + class PathPaymentStrictSendResultCode { + readonly name: + | "pathPaymentStrictSendSuccess" + | "pathPaymentStrictSendMalformed" + | "pathPaymentStrictSendUnderfunded" + | "pathPaymentStrictSendSrcNoTrust" + | "pathPaymentStrictSendSrcNotAuthorized" + | "pathPaymentStrictSendNoDestination" + | "pathPaymentStrictSendNoTrust" + | "pathPaymentStrictSendNotAuthorized" + | "pathPaymentStrictSendLineFull" + | "pathPaymentStrictSendNoIssuer" + | "pathPaymentStrictSendTooFewOffers" + | "pathPaymentStrictSendOfferCrossSelf" + | "pathPaymentStrictSendUnderDestmin"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static pathPaymentStrictSendSuccess(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoIssuer(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResultCode; + } + + class ManageSellOfferResultCode { + readonly name: + | "manageSellOfferSuccess" + | "manageSellOfferMalformed" + | "manageSellOfferSellNoTrust" + | "manageSellOfferBuyNoTrust" + | "manageSellOfferSellNotAuthorized" + | "manageSellOfferBuyNotAuthorized" + | "manageSellOfferLineFull" + | "manageSellOfferUnderfunded" + | "manageSellOfferCrossSelf" + | "manageSellOfferSellNoIssuer" + | "manageSellOfferBuyNoIssuer" + | "manageSellOfferNotFound" + | "manageSellOfferLowReserve"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static manageSellOfferSuccess(): ManageSellOfferResultCode; + + static manageSellOfferMalformed(): ManageSellOfferResultCode; + + static manageSellOfferSellNoTrust(): ManageSellOfferResultCode; + + static manageSellOfferBuyNoTrust(): ManageSellOfferResultCode; + + static manageSellOfferSellNotAuthorized(): ManageSellOfferResultCode; + + static manageSellOfferBuyNotAuthorized(): ManageSellOfferResultCode; + + static manageSellOfferLineFull(): ManageSellOfferResultCode; + + static manageSellOfferUnderfunded(): ManageSellOfferResultCode; + + static manageSellOfferCrossSelf(): ManageSellOfferResultCode; + + static manageSellOfferSellNoIssuer(): ManageSellOfferResultCode; + + static manageSellOfferBuyNoIssuer(): ManageSellOfferResultCode; + + static manageSellOfferNotFound(): ManageSellOfferResultCode; + + static manageSellOfferLowReserve(): ManageSellOfferResultCode; + } + + class ManageOfferEffect { + readonly name: + | "manageOfferCreated" + | "manageOfferUpdated" + | "manageOfferDeleted"; + + readonly value: 0 | 1 | 2; + + static manageOfferCreated(): ManageOfferEffect; + + static manageOfferUpdated(): ManageOfferEffect; + + static manageOfferDeleted(): ManageOfferEffect; + } + + class ManageBuyOfferResultCode { + readonly name: + | "manageBuyOfferSuccess" + | "manageBuyOfferMalformed" + | "manageBuyOfferSellNoTrust" + | "manageBuyOfferBuyNoTrust" + | "manageBuyOfferSellNotAuthorized" + | "manageBuyOfferBuyNotAuthorized" + | "manageBuyOfferLineFull" + | "manageBuyOfferUnderfunded" + | "manageBuyOfferCrossSelf" + | "manageBuyOfferSellNoIssuer" + | "manageBuyOfferBuyNoIssuer" + | "manageBuyOfferNotFound" + | "manageBuyOfferLowReserve"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static manageBuyOfferSuccess(): ManageBuyOfferResultCode; + + static manageBuyOfferMalformed(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNoTrust(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNoTrust(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResultCode; + + static manageBuyOfferLineFull(): ManageBuyOfferResultCode; + + static manageBuyOfferUnderfunded(): ManageBuyOfferResultCode; + + static manageBuyOfferCrossSelf(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNoIssuer(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResultCode; + + static manageBuyOfferNotFound(): ManageBuyOfferResultCode; + + static manageBuyOfferLowReserve(): ManageBuyOfferResultCode; + } + + class SetOptionsResultCode { + readonly name: + | "setOptionsSuccess" + | "setOptionsLowReserve" + | "setOptionsTooManySigners" + | "setOptionsBadFlags" + | "setOptionsInvalidInflation" + | "setOptionsCantChange" + | "setOptionsUnknownFlag" + | "setOptionsThresholdOutOfRange" + | "setOptionsBadSigner" + | "setOptionsInvalidHomeDomain" + | "setOptionsAuthRevocableRequired"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10; + + static setOptionsSuccess(): SetOptionsResultCode; + + static setOptionsLowReserve(): SetOptionsResultCode; + + static setOptionsTooManySigners(): SetOptionsResultCode; + + static setOptionsBadFlags(): SetOptionsResultCode; + + static setOptionsInvalidInflation(): SetOptionsResultCode; + + static setOptionsCantChange(): SetOptionsResultCode; + + static setOptionsUnknownFlag(): SetOptionsResultCode; + + static setOptionsThresholdOutOfRange(): SetOptionsResultCode; + + static setOptionsBadSigner(): SetOptionsResultCode; + + static setOptionsInvalidHomeDomain(): SetOptionsResultCode; + + static setOptionsAuthRevocableRequired(): SetOptionsResultCode; + } + + class ChangeTrustResultCode { + readonly name: + | "changeTrustSuccess" + | "changeTrustMalformed" + | "changeTrustNoIssuer" + | "changeTrustInvalidLimit" + | "changeTrustLowReserve" + | "changeTrustSelfNotAllowed" + | "changeTrustTrustLineMissing" + | "changeTrustCannotDelete" + | "changeTrustNotAuthMaintainLiabilities"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8; + + static changeTrustSuccess(): ChangeTrustResultCode; + + static changeTrustMalformed(): ChangeTrustResultCode; + + static changeTrustNoIssuer(): ChangeTrustResultCode; + + static changeTrustInvalidLimit(): ChangeTrustResultCode; + + static changeTrustLowReserve(): ChangeTrustResultCode; + + static changeTrustSelfNotAllowed(): ChangeTrustResultCode; + + static changeTrustTrustLineMissing(): ChangeTrustResultCode; + + static changeTrustCannotDelete(): ChangeTrustResultCode; + + static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResultCode; + } + + class AllowTrustResultCode { + readonly name: + | "allowTrustSuccess" + | "allowTrustMalformed" + | "allowTrustNoTrustLine" + | "allowTrustTrustNotRequired" + | "allowTrustCantRevoke" + | "allowTrustSelfNotAllowed" + | "allowTrustLowReserve"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; + + static allowTrustSuccess(): AllowTrustResultCode; + + static allowTrustMalformed(): AllowTrustResultCode; + + static allowTrustNoTrustLine(): AllowTrustResultCode; + + static allowTrustTrustNotRequired(): AllowTrustResultCode; + + static allowTrustCantRevoke(): AllowTrustResultCode; + + static allowTrustSelfNotAllowed(): AllowTrustResultCode; + + static allowTrustLowReserve(): AllowTrustResultCode; + } + + class AccountMergeResultCode { + readonly name: + | "accountMergeSuccess" + | "accountMergeMalformed" + | "accountMergeNoAccount" + | "accountMergeImmutableSet" + | "accountMergeHasSubEntries" + | "accountMergeSeqnumTooFar" + | "accountMergeDestFull" + | "accountMergeIsSponsor"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; + + static accountMergeSuccess(): AccountMergeResultCode; + + static accountMergeMalformed(): AccountMergeResultCode; + + static accountMergeNoAccount(): AccountMergeResultCode; + + static accountMergeImmutableSet(): AccountMergeResultCode; + + static accountMergeHasSubEntries(): AccountMergeResultCode; + + static accountMergeSeqnumTooFar(): AccountMergeResultCode; + + static accountMergeDestFull(): AccountMergeResultCode; + + static accountMergeIsSponsor(): AccountMergeResultCode; + } + + class InflationResultCode { + readonly name: "inflationSuccess" | "inflationNotTime"; + + readonly value: 0 | -1; + + static inflationSuccess(): InflationResultCode; + + static inflationNotTime(): InflationResultCode; + } + + class ManageDataResultCode { + readonly name: + | "manageDataSuccess" + | "manageDataNotSupportedYet" + | "manageDataNameNotFound" + | "manageDataLowReserve" + | "manageDataInvalidName"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static manageDataSuccess(): ManageDataResultCode; + + static manageDataNotSupportedYet(): ManageDataResultCode; + + static manageDataNameNotFound(): ManageDataResultCode; + + static manageDataLowReserve(): ManageDataResultCode; + + static manageDataInvalidName(): ManageDataResultCode; + } + + class BumpSequenceResultCode { + readonly name: "bumpSequenceSuccess" | "bumpSequenceBadSeq"; + + readonly value: 0 | -1; + + static bumpSequenceSuccess(): BumpSequenceResultCode; + + static bumpSequenceBadSeq(): BumpSequenceResultCode; + } + + class CreateClaimableBalanceResultCode { + readonly name: + | "createClaimableBalanceSuccess" + | "createClaimableBalanceMalformed" + | "createClaimableBalanceLowReserve" + | "createClaimableBalanceNoTrust" + | "createClaimableBalanceNotAuthorized" + | "createClaimableBalanceUnderfunded"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static createClaimableBalanceSuccess(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceMalformed(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceLowReserve(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceNoTrust(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResultCode; + } + + class ClaimClaimableBalanceResultCode { + readonly name: + | "claimClaimableBalanceSuccess" + | "claimClaimableBalanceDoesNotExist" + | "claimClaimableBalanceCannotClaim" + | "claimClaimableBalanceLineFull" + | "claimClaimableBalanceNoTrust" + | "claimClaimableBalanceNotAuthorized"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResultCode; + } + + class BeginSponsoringFutureReservesResultCode { + readonly name: + | "beginSponsoringFutureReservesSuccess" + | "beginSponsoringFutureReservesMalformed" + | "beginSponsoringFutureReservesAlreadySponsored" + | "beginSponsoringFutureReservesRecursive"; + + readonly value: 0 | -1 | -2 | -3; + + static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResultCode; + } + + class EndSponsoringFutureReservesResultCode { + readonly name: + | "endSponsoringFutureReservesSuccess" + | "endSponsoringFutureReservesNotSponsored"; + + readonly value: 0 | -1; + + static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResultCode; + + static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResultCode; + } + + class RevokeSponsorshipResultCode { + readonly name: + | "revokeSponsorshipSuccess" + | "revokeSponsorshipDoesNotExist" + | "revokeSponsorshipNotSponsor" + | "revokeSponsorshipLowReserve" + | "revokeSponsorshipOnlyTransferable" + | "revokeSponsorshipMalformed"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static revokeSponsorshipSuccess(): RevokeSponsorshipResultCode; + + static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResultCode; + + static revokeSponsorshipNotSponsor(): RevokeSponsorshipResultCode; + + static revokeSponsorshipLowReserve(): RevokeSponsorshipResultCode; + + static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResultCode; + + static revokeSponsorshipMalformed(): RevokeSponsorshipResultCode; + } + + class ClawbackResultCode { + readonly name: + | "clawbackSuccess" + | "clawbackMalformed" + | "clawbackNotClawbackEnabled" + | "clawbackNoTrust" + | "clawbackUnderfunded"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static clawbackSuccess(): ClawbackResultCode; + + static clawbackMalformed(): ClawbackResultCode; + + static clawbackNotClawbackEnabled(): ClawbackResultCode; + + static clawbackNoTrust(): ClawbackResultCode; + + static clawbackUnderfunded(): ClawbackResultCode; + } + + class ClawbackClaimableBalanceResultCode { + readonly name: + | "clawbackClaimableBalanceSuccess" + | "clawbackClaimableBalanceDoesNotExist" + | "clawbackClaimableBalanceNotIssuer" + | "clawbackClaimableBalanceNotClawbackEnabled"; + + readonly value: 0 | -1 | -2 | -3; + + static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResultCode; + } + + class SetTrustLineFlagsResultCode { + readonly name: + | "setTrustLineFlagsSuccess" + | "setTrustLineFlagsMalformed" + | "setTrustLineFlagsNoTrustLine" + | "setTrustLineFlagsCantRevoke" + | "setTrustLineFlagsInvalidState" + | "setTrustLineFlagsLowReserve"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static setTrustLineFlagsSuccess(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsMalformed(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResultCode; + } + + class LiquidityPoolDepositResultCode { + readonly name: + | "liquidityPoolDepositSuccess" + | "liquidityPoolDepositMalformed" + | "liquidityPoolDepositNoTrust" + | "liquidityPoolDepositNotAuthorized" + | "liquidityPoolDepositUnderfunded" + | "liquidityPoolDepositLineFull" + | "liquidityPoolDepositBadPrice" + | "liquidityPoolDepositPoolFull"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; + + static liquidityPoolDepositSuccess(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositMalformed(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositLineFull(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResultCode; + } + + class LiquidityPoolWithdrawResultCode { + readonly name: + | "liquidityPoolWithdrawSuccess" + | "liquidityPoolWithdrawMalformed" + | "liquidityPoolWithdrawNoTrust" + | "liquidityPoolWithdrawUnderfunded" + | "liquidityPoolWithdrawLineFull" + | "liquidityPoolWithdrawUnderMinimum"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResultCode; + } + + class OperationResultCode { + readonly name: + | "opInner" + | "opBadAuth" + | "opNoAccount" + | "opNotSupported" + | "opTooManySubentries" + | "opExceededWorkLimit" + | "opTooManySponsoring"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; + + static opInner(): OperationResultCode; + + static opBadAuth(): OperationResultCode; + + static opNoAccount(): OperationResultCode; + + static opNotSupported(): OperationResultCode; + + static opTooManySubentries(): OperationResultCode; + + static opExceededWorkLimit(): OperationResultCode; + + static opTooManySponsoring(): OperationResultCode; + } + + class TransactionResultCode { + readonly name: + | "txFeeBumpInnerSuccess" + | "txSuccess" + | "txFailed" + | "txTooEarly" + | "txTooLate" + | "txMissingOperation" + | "txBadSeq" + | "txBadAuth" + | "txInsufficientBalance" + | "txNoAccount" + | "txInsufficientFee" + | "txBadAuthExtra" + | "txInternalError" + | "txNotSupported" + | "txFeeBumpInnerFailed" + | "txBadSponsorship" + | "txBadMinSeqAgeOrGap" + | "txMalformed"; + + readonly value: + | 1 + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12 + | -13 + | -14 + | -15 + | -16; + + static txFeeBumpInnerSuccess(): TransactionResultCode; + + static txSuccess(): TransactionResultCode; + + static txFailed(): TransactionResultCode; + + static txTooEarly(): TransactionResultCode; + + static txTooLate(): TransactionResultCode; + + static txMissingOperation(): TransactionResultCode; + + static txBadSeq(): TransactionResultCode; + + static txBadAuth(): TransactionResultCode; + + static txInsufficientBalance(): TransactionResultCode; + + static txNoAccount(): TransactionResultCode; + + static txInsufficientFee(): TransactionResultCode; + + static txBadAuthExtra(): TransactionResultCode; + + static txInternalError(): TransactionResultCode; + + static txNotSupported(): TransactionResultCode; + + static txFeeBumpInnerFailed(): TransactionResultCode; + + static txBadSponsorship(): TransactionResultCode; + + static txBadMinSeqAgeOrGap(): TransactionResultCode; + + static txMalformed(): TransactionResultCode; + } + + class CryptoKeyType { + readonly name: + | "keyTypeEd25519" + | "keyTypePreAuthTx" + | "keyTypeHashX" + | "keyTypeEd25519SignedPayload" + | "keyTypeMuxedEd25519"; + + readonly value: 0 | 1 | 2 | 3 | 256; + + static keyTypeEd25519(): CryptoKeyType; + + static keyTypePreAuthTx(): CryptoKeyType; + + static keyTypeHashX(): CryptoKeyType; + + static keyTypeEd25519SignedPayload(): CryptoKeyType; + + static keyTypeMuxedEd25519(): CryptoKeyType; + } + + class PublicKeyType { + readonly name: "publicKeyTypeEd25519"; + + readonly value: 0; + + static publicKeyTypeEd25519(): PublicKeyType; + } + + class SignerKeyType { + readonly name: + | "signerKeyTypeEd25519" + | "signerKeyTypePreAuthTx" + | "signerKeyTypeHashX" + | "signerKeyTypeEd25519SignedPayload"; + + readonly value: 0 | 1 | 2 | 3; + + static signerKeyTypeEd25519(): SignerKeyType; + + static signerKeyTypePreAuthTx(): SignerKeyType; + + static signerKeyTypeHashX(): SignerKeyType; + + static signerKeyTypeEd25519SignedPayload(): SignerKeyType; + } + + const Value: VarOpaque; + + type AccountId = PublicKey; + + const Thresholds: Opaque; + + const String32: XDRString; + + const String64: XDRString; + + type SequenceNumber = Int64; + + type TimePoint = Uint64; + + type Duration = Uint64; + + const DataValue: VarOpaque; + + type Hash = Opaque[]; + + type PoolId = Hash; + + const AssetCode4: Opaque; + + const AssetCode12: Opaque; + + type SponsorshipDescriptor = undefined | AccountId; + + const UpgradeType: VarOpaque; + + const LedgerEntryChanges: XDRArray; + + const EncryptedBody: VarOpaque; + + const PeerStatList: XDRArray; + + const TxAdvertVector: XDRArray; + + const TxDemandVector: XDRArray; + + const Hash: Opaque; + + const Uint256: Opaque; + + const Uint32: UnsignedInt; + + const Int32: SignedInt; + + class Uint64 extends UnsignedHyper {} + + class Int64 extends Hyper {} + + const Signature: VarOpaque; + + const SignatureHint: Opaque; + + type NodeId = PublicKey; + + class ScpBallot { + constructor(attributes: { counter: number; value: Buffer }); + + counter(value?: number): number; + + value(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpBallot; + + static write(value: ScpBallot, io: Buffer): void; + + static isValid(value: ScpBallot): boolean; + + static toXDR(value: ScpBallot): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpBallot; + + static fromXDR(input: string, format: "hex" | "base64"): ScpBallot; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpNomination { + constructor(attributes: { + quorumSetHash: Buffer; + votes: Buffer[]; + accepted: Buffer[]; + }); + + quorumSetHash(value?: Buffer): Buffer; + + votes(value?: Buffer[]): Buffer[]; + + accepted(value?: Buffer[]): Buffer[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpNomination; + + static write(value: ScpNomination, io: Buffer): void; + + static isValid(value: ScpNomination): boolean; + + static toXDR(value: ScpNomination): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpNomination; + + static fromXDR(input: string, format: "hex" | "base64"): ScpNomination; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementPrepare { + constructor(attributes: { + quorumSetHash: Buffer; + ballot: ScpBallot; + prepared: null | ScpBallot; + preparedPrime: null | ScpBallot; + nC: number; + nH: number; + }); + + quorumSetHash(value?: Buffer): Buffer; + + ballot(value?: ScpBallot): ScpBallot; + + prepared(value?: null | ScpBallot): null | ScpBallot; + + preparedPrime(value?: null | ScpBallot): null | ScpBallot; + + nC(value?: number): number; + + nH(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementPrepare; + + static write(value: ScpStatementPrepare, io: Buffer): void; + + static isValid(value: ScpStatementPrepare): boolean; + + static toXDR(value: ScpStatementPrepare): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementPrepare; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementPrepare; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementConfirm { + constructor(attributes: { + ballot: ScpBallot; + nPrepared: number; + nCommit: number; + nH: number; + quorumSetHash: Buffer; + }); + + ballot(value?: ScpBallot): ScpBallot; + + nPrepared(value?: number): number; + + nCommit(value?: number): number; + + nH(value?: number): number; + + quorumSetHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementConfirm; + + static write(value: ScpStatementConfirm, io: Buffer): void; + + static isValid(value: ScpStatementConfirm): boolean; + + static toXDR(value: ScpStatementConfirm): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementConfirm; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementConfirm; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementExternalize { + constructor(attributes: { + commit: ScpBallot; + nH: number; + commitQuorumSetHash: Buffer; + }); + + commit(value?: ScpBallot): ScpBallot; + + nH(value?: number): number; + + commitQuorumSetHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementExternalize; + + static write(value: ScpStatementExternalize, io: Buffer): void; + + static isValid(value: ScpStatementExternalize): boolean; + + static toXDR(value: ScpStatementExternalize): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementExternalize; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementExternalize; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatement { + constructor(attributes: { + nodeId: NodeId; + slotIndex: Uint64; + pledges: ScpStatementPledges; + }); + + nodeId(value?: NodeId): NodeId; + + slotIndex(value?: Uint64): Uint64; + + pledges(value?: ScpStatementPledges): ScpStatementPledges; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatement; + + static write(value: ScpStatement, io: Buffer): void; + + static isValid(value: ScpStatement): boolean; + + static toXDR(value: ScpStatement): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatement; + + static fromXDR(input: string, format: "hex" | "base64"): ScpStatement; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpEnvelope { + constructor(attributes: { statement: ScpStatement; signature: Buffer }); + + statement(value?: ScpStatement): ScpStatement; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpEnvelope; + + static write(value: ScpEnvelope, io: Buffer): void; + + static isValid(value: ScpEnvelope): boolean; + + static toXDR(value: ScpEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpEnvelope; + + static fromXDR(input: string, format: "hex" | "base64"): ScpEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpQuorumSet { + constructor(attributes: { + threshold: number; + validators: NodeId[]; + innerSets: ScpQuorumSet[]; + }); + + threshold(value?: number): number; + + validators(value?: NodeId[]): NodeId[]; + + innerSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpQuorumSet; + + static write(value: ScpQuorumSet, io: Buffer): void; + + static isValid(value: ScpQuorumSet): boolean; + + static toXDR(value: ScpQuorumSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpQuorumSet; + + static fromXDR(input: string, format: "hex" | "base64"): ScpQuorumSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AlphaNum4 { + constructor(attributes: { assetCode: Buffer; issuer: AccountId }); + + assetCode(value?: Buffer): Buffer; + + issuer(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AlphaNum4; + + static write(value: AlphaNum4, io: Buffer): void; + + static isValid(value: AlphaNum4): boolean; + + static toXDR(value: AlphaNum4): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AlphaNum4; + + static fromXDR(input: string, format: "hex" | "base64"): AlphaNum4; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AlphaNum12 { + constructor(attributes: { assetCode: Buffer; issuer: AccountId }); + + assetCode(value?: Buffer): Buffer; + + issuer(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AlphaNum12; + + static write(value: AlphaNum12, io: Buffer): void; + + static isValid(value: AlphaNum12): boolean; + + static toXDR(value: AlphaNum12): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AlphaNum12; + + static fromXDR(input: string, format: "hex" | "base64"): AlphaNum12; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Price { + constructor(attributes: { n: number; d: number }); + + n(value?: number): number; + + d(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Price; + + static write(value: Price, io: Buffer): void; + + static isValid(value: Price): boolean; + + static toXDR(value: Price): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Price; + + static fromXDR(input: string, format: "hex" | "base64"): Price; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Liabilities { + constructor(attributes: { buying: Int64; selling: Int64 }); + + buying(value?: Int64): Int64; + + selling(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Liabilities; + + static write(value: Liabilities, io: Buffer): void; + + static isValid(value: Liabilities): boolean; + + static toXDR(value: Liabilities): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Liabilities; + + static fromXDR(input: string, format: "hex" | "base64"): Liabilities; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Signer { + constructor(attributes: { key: SignerKey; weight: number }); + + key(value?: SignerKey): SignerKey; + + weight(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Signer; + + static write(value: Signer, io: Buffer): void; + + static isValid(value: Signer): boolean; + + static toXDR(value: Signer): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Signer; + + static fromXDR(input: string, format: "hex" | "base64"): Signer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV3 { + constructor(attributes: { + ext: ExtensionPoint; + seqLedger: number; + seqTime: TimePoint; + }); + + ext(value?: ExtensionPoint): ExtensionPoint; + + seqLedger(value?: number): number; + + seqTime(value?: TimePoint): TimePoint; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV3; + + static write(value: AccountEntryExtensionV3, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV3): boolean; + + static toXDR(value: AccountEntryExtensionV3): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV3; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV3; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV2 { + constructor(attributes: { + numSponsored: number; + numSponsoring: number; + signerSponsoringIDs: SponsorshipDescriptor[]; + ext: AccountEntryExtensionV2Ext; + }); + + numSponsored(value?: number): number; + + numSponsoring(value?: number): number; + + signerSponsoringIDs( + value?: SponsorshipDescriptor[] + ): SponsorshipDescriptor[]; + + ext(value?: AccountEntryExtensionV2Ext): AccountEntryExtensionV2Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV2; + + static write(value: AccountEntryExtensionV2, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV2): boolean; + + static toXDR(value: AccountEntryExtensionV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV1 { + constructor(attributes: { + liabilities: Liabilities; + ext: AccountEntryExtensionV1Ext; + }); + + liabilities(value?: Liabilities): Liabilities; + + ext(value?: AccountEntryExtensionV1Ext): AccountEntryExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV1; + + static write(value: AccountEntryExtensionV1, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV1): boolean; + + static toXDR(value: AccountEntryExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntry { + constructor(attributes: { + accountId: AccountId; + balance: Int64; + seqNum: SequenceNumber; + numSubEntries: number; + inflationDest: null | AccountId; + flags: number; + homeDomain: string | Buffer; + thresholds: Buffer; + signers: Signer[]; + ext: AccountEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + balance(value?: Int64): Int64; + + seqNum(value?: SequenceNumber): SequenceNumber; + + numSubEntries(value?: number): number; + + inflationDest(value?: null | AccountId): null | AccountId; + + flags(value?: number): number; + + homeDomain(value?: string | Buffer): string | Buffer; + + thresholds(value?: Buffer): Buffer; + + signers(value?: Signer[]): Signer[]; + + ext(value?: AccountEntryExt): AccountEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntry; + + static write(value: AccountEntry, io: Buffer): void; + + static isValid(value: AccountEntry): boolean; + + static toXDR(value: AccountEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntry; + + static fromXDR(input: string, format: "hex" | "base64"): AccountEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExtensionV2 { + constructor(attributes: { + liquidityPoolUseCount: number; + ext: TrustLineEntryExtensionV2Ext; + }); + + liquidityPoolUseCount(value?: number): number; + + ext(value?: TrustLineEntryExtensionV2Ext): TrustLineEntryExtensionV2Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExtensionV2; + + static write(value: TrustLineEntryExtensionV2, io: Buffer): void; + + static isValid(value: TrustLineEntryExtensionV2): boolean; + + static toXDR(value: TrustLineEntryExtensionV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExtensionV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryExtensionV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryV1 { + constructor(attributes: { + liabilities: Liabilities; + ext: TrustLineEntryV1Ext; + }); + + liabilities(value?: Liabilities): Liabilities; + + ext(value?: TrustLineEntryV1Ext): TrustLineEntryV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryV1; + + static write(value: TrustLineEntryV1, io: Buffer): void; + + static isValid(value: TrustLineEntryV1): boolean; + + static toXDR(value: TrustLineEntryV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryV1; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntryV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntry { + constructor(attributes: { + accountId: AccountId; + asset: TrustLineAsset; + balance: Int64; + limit: Int64; + flags: number; + ext: TrustLineEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + asset(value?: TrustLineAsset): TrustLineAsset; + + balance(value?: Int64): Int64; + + limit(value?: Int64): Int64; + + flags(value?: number): number; + + ext(value?: TrustLineEntryExt): TrustLineEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntry; + + static write(value: TrustLineEntry, io: Buffer): void; + + static isValid(value: TrustLineEntry): boolean; + + static toXDR(value: TrustLineEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntry; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OfferEntry { + constructor(attributes: { + sellerId: AccountId; + offerId: Int64; + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + flags: number; + ext: OfferEntryExt; + }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + flags(value?: number): number; + + ext(value?: OfferEntryExt): OfferEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OfferEntry; + + static write(value: OfferEntry, io: Buffer): void; + + static isValid(value: OfferEntry): boolean; + + static toXDR(value: OfferEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OfferEntry; + + static fromXDR(input: string, format: "hex" | "base64"): OfferEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DataEntry { + constructor(attributes: { + accountId: AccountId; + dataName: string | Buffer; + dataValue: Buffer; + ext: DataEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + dataName(value?: string | Buffer): string | Buffer; + + dataValue(value?: Buffer): Buffer; + + ext(value?: DataEntryExt): DataEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DataEntry; + + static write(value: DataEntry, io: Buffer): void; + + static isValid(value: DataEntry): boolean; + + static toXDR(value: DataEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DataEntry; + + static fromXDR(input: string, format: "hex" | "base64"): DataEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimantV0 { + constructor(attributes: { + destination: AccountId; + predicate: ClaimPredicate; + }); + + destination(value?: AccountId): AccountId; + + predicate(value?: ClaimPredicate): ClaimPredicate; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimantV0; + + static write(value: ClaimantV0, io: Buffer): void; + + static isValid(value: ClaimantV0): boolean; + + static toXDR(value: ClaimantV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimantV0; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimantV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExtensionV1 { + constructor(attributes: { + ext: ClaimableBalanceEntryExtensionV1Ext; + flags: number; + }); + + ext( + value?: ClaimableBalanceEntryExtensionV1Ext + ): ClaimableBalanceEntryExtensionV1Ext; + + flags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExtensionV1; + + static write(value: ClaimableBalanceEntryExtensionV1, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExtensionV1): boolean; + + static toXDR(value: ClaimableBalanceEntryExtensionV1): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClaimableBalanceEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntry { + constructor(attributes: { + balanceId: ClaimableBalanceId; + claimants: Claimant[]; + asset: Asset; + amount: Int64; + ext: ClaimableBalanceEntryExt; + }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + claimants(value?: Claimant[]): Claimant[]; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + ext(value?: ClaimableBalanceEntryExt): ClaimableBalanceEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntry; + + static write(value: ClaimableBalanceEntry, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntry): boolean; + + static toXDR(value: ClaimableBalanceEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolConstantProductParameters { + constructor(attributes: { assetA: Asset; assetB: Asset; fee: number }); + + assetA(value?: Asset): Asset; + + assetB(value?: Asset): Asset; + + fee(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolConstantProductParameters; + + static write( + value: LiquidityPoolConstantProductParameters, + io: Buffer + ): void; + + static isValid(value: LiquidityPoolConstantProductParameters): boolean; + + static toXDR(value: LiquidityPoolConstantProductParameters): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): LiquidityPoolConstantProductParameters; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolConstantProductParameters; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntryConstantProduct { + constructor(attributes: { + params: LiquidityPoolConstantProductParameters; + reserveA: Int64; + reserveB: Int64; + totalPoolShares: Int64; + poolSharesTrustLineCount: Int64; + }); + + params( + value?: LiquidityPoolConstantProductParameters + ): LiquidityPoolConstantProductParameters; + + reserveA(value?: Int64): Int64; + + reserveB(value?: Int64): Int64; + + totalPoolShares(value?: Int64): Int64; + + poolSharesTrustLineCount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntryConstantProduct; + + static write(value: LiquidityPoolEntryConstantProduct, io: Buffer): void; + + static isValid(value: LiquidityPoolEntryConstantProduct): boolean; + + static toXDR(value: LiquidityPoolEntryConstantProduct): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): LiquidityPoolEntryConstantProduct; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolEntryConstantProduct; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntry { + constructor(attributes: { + liquidityPoolId: PoolId; + body: LiquidityPoolEntryBody; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + body(value?: LiquidityPoolEntryBody): LiquidityPoolEntryBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntry; + + static write(value: LiquidityPoolEntry, io: Buffer): void; + + static isValid(value: LiquidityPoolEntry): boolean; + + static toXDR(value: LiquidityPoolEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolEntry; + + static fromXDR(input: string, format: "hex" | "base64"): LiquidityPoolEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExtensionV1 { + constructor(attributes: { + sponsoringId: SponsorshipDescriptor; + ext: LedgerEntryExtensionV1Ext; + }); + + sponsoringId(value?: SponsorshipDescriptor): SponsorshipDescriptor; + + ext(value?: LedgerEntryExtensionV1Ext): LedgerEntryExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExtensionV1; + + static write(value: LedgerEntryExtensionV1, io: Buffer): void; + + static isValid(value: LedgerEntryExtensionV1): boolean; + + static toXDR(value: LedgerEntryExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntry { + constructor(attributes: { + lastModifiedLedgerSeq: number; + data: LedgerEntryData; + ext: LedgerEntryExt; + }); + + lastModifiedLedgerSeq(value?: number): number; + + data(value?: LedgerEntryData): LedgerEntryData; + + ext(value?: LedgerEntryExt): LedgerEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntry; + + static write(value: LedgerEntry, io: Buffer): void; + + static isValid(value: LedgerEntry): boolean; + + static toXDR(value: LedgerEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntry; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyAccount { + constructor(attributes: { accountId: AccountId }); + + accountId(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyAccount; + + static write(value: LedgerKeyAccount, io: Buffer): void; + + static isValid(value: LedgerKeyAccount): boolean; + + static toXDR(value: LedgerKeyAccount): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyAccount; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyAccount; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyTrustLine { + constructor(attributes: { accountId: AccountId; asset: TrustLineAsset }); + + accountId(value?: AccountId): AccountId; + + asset(value?: TrustLineAsset): TrustLineAsset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyTrustLine; + + static write(value: LedgerKeyTrustLine, io: Buffer): void; + + static isValid(value: LedgerKeyTrustLine): boolean; + + static toXDR(value: LedgerKeyTrustLine): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyTrustLine; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyTrustLine; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyOffer { + constructor(attributes: { sellerId: AccountId; offerId: Int64 }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyOffer; + + static write(value: LedgerKeyOffer, io: Buffer): void; + + static isValid(value: LedgerKeyOffer): boolean; + + static toXDR(value: LedgerKeyOffer): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyOffer; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyOffer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyData { + constructor(attributes: { + accountId: AccountId; + dataName: string | Buffer; + }); + + accountId(value?: AccountId): AccountId; + + dataName(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyData; + + static write(value: LedgerKeyData, io: Buffer): void; + + static isValid(value: LedgerKeyData): boolean; + + static toXDR(value: LedgerKeyData): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyData; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyData; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyClaimableBalance { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyClaimableBalance; + + static write(value: LedgerKeyClaimableBalance, io: Buffer): void; + + static isValid(value: LedgerKeyClaimableBalance): boolean; + + static toXDR(value: LedgerKeyClaimableBalance): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyClaimableBalance; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyClaimableBalance; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyLiquidityPool { + constructor(attributes: { liquidityPoolId: PoolId }); + + liquidityPoolId(value?: PoolId): PoolId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyLiquidityPool; + + static write(value: LedgerKeyLiquidityPool, io: Buffer): void; + + static isValid(value: LedgerKeyLiquidityPool): boolean; + + static toXDR(value: LedgerKeyLiquidityPool): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyLiquidityPool; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyLiquidityPool; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseValueSignature { + constructor(attributes: { nodeId: NodeId; signature: Buffer }); + + nodeId(value?: NodeId): NodeId; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseValueSignature; + + static write(value: LedgerCloseValueSignature, io: Buffer): void; + + static isValid(value: LedgerCloseValueSignature): boolean; + + static toXDR(value: LedgerCloseValueSignature): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseValueSignature; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerCloseValueSignature; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarValue { + constructor(attributes: { + txSetHash: Buffer; + closeTime: TimePoint; + upgrades: Buffer[]; + ext: StellarValueExt; + }); + + txSetHash(value?: Buffer): Buffer; + + closeTime(value?: TimePoint): TimePoint; + + upgrades(value?: Buffer[]): Buffer[]; + + ext(value?: StellarValueExt): StellarValueExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarValue; + + static write(value: StellarValue, io: Buffer): void; + + static isValid(value: StellarValue): boolean; + + static toXDR(value: StellarValue): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarValue; + + static fromXDR(input: string, format: "hex" | "base64"): StellarValue; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExtensionV1 { + constructor(attributes: { flags: number; ext: LedgerHeaderExtensionV1Ext }); + + flags(value?: number): number; + + ext(value?: LedgerHeaderExtensionV1Ext): LedgerHeaderExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExtensionV1; + + static write(value: LedgerHeaderExtensionV1, io: Buffer): void; + + static isValid(value: LedgerHeaderExtensionV1): boolean; + + static toXDR(value: LedgerHeaderExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeader { + constructor(attributes: { + ledgerVersion: number; + previousLedgerHash: Buffer; + scpValue: StellarValue; + txSetResultHash: Buffer; + bucketListHash: Buffer; + ledgerSeq: number; + totalCoins: Int64; + feePool: Int64; + inflationSeq: number; + idPool: Uint64; + baseFee: number; + baseReserve: number; + maxTxSetSize: number; + skipList: Buffer[]; + ext: LedgerHeaderExt; + }); + + ledgerVersion(value?: number): number; + + previousLedgerHash(value?: Buffer): Buffer; + + scpValue(value?: StellarValue): StellarValue; + + txSetResultHash(value?: Buffer): Buffer; + + bucketListHash(value?: Buffer): Buffer; + + ledgerSeq(value?: number): number; + + totalCoins(value?: Int64): Int64; + + feePool(value?: Int64): Int64; + + inflationSeq(value?: number): number; + + idPool(value?: Uint64): Uint64; + + baseFee(value?: number): number; + + baseReserve(value?: number): number; + + maxTxSetSize(value?: number): number; + + skipList(value?: Buffer[]): Buffer[]; + + ext(value?: LedgerHeaderExt): LedgerHeaderExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeader; + + static write(value: LedgerHeader, io: Buffer): void; + + static isValid(value: LedgerHeader): boolean; + + static toXDR(value: LedgerHeader): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeader; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerHeader; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketMetadata { + constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); + + ledgerVersion(value?: number): number; + + ext(value?: BucketMetadataExt): BucketMetadataExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketMetadata; + + static write(value: BucketMetadata, io: Buffer): void; + + static isValid(value: BucketMetadata): boolean; + + static toXDR(value: BucketMetadata): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketMetadata; + + static fromXDR(input: string, format: "hex" | "base64"): BucketMetadata; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TxSetComponentTxsMaybeDiscountedFee { + constructor(attributes: { + baseFee: null | Int64; + txes: TransactionEnvelope[]; + }); + + baseFee(value?: null | Int64): null | Int64; + + txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TxSetComponentTxsMaybeDiscountedFee; + + static write(value: TxSetComponentTxsMaybeDiscountedFee, io: Buffer): void; + + static isValid(value: TxSetComponentTxsMaybeDiscountedFee): boolean; + + static toXDR(value: TxSetComponentTxsMaybeDiscountedFee): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TxSetComponentTxsMaybeDiscountedFee; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TxSetComponentTxsMaybeDiscountedFee; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSet { + constructor(attributes: { + previousLedgerHash: Buffer; + txes: TransactionEnvelope[]; + }); + + previousLedgerHash(value?: Buffer): Buffer; + + txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSet; + + static write(value: TransactionSet, io: Buffer): void; + + static isValid(value: TransactionSet): boolean; + + static toXDR(value: TransactionSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSet; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSetV1 { + constructor(attributes: { + previousLedgerHash: Buffer; + phases: TransactionPhase[]; + }); + + previousLedgerHash(value?: Buffer): Buffer; + + phases(value?: TransactionPhase[]): TransactionPhase[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSetV1; + + static write(value: TransactionSetV1, io: Buffer): void; + + static isValid(value: TransactionSetV1): boolean; + + static toXDR(value: TransactionSetV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSetV1; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionSetV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultPair { + constructor(attributes: { + transactionHash: Buffer; + result: TransactionResult; + }); + + transactionHash(value?: Buffer): Buffer; + + result(value?: TransactionResult): TransactionResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultPair; + + static write(value: TransactionResultPair, io: Buffer): void; + + static isValid(value: TransactionResultPair): boolean; + + static toXDR(value: TransactionResultPair): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultPair; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultPair; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultSet { + constructor(attributes: { results: TransactionResultPair[] }); + + results(value?: TransactionResultPair[]): TransactionResultPair[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultSet; + + static write(value: TransactionResultSet, io: Buffer): void; + + static isValid(value: TransactionResultSet): boolean; + + static toXDR(value: TransactionResultSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultSet; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryEntry { + constructor(attributes: { + ledgerSeq: number; + txSet: TransactionSet; + ext: TransactionHistoryEntryExt; + }); + + ledgerSeq(value?: number): number; + + txSet(value?: TransactionSet): TransactionSet; + + ext(value?: TransactionHistoryEntryExt): TransactionHistoryEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryEntry; + + static write(value: TransactionHistoryEntry, io: Buffer): void; + + static isValid(value: TransactionHistoryEntry): boolean; + + static toXDR(value: TransactionHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionHistoryEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntry { + constructor(attributes: { + ledgerSeq: number; + txResultSet: TransactionResultSet; + ext: TransactionHistoryResultEntryExt; + }); + + ledgerSeq(value?: number): number; + + txResultSet(value?: TransactionResultSet): TransactionResultSet; + + ext( + value?: TransactionHistoryResultEntryExt + ): TransactionHistoryResultEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntry; + + static write(value: TransactionHistoryResultEntry, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntry): boolean; + + static toXDR(value: TransactionHistoryResultEntry): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderHistoryEntry { + constructor(attributes: { + hash: Buffer; + header: LedgerHeader; + ext: LedgerHeaderHistoryEntryExt; + }); + + hash(value?: Buffer): Buffer; + + header(value?: LedgerHeader): LedgerHeader; + + ext(value?: LedgerHeaderHistoryEntryExt): LedgerHeaderHistoryEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderHistoryEntry; + + static write(value: LedgerHeaderHistoryEntry, io: Buffer): void; + + static isValid(value: LedgerHeaderHistoryEntry): boolean; + + static toXDR(value: LedgerHeaderHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderHistoryEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerScpMessages { + constructor(attributes: { ledgerSeq: number; messages: ScpEnvelope[] }); + + ledgerSeq(value?: number): number; + + messages(value?: ScpEnvelope[]): ScpEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerScpMessages; + + static write(value: LedgerScpMessages, io: Buffer): void; + + static isValid(value: LedgerScpMessages): boolean; + + static toXDR(value: LedgerScpMessages): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerScpMessages; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerScpMessages; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpHistoryEntryV0 { + constructor(attributes: { + quorumSets: ScpQuorumSet[]; + ledgerMessages: LedgerScpMessages; + }); + + quorumSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; + + ledgerMessages(value?: LedgerScpMessages): LedgerScpMessages; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpHistoryEntryV0; + + static write(value: ScpHistoryEntryV0, io: Buffer): void; + + static isValid(value: ScpHistoryEntryV0): boolean; + + static toXDR(value: ScpHistoryEntryV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpHistoryEntryV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScpHistoryEntryV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationMeta { + constructor(attributes: { changes: LedgerEntryChange[] }); + + changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationMeta; + + static write(value: OperationMeta, io: Buffer): void; + + static isValid(value: OperationMeta): boolean; + + static toXDR(value: OperationMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationMeta; + + static fromXDR(input: string, format: "hex" | "base64"): OperationMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMetaV1 { + constructor(attributes: { + txChanges: LedgerEntryChange[]; + operations: OperationMeta[]; + }); + + txChanges(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + operations(value?: OperationMeta[]): OperationMeta[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMetaV1; + + static write(value: TransactionMetaV1, io: Buffer): void; + + static isValid(value: TransactionMetaV1): boolean; + + static toXDR(value: TransactionMetaV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMetaV1; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMetaV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMetaV2 { + constructor(attributes: { + txChangesBefore: LedgerEntryChange[]; + operations: OperationMeta[]; + txChangesAfter: LedgerEntryChange[]; + }); + + txChangesBefore(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + operations(value?: OperationMeta[]): OperationMeta[]; + + txChangesAfter(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMetaV2; + + static write(value: TransactionMetaV2, io: Buffer): void; + + static isValid(value: TransactionMetaV2): boolean; + + static toXDR(value: TransactionMetaV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMetaV2; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMetaV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultMeta { + constructor(attributes: { + result: TransactionResultPair; + feeProcessing: LedgerEntryChange[]; + txApplyProcessing: TransactionMeta; + }); + + result(value?: TransactionResultPair): TransactionResultPair; + + feeProcessing(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + txApplyProcessing(value?: TransactionMeta): TransactionMeta; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultMeta; + + static write(value: TransactionResultMeta, io: Buffer): void; + + static isValid(value: TransactionResultMeta): boolean; + + static toXDR(value: TransactionResultMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultMeta; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class UpgradeEntryMeta { + constructor(attributes: { + upgrade: LedgerUpgrade; + changes: LedgerEntryChange[]; + }); + + upgrade(value?: LedgerUpgrade): LedgerUpgrade; + + changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): UpgradeEntryMeta; + + static write(value: UpgradeEntryMeta, io: Buffer): void; + + static isValid(value: UpgradeEntryMeta): boolean; + + static toXDR(value: UpgradeEntryMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UpgradeEntryMeta; + + static fromXDR(input: string, format: "hex" | "base64"): UpgradeEntryMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMetaV0 { + constructor(attributes: { + ledgerHeader: LedgerHeaderHistoryEntry; + txSet: TransactionSet; + txProcessing: TransactionResultMeta[]; + upgradesProcessing: UpgradeEntryMeta[]; + scpInfo: ScpHistoryEntry[]; + }); + + ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; + + txSet(value?: TransactionSet): TransactionSet; + + txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; + + upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; + + scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMetaV0; + + static write(value: LedgerCloseMetaV0, io: Buffer): void; + + static isValid(value: LedgerCloseMetaV0): boolean; + + static toXDR(value: LedgerCloseMetaV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMetaV0; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMetaV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMetaV1 { + constructor(attributes: { + ledgerHeader: LedgerHeaderHistoryEntry; + txSet: GeneralizedTransactionSet; + txProcessing: TransactionResultMeta[]; + upgradesProcessing: UpgradeEntryMeta[]; + scpInfo: ScpHistoryEntry[]; + }); + + ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; + + txSet(value?: GeneralizedTransactionSet): GeneralizedTransactionSet; + + txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; + + upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; + + scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMetaV1; + + static write(value: LedgerCloseMetaV1, io: Buffer): void; + + static isValid(value: LedgerCloseMetaV1): boolean; + + static toXDR(value: LedgerCloseMetaV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMetaV1; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMetaV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Error { + constructor(attributes: { code: ErrorCode; msg: string | Buffer }); + + code(value?: ErrorCode): ErrorCode; + + msg(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Error; + + static write(value: Error, io: Buffer): void; + + static isValid(value: Error): boolean; + + static toXDR(value: Error): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Error; + + static fromXDR(input: string, format: "hex" | "base64"): Error; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SendMore { + constructor(attributes: { numMessages: number }); + + numMessages(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SendMore; + + static write(value: SendMore, io: Buffer): void; + + static isValid(value: SendMore): boolean; + + static toXDR(value: SendMore): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SendMore; + + static fromXDR(input: string, format: "hex" | "base64"): SendMore; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthCert { + constructor(attributes: { + pubkey: Curve25519Public; + expiration: Uint64; + sig: Buffer; + }); + + pubkey(value?: Curve25519Public): Curve25519Public; + + expiration(value?: Uint64): Uint64; + + sig(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthCert; + + static write(value: AuthCert, io: Buffer): void; + + static isValid(value: AuthCert): boolean; + + static toXDR(value: AuthCert): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthCert; + + static fromXDR(input: string, format: "hex" | "base64"): AuthCert; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Hello { + constructor(attributes: { + ledgerVersion: number; + overlayVersion: number; + overlayMinVersion: number; + networkId: Buffer; + versionStr: string | Buffer; + listeningPort: number; + peerId: NodeId; + cert: AuthCert; + nonce: Buffer; + }); + + ledgerVersion(value?: number): number; + + overlayVersion(value?: number): number; + + overlayMinVersion(value?: number): number; + + networkId(value?: Buffer): Buffer; + + versionStr(value?: string | Buffer): string | Buffer; + + listeningPort(value?: number): number; + + peerId(value?: NodeId): NodeId; + + cert(value?: AuthCert): AuthCert; + + nonce(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Hello; + + static write(value: Hello, io: Buffer): void; + + static isValid(value: Hello): boolean; + + static toXDR(value: Hello): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Hello; + + static fromXDR(input: string, format: "hex" | "base64"): Hello; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Auth { + constructor(attributes: { flags: number }); + + flags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Auth; + + static write(value: Auth, io: Buffer): void; + + static isValid(value: Auth): boolean; + + static toXDR(value: Auth): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Auth; + + static fromXDR(input: string, format: "hex" | "base64"): Auth; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerAddress { + constructor(attributes: { + ip: PeerAddressIp; + port: number; + numFailures: number; + }); + + ip(value?: PeerAddressIp): PeerAddressIp; + + port(value?: number): number; + + numFailures(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerAddress; + + static write(value: PeerAddress, io: Buffer): void; + + static isValid(value: PeerAddress): boolean; + + static toXDR(value: PeerAddress): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerAddress; + + static fromXDR(input: string, format: "hex" | "base64"): PeerAddress; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DontHave { + constructor(attributes: { type: MessageType; reqHash: Buffer }); + + type(value?: MessageType): MessageType; + + reqHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DontHave; + + static write(value: DontHave, io: Buffer): void; + + static isValid(value: DontHave): boolean; + + static toXDR(value: DontHave): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DontHave; + + static fromXDR(input: string, format: "hex" | "base64"): DontHave; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyRequestMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + encryptionKey: Curve25519Public; + commandType: SurveyMessageCommandType; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + encryptionKey(value?: Curve25519Public): Curve25519Public; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyRequestMessage; + + static write(value: SurveyRequestMessage, io: Buffer): void; + + static isValid(value: SurveyRequestMessage): boolean; + + static toXDR(value: SurveyRequestMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyRequestMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SurveyRequestMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignedSurveyRequestMessage { + constructor(attributes: { + requestSignature: Buffer; + request: SurveyRequestMessage; + }); + + requestSignature(value?: Buffer): Buffer; + + request(value?: SurveyRequestMessage): SurveyRequestMessage; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignedSurveyRequestMessage; + + static write(value: SignedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: SignedSurveyRequestMessage): boolean; + + static toXDR(value: SignedSurveyRequestMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignedSurveyRequestMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignedSurveyRequestMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyResponseMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + commandType: SurveyMessageCommandType; + encryptedBody: Buffer; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + encryptedBody(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyResponseMessage; + + static write(value: SurveyResponseMessage, io: Buffer): void; + + static isValid(value: SurveyResponseMessage): boolean; + + static toXDR(value: SurveyResponseMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyResponseMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SurveyResponseMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignedSurveyResponseMessage { + constructor(attributes: { + responseSignature: Buffer; + response: SurveyResponseMessage; + }); + + responseSignature(value?: Buffer): Buffer; + + response(value?: SurveyResponseMessage): SurveyResponseMessage; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignedSurveyResponseMessage; + + static write(value: SignedSurveyResponseMessage, io: Buffer): void; + + static isValid(value: SignedSurveyResponseMessage): boolean; + + static toXDR(value: SignedSurveyResponseMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignedSurveyResponseMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerStats { + constructor(attributes: { + id: NodeId; + versionStr: string | Buffer; + messagesRead: Uint64; + messagesWritten: Uint64; + bytesRead: Uint64; + bytesWritten: Uint64; + secondsConnected: Uint64; + uniqueFloodBytesRecv: Uint64; + duplicateFloodBytesRecv: Uint64; + uniqueFetchBytesRecv: Uint64; + duplicateFetchBytesRecv: Uint64; + uniqueFloodMessageRecv: Uint64; + duplicateFloodMessageRecv: Uint64; + uniqueFetchMessageRecv: Uint64; + duplicateFetchMessageRecv: Uint64; + }); + + id(value?: NodeId): NodeId; + + versionStr(value?: string | Buffer): string | Buffer; + + messagesRead(value?: Uint64): Uint64; + + messagesWritten(value?: Uint64): Uint64; + + bytesRead(value?: Uint64): Uint64; + + bytesWritten(value?: Uint64): Uint64; + + secondsConnected(value?: Uint64): Uint64; + + uniqueFloodBytesRecv(value?: Uint64): Uint64; + + duplicateFloodBytesRecv(value?: Uint64): Uint64; + + uniqueFetchBytesRecv(value?: Uint64): Uint64; + + duplicateFetchBytesRecv(value?: Uint64): Uint64; + + uniqueFloodMessageRecv(value?: Uint64): Uint64; + + duplicateFloodMessageRecv(value?: Uint64): Uint64; + + uniqueFetchMessageRecv(value?: Uint64): Uint64; + + duplicateFetchMessageRecv(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerStats; + + static write(value: PeerStats, io: Buffer): void; + + static isValid(value: PeerStats): boolean; + + static toXDR(value: PeerStats): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerStats; + + static fromXDR(input: string, format: "hex" | "base64"): PeerStats; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TopologyResponseBody { + constructor(attributes: { + inboundPeers: PeerStats[]; + outboundPeers: PeerStats[]; + totalInboundPeerCount: number; + totalOutboundPeerCount: number; + }); + + inboundPeers(value?: PeerStats[]): PeerStats[]; + + outboundPeers(value?: PeerStats[]): PeerStats[]; + + totalInboundPeerCount(value?: number): number; + + totalOutboundPeerCount(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TopologyResponseBody; + + static write(value: TopologyResponseBody, io: Buffer): void; + + static isValid(value: TopologyResponseBody): boolean; + + static toXDR(value: TopologyResponseBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TopologyResponseBody; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TopologyResponseBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FloodAdvert { + constructor(attributes: { txHashes: Hash[] }); + + txHashes(value?: Hash[]): Hash[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FloodAdvert; + + static write(value: FloodAdvert, io: Buffer): void; + + static isValid(value: FloodAdvert): boolean; + + static toXDR(value: FloodAdvert): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FloodAdvert; + + static fromXDR(input: string, format: "hex" | "base64"): FloodAdvert; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FloodDemand { + constructor(attributes: { txHashes: Hash[] }); + + txHashes(value?: Hash[]): Hash[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FloodDemand; + + static write(value: FloodDemand, io: Buffer): void; + + static isValid(value: FloodDemand): boolean; + + static toXDR(value: FloodDemand): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FloodDemand; + + static fromXDR(input: string, format: "hex" | "base64"): FloodDemand; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthenticatedMessageV0 { + constructor(attributes: { + sequence: Uint64; + message: StellarMessage; + mac: HmacSha256Mac; + }); + + sequence(value?: Uint64): Uint64; + + message(value?: StellarMessage): StellarMessage; + + mac(value?: HmacSha256Mac): HmacSha256Mac; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthenticatedMessageV0; + + static write(value: AuthenticatedMessageV0, io: Buffer): void; + + static isValid(value: AuthenticatedMessageV0): boolean; + + static toXDR(value: AuthenticatedMessageV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthenticatedMessageV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AuthenticatedMessageV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class MuxedAccountMed25519 { + constructor(attributes: { id: Uint64; ed25519: Buffer }); + + id(value?: Uint64): Uint64; + + ed25519(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): MuxedAccountMed25519; + + static write(value: MuxedAccountMed25519, io: Buffer): void; + + static isValid(value: MuxedAccountMed25519): boolean; + + static toXDR(value: MuxedAccountMed25519): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): MuxedAccountMed25519; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): MuxedAccountMed25519; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DecoratedSignature { + constructor(attributes: { hint: Buffer; signature: Buffer }); + + hint(value?: Buffer): Buffer; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DecoratedSignature; + + static write(value: DecoratedSignature, io: Buffer): void; + + static isValid(value: DecoratedSignature): boolean; + + static toXDR(value: DecoratedSignature): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DecoratedSignature; + + static fromXDR(input: string, format: "hex" | "base64"): DecoratedSignature; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateAccountOp { + constructor(attributes: { destination: AccountId; startingBalance: Int64 }); + + destination(value?: AccountId): AccountId; + + startingBalance(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateAccountOp; + + static write(value: CreateAccountOp, io: Buffer): void; + + static isValid(value: CreateAccountOp): boolean; + + static toXDR(value: CreateAccountOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateAccountOp; + + static fromXDR(input: string, format: "hex" | "base64"): CreateAccountOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PaymentOp { + constructor(attributes: { + destination: MuxedAccount; + asset: Asset; + amount: Int64; + }); + + destination(value?: MuxedAccount): MuxedAccount; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PaymentOp; + + static write(value: PaymentOp, io: Buffer): void; + + static isValid(value: PaymentOp): boolean; + + static toXDR(value: PaymentOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PaymentOp; + + static fromXDR(input: string, format: "hex" | "base64"): PaymentOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveOp { + constructor(attributes: { + sendAsset: Asset; + sendMax: Int64; + destination: MuxedAccount; + destAsset: Asset; + destAmount: Int64; + path: Asset[]; + }); + + sendAsset(value?: Asset): Asset; + + sendMax(value?: Int64): Int64; + + destination(value?: MuxedAccount): MuxedAccount; + + destAsset(value?: Asset): Asset; + + destAmount(value?: Int64): Int64; + + path(value?: Asset[]): Asset[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveOp; + + static write(value: PathPaymentStrictReceiveOp, io: Buffer): void; + + static isValid(value: PathPaymentStrictReceiveOp): boolean; + + static toXDR(value: PathPaymentStrictReceiveOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictReceiveOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendOp { + constructor(attributes: { + sendAsset: Asset; + sendAmount: Int64; + destination: MuxedAccount; + destAsset: Asset; + destMin: Int64; + path: Asset[]; + }); + + sendAsset(value?: Asset): Asset; + + sendAmount(value?: Int64): Int64; + + destination(value?: MuxedAccount): MuxedAccount; + + destAsset(value?: Asset): Asset; + + destMin(value?: Int64): Int64; + + path(value?: Asset[]): Asset[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendOp; + + static write(value: PathPaymentStrictSendOp, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendOp): boolean; + + static toXDR(value: PathPaymentStrictSendOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictSendOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageSellOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + offerId: Int64; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageSellOfferOp; + + static write(value: ManageSellOfferOp, io: Buffer): void; + + static isValid(value: ManageSellOfferOp): boolean; + + static toXDR(value: ManageSellOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageSellOfferOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageSellOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageBuyOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + buyAmount: Int64; + price: Price; + offerId: Int64; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + buyAmount(value?: Int64): Int64; + + price(value?: Price): Price; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageBuyOfferOp; + + static write(value: ManageBuyOfferOp, io: Buffer): void; + + static isValid(value: ManageBuyOfferOp): boolean; + + static toXDR(value: ManageBuyOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageBuyOfferOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageBuyOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreatePassiveSellOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreatePassiveSellOfferOp; + + static write(value: CreatePassiveSellOfferOp, io: Buffer): void; + + static isValid(value: CreatePassiveSellOfferOp): boolean; + + static toXDR(value: CreatePassiveSellOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreatePassiveSellOfferOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreatePassiveSellOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetOptionsOp { + constructor(attributes: { + inflationDest: null | AccountId; + clearFlags: null | number; + setFlags: null | number; + masterWeight: null | number; + lowThreshold: null | number; + medThreshold: null | number; + highThreshold: null | number; + homeDomain: null | string | Buffer; + signer: null | Signer; + }); + + inflationDest(value?: null | AccountId): null | AccountId; + + clearFlags(value?: null | number): null | number; + + setFlags(value?: null | number): null | number; + + masterWeight(value?: null | number): null | number; + + lowThreshold(value?: null | number): null | number; + + medThreshold(value?: null | number): null | number; + + highThreshold(value?: null | number): null | number; + + homeDomain(value?: null | string | Buffer): null | string | Buffer; + + signer(value?: null | Signer): null | Signer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetOptionsOp; + + static write(value: SetOptionsOp, io: Buffer): void; + + static isValid(value: SetOptionsOp): boolean; + + static toXDR(value: SetOptionsOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetOptionsOp; + + static fromXDR(input: string, format: "hex" | "base64"): SetOptionsOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustOp { + constructor(attributes: { line: ChangeTrustAsset; limit: Int64 }); + + line(value?: ChangeTrustAsset): ChangeTrustAsset; + + limit(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustOp; + + static write(value: ChangeTrustOp, io: Buffer): void; + + static isValid(value: ChangeTrustOp): boolean; + + static toXDR(value: ChangeTrustOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustOp; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AllowTrustOp { + constructor(attributes: { + trustor: AccountId; + asset: AssetCode; + authorize: number; + }); + + trustor(value?: AccountId): AccountId; + + asset(value?: AssetCode): AssetCode; + + authorize(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AllowTrustOp; + + static write(value: AllowTrustOp, io: Buffer): void; + + static isValid(value: AllowTrustOp): boolean; + + static toXDR(value: AllowTrustOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AllowTrustOp; + + static fromXDR(input: string, format: "hex" | "base64"): AllowTrustOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageDataOp { + constructor(attributes: { + dataName: string | Buffer; + dataValue: null | Buffer; + }); + + dataName(value?: string | Buffer): string | Buffer; + + dataValue(value?: null | Buffer): null | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageDataOp; + + static write(value: ManageDataOp, io: Buffer): void; + + static isValid(value: ManageDataOp): boolean; + + static toXDR(value: ManageDataOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageDataOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageDataOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BumpSequenceOp { + constructor(attributes: { bumpTo: SequenceNumber }); + + bumpTo(value?: SequenceNumber): SequenceNumber; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BumpSequenceOp; + + static write(value: BumpSequenceOp, io: Buffer): void; + + static isValid(value: BumpSequenceOp): boolean; + + static toXDR(value: BumpSequenceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BumpSequenceOp; + + static fromXDR(input: string, format: "hex" | "base64"): BumpSequenceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateClaimableBalanceOp { + constructor(attributes: { + asset: Asset; + amount: Int64; + claimants: Claimant[]; + }); + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + claimants(value?: Claimant[]): Claimant[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateClaimableBalanceOp; + + static write(value: CreateClaimableBalanceOp, io: Buffer): void; + + static isValid(value: CreateClaimableBalanceOp): boolean; + + static toXDR(value: CreateClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimClaimableBalanceOp { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimClaimableBalanceOp; + + static write(value: ClaimClaimableBalanceOp, io: Buffer): void; + + static isValid(value: ClaimClaimableBalanceOp): boolean; + + static toXDR(value: ClaimClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BeginSponsoringFutureReservesOp { + constructor(attributes: { sponsoredId: AccountId }); + + sponsoredId(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BeginSponsoringFutureReservesOp; + + static write(value: BeginSponsoringFutureReservesOp, io: Buffer): void; + + static isValid(value: BeginSponsoringFutureReservesOp): boolean; + + static toXDR(value: BeginSponsoringFutureReservesOp): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): BeginSponsoringFutureReservesOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): BeginSponsoringFutureReservesOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipOpSigner { + constructor(attributes: { accountId: AccountId; signerKey: SignerKey }); + + accountId(value?: AccountId): AccountId; + + signerKey(value?: SignerKey): SignerKey; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipOpSigner; + + static write(value: RevokeSponsorshipOpSigner, io: Buffer): void; + + static isValid(value: RevokeSponsorshipOpSigner): boolean; + + static toXDR(value: RevokeSponsorshipOpSigner): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipOpSigner; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipOpSigner; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackOp { + constructor(attributes: { + asset: Asset; + from: MuxedAccount; + amount: Int64; + }); + + asset(value?: Asset): Asset; + + from(value?: MuxedAccount): MuxedAccount; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackOp; + + static write(value: ClawbackOp, io: Buffer): void; + + static isValid(value: ClawbackOp): boolean; + + static toXDR(value: ClawbackOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackOp; + + static fromXDR(input: string, format: "hex" | "base64"): ClawbackOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackClaimableBalanceOp { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackClaimableBalanceOp; + + static write(value: ClawbackClaimableBalanceOp, io: Buffer): void; + + static isValid(value: ClawbackClaimableBalanceOp): boolean; + + static toXDR(value: ClawbackClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClawbackClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetTrustLineFlagsOp { + constructor(attributes: { + trustor: AccountId; + asset: Asset; + clearFlags: number; + setFlags: number; + }); + + trustor(value?: AccountId): AccountId; + + asset(value?: Asset): Asset; + + clearFlags(value?: number): number; + + setFlags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetTrustLineFlagsOp; + + static write(value: SetTrustLineFlagsOp, io: Buffer): void; + + static isValid(value: SetTrustLineFlagsOp): boolean; + + static toXDR(value: SetTrustLineFlagsOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetTrustLineFlagsOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SetTrustLineFlagsOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolDepositOp { + constructor(attributes: { + liquidityPoolId: PoolId; + maxAmountA: Int64; + maxAmountB: Int64; + minPrice: Price; + maxPrice: Price; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + maxAmountA(value?: Int64): Int64; + + maxAmountB(value?: Int64): Int64; + + minPrice(value?: Price): Price; + + maxPrice(value?: Price): Price; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolDepositOp; + + static write(value: LiquidityPoolDepositOp, io: Buffer): void; + + static isValid(value: LiquidityPoolDepositOp): boolean; + + static toXDR(value: LiquidityPoolDepositOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolDepositOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolDepositOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolWithdrawOp { + constructor(attributes: { + liquidityPoolId: PoolId; + amount: Int64; + minAmountA: Int64; + minAmountB: Int64; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + amount(value?: Int64): Int64; + + minAmountA(value?: Int64): Int64; + + minAmountB(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolWithdrawOp; + + static write(value: LiquidityPoolWithdrawOp, io: Buffer): void; + + static isValid(value: LiquidityPoolWithdrawOp): boolean; + + static toXDR(value: LiquidityPoolWithdrawOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolWithdrawOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolWithdrawOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageOperationId { + constructor(attributes: { + sourceAccount: AccountId; + seqNum: SequenceNumber; + opNum: number; + }); + + sourceAccount(value?: AccountId): AccountId; + + seqNum(value?: SequenceNumber): SequenceNumber; + + opNum(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageOperationId; + + static write(value: HashIdPreimageOperationId, io: Buffer): void; + + static isValid(value: HashIdPreimageOperationId): boolean; + + static toXDR(value: HashIdPreimageOperationId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageOperationId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageOperationId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageRevokeId { + constructor(attributes: { + sourceAccount: AccountId; + seqNum: SequenceNumber; + opNum: number; + liquidityPoolId: PoolId; + asset: Asset; + }); + + sourceAccount(value?: AccountId): AccountId; + + seqNum(value?: SequenceNumber): SequenceNumber; + + opNum(value?: number): number; + + liquidityPoolId(value?: PoolId): PoolId; + + asset(value?: Asset): Asset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageRevokeId; + + static write(value: HashIdPreimageRevokeId, io: Buffer): void; + + static isValid(value: HashIdPreimageRevokeId): boolean; + + static toXDR(value: HashIdPreimageRevokeId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageRevokeId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageRevokeId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TimeBounds { + constructor(attributes: { minTime: TimePoint; maxTime: TimePoint }); + + minTime(value?: TimePoint): TimePoint; + + maxTime(value?: TimePoint): TimePoint; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TimeBounds; + + static write(value: TimeBounds, io: Buffer): void; + + static isValid(value: TimeBounds): boolean; + + static toXDR(value: TimeBounds): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TimeBounds; + + static fromXDR(input: string, format: "hex" | "base64"): TimeBounds; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerBounds { + constructor(attributes: { minLedger: number; maxLedger: number }); + + minLedger(value?: number): number; + + maxLedger(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerBounds; + + static write(value: LedgerBounds, io: Buffer): void; + + static isValid(value: LedgerBounds): boolean; + + static toXDR(value: LedgerBounds): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerBounds; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerBounds; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PreconditionsV2 { + constructor(attributes: { + timeBounds: null | TimeBounds; + ledgerBounds: null | LedgerBounds; + minSeqNum: null | SequenceNumber; + minSeqAge: Duration; + minSeqLedgerGap: number; + extraSigners: SignerKey[]; + }); + + timeBounds(value?: null | TimeBounds): null | TimeBounds; + + ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; + + minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; + + minSeqAge(value?: Duration): Duration; + + minSeqLedgerGap(value?: number): number; + + extraSigners(value?: SignerKey[]): SignerKey[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PreconditionsV2; + + static write(value: PreconditionsV2, io: Buffer): void; + + static isValid(value: PreconditionsV2): boolean; + + static toXDR(value: PreconditionsV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PreconditionsV2; + + static fromXDR(input: string, format: "hex" | "base64"): PreconditionsV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0 { + constructor(attributes: { + sourceAccountEd25519: Buffer; + fee: number; + seqNum: SequenceNumber; + timeBounds: null | TimeBounds; + memo: Memo; + operations: Operation[]; + ext: TransactionV0Ext; + }); + + sourceAccountEd25519(value?: Buffer): Buffer; + + fee(value?: number): number; + + seqNum(value?: SequenceNumber): SequenceNumber; + + timeBounds(value?: null | TimeBounds): null | TimeBounds; + + memo(value?: Memo): Memo; + + operations(value?: Operation[]): Operation[]; + + ext(value?: TransactionV0Ext): TransactionV0Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0; + + static write(value: TransactionV0, io: Buffer): void; + + static isValid(value: TransactionV0): boolean; + + static toXDR(value: TransactionV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0Envelope { + constructor(attributes: { + tx: TransactionV0; + signatures: DecoratedSignature[]; + }); + + tx(value?: TransactionV0): TransactionV0; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0Envelope; + + static write(value: TransactionV0Envelope, io: Buffer): void; + + static isValid(value: TransactionV0Envelope): boolean; + + static toXDR(value: TransactionV0Envelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0Envelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionV0Envelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Transaction { + constructor(attributes: { + sourceAccount: MuxedAccount; + fee: number; + seqNum: SequenceNumber; + cond: Preconditions; + memo: Memo; + operations: Operation[]; + ext: TransactionExt; + }); + + sourceAccount(value?: MuxedAccount): MuxedAccount; + + fee(value?: number): number; + + seqNum(value?: SequenceNumber): SequenceNumber; + + cond(value?: Preconditions): Preconditions; + + memo(value?: Memo): Memo; + + operations(value?: Operation[]): Operation[]; + + ext(value?: TransactionExt): TransactionExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Transaction; + + static write(value: Transaction, io: Buffer): void; + + static isValid(value: Transaction): boolean; + + static toXDR(value: Transaction): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Transaction; + + static fromXDR(input: string, format: "hex" | "base64"): Transaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV1Envelope { + constructor(attributes: { + tx: Transaction; + signatures: DecoratedSignature[]; + }); + + tx(value?: Transaction): Transaction; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV1Envelope; + + static write(value: TransactionV1Envelope, io: Buffer): void; + + static isValid(value: TransactionV1Envelope): boolean; + + static toXDR(value: TransactionV1Envelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV1Envelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionV1Envelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransaction { + constructor(attributes: { + feeSource: MuxedAccount; + fee: Int64; + innerTx: FeeBumpTransactionInnerTx; + ext: FeeBumpTransactionExt; + }); + + feeSource(value?: MuxedAccount): MuxedAccount; + + fee(value?: Int64): Int64; + + innerTx(value?: FeeBumpTransactionInnerTx): FeeBumpTransactionInnerTx; + + ext(value?: FeeBumpTransactionExt): FeeBumpTransactionExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransaction; + + static write(value: FeeBumpTransaction, io: Buffer): void; + + static isValid(value: FeeBumpTransaction): boolean; + + static toXDR(value: FeeBumpTransaction): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransaction; + + static fromXDR(input: string, format: "hex" | "base64"): FeeBumpTransaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionEnvelope { + constructor(attributes: { + tx: FeeBumpTransaction; + signatures: DecoratedSignature[]; + }); + + tx(value?: FeeBumpTransaction): FeeBumpTransaction; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionEnvelope; + + static write(value: FeeBumpTransactionEnvelope, io: Buffer): void; + + static isValid(value: FeeBumpTransactionEnvelope): boolean; + + static toXDR(value: FeeBumpTransactionEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionEnvelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSignaturePayload { + constructor(attributes: { + networkId: Buffer; + taggedTransaction: TransactionSignaturePayloadTaggedTransaction; + }); + + networkId(value?: Buffer): Buffer; + + taggedTransaction( + value?: TransactionSignaturePayloadTaggedTransaction + ): TransactionSignaturePayloadTaggedTransaction; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSignaturePayload; + + static write(value: TransactionSignaturePayload, io: Buffer): void; + + static isValid(value: TransactionSignaturePayload): boolean; + + static toXDR(value: TransactionSignaturePayload): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSignaturePayload; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionSignaturePayload; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimOfferAtomV0 { + constructor(attributes: { + sellerEd25519: Buffer; + offerId: Int64; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + sellerEd25519(value?: Buffer): Buffer; + + offerId(value?: Int64): Int64; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimOfferAtomV0; + + static write(value: ClaimOfferAtomV0, io: Buffer): void; + + static isValid(value: ClaimOfferAtomV0): boolean; + + static toXDR(value: ClaimOfferAtomV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimOfferAtomV0; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimOfferAtomV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimOfferAtom { + constructor(attributes: { + sellerId: AccountId; + offerId: Int64; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimOfferAtom; + + static write(value: ClaimOfferAtom, io: Buffer): void; + + static isValid(value: ClaimOfferAtom): boolean; + + static toXDR(value: ClaimOfferAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimOfferAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimOfferAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimLiquidityAtom { + constructor(attributes: { + liquidityPoolId: PoolId; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimLiquidityAtom; + + static write(value: ClaimLiquidityAtom, io: Buffer): void; + + static isValid(value: ClaimLiquidityAtom): boolean; + + static toXDR(value: ClaimLiquidityAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimLiquidityAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimLiquidityAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SimplePaymentResult { + constructor(attributes: { + destination: AccountId; + asset: Asset; + amount: Int64; + }); + + destination(value?: AccountId): AccountId; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SimplePaymentResult; + + static write(value: SimplePaymentResult, io: Buffer): void; + + static isValid(value: SimplePaymentResult): boolean; + + static toXDR(value: SimplePaymentResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SimplePaymentResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SimplePaymentResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveResultSuccess { + constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); + + offers(value?: ClaimAtom[]): ClaimAtom[]; + + last(value?: SimplePaymentResult): SimplePaymentResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveResultSuccess; + + static write( + value: PathPaymentStrictReceiveResultSuccess, + io: Buffer + ): void; + + static isValid(value: PathPaymentStrictReceiveResultSuccess): boolean; + + static toXDR(value: PathPaymentStrictReceiveResultSuccess): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictReceiveResultSuccess; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveResultSuccess; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendResultSuccess { + constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); + + offers(value?: ClaimAtom[]): ClaimAtom[]; + + last(value?: SimplePaymentResult): SimplePaymentResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendResultSuccess; + + static write(value: PathPaymentStrictSendResultSuccess, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendResultSuccess): boolean; + + static toXDR(value: PathPaymentStrictSendResultSuccess): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictSendResultSuccess; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendResultSuccess; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageOfferSuccessResult { + constructor(attributes: { + offersClaimed: ClaimAtom[]; + offer: ManageOfferSuccessResultOffer; + }); + + offersClaimed(value?: ClaimAtom[]): ClaimAtom[]; + + offer(value?: ManageOfferSuccessResultOffer): ManageOfferSuccessResultOffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageOfferSuccessResult; + + static write(value: ManageOfferSuccessResult, io: Buffer): void; + + static isValid(value: ManageOfferSuccessResult): boolean; + + static toXDR(value: ManageOfferSuccessResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageOfferSuccessResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageOfferSuccessResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InflationPayout { + constructor(attributes: { destination: AccountId; amount: Int64 }); + + destination(value?: AccountId): AccountId; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InflationPayout; + + static write(value: InflationPayout, io: Buffer): void; + + static isValid(value: InflationPayout): boolean; + + static toXDR(value: InflationPayout): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InflationPayout; + + static fromXDR(input: string, format: "hex" | "base64"): InflationPayout; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResult { + constructor(attributes: { + feeCharged: Int64; + result: InnerTransactionResultResult; + ext: InnerTransactionResultExt; + }); + + feeCharged(value?: Int64): Int64; + + result(value?: InnerTransactionResultResult): InnerTransactionResultResult; + + ext(value?: InnerTransactionResultExt): InnerTransactionResultExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResult; + + static write(value: InnerTransactionResult, io: Buffer): void; + + static isValid(value: InnerTransactionResult): boolean; + + static toXDR(value: InnerTransactionResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultPair { + constructor(attributes: { + transactionHash: Buffer; + result: InnerTransactionResult; + }); + + transactionHash(value?: Buffer): Buffer; + + result(value?: InnerTransactionResult): InnerTransactionResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultPair; + + static write(value: InnerTransactionResultPair, io: Buffer): void; + + static isValid(value: InnerTransactionResultPair): boolean; + + static toXDR(value: InnerTransactionResultPair): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultPair; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultPair; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResult { + constructor(attributes: { + feeCharged: Int64; + result: TransactionResultResult; + ext: TransactionResultExt; + }); + + feeCharged(value?: Int64): Int64; + + result(value?: TransactionResultResult): TransactionResultResult; + + ext(value?: TransactionResultExt): TransactionResultExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResult; + + static write(value: TransactionResult, io: Buffer): void; + + static isValid(value: TransactionResult): boolean; + + static toXDR(value: TransactionResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResult; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignerKeyEd25519SignedPayload { + constructor(attributes: { ed25519: Buffer; payload: Buffer }); + + ed25519(value?: Buffer): Buffer; + + payload(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignerKeyEd25519SignedPayload; + + static write(value: SignerKeyEd25519SignedPayload, io: Buffer): void; + + static isValid(value: SignerKeyEd25519SignedPayload): boolean; + + static toXDR(value: SignerKeyEd25519SignedPayload): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): SignerKeyEd25519SignedPayload; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignerKeyEd25519SignedPayload; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Curve25519Secret { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Curve25519Secret; + + static write(value: Curve25519Secret, io: Buffer): void; + + static isValid(value: Curve25519Secret): boolean; + + static toXDR(value: Curve25519Secret): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Curve25519Secret; + + static fromXDR(input: string, format: "hex" | "base64"): Curve25519Secret; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Curve25519Public { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Curve25519Public; + + static write(value: Curve25519Public, io: Buffer): void; + + static isValid(value: Curve25519Public): boolean; + + static toXDR(value: Curve25519Public): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Curve25519Public; + + static fromXDR(input: string, format: "hex" | "base64"): Curve25519Public; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HmacSha256Key { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HmacSha256Key; + + static write(value: HmacSha256Key, io: Buffer): void; + + static isValid(value: HmacSha256Key): boolean; + + static toXDR(value: HmacSha256Key): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HmacSha256Key; + + static fromXDR(input: string, format: "hex" | "base64"): HmacSha256Key; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HmacSha256Mac { + constructor(attributes: { mac: Buffer }); + + mac(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HmacSha256Mac; + + static write(value: HmacSha256Mac, io: Buffer): void; + + static isValid(value: HmacSha256Mac): boolean; + + static toXDR(value: HmacSha256Mac): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HmacSha256Mac; + + static fromXDR(input: string, format: "hex" | "base64"): HmacSha256Mac; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementPledges { + switch(): ScpStatementType; + + prepare(value?: ScpStatementPrepare): ScpStatementPrepare; + + confirm(value?: ScpStatementConfirm): ScpStatementConfirm; + + externalize(value?: ScpStatementExternalize): ScpStatementExternalize; + + nominate(value?: ScpNomination): ScpNomination; + + static scpStPrepare(value: ScpStatementPrepare): ScpStatementPledges; + + static scpStConfirm(value: ScpStatementConfirm): ScpStatementPledges; + + static scpStExternalize( + value: ScpStatementExternalize + ): ScpStatementPledges; + + static scpStNominate(value: ScpNomination): ScpStatementPledges; + + value(): + | ScpStatementPrepare + | ScpStatementConfirm + | ScpStatementExternalize + | ScpNomination; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementPledges; + + static write(value: ScpStatementPledges, io: Buffer): void; + + static isValid(value: ScpStatementPledges): boolean; + + static toXDR(value: ScpStatementPledges): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementPledges; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementPledges; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AssetCode { + switch(): AssetType; + + assetCode4(value?: Buffer): Buffer; + + assetCode12(value?: Buffer): Buffer; + + static assetTypeCreditAlphanum4(value: Buffer): AssetCode; + + static assetTypeCreditAlphanum12(value: Buffer): AssetCode; + + value(): Buffer | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AssetCode; + + static write(value: AssetCode, io: Buffer): void; + + static isValid(value: AssetCode): boolean; + + static toXDR(value: AssetCode): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AssetCode; + + static fromXDR(input: string, format: "hex" | "base64"): AssetCode; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Asset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + static assetTypeNative(): Asset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): Asset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): Asset; + + value(): AlphaNum4 | AlphaNum12 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Asset; + + static write(value: Asset, io: Buffer): void; + + static isValid(value: Asset): boolean; + + static toXDR(value: Asset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Asset; + + static fromXDR(input: string, format: "hex" | "base64"): Asset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV2Ext { + switch(): number; + + v3(value?: AccountEntryExtensionV3): AccountEntryExtensionV3; + + static 0(): AccountEntryExtensionV2Ext; + + static 3(value: AccountEntryExtensionV3): AccountEntryExtensionV2Ext; + + value(): AccountEntryExtensionV3 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV2Ext; + + static write(value: AccountEntryExtensionV2Ext, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV2Ext): boolean; + + static toXDR(value: AccountEntryExtensionV2Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV2Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV2Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV1Ext { + switch(): number; + + v2(value?: AccountEntryExtensionV2): AccountEntryExtensionV2; + + static 0(): AccountEntryExtensionV1Ext; + + static 2(value: AccountEntryExtensionV2): AccountEntryExtensionV1Ext; + + value(): AccountEntryExtensionV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV1Ext; + + static write(value: AccountEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV1Ext): boolean; + + static toXDR(value: AccountEntryExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExt { + switch(): number; + + v1(value?: AccountEntryExtensionV1): AccountEntryExtensionV1; + + static 0(): AccountEntryExt; + + static 1(value: AccountEntryExtensionV1): AccountEntryExt; + + value(): AccountEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExt; + + static write(value: AccountEntryExt, io: Buffer): void; + + static isValid(value: AccountEntryExt): boolean; + + static toXDR(value: AccountEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): AccountEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineAsset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + liquidityPoolId(value?: PoolId): PoolId; + + static assetTypeNative(): TrustLineAsset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): TrustLineAsset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): TrustLineAsset; + + static assetTypePoolShare(value: PoolId): TrustLineAsset; + + value(): AlphaNum4 | AlphaNum12 | PoolId | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineAsset; + + static write(value: TrustLineAsset, io: Buffer): void; + + static isValid(value: TrustLineAsset): boolean; + + static toXDR(value: TrustLineAsset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineAsset; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineAsset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExtensionV2Ext { + switch(): number; + + static 0(): TrustLineEntryExtensionV2Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExtensionV2Ext; + + static write(value: TrustLineEntryExtensionV2Ext, io: Buffer): void; + + static isValid(value: TrustLineEntryExtensionV2Ext): boolean; + + static toXDR(value: TrustLineEntryExtensionV2Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExtensionV2Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryExtensionV2Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryV1Ext { + switch(): number; + + v2(value?: TrustLineEntryExtensionV2): TrustLineEntryExtensionV2; + + static 0(): TrustLineEntryV1Ext; + + static 2(value: TrustLineEntryExtensionV2): TrustLineEntryV1Ext; + + value(): TrustLineEntryExtensionV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryV1Ext; + + static write(value: TrustLineEntryV1Ext, io: Buffer): void; + + static isValid(value: TrustLineEntryV1Ext): boolean; + + static toXDR(value: TrustLineEntryV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExt { + switch(): number; + + v1(value?: TrustLineEntryV1): TrustLineEntryV1; + + static 0(): TrustLineEntryExt; + + static 1(value: TrustLineEntryV1): TrustLineEntryExt; + + value(): TrustLineEntryV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExt; + + static write(value: TrustLineEntryExt, io: Buffer): void; + + static isValid(value: TrustLineEntryExt): boolean; + + static toXDR(value: TrustLineEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OfferEntryExt { + switch(): number; + + static 0(): OfferEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OfferEntryExt; + + static write(value: OfferEntryExt, io: Buffer): void; + + static isValid(value: OfferEntryExt): boolean; + + static toXDR(value: OfferEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OfferEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): OfferEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DataEntryExt { + switch(): number; + + static 0(): DataEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DataEntryExt; + + static write(value: DataEntryExt, io: Buffer): void; + + static isValid(value: DataEntryExt): boolean; + + static toXDR(value: DataEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DataEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): DataEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimPredicate { + switch(): ClaimPredicateType; + + andPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; + + orPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; + + notPredicate(value?: null | ClaimPredicate): null | ClaimPredicate; + + absBefore(value?: Int64): Int64; + + relBefore(value?: Int64): Int64; + + static claimPredicateUnconditional(): ClaimPredicate; + + static claimPredicateAnd(value: ClaimPredicate[]): ClaimPredicate; + + static claimPredicateOr(value: ClaimPredicate[]): ClaimPredicate; + + static claimPredicateNot(value: null | ClaimPredicate): ClaimPredicate; + + static claimPredicateBeforeAbsoluteTime(value: Int64): ClaimPredicate; + + static claimPredicateBeforeRelativeTime(value: Int64): ClaimPredicate; + + value(): + | ClaimPredicate[] + | ClaimPredicate[] + | null + | ClaimPredicate + | Int64 + | Int64 + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimPredicate; + + static write(value: ClaimPredicate, io: Buffer): void; + + static isValid(value: ClaimPredicate): boolean; + + static toXDR(value: ClaimPredicate): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimPredicate; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimPredicate; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Claimant { + switch(): ClaimantType; + + v0(value?: ClaimantV0): ClaimantV0; + + static claimantTypeV0(value: ClaimantV0): Claimant; + + value(): ClaimantV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Claimant; + + static write(value: Claimant, io: Buffer): void; + + static isValid(value: Claimant): boolean; + + static toXDR(value: Claimant): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Claimant; + + static fromXDR(input: string, format: "hex" | "base64"): Claimant; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceId { + switch(): ClaimableBalanceIdType; + + v0(value?: Buffer): Buffer; + + static claimableBalanceIdTypeV0(value: Buffer): ClaimableBalanceId; + + value(): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceId; + + static write(value: ClaimableBalanceId, io: Buffer): void; + + static isValid(value: ClaimableBalanceId): boolean; + + static toXDR(value: ClaimableBalanceId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceId; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimableBalanceId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExtensionV1Ext { + switch(): number; + + static 0(): ClaimableBalanceEntryExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExtensionV1Ext; + + static write(value: ClaimableBalanceEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExtensionV1Ext): boolean; + + static toXDR(value: ClaimableBalanceEntryExtensionV1Ext): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClaimableBalanceEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExt { + switch(): number; + + v1( + value?: ClaimableBalanceEntryExtensionV1 + ): ClaimableBalanceEntryExtensionV1; + + static 0(): ClaimableBalanceEntryExt; + + static 1(value: ClaimableBalanceEntryExtensionV1): ClaimableBalanceEntryExt; + + value(): ClaimableBalanceEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExt; + + static write(value: ClaimableBalanceEntryExt, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExt): boolean; + + static toXDR(value: ClaimableBalanceEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntryBody { + switch(): LiquidityPoolType; + + constantProduct( + value?: LiquidityPoolEntryConstantProduct + ): LiquidityPoolEntryConstantProduct; + + static liquidityPoolConstantProduct( + value: LiquidityPoolEntryConstantProduct + ): LiquidityPoolEntryBody; + + value(): LiquidityPoolEntryConstantProduct; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntryBody; + + static write(value: LiquidityPoolEntryBody, io: Buffer): void; + + static isValid(value: LiquidityPoolEntryBody): boolean; + + static toXDR(value: LiquidityPoolEntryBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolEntryBody; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolEntryBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExtensionV1Ext { + switch(): number; + + static 0(): LedgerEntryExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExtensionV1Ext; + + static write(value: LedgerEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: LedgerEntryExtensionV1Ext): boolean; + + static toXDR(value: LedgerEntryExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryData { + switch(): LedgerEntryType; + + account(value?: AccountEntry): AccountEntry; + + trustLine(value?: TrustLineEntry): TrustLineEntry; + + offer(value?: OfferEntry): OfferEntry; + + data(value?: DataEntry): DataEntry; + + claimableBalance(value?: ClaimableBalanceEntry): ClaimableBalanceEntry; + + liquidityPool(value?: LiquidityPoolEntry): LiquidityPoolEntry; + + static account(value: AccountEntry): LedgerEntryData; + + static trustline(value: TrustLineEntry): LedgerEntryData; + + static offer(value: OfferEntry): LedgerEntryData; + + static data(value: DataEntry): LedgerEntryData; + + static claimableBalance(value: ClaimableBalanceEntry): LedgerEntryData; + + static liquidityPool(value: LiquidityPoolEntry): LedgerEntryData; + + value(): + | AccountEntry + | TrustLineEntry + | OfferEntry + | DataEntry + | ClaimableBalanceEntry + | LiquidityPoolEntry; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryData; + + static write(value: LedgerEntryData, io: Buffer): void; + + static isValid(value: LedgerEntryData): boolean; + + static toXDR(value: LedgerEntryData): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryData; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryData; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExt { + switch(): number; + + v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; + + static 0(): LedgerEntryExt; + + static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; + + value(): LedgerEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExt; + + static write(value: LedgerEntryExt, io: Buffer): void; + + static isValid(value: LedgerEntryExt): boolean; + + static toXDR(value: LedgerEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKey { + switch(): LedgerEntryType; + + account(value?: LedgerKeyAccount): LedgerKeyAccount; + + trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; + + offer(value?: LedgerKeyOffer): LedgerKeyOffer; + + data(value?: LedgerKeyData): LedgerKeyData; + + claimableBalance( + value?: LedgerKeyClaimableBalance + ): LedgerKeyClaimableBalance; + + liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; + + static account(value: LedgerKeyAccount): LedgerKey; + + static trustline(value: LedgerKeyTrustLine): LedgerKey; + + static offer(value: LedgerKeyOffer): LedgerKey; + + static data(value: LedgerKeyData): LedgerKey; + + static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; + + static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; + + value(): + | LedgerKeyAccount + | LedgerKeyTrustLine + | LedgerKeyOffer + | LedgerKeyData + | LedgerKeyClaimableBalance + | LedgerKeyLiquidityPool; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKey; + + static write(value: LedgerKey, io: Buffer): void; + + static isValid(value: LedgerKey): boolean; + + static toXDR(value: LedgerKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKey; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarValueExt { + switch(): StellarValueType; + + lcValueSignature( + value?: LedgerCloseValueSignature + ): LedgerCloseValueSignature; + + static stellarValueBasic(): StellarValueExt; + + static stellarValueSigned( + value: LedgerCloseValueSignature + ): StellarValueExt; + + value(): LedgerCloseValueSignature | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarValueExt; + + static write(value: StellarValueExt, io: Buffer): void; + + static isValid(value: StellarValueExt): boolean; + + static toXDR(value: StellarValueExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarValueExt; + + static fromXDR(input: string, format: "hex" | "base64"): StellarValueExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExtensionV1Ext { + switch(): number; + + static 0(): LedgerHeaderExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExtensionV1Ext; + + static write(value: LedgerHeaderExtensionV1Ext, io: Buffer): void; + + static isValid(value: LedgerHeaderExtensionV1Ext): boolean; + + static toXDR(value: LedgerHeaderExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExt { + switch(): number; + + v1(value?: LedgerHeaderExtensionV1): LedgerHeaderExtensionV1; + + static 0(): LedgerHeaderExt; + + static 1(value: LedgerHeaderExtensionV1): LedgerHeaderExt; + + value(): LedgerHeaderExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExt; + + static write(value: LedgerHeaderExt, io: Buffer): void; + + static isValid(value: LedgerHeaderExt): boolean; + + static toXDR(value: LedgerHeaderExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExt; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerHeaderExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerUpgrade { + switch(): LedgerUpgradeType; + + newLedgerVersion(value?: number): number; + + newBaseFee(value?: number): number; + + newMaxTxSetSize(value?: number): number; + + newBaseReserve(value?: number): number; + + newFlags(value?: number): number; + + static ledgerUpgradeVersion(value: number): LedgerUpgrade; + + static ledgerUpgradeBaseFee(value: number): LedgerUpgrade; + + static ledgerUpgradeMaxTxSetSize(value: number): LedgerUpgrade; + + static ledgerUpgradeBaseReserve(value: number): LedgerUpgrade; + + static ledgerUpgradeFlags(value: number): LedgerUpgrade; + + value(): number | number | number | number | number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerUpgrade; + + static write(value: LedgerUpgrade, io: Buffer): void; + + static isValid(value: LedgerUpgrade): boolean; + + static toXDR(value: LedgerUpgrade): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerUpgrade; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerUpgrade; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketMetadataExt { + switch(): number; + + static 0(): BucketMetadataExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketMetadataExt; + + static write(value: BucketMetadataExt, io: Buffer): void; + + static isValid(value: BucketMetadataExt): boolean; + + static toXDR(value: BucketMetadataExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketMetadataExt; + + static fromXDR(input: string, format: "hex" | "base64"): BucketMetadataExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketEntry { + switch(): BucketEntryType; + + liveEntry(value?: LedgerEntry): LedgerEntry; + + deadEntry(value?: LedgerKey): LedgerKey; + + metaEntry(value?: BucketMetadata): BucketMetadata; + + static liveentry(value: LedgerEntry): BucketEntry; + + static initentry(value: LedgerEntry): BucketEntry; + + static deadentry(value: LedgerKey): BucketEntry; + + static metaentry(value: BucketMetadata): BucketEntry; + + value(): LedgerEntry | LedgerKey | BucketMetadata; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketEntry; + + static write(value: BucketEntry, io: Buffer): void; + + static isValid(value: BucketEntry): boolean; + + static toXDR(value: BucketEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketEntry; + + static fromXDR(input: string, format: "hex" | "base64"): BucketEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TxSetComponent { + switch(): TxSetComponentType; + + txsMaybeDiscountedFee( + value?: TxSetComponentTxsMaybeDiscountedFee + ): TxSetComponentTxsMaybeDiscountedFee; + + static txsetCompTxsMaybeDiscountedFee( + value: TxSetComponentTxsMaybeDiscountedFee + ): TxSetComponent; + + value(): TxSetComponentTxsMaybeDiscountedFee; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TxSetComponent; + + static write(value: TxSetComponent, io: Buffer): void; + + static isValid(value: TxSetComponent): boolean; + + static toXDR(value: TxSetComponent): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TxSetComponent; + + static fromXDR(input: string, format: "hex" | "base64"): TxSetComponent; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionPhase { + switch(): number; + + v0Components(value?: TxSetComponent[]): TxSetComponent[]; + + static 0(value: TxSetComponent[]): TransactionPhase; + + value(): TxSetComponent[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionPhase; + + static write(value: TransactionPhase, io: Buffer): void; + + static isValid(value: TransactionPhase): boolean; + + static toXDR(value: TransactionPhase): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionPhase; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionPhase; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class GeneralizedTransactionSet { + switch(): number; + + v1TxSet(value?: TransactionSetV1): TransactionSetV1; + + static 1(value: TransactionSetV1): GeneralizedTransactionSet; + + value(): TransactionSetV1; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): GeneralizedTransactionSet; + + static write(value: GeneralizedTransactionSet, io: Buffer): void; + + static isValid(value: GeneralizedTransactionSet): boolean; + + static toXDR(value: GeneralizedTransactionSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): GeneralizedTransactionSet; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): GeneralizedTransactionSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryEntryExt { + switch(): number; + + generalizedTxSet( + value?: GeneralizedTransactionSet + ): GeneralizedTransactionSet; + + static 0(): TransactionHistoryEntryExt; + + static 1(value: GeneralizedTransactionSet): TransactionHistoryEntryExt; + + value(): GeneralizedTransactionSet | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryEntryExt; + + static write(value: TransactionHistoryEntryExt, io: Buffer): void; + + static isValid(value: TransactionHistoryEntryExt): boolean; + + static toXDR(value: TransactionHistoryEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionHistoryEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntryExt { + switch(): number; + + static 0(): TransactionHistoryResultEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntryExt; + + static write(value: TransactionHistoryResultEntryExt, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntryExt): boolean; + + static toXDR(value: TransactionHistoryResultEntryExt): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderHistoryEntryExt { + switch(): number; + + static 0(): LedgerHeaderHistoryEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderHistoryEntryExt; + + static write(value: LedgerHeaderHistoryEntryExt, io: Buffer): void; + + static isValid(value: LedgerHeaderHistoryEntryExt): boolean; + + static toXDR(value: LedgerHeaderHistoryEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderHistoryEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderHistoryEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpHistoryEntry { + switch(): number; + + v0(value?: ScpHistoryEntryV0): ScpHistoryEntryV0; + + static 0(value: ScpHistoryEntryV0): ScpHistoryEntry; + + value(): ScpHistoryEntryV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpHistoryEntry; + + static write(value: ScpHistoryEntry, io: Buffer): void; + + static isValid(value: ScpHistoryEntry): boolean; + + static toXDR(value: ScpHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpHistoryEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ScpHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryChange { + switch(): LedgerEntryChangeType; + + created(value?: LedgerEntry): LedgerEntry; + + updated(value?: LedgerEntry): LedgerEntry; + + removed(value?: LedgerKey): LedgerKey; + + state(value?: LedgerEntry): LedgerEntry; + + static ledgerEntryCreated(value: LedgerEntry): LedgerEntryChange; + + static ledgerEntryUpdated(value: LedgerEntry): LedgerEntryChange; + + static ledgerEntryRemoved(value: LedgerKey): LedgerEntryChange; + + static ledgerEntryState(value: LedgerEntry): LedgerEntryChange; + + value(): LedgerEntry | LedgerEntry | LedgerKey | LedgerEntry; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryChange; + + static write(value: LedgerEntryChange, io: Buffer): void; + + static isValid(value: LedgerEntryChange): boolean; + + static toXDR(value: LedgerEntryChange): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryChange; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryChange; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMeta { + switch(): number; + + operations(value?: OperationMeta[]): OperationMeta[]; + + v1(value?: TransactionMetaV1): TransactionMetaV1; + + v2(value?: TransactionMetaV2): TransactionMetaV2; + + static 0(value: OperationMeta[]): TransactionMeta; + + static 1(value: TransactionMetaV1): TransactionMeta; + + static 2(value: TransactionMetaV2): TransactionMeta; + + value(): OperationMeta[] | TransactionMetaV1 | TransactionMetaV2; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMeta; + + static write(value: TransactionMeta, io: Buffer): void; + + static isValid(value: TransactionMeta): boolean; + + static toXDR(value: TransactionMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMeta; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMeta { + switch(): number; + + v0(value?: LedgerCloseMetaV0): LedgerCloseMetaV0; + + v1(value?: LedgerCloseMetaV1): LedgerCloseMetaV1; + + static 0(value: LedgerCloseMetaV0): LedgerCloseMeta; + + static 1(value: LedgerCloseMetaV1): LedgerCloseMeta; + + value(): LedgerCloseMetaV0 | LedgerCloseMetaV1; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMeta; + + static write(value: LedgerCloseMeta, io: Buffer): void; + + static isValid(value: LedgerCloseMeta): boolean; + + static toXDR(value: LedgerCloseMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMeta; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerAddressIp { + switch(): IpAddrType; + + ipv4(value?: Buffer): Buffer; + + ipv6(value?: Buffer): Buffer; + + static iPv4(value: Buffer): PeerAddressIp; + + static iPv6(value: Buffer): PeerAddressIp; + + value(): Buffer | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerAddressIp; + + static write(value: PeerAddressIp, io: Buffer): void; + + static isValid(value: PeerAddressIp): boolean; + + static toXDR(value: PeerAddressIp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerAddressIp; + + static fromXDR(input: string, format: "hex" | "base64"): PeerAddressIp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyResponseBody { + switch(): SurveyMessageCommandType; + + topologyResponseBody(value?: TopologyResponseBody): TopologyResponseBody; + + static surveyTopology(value: TopologyResponseBody): SurveyResponseBody; + + value(): TopologyResponseBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyResponseBody; + + static write(value: SurveyResponseBody, io: Buffer): void; + + static isValid(value: SurveyResponseBody): boolean; + + static toXDR(value: SurveyResponseBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyResponseBody; + + static fromXDR(input: string, format: "hex" | "base64"): SurveyResponseBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarMessage { + switch(): MessageType; + + error(value?: Error): Error; + + hello(value?: Hello): Hello; + + auth(value?: Auth): Auth; + + dontHave(value?: DontHave): DontHave; + + peers(value?: PeerAddress[]): PeerAddress[]; + + txSetHash(value?: Buffer): Buffer; + + txSet(value?: TransactionSet): TransactionSet; + + generalizedTxSet( + value?: GeneralizedTransactionSet + ): GeneralizedTransactionSet; + + transaction(value?: TransactionEnvelope): TransactionEnvelope; + + signedSurveyRequestMessage( + value?: SignedSurveyRequestMessage + ): SignedSurveyRequestMessage; + + signedSurveyResponseMessage( + value?: SignedSurveyResponseMessage + ): SignedSurveyResponseMessage; + + qSetHash(value?: Buffer): Buffer; + + qSet(value?: ScpQuorumSet): ScpQuorumSet; + + envelope(value?: ScpEnvelope): ScpEnvelope; + + getScpLedgerSeq(value?: number): number; + + sendMoreMessage(value?: SendMore): SendMore; + + floodAdvert(value?: FloodAdvert): FloodAdvert; + + floodDemand(value?: FloodDemand): FloodDemand; + + static errorMsg(value: Error): StellarMessage; + + static hello(value: Hello): StellarMessage; + + static auth(value: Auth): StellarMessage; + + static dontHave(value: DontHave): StellarMessage; + + static getPeers(): StellarMessage; + + static peers(value: PeerAddress[]): StellarMessage; + + static getTxSet(value: Buffer): StellarMessage; + + static txSet(value: TransactionSet): StellarMessage; + + static generalizedTxSet(value: GeneralizedTransactionSet): StellarMessage; + + static transaction(value: TransactionEnvelope): StellarMessage; + + static surveyRequest(value: SignedSurveyRequestMessage): StellarMessage; + + static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; + + static getScpQuorumset(value: Buffer): StellarMessage; + + static scpQuorumset(value: ScpQuorumSet): StellarMessage; + + static scpMessage(value: ScpEnvelope): StellarMessage; + + static getScpState(value: number): StellarMessage; + + static sendMore(value: SendMore): StellarMessage; + + static floodAdvert(value: FloodAdvert): StellarMessage; + + static floodDemand(value: FloodDemand): StellarMessage; + + value(): + | Error + | Hello + | Auth + | DontHave + | PeerAddress[] + | Buffer + | TransactionSet + | GeneralizedTransactionSet + | TransactionEnvelope + | SignedSurveyRequestMessage + | SignedSurveyResponseMessage + | Buffer + | ScpQuorumSet + | ScpEnvelope + | number + | SendMore + | FloodAdvert + | FloodDemand + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarMessage; + + static write(value: StellarMessage, io: Buffer): void; + + static isValid(value: StellarMessage): boolean; + + static toXDR(value: StellarMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarMessage; + + static fromXDR(input: string, format: "hex" | "base64"): StellarMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthenticatedMessage { + switch(): number; + + v0(value?: AuthenticatedMessageV0): AuthenticatedMessageV0; + + static 0(value: AuthenticatedMessageV0): AuthenticatedMessage; + + value(): AuthenticatedMessageV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthenticatedMessage; + + static write(value: AuthenticatedMessage, io: Buffer): void; + + static isValid(value: AuthenticatedMessage): boolean; + + static toXDR(value: AuthenticatedMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthenticatedMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AuthenticatedMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolParameters { + switch(): LiquidityPoolType; + + constantProduct( + value?: LiquidityPoolConstantProductParameters + ): LiquidityPoolConstantProductParameters; + + static liquidityPoolConstantProduct( + value: LiquidityPoolConstantProductParameters + ): LiquidityPoolParameters; + + value(): LiquidityPoolConstantProductParameters; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolParameters; + + static write(value: LiquidityPoolParameters, io: Buffer): void; + + static isValid(value: LiquidityPoolParameters): boolean; + + static toXDR(value: LiquidityPoolParameters): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolParameters; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolParameters; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class MuxedAccount { + switch(): CryptoKeyType; + + ed25519(value?: Buffer): Buffer; + + med25519(value?: MuxedAccountMed25519): MuxedAccountMed25519; + + static keyTypeEd25519(value: Buffer): MuxedAccount; + + static keyTypeMuxedEd25519(value: MuxedAccountMed25519): MuxedAccount; + + value(): Buffer | MuxedAccountMed25519; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): MuxedAccount; + + static write(value: MuxedAccount, io: Buffer): void; + + static isValid(value: MuxedAccount): boolean; + + static toXDR(value: MuxedAccount): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): MuxedAccount; + + static fromXDR(input: string, format: "hex" | "base64"): MuxedAccount; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustAsset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + liquidityPool(value?: LiquidityPoolParameters): LiquidityPoolParameters; + + static assetTypeNative(): ChangeTrustAsset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): ChangeTrustAsset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): ChangeTrustAsset; + + static assetTypePoolShare(value: LiquidityPoolParameters): ChangeTrustAsset; + + value(): AlphaNum4 | AlphaNum12 | LiquidityPoolParameters | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustAsset; + + static write(value: ChangeTrustAsset, io: Buffer): void; + + static isValid(value: ChangeTrustAsset): boolean; + + static toXDR(value: ChangeTrustAsset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustAsset; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustAsset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipOp { + switch(): RevokeSponsorshipType; + + ledgerKey(value?: LedgerKey): LedgerKey; + + signer(value?: RevokeSponsorshipOpSigner): RevokeSponsorshipOpSigner; + + static revokeSponsorshipLedgerEntry(value: LedgerKey): RevokeSponsorshipOp; + + static revokeSponsorshipSigner( + value: RevokeSponsorshipOpSigner + ): RevokeSponsorshipOp; + + value(): LedgerKey | RevokeSponsorshipOpSigner; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipOp; + + static write(value: RevokeSponsorshipOp, io: Buffer): void; + + static isValid(value: RevokeSponsorshipOp): boolean; + + static toXDR(value: RevokeSponsorshipOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationBody { + switch(): OperationType; + + createAccountOp(value?: CreateAccountOp): CreateAccountOp; + + paymentOp(value?: PaymentOp): PaymentOp; + + pathPaymentStrictReceiveOp( + value?: PathPaymentStrictReceiveOp + ): PathPaymentStrictReceiveOp; + + manageSellOfferOp(value?: ManageSellOfferOp): ManageSellOfferOp; + + createPassiveSellOfferOp( + value?: CreatePassiveSellOfferOp + ): CreatePassiveSellOfferOp; + + setOptionsOp(value?: SetOptionsOp): SetOptionsOp; + + changeTrustOp(value?: ChangeTrustOp): ChangeTrustOp; + + allowTrustOp(value?: AllowTrustOp): AllowTrustOp; + + destination(value?: MuxedAccount): MuxedAccount; + + manageDataOp(value?: ManageDataOp): ManageDataOp; + + bumpSequenceOp(value?: BumpSequenceOp): BumpSequenceOp; + + manageBuyOfferOp(value?: ManageBuyOfferOp): ManageBuyOfferOp; + + pathPaymentStrictSendOp( + value?: PathPaymentStrictSendOp + ): PathPaymentStrictSendOp; + + createClaimableBalanceOp( + value?: CreateClaimableBalanceOp + ): CreateClaimableBalanceOp; + + claimClaimableBalanceOp( + value?: ClaimClaimableBalanceOp + ): ClaimClaimableBalanceOp; + + beginSponsoringFutureReservesOp( + value?: BeginSponsoringFutureReservesOp + ): BeginSponsoringFutureReservesOp; + + revokeSponsorshipOp(value?: RevokeSponsorshipOp): RevokeSponsorshipOp; + + clawbackOp(value?: ClawbackOp): ClawbackOp; + + clawbackClaimableBalanceOp( + value?: ClawbackClaimableBalanceOp + ): ClawbackClaimableBalanceOp; + + setTrustLineFlagsOp(value?: SetTrustLineFlagsOp): SetTrustLineFlagsOp; + + liquidityPoolDepositOp( + value?: LiquidityPoolDepositOp + ): LiquidityPoolDepositOp; + + liquidityPoolWithdrawOp( + value?: LiquidityPoolWithdrawOp + ): LiquidityPoolWithdrawOp; + + static createAccount(value: CreateAccountOp): OperationBody; + + static payment(value: PaymentOp): OperationBody; + + static pathPaymentStrictReceive( + value: PathPaymentStrictReceiveOp + ): OperationBody; + + static manageSellOffer(value: ManageSellOfferOp): OperationBody; + + static createPassiveSellOffer( + value: CreatePassiveSellOfferOp + ): OperationBody; + + static setOptions(value: SetOptionsOp): OperationBody; + + static changeTrust(value: ChangeTrustOp): OperationBody; + + static allowTrust(value: AllowTrustOp): OperationBody; + + static accountMerge(value: MuxedAccount): OperationBody; + + static inflation(): OperationBody; + + static manageData(value: ManageDataOp): OperationBody; + + static bumpSequence(value: BumpSequenceOp): OperationBody; + + static manageBuyOffer(value: ManageBuyOfferOp): OperationBody; + + static pathPaymentStrictSend(value: PathPaymentStrictSendOp): OperationBody; + + static createClaimableBalance( + value: CreateClaimableBalanceOp + ): OperationBody; + + static claimClaimableBalance(value: ClaimClaimableBalanceOp): OperationBody; + + static beginSponsoringFutureReserves( + value: BeginSponsoringFutureReservesOp + ): OperationBody; + + static endSponsoringFutureReserves(): OperationBody; + + static revokeSponsorship(value: RevokeSponsorshipOp): OperationBody; + + static clawback(value: ClawbackOp): OperationBody; + + static clawbackClaimableBalance( + value: ClawbackClaimableBalanceOp + ): OperationBody; + + static setTrustLineFlags(value: SetTrustLineFlagsOp): OperationBody; + + static liquidityPoolDeposit(value: LiquidityPoolDepositOp): OperationBody; + + static liquidityPoolWithdraw(value: LiquidityPoolWithdrawOp): OperationBody; + + value(): + | CreateAccountOp + | PaymentOp + | PathPaymentStrictReceiveOp + | ManageSellOfferOp + | CreatePassiveSellOfferOp + | SetOptionsOp + | ChangeTrustOp + | AllowTrustOp + | MuxedAccount + | ManageDataOp + | BumpSequenceOp + | ManageBuyOfferOp + | PathPaymentStrictSendOp + | CreateClaimableBalanceOp + | ClaimClaimableBalanceOp + | BeginSponsoringFutureReservesOp + | RevokeSponsorshipOp + | ClawbackOp + | ClawbackClaimableBalanceOp + | SetTrustLineFlagsOp + | LiquidityPoolDepositOp + | LiquidityPoolWithdrawOp + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationBody; + + static write(value: OperationBody, io: Buffer): void; + + static isValid(value: OperationBody): boolean; + + static toXDR(value: OperationBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationBody; + + static fromXDR(input: string, format: "hex" | "base64"): OperationBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimage { + switch(): EnvelopeType; + + operationId(value?: HashIdPreimageOperationId): HashIdPreimageOperationId; + + revokeId(value?: HashIdPreimageRevokeId): HashIdPreimageRevokeId; + + static envelopeTypeOpId(value: HashIdPreimageOperationId): HashIdPreimage; + + static envelopeTypePoolRevokeOpId( + value: HashIdPreimageRevokeId + ): HashIdPreimage; + + value(): HashIdPreimageOperationId | HashIdPreimageRevokeId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimage; + + static write(value: HashIdPreimage, io: Buffer): void; + + static isValid(value: HashIdPreimage): boolean; + + static toXDR(value: HashIdPreimage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimage; + + static fromXDR(input: string, format: "hex" | "base64"): HashIdPreimage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Memo { + switch(): MemoType; + + text(value?: string | Buffer): string | Buffer; + + id(value?: Uint64): Uint64; + + hash(value?: Buffer): Buffer; + + retHash(value?: Buffer): Buffer; + + static memoNone(): Memo; + + static memoText(value: string | Buffer): Memo; + + static memoId(value: Uint64): Memo; + + static memoHash(value: Buffer): Memo; + + static memoReturn(value: Buffer): Memo; + + value(): string | Buffer | Uint64 | Buffer | Buffer | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Memo; + + static write(value: Memo, io: Buffer): void; + + static isValid(value: Memo): boolean; + + static toXDR(value: Memo): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Memo; + + static fromXDR(input: string, format: "hex" | "base64"): Memo; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Preconditions { + switch(): PreconditionType; + + timeBounds(value?: TimeBounds): TimeBounds; + + v2(value?: PreconditionsV2): PreconditionsV2; + + static precondNone(): Preconditions; + + static precondTime(value: TimeBounds): Preconditions; + + static precondV2(value: PreconditionsV2): Preconditions; + + value(): TimeBounds | PreconditionsV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Preconditions; + + static write(value: Preconditions, io: Buffer): void; + + static isValid(value: Preconditions): boolean; + + static toXDR(value: Preconditions): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Preconditions; + + static fromXDR(input: string, format: "hex" | "base64"): Preconditions; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0Ext { + switch(): number; + + static 0(): TransactionV0Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0Ext; + + static write(value: TransactionV0Ext, io: Buffer): void; + + static isValid(value: TransactionV0Ext): boolean; + + static toXDR(value: TransactionV0Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0Ext; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionV0Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionExt { + switch(): number; + + static 0(): TransactionExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionExt; + + static write(value: TransactionExt, io: Buffer): void; + + static isValid(value: TransactionExt): boolean; + + static toXDR(value: TransactionExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionExt; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionInnerTx { + switch(): EnvelopeType; + + v1(value?: TransactionV1Envelope): TransactionV1Envelope; + + static envelopeTypeTx( + value: TransactionV1Envelope + ): FeeBumpTransactionInnerTx; + + value(): TransactionV1Envelope; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionInnerTx; + + static write(value: FeeBumpTransactionInnerTx, io: Buffer): void; + + static isValid(value: FeeBumpTransactionInnerTx): boolean; + + static toXDR(value: FeeBumpTransactionInnerTx): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionInnerTx; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionInnerTx; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionExt { + switch(): number; + + static 0(): FeeBumpTransactionExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionExt; + + static write(value: FeeBumpTransactionExt, io: Buffer): void; + + static isValid(value: FeeBumpTransactionExt): boolean; + + static toXDR(value: FeeBumpTransactionExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionEnvelope { + switch(): EnvelopeType; + + v0(value?: TransactionV0Envelope): TransactionV0Envelope; + + v1(value?: TransactionV1Envelope): TransactionV1Envelope; + + feeBump(value?: FeeBumpTransactionEnvelope): FeeBumpTransactionEnvelope; + + static envelopeTypeTxV0(value: TransactionV0Envelope): TransactionEnvelope; + + static envelopeTypeTx(value: TransactionV1Envelope): TransactionEnvelope; + + static envelopeTypeTxFeeBump( + value: FeeBumpTransactionEnvelope + ): TransactionEnvelope; + + value(): + | TransactionV0Envelope + | TransactionV1Envelope + | FeeBumpTransactionEnvelope; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionEnvelope; + + static write(value: TransactionEnvelope, io: Buffer): void; + + static isValid(value: TransactionEnvelope): boolean; + + static toXDR(value: TransactionEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionEnvelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSignaturePayloadTaggedTransaction { + switch(): EnvelopeType; + + tx(value?: Transaction): Transaction; + + feeBump(value?: FeeBumpTransaction): FeeBumpTransaction; + + static envelopeTypeTx( + value: Transaction + ): TransactionSignaturePayloadTaggedTransaction; + + static envelopeTypeTxFeeBump( + value: FeeBumpTransaction + ): TransactionSignaturePayloadTaggedTransaction; + + value(): Transaction | FeeBumpTransaction; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSignaturePayloadTaggedTransaction; + + static write( + value: TransactionSignaturePayloadTaggedTransaction, + io: Buffer + ): void; + + static isValid( + value: TransactionSignaturePayloadTaggedTransaction + ): boolean; + + static toXDR(value: TransactionSignaturePayloadTaggedTransaction): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionSignaturePayloadTaggedTransaction; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionSignaturePayloadTaggedTransaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimAtom { + switch(): ClaimAtomType; + + v0(value?: ClaimOfferAtomV0): ClaimOfferAtomV0; + + orderBook(value?: ClaimOfferAtom): ClaimOfferAtom; + + liquidityPool(value?: ClaimLiquidityAtom): ClaimLiquidityAtom; + + static claimAtomTypeV0(value: ClaimOfferAtomV0): ClaimAtom; + + static claimAtomTypeOrderBook(value: ClaimOfferAtom): ClaimAtom; + + static claimAtomTypeLiquidityPool(value: ClaimLiquidityAtom): ClaimAtom; + + value(): ClaimOfferAtomV0 | ClaimOfferAtom | ClaimLiquidityAtom; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimAtom; + + static write(value: ClaimAtom, io: Buffer): void; + + static isValid(value: ClaimAtom): boolean; + + static toXDR(value: ClaimAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateAccountResult { + switch(): CreateAccountResultCode; + + static createAccountSuccess(): CreateAccountResult; + + static createAccountMalformed(): CreateAccountResult; + + static createAccountUnderfunded(): CreateAccountResult; + + static createAccountLowReserve(): CreateAccountResult; + + static createAccountAlreadyExist(): CreateAccountResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateAccountResult; + + static write(value: CreateAccountResult, io: Buffer): void; + + static isValid(value: CreateAccountResult): boolean; + + static toXDR(value: CreateAccountResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateAccountResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateAccountResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PaymentResult { + switch(): PaymentResultCode; + + static paymentSuccess(): PaymentResult; + + static paymentMalformed(): PaymentResult; + + static paymentUnderfunded(): PaymentResult; + + static paymentSrcNoTrust(): PaymentResult; + + static paymentSrcNotAuthorized(): PaymentResult; + + static paymentNoDestination(): PaymentResult; + + static paymentNoTrust(): PaymentResult; + + static paymentNotAuthorized(): PaymentResult; + + static paymentLineFull(): PaymentResult; + + static paymentNoIssuer(): PaymentResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PaymentResult; + + static write(value: PaymentResult, io: Buffer): void; + + static isValid(value: PaymentResult): boolean; + + static toXDR(value: PaymentResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PaymentResult; + + static fromXDR(input: string, format: "hex" | "base64"): PaymentResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveResult { + switch(): PathPaymentStrictReceiveResultCode; + + success( + value?: PathPaymentStrictReceiveResultSuccess + ): PathPaymentStrictReceiveResultSuccess; + + noIssuer(value?: Asset): Asset; + + static pathPaymentStrictReceiveSuccess( + value: PathPaymentStrictReceiveResultSuccess + ): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoIssuer( + value: Asset + ): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResult; + + value(): PathPaymentStrictReceiveResultSuccess | Asset | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveResult; + + static write(value: PathPaymentStrictReceiveResult, io: Buffer): void; + + static isValid(value: PathPaymentStrictReceiveResult): boolean; + + static toXDR(value: PathPaymentStrictReceiveResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictReceiveResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendResult { + switch(): PathPaymentStrictSendResultCode; + + success( + value?: PathPaymentStrictSendResultSuccess + ): PathPaymentStrictSendResultSuccess; + + noIssuer(value?: Asset): Asset; + + static pathPaymentStrictSendSuccess( + value: PathPaymentStrictSendResultSuccess + ): PathPaymentStrictSendResult; + + static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoIssuer( + value: Asset + ): PathPaymentStrictSendResult; + + static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResult; + + value(): PathPaymentStrictSendResultSuccess | Asset | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendResult; + + static write(value: PathPaymentStrictSendResult, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendResult): boolean; + + static toXDR(value: PathPaymentStrictSendResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictSendResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageOfferSuccessResultOffer { + switch(): ManageOfferEffect; + + offer(value?: OfferEntry): OfferEntry; + + static manageOfferCreated(value: OfferEntry): ManageOfferSuccessResultOffer; + + static manageOfferUpdated(value: OfferEntry): ManageOfferSuccessResultOffer; + + static manageOfferDeleted(): ManageOfferSuccessResultOffer; + + value(): OfferEntry | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageOfferSuccessResultOffer; + + static write(value: ManageOfferSuccessResultOffer, io: Buffer): void; + + static isValid(value: ManageOfferSuccessResultOffer): boolean; + + static toXDR(value: ManageOfferSuccessResultOffer): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ManageOfferSuccessResultOffer; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageOfferSuccessResultOffer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageSellOfferResult { + switch(): ManageSellOfferResultCode; + + success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; + + static manageSellOfferSuccess( + value: ManageOfferSuccessResult + ): ManageSellOfferResult; + + static manageSellOfferMalformed(): ManageSellOfferResult; + + static manageSellOfferSellNoTrust(): ManageSellOfferResult; + + static manageSellOfferBuyNoTrust(): ManageSellOfferResult; + + static manageSellOfferSellNotAuthorized(): ManageSellOfferResult; + + static manageSellOfferBuyNotAuthorized(): ManageSellOfferResult; + + static manageSellOfferLineFull(): ManageSellOfferResult; + + static manageSellOfferUnderfunded(): ManageSellOfferResult; + + static manageSellOfferCrossSelf(): ManageSellOfferResult; + + static manageSellOfferSellNoIssuer(): ManageSellOfferResult; + + static manageSellOfferBuyNoIssuer(): ManageSellOfferResult; + + static manageSellOfferNotFound(): ManageSellOfferResult; + + static manageSellOfferLowReserve(): ManageSellOfferResult; + + value(): ManageOfferSuccessResult | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageSellOfferResult; + + static write(value: ManageSellOfferResult, io: Buffer): void; + + static isValid(value: ManageSellOfferResult): boolean; + + static toXDR(value: ManageSellOfferResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageSellOfferResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageSellOfferResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageBuyOfferResult { + switch(): ManageBuyOfferResultCode; + + success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; + + static manageBuyOfferSuccess( + value: ManageOfferSuccessResult + ): ManageBuyOfferResult; + + static manageBuyOfferMalformed(): ManageBuyOfferResult; + + static manageBuyOfferSellNoTrust(): ManageBuyOfferResult; + + static manageBuyOfferBuyNoTrust(): ManageBuyOfferResult; + + static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResult; + + static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResult; + + static manageBuyOfferLineFull(): ManageBuyOfferResult; + + static manageBuyOfferUnderfunded(): ManageBuyOfferResult; + + static manageBuyOfferCrossSelf(): ManageBuyOfferResult; + + static manageBuyOfferSellNoIssuer(): ManageBuyOfferResult; + + static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResult; + + static manageBuyOfferNotFound(): ManageBuyOfferResult; + + static manageBuyOfferLowReserve(): ManageBuyOfferResult; + + value(): ManageOfferSuccessResult | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageBuyOfferResult; + + static write(value: ManageBuyOfferResult, io: Buffer): void; + + static isValid(value: ManageBuyOfferResult): boolean; + + static toXDR(value: ManageBuyOfferResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageBuyOfferResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageBuyOfferResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetOptionsResult { + switch(): SetOptionsResultCode; + + static setOptionsSuccess(): SetOptionsResult; + + static setOptionsLowReserve(): SetOptionsResult; + + static setOptionsTooManySigners(): SetOptionsResult; + + static setOptionsBadFlags(): SetOptionsResult; + + static setOptionsInvalidInflation(): SetOptionsResult; + + static setOptionsCantChange(): SetOptionsResult; + + static setOptionsUnknownFlag(): SetOptionsResult; + + static setOptionsThresholdOutOfRange(): SetOptionsResult; + + static setOptionsBadSigner(): SetOptionsResult; + + static setOptionsInvalidHomeDomain(): SetOptionsResult; + + static setOptionsAuthRevocableRequired(): SetOptionsResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetOptionsResult; + + static write(value: SetOptionsResult, io: Buffer): void; + + static isValid(value: SetOptionsResult): boolean; + + static toXDR(value: SetOptionsResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetOptionsResult; + + static fromXDR(input: string, format: "hex" | "base64"): SetOptionsResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustResult { + switch(): ChangeTrustResultCode; + + static changeTrustSuccess(): ChangeTrustResult; + + static changeTrustMalformed(): ChangeTrustResult; + + static changeTrustNoIssuer(): ChangeTrustResult; + + static changeTrustInvalidLimit(): ChangeTrustResult; + + static changeTrustLowReserve(): ChangeTrustResult; + + static changeTrustSelfNotAllowed(): ChangeTrustResult; + + static changeTrustTrustLineMissing(): ChangeTrustResult; + + static changeTrustCannotDelete(): ChangeTrustResult; + + static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustResult; + + static write(value: ChangeTrustResult, io: Buffer): void; + + static isValid(value: ChangeTrustResult): boolean; + + static toXDR(value: ChangeTrustResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustResult; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AllowTrustResult { + switch(): AllowTrustResultCode; + + static allowTrustSuccess(): AllowTrustResult; + + static allowTrustMalformed(): AllowTrustResult; + + static allowTrustNoTrustLine(): AllowTrustResult; + + static allowTrustTrustNotRequired(): AllowTrustResult; + + static allowTrustCantRevoke(): AllowTrustResult; + + static allowTrustSelfNotAllowed(): AllowTrustResult; + + static allowTrustLowReserve(): AllowTrustResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AllowTrustResult; + + static write(value: AllowTrustResult, io: Buffer): void; + + static isValid(value: AllowTrustResult): boolean; + + static toXDR(value: AllowTrustResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AllowTrustResult; + + static fromXDR(input: string, format: "hex" | "base64"): AllowTrustResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountMergeResult { + switch(): AccountMergeResultCode; + + sourceAccountBalance(value?: Int64): Int64; + + static accountMergeSuccess(value: Int64): AccountMergeResult; + + static accountMergeMalformed(): AccountMergeResult; + + static accountMergeNoAccount(): AccountMergeResult; + + static accountMergeImmutableSet(): AccountMergeResult; + + static accountMergeHasSubEntries(): AccountMergeResult; + + static accountMergeSeqnumTooFar(): AccountMergeResult; + + static accountMergeDestFull(): AccountMergeResult; + + static accountMergeIsSponsor(): AccountMergeResult; + + value(): Int64 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountMergeResult; + + static write(value: AccountMergeResult, io: Buffer): void; + + static isValid(value: AccountMergeResult): boolean; + + static toXDR(value: AccountMergeResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountMergeResult; + + static fromXDR(input: string, format: "hex" | "base64"): AccountMergeResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InflationResult { + switch(): InflationResultCode; + + payouts(value?: InflationPayout[]): InflationPayout[]; + + static inflationSuccess(value: InflationPayout[]): InflationResult; + + static inflationNotTime(): InflationResult; + + value(): InflationPayout[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InflationResult; + + static write(value: InflationResult, io: Buffer): void; + + static isValid(value: InflationResult): boolean; + + static toXDR(value: InflationResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InflationResult; + + static fromXDR(input: string, format: "hex" | "base64"): InflationResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageDataResult { + switch(): ManageDataResultCode; + + static manageDataSuccess(): ManageDataResult; + + static manageDataNotSupportedYet(): ManageDataResult; + + static manageDataNameNotFound(): ManageDataResult; + + static manageDataLowReserve(): ManageDataResult; + + static manageDataInvalidName(): ManageDataResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageDataResult; + + static write(value: ManageDataResult, io: Buffer): void; + + static isValid(value: ManageDataResult): boolean; + + static toXDR(value: ManageDataResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageDataResult; + + static fromXDR(input: string, format: "hex" | "base64"): ManageDataResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BumpSequenceResult { + switch(): BumpSequenceResultCode; + + static bumpSequenceSuccess(): BumpSequenceResult; + + static bumpSequenceBadSeq(): BumpSequenceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BumpSequenceResult; + + static write(value: BumpSequenceResult, io: Buffer): void; + + static isValid(value: BumpSequenceResult): boolean; + + static toXDR(value: BumpSequenceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BumpSequenceResult; + + static fromXDR(input: string, format: "hex" | "base64"): BumpSequenceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateClaimableBalanceResult { + switch(): CreateClaimableBalanceResultCode; + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + static createClaimableBalanceSuccess( + value: ClaimableBalanceId + ): CreateClaimableBalanceResult; + + static createClaimableBalanceMalformed(): CreateClaimableBalanceResult; + + static createClaimableBalanceLowReserve(): CreateClaimableBalanceResult; + + static createClaimableBalanceNoTrust(): CreateClaimableBalanceResult; + + static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResult; + + static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResult; + + value(): ClaimableBalanceId | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateClaimableBalanceResult; + + static write(value: CreateClaimableBalanceResult, io: Buffer): void; + + static isValid(value: CreateClaimableBalanceResult): boolean; + + static toXDR(value: CreateClaimableBalanceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimClaimableBalanceResult { + switch(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimClaimableBalanceResult; + + static write(value: ClaimClaimableBalanceResult, io: Buffer): void; + + static isValid(value: ClaimClaimableBalanceResult): boolean; + + static toXDR(value: ClaimClaimableBalanceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BeginSponsoringFutureReservesResult { + switch(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BeginSponsoringFutureReservesResult; + + static write(value: BeginSponsoringFutureReservesResult, io: Buffer): void; + + static isValid(value: BeginSponsoringFutureReservesResult): boolean; + + static toXDR(value: BeginSponsoringFutureReservesResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): BeginSponsoringFutureReservesResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): BeginSponsoringFutureReservesResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class EndSponsoringFutureReservesResult { + switch(): EndSponsoringFutureReservesResultCode; + + static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResult; + + static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): EndSponsoringFutureReservesResult; + + static write(value: EndSponsoringFutureReservesResult, io: Buffer): void; + + static isValid(value: EndSponsoringFutureReservesResult): boolean; + + static toXDR(value: EndSponsoringFutureReservesResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): EndSponsoringFutureReservesResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): EndSponsoringFutureReservesResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipResult { + switch(): RevokeSponsorshipResultCode; + + static revokeSponsorshipSuccess(): RevokeSponsorshipResult; + + static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResult; + + static revokeSponsorshipNotSponsor(): RevokeSponsorshipResult; + + static revokeSponsorshipLowReserve(): RevokeSponsorshipResult; + + static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResult; + + static revokeSponsorshipMalformed(): RevokeSponsorshipResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipResult; + + static write(value: RevokeSponsorshipResult, io: Buffer): void; + + static isValid(value: RevokeSponsorshipResult): boolean; + + static toXDR(value: RevokeSponsorshipResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackResult { + switch(): ClawbackResultCode; + + static clawbackSuccess(): ClawbackResult; + + static clawbackMalformed(): ClawbackResult; + + static clawbackNotClawbackEnabled(): ClawbackResult; + + static clawbackNoTrust(): ClawbackResult; + + static clawbackUnderfunded(): ClawbackResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackResult; + + static write(value: ClawbackResult, io: Buffer): void; + + static isValid(value: ClawbackResult): boolean; + + static toXDR(value: ClawbackResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackResult; + + static fromXDR(input: string, format: "hex" | "base64"): ClawbackResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackClaimableBalanceResult { + switch(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackClaimableBalanceResult; + + static write(value: ClawbackClaimableBalanceResult, io: Buffer): void; + + static isValid(value: ClawbackClaimableBalanceResult): boolean; + + static toXDR(value: ClawbackClaimableBalanceResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClawbackClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClawbackClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetTrustLineFlagsResult { + switch(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsSuccess(): SetTrustLineFlagsResult; + + static setTrustLineFlagsMalformed(): SetTrustLineFlagsResult; + + static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResult; + + static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResult; + + static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResult; + + static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetTrustLineFlagsResult; + + static write(value: SetTrustLineFlagsResult, io: Buffer): void; + + static isValid(value: SetTrustLineFlagsResult): boolean; + + static toXDR(value: SetTrustLineFlagsResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetTrustLineFlagsResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SetTrustLineFlagsResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolDepositResult { + switch(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositSuccess(): LiquidityPoolDepositResult; + + static liquidityPoolDepositMalformed(): LiquidityPoolDepositResult; + + static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResult; + + static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResult; + + static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResult; + + static liquidityPoolDepositLineFull(): LiquidityPoolDepositResult; + + static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResult; + + static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolDepositResult; + + static write(value: LiquidityPoolDepositResult, io: Buffer): void; + + static isValid(value: LiquidityPoolDepositResult): boolean; + + static toXDR(value: LiquidityPoolDepositResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolDepositResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolDepositResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolWithdrawResult { + switch(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolWithdrawResult; + + static write(value: LiquidityPoolWithdrawResult, io: Buffer): void; + + static isValid(value: LiquidityPoolWithdrawResult): boolean; + + static toXDR(value: LiquidityPoolWithdrawResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolWithdrawResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolWithdrawResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationResultTr { + switch(): OperationType; + + createAccountResult(value?: CreateAccountResult): CreateAccountResult; + + paymentResult(value?: PaymentResult): PaymentResult; + + pathPaymentStrictReceiveResult( + value?: PathPaymentStrictReceiveResult + ): PathPaymentStrictReceiveResult; + + manageSellOfferResult(value?: ManageSellOfferResult): ManageSellOfferResult; + + createPassiveSellOfferResult( + value?: ManageSellOfferResult + ): ManageSellOfferResult; + + setOptionsResult(value?: SetOptionsResult): SetOptionsResult; + + changeTrustResult(value?: ChangeTrustResult): ChangeTrustResult; + + allowTrustResult(value?: AllowTrustResult): AllowTrustResult; + + accountMergeResult(value?: AccountMergeResult): AccountMergeResult; + + inflationResult(value?: InflationResult): InflationResult; + + manageDataResult(value?: ManageDataResult): ManageDataResult; + + bumpSeqResult(value?: BumpSequenceResult): BumpSequenceResult; + + manageBuyOfferResult(value?: ManageBuyOfferResult): ManageBuyOfferResult; + + pathPaymentStrictSendResult( + value?: PathPaymentStrictSendResult + ): PathPaymentStrictSendResult; + + createClaimableBalanceResult( + value?: CreateClaimableBalanceResult + ): CreateClaimableBalanceResult; + + claimClaimableBalanceResult( + value?: ClaimClaimableBalanceResult + ): ClaimClaimableBalanceResult; + + beginSponsoringFutureReservesResult( + value?: BeginSponsoringFutureReservesResult + ): BeginSponsoringFutureReservesResult; + + endSponsoringFutureReservesResult( + value?: EndSponsoringFutureReservesResult + ): EndSponsoringFutureReservesResult; + + revokeSponsorshipResult( + value?: RevokeSponsorshipResult + ): RevokeSponsorshipResult; + + clawbackResult(value?: ClawbackResult): ClawbackResult; + + clawbackClaimableBalanceResult( + value?: ClawbackClaimableBalanceResult + ): ClawbackClaimableBalanceResult; + + setTrustLineFlagsResult( + value?: SetTrustLineFlagsResult + ): SetTrustLineFlagsResult; + + liquidityPoolDepositResult( + value?: LiquidityPoolDepositResult + ): LiquidityPoolDepositResult; + + liquidityPoolWithdrawResult( + value?: LiquidityPoolWithdrawResult + ): LiquidityPoolWithdrawResult; + + static createAccount(value: CreateAccountResult): OperationResultTr; + + static payment(value: PaymentResult): OperationResultTr; + + static pathPaymentStrictReceive( + value: PathPaymentStrictReceiveResult + ): OperationResultTr; + + static manageSellOffer(value: ManageSellOfferResult): OperationResultTr; + + static createPassiveSellOffer( + value: ManageSellOfferResult + ): OperationResultTr; + + static setOptions(value: SetOptionsResult): OperationResultTr; + + static changeTrust(value: ChangeTrustResult): OperationResultTr; + + static allowTrust(value: AllowTrustResult): OperationResultTr; + + static accountMerge(value: AccountMergeResult): OperationResultTr; + + static inflation(value: InflationResult): OperationResultTr; + + static manageData(value: ManageDataResult): OperationResultTr; + + static bumpSequence(value: BumpSequenceResult): OperationResultTr; + + static manageBuyOffer(value: ManageBuyOfferResult): OperationResultTr; + + static pathPaymentStrictSend( + value: PathPaymentStrictSendResult + ): OperationResultTr; + + static createClaimableBalance( + value: CreateClaimableBalanceResult + ): OperationResultTr; + + static claimClaimableBalance( + value: ClaimClaimableBalanceResult + ): OperationResultTr; + + static beginSponsoringFutureReserves( + value: BeginSponsoringFutureReservesResult + ): OperationResultTr; + + static endSponsoringFutureReserves( + value: EndSponsoringFutureReservesResult + ): OperationResultTr; + + static revokeSponsorship(value: RevokeSponsorshipResult): OperationResultTr; + + static clawback(value: ClawbackResult): OperationResultTr; + + static clawbackClaimableBalance( + value: ClawbackClaimableBalanceResult + ): OperationResultTr; + + static setTrustLineFlags(value: SetTrustLineFlagsResult): OperationResultTr; + + static liquidityPoolDeposit( + value: LiquidityPoolDepositResult + ): OperationResultTr; + + static liquidityPoolWithdraw( + value: LiquidityPoolWithdrawResult + ): OperationResultTr; + + value(): + | CreateAccountResult + | PaymentResult + | PathPaymentStrictReceiveResult + | ManageSellOfferResult + | ManageSellOfferResult + | SetOptionsResult + | ChangeTrustResult + | AllowTrustResult + | AccountMergeResult + | InflationResult + | ManageDataResult + | BumpSequenceResult + | ManageBuyOfferResult + | PathPaymentStrictSendResult + | CreateClaimableBalanceResult + | ClaimClaimableBalanceResult + | BeginSponsoringFutureReservesResult + | EndSponsoringFutureReservesResult + | RevokeSponsorshipResult + | ClawbackResult + | ClawbackClaimableBalanceResult + | SetTrustLineFlagsResult + | LiquidityPoolDepositResult + | LiquidityPoolWithdrawResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationResultTr; + + static write(value: OperationResultTr, io: Buffer): void; + + static isValid(value: OperationResultTr): boolean; + + static toXDR(value: OperationResultTr): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationResultTr; + + static fromXDR(input: string, format: "hex" | "base64"): OperationResultTr; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationResult { + switch(): OperationResultCode; + + tr(value?: OperationResultTr): OperationResultTr; + + static opInner(value: OperationResultTr): OperationResult; + + static opBadAuth(): OperationResult; + + static opNoAccount(): OperationResult; + + static opNotSupported(): OperationResult; + + static opTooManySubentries(): OperationResult; + + static opExceededWorkLimit(): OperationResult; + + static opTooManySponsoring(): OperationResult; + + value(): OperationResultTr | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationResult; + + static write(value: OperationResult, io: Buffer): void; + + static isValid(value: OperationResult): boolean; + + static toXDR(value: OperationResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationResult; + + static fromXDR(input: string, format: "hex" | "base64"): OperationResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultResult { + switch(): TransactionResultCode; + + results(value?: OperationResult[]): OperationResult[]; + + static txSuccess(value: OperationResult[]): InnerTransactionResultResult; + + static txFailed(value: OperationResult[]): InnerTransactionResultResult; + + static txTooEarly(): InnerTransactionResultResult; + + static txTooLate(): InnerTransactionResultResult; + + static txMissingOperation(): InnerTransactionResultResult; + + static txBadSeq(): InnerTransactionResultResult; + + static txBadAuth(): InnerTransactionResultResult; + + static txInsufficientBalance(): InnerTransactionResultResult; + + static txNoAccount(): InnerTransactionResultResult; + + static txInsufficientFee(): InnerTransactionResultResult; + + static txBadAuthExtra(): InnerTransactionResultResult; + + static txInternalError(): InnerTransactionResultResult; + + static txNotSupported(): InnerTransactionResultResult; + + static txBadSponsorship(): InnerTransactionResultResult; + + static txBadMinSeqAgeOrGap(): InnerTransactionResultResult; + + static txMalformed(): InnerTransactionResultResult; + + value(): OperationResult[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultResult; + + static write(value: InnerTransactionResultResult, io: Buffer): void; + + static isValid(value: InnerTransactionResultResult): boolean; + + static toXDR(value: InnerTransactionResultResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultExt { + switch(): number; + + static 0(): InnerTransactionResultExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultExt; + + static write(value: InnerTransactionResultExt, io: Buffer): void; + + static isValid(value: InnerTransactionResultExt): boolean; + + static toXDR(value: InnerTransactionResultExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultResult { + switch(): TransactionResultCode; + + innerResultPair( + value?: InnerTransactionResultPair + ): InnerTransactionResultPair; + + results(value?: OperationResult[]): OperationResult[]; + + static txFeeBumpInnerSuccess( + value: InnerTransactionResultPair + ): TransactionResultResult; + + static txFeeBumpInnerFailed( + value: InnerTransactionResultPair + ): TransactionResultResult; + + static txSuccess(value: OperationResult[]): TransactionResultResult; + + static txFailed(value: OperationResult[]): TransactionResultResult; + + static txTooEarly(): TransactionResultResult; + + static txTooLate(): TransactionResultResult; + + static txMissingOperation(): TransactionResultResult; + + static txBadSeq(): TransactionResultResult; + + static txBadAuth(): TransactionResultResult; + + static txInsufficientBalance(): TransactionResultResult; + + static txNoAccount(): TransactionResultResult; + + static txInsufficientFee(): TransactionResultResult; + + static txBadAuthExtra(): TransactionResultResult; + + static txInternalError(): TransactionResultResult; + + static txNotSupported(): TransactionResultResult; + + static txBadSponsorship(): TransactionResultResult; + + static txBadMinSeqAgeOrGap(): TransactionResultResult; + + static txMalformed(): TransactionResultResult; + + value(): InnerTransactionResultPair | OperationResult[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultResult; + + static write(value: TransactionResultResult, io: Buffer): void; + + static isValid(value: TransactionResultResult): boolean; + + static toXDR(value: TransactionResultResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultExt { + switch(): number; + + static 0(): TransactionResultExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultExt; + + static write(value: TransactionResultExt, io: Buffer): void; + + static isValid(value: TransactionResultExt): boolean; + + static toXDR(value: TransactionResultExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ExtensionPoint { + switch(): number; + + static 0(): ExtensionPoint; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ExtensionPoint; + + static write(value: ExtensionPoint, io: Buffer): void; + + static isValid(value: ExtensionPoint): boolean; + + static toXDR(value: ExtensionPoint): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ExtensionPoint; + + static fromXDR(input: string, format: "hex" | "base64"): ExtensionPoint; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PublicKey { + switch(): PublicKeyType; + + ed25519(value?: Buffer): Buffer; + + static publicKeyTypeEd25519(value: Buffer): PublicKey; + + value(): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PublicKey; + + static write(value: PublicKey, io: Buffer): void; + + static isValid(value: PublicKey): boolean; + + static toXDR(value: PublicKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PublicKey; + + static fromXDR(input: string, format: "hex" | "base64"): PublicKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignerKey { + switch(): SignerKeyType; + + ed25519(value?: Buffer): Buffer; + + preAuthTx(value?: Buffer): Buffer; + + hashX(value?: Buffer): Buffer; + + ed25519SignedPayload( + value?: SignerKeyEd25519SignedPayload + ): SignerKeyEd25519SignedPayload; + + static signerKeyTypeEd25519(value: Buffer): SignerKey; + + static signerKeyTypePreAuthTx(value: Buffer): SignerKey; + + static signerKeyTypeHashX(value: Buffer): SignerKey; + + static signerKeyTypeEd25519SignedPayload( + value: SignerKeyEd25519SignedPayload + ): SignerKey; + + value(): Buffer | Buffer | Buffer | SignerKeyEd25519SignedPayload; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignerKey; + + static write(value: SignerKey, io: Buffer): void; + + static isValid(value: SignerKey): boolean; + + static toXDR(value: SignerKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignerKey; + + static fromXDR(input: string, format: "hex" | "base64"): SignerKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } +} diff --git a/types/next.d.ts b/types/next.d.ts index a3cac56ac..f9ce201aa 100644 --- a/types/next.d.ts +++ b/types/next.d.ts @@ -1,11767 +1,13794 @@ -// Automatically generated on 2022-08-12T12:40:00+01:00 -import { Operation } from './index'; - -export {}; - -// Hidden namespace as hack to work around name collision. -declare namespace xdrHidden { - // tslint:disable-line:strict-export-declare-modifiers - class Operation2 { - constructor(attributes: { - sourceAccount: null | xdr.MuxedAccount; - body: xdr.OperationBody; - }); - - sourceAccount(value?: null | xdr.MuxedAccount): null | xdr.MuxedAccount; - - body(value?: xdr.OperationBody): xdr.OperationBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): xdr.Operation; - - static write(value: xdr.Operation, io: Buffer): void; - - static isValid(value: xdr.Operation): boolean; - - static toXDR(value: xdr.Operation): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): xdr.Operation; - - static fromXDR(input: string, format: 'hex' | 'base64'): xdr.Operation; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } -} - -export namespace xdr { - export import Operation = xdrHidden.Operation2; // tslint:disable-line:strict-export-declare-modifiers - - interface SignedInt { - readonly MAX_VALUE: 2147483647; - readonly MIN_VALUE: -2147483648; - read(io: Buffer): number; - write(value: number, io: Buffer): void; - isValid(value: number): boolean; - toXDR(value: number): Buffer; - fromXDR(input: Buffer, format?: 'raw'): number; - fromXDR(input: string, format: 'hex' | 'base64'): number; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - interface UnsignedInt { - readonly MAX_VALUE: 4294967295; - readonly MIN_VALUE: 0; - read(io: Buffer): number; - write(value: number, io: Buffer): void; - isValid(value: number): boolean; - toXDR(value: number): Buffer; - fromXDR(input: Buffer, format?: 'raw'): number; - fromXDR(input: string, format: 'hex' | 'base64'): number; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - interface Bool { - read(io: Buffer): boolean; - write(value: boolean, io: Buffer): void; - isValid(value: boolean): boolean; - toXDR(value: boolean): Buffer; - fromXDR(input: Buffer, format?: 'raw'): boolean; - fromXDR(input: string, format: 'hex' | 'base64'): boolean; - validateXDR(input: Buffer, format?: 'raw'): boolean; - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Hyper { - low: number; - - high: number; - - unsigned: boolean; - - constructor(low: number, high: number); - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static toXDR(value: Hyper): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Hyper; - - static fromXDR(input: string, format: 'hex' | 'base64'): Hyper; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - - static readonly MAX_VALUE: Hyper; - - static readonly MIN_VALUE: Hyper; - - static read(io: Buffer): Hyper; - - static write(value: Hyper, io: Buffer): void; - - static fromString(input: string): Hyper; - - static fromBytes(low: number, high: number): Hyper; - - static isValid(value: Hyper): boolean; - } - - class UnsignedHyper { - low: number; - - high: number; - - unsigned: boolean; - - constructor(low: number, high: number); - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static toXDR(value: UnsignedHyper): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): UnsignedHyper; - - static fromXDR(input: string, format: 'hex' | 'base64'): UnsignedHyper; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - - static readonly MAX_VALUE: UnsignedHyper; - - static readonly MIN_VALUE: UnsignedHyper; - - static read(io: Buffer): UnsignedHyper; - - static write(value: UnsignedHyper, io: Buffer): void; - - static fromString(input: string): UnsignedHyper; - - static fromBytes(low: number, high: number): UnsignedHyper; - - static isValid(value: UnsignedHyper): boolean; - } - - class XDRString { - constructor(maxLength: 4294967295); - - read(io: Buffer): Buffer; - - readString(io: Buffer): string; - - write(value: string | Buffer, io: Buffer): void; - - isValid(value: string | number[] | Buffer): boolean; - - toXDR(value: string | Buffer): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): Buffer; - - fromXDR(input: string, format: 'hex' | 'base64'): Buffer; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class XDRArray { - read(io: Buffer): Buffer; - - write(value: T[], io: Buffer): void; - - isValid(value: T[]): boolean; - - toXDR(value: T[]): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): T[]; - - fromXDR(input: string, format: 'hex' | 'base64'): T[]; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Opaque { - constructor(length: number); - - read(io: Buffer): Buffer; - - write(value: Buffer, io: Buffer): void; - - isValid(value: Buffer): boolean; - - toXDR(value: Buffer): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): Buffer; - - fromXDR(input: string, format: 'hex' | 'base64'): Buffer; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class VarOpaque extends Opaque {} - - class Option { - constructor(childType: { - read(io: any): any; - write(value: any, io: Buffer): void; - isValid(value: any): boolean; - }); - - read(io: Buffer): any; - - write(value: any, io: Buffer): void; - - isValid(value: any): boolean; - - toXDR(value: any): Buffer; - - fromXDR(input: Buffer, format?: 'raw'): any; - - fromXDR(input: string, format: 'hex' | 'base64'): any; - - validateXDR(input: Buffer, format?: 'raw'): boolean; - - validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementType { - readonly name: - | 'scpStPrepare' - | 'scpStConfirm' - | 'scpStExternalize' - | 'scpStNominate'; - - readonly value: 0 | 1 | 2 | 3; - - static scpStPrepare(): ScpStatementType; - - static scpStConfirm(): ScpStatementType; - - static scpStExternalize(): ScpStatementType; - - static scpStNominate(): ScpStatementType; - } - - class AssetType { - readonly name: - | 'assetTypeNative' - | 'assetTypeCreditAlphanum4' - | 'assetTypeCreditAlphanum12' - | 'assetTypePoolShare'; - - readonly value: 0 | 1 | 2 | 3; - - static assetTypeNative(): AssetType; - - static assetTypeCreditAlphanum4(): AssetType; - - static assetTypeCreditAlphanum12(): AssetType; - - static assetTypePoolShare(): AssetType; - } - - class ThresholdIndices { - readonly name: - | 'thresholdMasterWeight' - | 'thresholdLow' - | 'thresholdMed' - | 'thresholdHigh'; - - readonly value: 0 | 1 | 2 | 3; - - static thresholdMasterWeight(): ThresholdIndices; - - static thresholdLow(): ThresholdIndices; - - static thresholdMed(): ThresholdIndices; - - static thresholdHigh(): ThresholdIndices; - } - - class LedgerEntryType { - readonly name: - | 'account' - | 'trustline' - | 'offer' - | 'data' - | 'claimableBalance' - | 'liquidityPool' - | 'contractData' - | 'configSetting'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; - - static account(): LedgerEntryType; - - static trustline(): LedgerEntryType; - - static offer(): LedgerEntryType; - - static data(): LedgerEntryType; - - static claimableBalance(): LedgerEntryType; - - static liquidityPool(): LedgerEntryType; - - static contractData(): LedgerEntryType; - - static configSetting(): LedgerEntryType; - } - - class AccountFlags { - readonly name: - | 'authRequiredFlag' - | 'authRevocableFlag' - | 'authImmutableFlag' - | 'authClawbackEnabledFlag'; - - readonly value: 1 | 2 | 4 | 8; - - static authRequiredFlag(): AccountFlags; - - static authRevocableFlag(): AccountFlags; - - static authImmutableFlag(): AccountFlags; - - static authClawbackEnabledFlag(): AccountFlags; - } - - class TrustLineFlags { - readonly name: - | 'authorizedFlag' - | 'authorizedToMaintainLiabilitiesFlag' - | 'trustlineClawbackEnabledFlag'; - - readonly value: 1 | 2 | 4; - - static authorizedFlag(): TrustLineFlags; - - static authorizedToMaintainLiabilitiesFlag(): TrustLineFlags; - - static trustlineClawbackEnabledFlag(): TrustLineFlags; - } - - class LiquidityPoolType { - readonly name: 'liquidityPoolConstantProduct'; - - readonly value: 0; - - static liquidityPoolConstantProduct(): LiquidityPoolType; - } - - class OfferEntryFlags { - readonly name: 'passiveFlag'; - - readonly value: 1; - - static passiveFlag(): OfferEntryFlags; - } - - class ClaimPredicateType { - readonly name: - | 'claimPredicateUnconditional' - | 'claimPredicateAnd' - | 'claimPredicateOr' - | 'claimPredicateNot' - | 'claimPredicateBeforeAbsoluteTime' - | 'claimPredicateBeforeRelativeTime'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5; - - static claimPredicateUnconditional(): ClaimPredicateType; - - static claimPredicateAnd(): ClaimPredicateType; - - static claimPredicateOr(): ClaimPredicateType; - - static claimPredicateNot(): ClaimPredicateType; - - static claimPredicateBeforeAbsoluteTime(): ClaimPredicateType; - - static claimPredicateBeforeRelativeTime(): ClaimPredicateType; - } - - class ClaimantType { - readonly name: 'claimantTypeV0'; - - readonly value: 0; - - static claimantTypeV0(): ClaimantType; - } - - class ClaimableBalanceIdType { - readonly name: 'claimableBalanceIdTypeV0'; - - readonly value: 0; - - static claimableBalanceIdTypeV0(): ClaimableBalanceIdType; - } - - class ClaimableBalanceFlags { - readonly name: 'claimableBalanceClawbackEnabledFlag'; - - readonly value: 1; - - static claimableBalanceClawbackEnabledFlag(): ClaimableBalanceFlags; - } - - class ConfigSettingType { - readonly name: 'configSettingTypeUint32'; - - readonly value: 0; - - static configSettingTypeUint32(): ConfigSettingType; - } - - class ConfigSettingId { - readonly name: 'configSettingContractMaxSize'; - - readonly value: 0; - - static configSettingContractMaxSize(): ConfigSettingId; - } - - class EnvelopeType { - readonly name: - | 'envelopeTypeTxV0' - | 'envelopeTypeScp' - | 'envelopeTypeTx' - | 'envelopeTypeAuth' - | 'envelopeTypeScpvalue' - | 'envelopeTypeTxFeeBump' - | 'envelopeTypeOpId' - | 'envelopeTypePoolRevokeOpId' - | 'envelopeTypeContractIdFromEd25519' - | 'envelopeTypeContractIdFromContract'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - - static envelopeTypeTxV0(): EnvelopeType; - - static envelopeTypeScp(): EnvelopeType; - - static envelopeTypeTx(): EnvelopeType; - - static envelopeTypeAuth(): EnvelopeType; - - static envelopeTypeScpvalue(): EnvelopeType; - - static envelopeTypeTxFeeBump(): EnvelopeType; - - static envelopeTypeOpId(): EnvelopeType; - - static envelopeTypePoolRevokeOpId(): EnvelopeType; - - static envelopeTypeContractIdFromEd25519(): EnvelopeType; - - static envelopeTypeContractIdFromContract(): EnvelopeType; - } - - class StellarValueType { - readonly name: 'stellarValueBasic' | 'stellarValueSigned'; - - readonly value: 0 | 1; - - static stellarValueBasic(): StellarValueType; - - static stellarValueSigned(): StellarValueType; - } - - class LedgerHeaderFlags { - readonly name: - | 'disableLiquidityPoolTradingFlag' - | 'disableLiquidityPoolDepositFlag' - | 'disableLiquidityPoolWithdrawalFlag' - | 'disableContractCreate' - | 'disableContractUpdate' - | 'disableContractRemove' - | 'disableContractInvoke'; - - readonly value: 1 | 2 | 4 | 8 | 16 | 32 | 64; - - static disableLiquidityPoolTradingFlag(): LedgerHeaderFlags; - - static disableLiquidityPoolDepositFlag(): LedgerHeaderFlags; - - static disableLiquidityPoolWithdrawalFlag(): LedgerHeaderFlags; - - static disableContractCreate(): LedgerHeaderFlags; - - static disableContractUpdate(): LedgerHeaderFlags; - - static disableContractRemove(): LedgerHeaderFlags; - - static disableContractInvoke(): LedgerHeaderFlags; - } - - class LedgerUpgradeType { - readonly name: - | 'ledgerUpgradeVersion' - | 'ledgerUpgradeBaseFee' - | 'ledgerUpgradeMaxTxSetSize' - | 'ledgerUpgradeBaseReserve' - | 'ledgerUpgradeFlags' - | 'ledgerUpgradeConfig'; - - readonly value: 1 | 2 | 3 | 4 | 5 | 6; - - static ledgerUpgradeVersion(): LedgerUpgradeType; - - static ledgerUpgradeBaseFee(): LedgerUpgradeType; - - static ledgerUpgradeMaxTxSetSize(): LedgerUpgradeType; - - static ledgerUpgradeBaseReserve(): LedgerUpgradeType; - - static ledgerUpgradeFlags(): LedgerUpgradeType; - - static ledgerUpgradeConfig(): LedgerUpgradeType; - } - - class BucketEntryType { - readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; - - readonly value: -1 | 0 | 1 | 2; - - static metaentry(): BucketEntryType; - - static liveentry(): BucketEntryType; - - static deadentry(): BucketEntryType; - - static initentry(): BucketEntryType; - } - - class TxSetComponentType { - readonly name: 'txsetCompTxsMaybeDiscountedFee'; - - readonly value: 0; - - static txsetCompTxsMaybeDiscountedFee(): TxSetComponentType; - } - - class LedgerEntryChangeType { - readonly name: - | 'ledgerEntryCreated' - | 'ledgerEntryUpdated' - | 'ledgerEntryRemoved' - | 'ledgerEntryState'; - - readonly value: 0 | 1 | 2 | 3; - - static ledgerEntryCreated(): LedgerEntryChangeType; - - static ledgerEntryUpdated(): LedgerEntryChangeType; - - static ledgerEntryRemoved(): LedgerEntryChangeType; - - static ledgerEntryState(): LedgerEntryChangeType; - } - - class ErrorCode { - readonly name: 'errMisc' | 'errData' | 'errConf' | 'errAuth' | 'errLoad'; - - readonly value: 0 | 1 | 2 | 3 | 4; - - static errMisc(): ErrorCode; - - static errData(): ErrorCode; - - static errConf(): ErrorCode; - - static errAuth(): ErrorCode; - - static errLoad(): ErrorCode; - } - - class IpAddrType { - readonly name: 'iPv4' | 'iPv6'; - - readonly value: 0 | 1; - - static iPv4(): IpAddrType; - - static iPv6(): IpAddrType; - } - - class MessageType { - readonly name: - | 'errorMsg' - | 'auth' - | 'dontHave' - | 'getPeers' - | 'peers' - | 'getTxSet' - | 'txSet' - | 'generalizedTxSet' - | 'transaction' - | 'getScpQuorumset' - | 'scpQuorumset' - | 'scpMessage' - | 'getScpState' - | 'hello' - | 'surveyRequest' - | 'surveyResponse' - | 'sendMore'; - - readonly value: - | 0 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 17 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16; - - static errorMsg(): MessageType; - - static auth(): MessageType; - - static dontHave(): MessageType; - - static getPeers(): MessageType; - - static peers(): MessageType; - - static getTxSet(): MessageType; - - static txSet(): MessageType; - - static generalizedTxSet(): MessageType; - - static transaction(): MessageType; - - static getScpQuorumset(): MessageType; - - static scpQuorumset(): MessageType; - - static scpMessage(): MessageType; - - static getScpState(): MessageType; - - static hello(): MessageType; - - static surveyRequest(): MessageType; - - static surveyResponse(): MessageType; - - static sendMore(): MessageType; - } - - class SurveyMessageCommandType { - readonly name: 'surveyTopology'; - - readonly value: 0; - - static surveyTopology(): SurveyMessageCommandType; - } - - class OperationType { - readonly name: - | 'createAccount' - | 'payment' - | 'pathPaymentStrictReceive' - | 'manageSellOffer' - | 'createPassiveSellOffer' - | 'setOptions' - | 'changeTrust' - | 'allowTrust' - | 'accountMerge' - | 'inflation' - | 'manageData' - | 'bumpSequence' - | 'manageBuyOffer' - | 'pathPaymentStrictSend' - | 'createClaimableBalance' - | 'claimClaimableBalance' - | 'beginSponsoringFutureReserves' - | 'endSponsoringFutureReserves' - | 'revokeSponsorship' - | 'clawback' - | 'clawbackClaimableBalance' - | 'setTrustLineFlags' - | 'liquidityPoolDeposit' - | 'liquidityPoolWithdraw' - | 'invokeHostFunction'; - - readonly value: - | 0 - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 17 - | 18 - | 19 - | 20 - | 21 - | 22 - | 23 - | 24; - - static createAccount(): OperationType; - - static payment(): OperationType; - - static pathPaymentStrictReceive(): OperationType; - - static manageSellOffer(): OperationType; - - static createPassiveSellOffer(): OperationType; - - static setOptions(): OperationType; - - static changeTrust(): OperationType; - - static allowTrust(): OperationType; - - static accountMerge(): OperationType; - - static inflation(): OperationType; - - static manageData(): OperationType; - - static bumpSequence(): OperationType; - - static manageBuyOffer(): OperationType; - - static pathPaymentStrictSend(): OperationType; - - static createClaimableBalance(): OperationType; - - static claimClaimableBalance(): OperationType; - - static beginSponsoringFutureReserves(): OperationType; - - static endSponsoringFutureReserves(): OperationType; - - static revokeSponsorship(): OperationType; - - static clawback(): OperationType; - - static clawbackClaimableBalance(): OperationType; - - static setTrustLineFlags(): OperationType; - - static liquidityPoolDeposit(): OperationType; - - static liquidityPoolWithdraw(): OperationType; - - static invokeHostFunction(): OperationType; - } - - class RevokeSponsorshipType { - readonly name: 'revokeSponsorshipLedgerEntry' | 'revokeSponsorshipSigner'; - - readonly value: 0 | 1; - - static revokeSponsorshipLedgerEntry(): RevokeSponsorshipType; - - static revokeSponsorshipSigner(): RevokeSponsorshipType; - } - - class HostFunction { - readonly name: 'hostFnCall' | 'hostFnCreateContract'; - - readonly value: 0 | 1; - - static hostFnCall(): HostFunction; - - static hostFnCreateContract(): HostFunction; - } - - class MemoType { - readonly name: - | 'memoNone' - | 'memoText' - | 'memoId' - | 'memoHash' - | 'memoReturn'; - - readonly value: 0 | 1 | 2 | 3 | 4; - - static memoNone(): MemoType; - - static memoText(): MemoType; - - static memoId(): MemoType; - - static memoHash(): MemoType; - - static memoReturn(): MemoType; - } - - class PreconditionType { - readonly name: 'precondNone' | 'precondTime' | 'precondV2'; - - readonly value: 0 | 1 | 2; - - static precondNone(): PreconditionType; - - static precondTime(): PreconditionType; - - static precondV2(): PreconditionType; - } - - class ClaimAtomType { - readonly name: - | 'claimAtomTypeV0' - | 'claimAtomTypeOrderBook' - | 'claimAtomTypeLiquidityPool'; - - readonly value: 0 | 1 | 2; - - static claimAtomTypeV0(): ClaimAtomType; - - static claimAtomTypeOrderBook(): ClaimAtomType; - - static claimAtomTypeLiquidityPool(): ClaimAtomType; - } - - class CreateAccountResultCode { - readonly name: - | 'createAccountSuccess' - | 'createAccountMalformed' - | 'createAccountUnderfunded' - | 'createAccountLowReserve' - | 'createAccountAlreadyExist'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static createAccountSuccess(): CreateAccountResultCode; - - static createAccountMalformed(): CreateAccountResultCode; - - static createAccountUnderfunded(): CreateAccountResultCode; - - static createAccountLowReserve(): CreateAccountResultCode; - - static createAccountAlreadyExist(): CreateAccountResultCode; - } - - class PaymentResultCode { - readonly name: - | 'paymentSuccess' - | 'paymentMalformed' - | 'paymentUnderfunded' - | 'paymentSrcNoTrust' - | 'paymentSrcNotAuthorized' - | 'paymentNoDestination' - | 'paymentNoTrust' - | 'paymentNotAuthorized' - | 'paymentLineFull' - | 'paymentNoIssuer'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9; - - static paymentSuccess(): PaymentResultCode; - - static paymentMalformed(): PaymentResultCode; - - static paymentUnderfunded(): PaymentResultCode; - - static paymentSrcNoTrust(): PaymentResultCode; - - static paymentSrcNotAuthorized(): PaymentResultCode; - - static paymentNoDestination(): PaymentResultCode; - - static paymentNoTrust(): PaymentResultCode; - - static paymentNotAuthorized(): PaymentResultCode; - - static paymentLineFull(): PaymentResultCode; - - static paymentNoIssuer(): PaymentResultCode; - } - - class PathPaymentStrictReceiveResultCode { - readonly name: - | 'pathPaymentStrictReceiveSuccess' - | 'pathPaymentStrictReceiveMalformed' - | 'pathPaymentStrictReceiveUnderfunded' - | 'pathPaymentStrictReceiveSrcNoTrust' - | 'pathPaymentStrictReceiveSrcNotAuthorized' - | 'pathPaymentStrictReceiveNoDestination' - | 'pathPaymentStrictReceiveNoTrust' - | 'pathPaymentStrictReceiveNotAuthorized' - | 'pathPaymentStrictReceiveLineFull' - | 'pathPaymentStrictReceiveNoIssuer' - | 'pathPaymentStrictReceiveTooFewOffers' - | 'pathPaymentStrictReceiveOfferCrossSelf' - | 'pathPaymentStrictReceiveOverSendmax'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static pathPaymentStrictReceiveSuccess(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveNoIssuer(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResultCode; - - static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResultCode; - } - - class PathPaymentStrictSendResultCode { - readonly name: - | 'pathPaymentStrictSendSuccess' - | 'pathPaymentStrictSendMalformed' - | 'pathPaymentStrictSendUnderfunded' - | 'pathPaymentStrictSendSrcNoTrust' - | 'pathPaymentStrictSendSrcNotAuthorized' - | 'pathPaymentStrictSendNoDestination' - | 'pathPaymentStrictSendNoTrust' - | 'pathPaymentStrictSendNotAuthorized' - | 'pathPaymentStrictSendLineFull' - | 'pathPaymentStrictSendNoIssuer' - | 'pathPaymentStrictSendTooFewOffers' - | 'pathPaymentStrictSendOfferCrossSelf' - | 'pathPaymentStrictSendUnderDestmin'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static pathPaymentStrictSendSuccess(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendNoIssuer(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResultCode; - - static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResultCode; - } - - class ManageSellOfferResultCode { - readonly name: - | 'manageSellOfferSuccess' - | 'manageSellOfferMalformed' - | 'manageSellOfferSellNoTrust' - | 'manageSellOfferBuyNoTrust' - | 'manageSellOfferSellNotAuthorized' - | 'manageSellOfferBuyNotAuthorized' - | 'manageSellOfferLineFull' - | 'manageSellOfferUnderfunded' - | 'manageSellOfferCrossSelf' - | 'manageSellOfferSellNoIssuer' - | 'manageSellOfferBuyNoIssuer' - | 'manageSellOfferNotFound' - | 'manageSellOfferLowReserve'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static manageSellOfferSuccess(): ManageSellOfferResultCode; - - static manageSellOfferMalformed(): ManageSellOfferResultCode; - - static manageSellOfferSellNoTrust(): ManageSellOfferResultCode; - - static manageSellOfferBuyNoTrust(): ManageSellOfferResultCode; - - static manageSellOfferSellNotAuthorized(): ManageSellOfferResultCode; - - static manageSellOfferBuyNotAuthorized(): ManageSellOfferResultCode; - - static manageSellOfferLineFull(): ManageSellOfferResultCode; - - static manageSellOfferUnderfunded(): ManageSellOfferResultCode; - - static manageSellOfferCrossSelf(): ManageSellOfferResultCode; - - static manageSellOfferSellNoIssuer(): ManageSellOfferResultCode; - - static manageSellOfferBuyNoIssuer(): ManageSellOfferResultCode; - - static manageSellOfferNotFound(): ManageSellOfferResultCode; - - static manageSellOfferLowReserve(): ManageSellOfferResultCode; - } - - class ManageOfferEffect { - readonly name: - | 'manageOfferCreated' - | 'manageOfferUpdated' - | 'manageOfferDeleted'; - - readonly value: 0 | 1 | 2; - - static manageOfferCreated(): ManageOfferEffect; - - static manageOfferUpdated(): ManageOfferEffect; - - static manageOfferDeleted(): ManageOfferEffect; - } - - class ManageBuyOfferResultCode { - readonly name: - | 'manageBuyOfferSuccess' - | 'manageBuyOfferMalformed' - | 'manageBuyOfferSellNoTrust' - | 'manageBuyOfferBuyNoTrust' - | 'manageBuyOfferSellNotAuthorized' - | 'manageBuyOfferBuyNotAuthorized' - | 'manageBuyOfferLineFull' - | 'manageBuyOfferUnderfunded' - | 'manageBuyOfferCrossSelf' - | 'manageBuyOfferSellNoIssuer' - | 'manageBuyOfferBuyNoIssuer' - | 'manageBuyOfferNotFound' - | 'manageBuyOfferLowReserve'; - - readonly value: - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12; - - static manageBuyOfferSuccess(): ManageBuyOfferResultCode; - - static manageBuyOfferMalformed(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNoTrust(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNoTrust(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResultCode; - - static manageBuyOfferLineFull(): ManageBuyOfferResultCode; - - static manageBuyOfferUnderfunded(): ManageBuyOfferResultCode; - - static manageBuyOfferCrossSelf(): ManageBuyOfferResultCode; - - static manageBuyOfferSellNoIssuer(): ManageBuyOfferResultCode; - - static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResultCode; - - static manageBuyOfferNotFound(): ManageBuyOfferResultCode; - - static manageBuyOfferLowReserve(): ManageBuyOfferResultCode; - } - - class SetOptionsResultCode { - readonly name: - | 'setOptionsSuccess' - | 'setOptionsLowReserve' - | 'setOptionsTooManySigners' - | 'setOptionsBadFlags' - | 'setOptionsInvalidInflation' - | 'setOptionsCantChange' - | 'setOptionsUnknownFlag' - | 'setOptionsThresholdOutOfRange' - | 'setOptionsBadSigner' - | 'setOptionsInvalidHomeDomain' - | 'setOptionsAuthRevocableRequired'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10; - - static setOptionsSuccess(): SetOptionsResultCode; - - static setOptionsLowReserve(): SetOptionsResultCode; - - static setOptionsTooManySigners(): SetOptionsResultCode; - - static setOptionsBadFlags(): SetOptionsResultCode; - - static setOptionsInvalidInflation(): SetOptionsResultCode; - - static setOptionsCantChange(): SetOptionsResultCode; - - static setOptionsUnknownFlag(): SetOptionsResultCode; - - static setOptionsThresholdOutOfRange(): SetOptionsResultCode; - - static setOptionsBadSigner(): SetOptionsResultCode; - - static setOptionsInvalidHomeDomain(): SetOptionsResultCode; - - static setOptionsAuthRevocableRequired(): SetOptionsResultCode; - } - - class ChangeTrustResultCode { - readonly name: - | 'changeTrustSuccess' - | 'changeTrustMalformed' - | 'changeTrustNoIssuer' - | 'changeTrustInvalidLimit' - | 'changeTrustLowReserve' - | 'changeTrustSelfNotAllowed' - | 'changeTrustTrustLineMissing' - | 'changeTrustCannotDelete' - | 'changeTrustNotAuthMaintainLiabilities'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8; - - static changeTrustSuccess(): ChangeTrustResultCode; - - static changeTrustMalformed(): ChangeTrustResultCode; - - static changeTrustNoIssuer(): ChangeTrustResultCode; - - static changeTrustInvalidLimit(): ChangeTrustResultCode; - - static changeTrustLowReserve(): ChangeTrustResultCode; - - static changeTrustSelfNotAllowed(): ChangeTrustResultCode; - - static changeTrustTrustLineMissing(): ChangeTrustResultCode; - - static changeTrustCannotDelete(): ChangeTrustResultCode; - - static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResultCode; - } - - class AllowTrustResultCode { - readonly name: - | 'allowTrustSuccess' - | 'allowTrustMalformed' - | 'allowTrustNoTrustLine' - | 'allowTrustTrustNotRequired' - | 'allowTrustCantRevoke' - | 'allowTrustSelfNotAllowed' - | 'allowTrustLowReserve'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; - - static allowTrustSuccess(): AllowTrustResultCode; - - static allowTrustMalformed(): AllowTrustResultCode; - - static allowTrustNoTrustLine(): AllowTrustResultCode; - - static allowTrustTrustNotRequired(): AllowTrustResultCode; - - static allowTrustCantRevoke(): AllowTrustResultCode; - - static allowTrustSelfNotAllowed(): AllowTrustResultCode; - - static allowTrustLowReserve(): AllowTrustResultCode; - } - - class AccountMergeResultCode { - readonly name: - | 'accountMergeSuccess' - | 'accountMergeMalformed' - | 'accountMergeNoAccount' - | 'accountMergeImmutableSet' - | 'accountMergeHasSubEntries' - | 'accountMergeSeqnumTooFar' - | 'accountMergeDestFull' - | 'accountMergeIsSponsor'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; - - static accountMergeSuccess(): AccountMergeResultCode; - - static accountMergeMalformed(): AccountMergeResultCode; - - static accountMergeNoAccount(): AccountMergeResultCode; - - static accountMergeImmutableSet(): AccountMergeResultCode; - - static accountMergeHasSubEntries(): AccountMergeResultCode; - - static accountMergeSeqnumTooFar(): AccountMergeResultCode; - - static accountMergeDestFull(): AccountMergeResultCode; - - static accountMergeIsSponsor(): AccountMergeResultCode; - } - - class InflationResultCode { - readonly name: 'inflationSuccess' | 'inflationNotTime'; - - readonly value: 0 | -1; - - static inflationSuccess(): InflationResultCode; - - static inflationNotTime(): InflationResultCode; - } - - class ManageDataResultCode { - readonly name: - | 'manageDataSuccess' - | 'manageDataNotSupportedYet' - | 'manageDataNameNotFound' - | 'manageDataLowReserve' - | 'manageDataInvalidName'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static manageDataSuccess(): ManageDataResultCode; - - static manageDataNotSupportedYet(): ManageDataResultCode; - - static manageDataNameNotFound(): ManageDataResultCode; - - static manageDataLowReserve(): ManageDataResultCode; - - static manageDataInvalidName(): ManageDataResultCode; - } - - class BumpSequenceResultCode { - readonly name: 'bumpSequenceSuccess' | 'bumpSequenceBadSeq'; - - readonly value: 0 | -1; - - static bumpSequenceSuccess(): BumpSequenceResultCode; - - static bumpSequenceBadSeq(): BumpSequenceResultCode; - } - - class CreateClaimableBalanceResultCode { - readonly name: - | 'createClaimableBalanceSuccess' - | 'createClaimableBalanceMalformed' - | 'createClaimableBalanceLowReserve' - | 'createClaimableBalanceNoTrust' - | 'createClaimableBalanceNotAuthorized' - | 'createClaimableBalanceUnderfunded'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static createClaimableBalanceSuccess(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceMalformed(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceLowReserve(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceNoTrust(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResultCode; - - static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResultCode; - } - - class ClaimClaimableBalanceResultCode { - readonly name: - | 'claimClaimableBalanceSuccess' - | 'claimClaimableBalanceDoesNotExist' - | 'claimClaimableBalanceCannotClaim' - | 'claimClaimableBalanceLineFull' - | 'claimClaimableBalanceNoTrust' - | 'claimClaimableBalanceNotAuthorized'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResultCode; - } - - class BeginSponsoringFutureReservesResultCode { - readonly name: - | 'beginSponsoringFutureReservesSuccess' - | 'beginSponsoringFutureReservesMalformed' - | 'beginSponsoringFutureReservesAlreadySponsored' - | 'beginSponsoringFutureReservesRecursive'; - - readonly value: 0 | -1 | -2 | -3; - - static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResultCode; - } - - class EndSponsoringFutureReservesResultCode { - readonly name: - | 'endSponsoringFutureReservesSuccess' - | 'endSponsoringFutureReservesNotSponsored'; - - readonly value: 0 | -1; - - static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResultCode; - - static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResultCode; - } - - class RevokeSponsorshipResultCode { - readonly name: - | 'revokeSponsorshipSuccess' - | 'revokeSponsorshipDoesNotExist' - | 'revokeSponsorshipNotSponsor' - | 'revokeSponsorshipLowReserve' - | 'revokeSponsorshipOnlyTransferable' - | 'revokeSponsorshipMalformed'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static revokeSponsorshipSuccess(): RevokeSponsorshipResultCode; - - static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResultCode; - - static revokeSponsorshipNotSponsor(): RevokeSponsorshipResultCode; - - static revokeSponsorshipLowReserve(): RevokeSponsorshipResultCode; - - static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResultCode; - - static revokeSponsorshipMalformed(): RevokeSponsorshipResultCode; - } - - class ClawbackResultCode { - readonly name: - | 'clawbackSuccess' - | 'clawbackMalformed' - | 'clawbackNotClawbackEnabled' - | 'clawbackNoTrust' - | 'clawbackUnderfunded'; - - readonly value: 0 | -1 | -2 | -3 | -4; - - static clawbackSuccess(): ClawbackResultCode; - - static clawbackMalformed(): ClawbackResultCode; - - static clawbackNotClawbackEnabled(): ClawbackResultCode; - - static clawbackNoTrust(): ClawbackResultCode; - - static clawbackUnderfunded(): ClawbackResultCode; - } - - class ClawbackClaimableBalanceResultCode { - readonly name: - | 'clawbackClaimableBalanceSuccess' - | 'clawbackClaimableBalanceDoesNotExist' - | 'clawbackClaimableBalanceNotIssuer' - | 'clawbackClaimableBalanceNotClawbackEnabled'; - - readonly value: 0 | -1 | -2 | -3; - - static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResultCode; - } - - class SetTrustLineFlagsResultCode { - readonly name: - | 'setTrustLineFlagsSuccess' - | 'setTrustLineFlagsMalformed' - | 'setTrustLineFlagsNoTrustLine' - | 'setTrustLineFlagsCantRevoke' - | 'setTrustLineFlagsInvalidState' - | 'setTrustLineFlagsLowReserve'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static setTrustLineFlagsSuccess(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsMalformed(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResultCode; - } - - class LiquidityPoolDepositResultCode { - readonly name: - | 'liquidityPoolDepositSuccess' - | 'liquidityPoolDepositMalformed' - | 'liquidityPoolDepositNoTrust' - | 'liquidityPoolDepositNotAuthorized' - | 'liquidityPoolDepositUnderfunded' - | 'liquidityPoolDepositLineFull' - | 'liquidityPoolDepositBadPrice' - | 'liquidityPoolDepositPoolFull'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; - - static liquidityPoolDepositSuccess(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositMalformed(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositLineFull(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResultCode; - } - - class LiquidityPoolWithdrawResultCode { - readonly name: - | 'liquidityPoolWithdrawSuccess' - | 'liquidityPoolWithdrawMalformed' - | 'liquidityPoolWithdrawNoTrust' - | 'liquidityPoolWithdrawUnderfunded' - | 'liquidityPoolWithdrawLineFull' - | 'liquidityPoolWithdrawUnderMinimum'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5; - - static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResultCode; - } - - class InvokeHostFunctionResultCode { - readonly name: - | 'invokeHostFunctionSuccess' - | 'invokeHostFunctionMalformed' - | 'invokeHostFunctionTrapped'; - - readonly value: 0 | -1 | -2; - - static invokeHostFunctionSuccess(): InvokeHostFunctionResultCode; - - static invokeHostFunctionMalformed(): InvokeHostFunctionResultCode; - - static invokeHostFunctionTrapped(): InvokeHostFunctionResultCode; - } - - class OperationResultCode { - readonly name: - | 'opInner' - | 'opBadAuth' - | 'opNoAccount' - | 'opNotSupported' - | 'opTooManySubentries' - | 'opExceededWorkLimit' - | 'opTooManySponsoring'; - - readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; - - static opInner(): OperationResultCode; - - static opBadAuth(): OperationResultCode; - - static opNoAccount(): OperationResultCode; - - static opNotSupported(): OperationResultCode; - - static opTooManySubentries(): OperationResultCode; - - static opExceededWorkLimit(): OperationResultCode; - - static opTooManySponsoring(): OperationResultCode; - } - - class TransactionResultCode { - readonly name: - | 'txFeeBumpInnerSuccess' - | 'txSuccess' - | 'txFailed' - | 'txTooEarly' - | 'txTooLate' - | 'txMissingOperation' - | 'txBadSeq' - | 'txBadAuth' - | 'txInsufficientBalance' - | 'txNoAccount' - | 'txInsufficientFee' - | 'txBadAuthExtra' - | 'txInternalError' - | 'txNotSupported' - | 'txFeeBumpInnerFailed' - | 'txBadSponsorship' - | 'txBadMinSeqAgeOrGap' - | 'txMalformed'; - - readonly value: - | 1 - | 0 - | -1 - | -2 - | -3 - | -4 - | -5 - | -6 - | -7 - | -8 - | -9 - | -10 - | -11 - | -12 - | -13 - | -14 - | -15 - | -16; - - static txFeeBumpInnerSuccess(): TransactionResultCode; - - static txSuccess(): TransactionResultCode; - - static txFailed(): TransactionResultCode; - - static txTooEarly(): TransactionResultCode; - - static txTooLate(): TransactionResultCode; - - static txMissingOperation(): TransactionResultCode; - - static txBadSeq(): TransactionResultCode; - - static txBadAuth(): TransactionResultCode; - - static txInsufficientBalance(): TransactionResultCode; - - static txNoAccount(): TransactionResultCode; - - static txInsufficientFee(): TransactionResultCode; - - static txBadAuthExtra(): TransactionResultCode; - - static txInternalError(): TransactionResultCode; - - static txNotSupported(): TransactionResultCode; - - static txFeeBumpInnerFailed(): TransactionResultCode; - - static txBadSponsorship(): TransactionResultCode; - - static txBadMinSeqAgeOrGap(): TransactionResultCode; - - static txMalformed(): TransactionResultCode; - } - - class CryptoKeyType { - readonly name: - | 'keyTypeEd25519' - | 'keyTypePreAuthTx' - | 'keyTypeHashX' - | 'keyTypeEd25519SignedPayload' - | 'keyTypeMuxedEd25519'; - - readonly value: 0 | 1 | 2 | 3 | 256; - - static keyTypeEd25519(): CryptoKeyType; - - static keyTypePreAuthTx(): CryptoKeyType; - - static keyTypeHashX(): CryptoKeyType; - - static keyTypeEd25519SignedPayload(): CryptoKeyType; - - static keyTypeMuxedEd25519(): CryptoKeyType; - } - - class PublicKeyType { - readonly name: 'publicKeyTypeEd25519'; - - readonly value: 0; - - static publicKeyTypeEd25519(): PublicKeyType; - } - - class SignerKeyType { - readonly name: - | 'signerKeyTypeEd25519' - | 'signerKeyTypePreAuthTx' - | 'signerKeyTypeHashX' - | 'signerKeyTypeEd25519SignedPayload'; - - readonly value: 0 | 1 | 2 | 3; - - static signerKeyTypeEd25519(): SignerKeyType; - - static signerKeyTypePreAuthTx(): SignerKeyType; - - static signerKeyTypeHashX(): SignerKeyType; - - static signerKeyTypeEd25519SignedPayload(): SignerKeyType; - } - - class ScValType { - readonly name: - | 'scvU63' - | 'scvU32' - | 'scvI32' - | 'scvStatic' - | 'scvObject' - | 'scvSymbol' - | 'scvBitset' - | 'scvStatus'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; - - static scvU63(): ScValType; - - static scvU32(): ScValType; - - static scvI32(): ScValType; - - static scvStatic(): ScValType; - - static scvObject(): ScValType; - - static scvSymbol(): ScValType; - - static scvBitset(): ScValType; - - static scvStatus(): ScValType; - } - - class ScStatic { - readonly name: - | 'scsVoid' - | 'scsTrue' - | 'scsFalse' - | 'scsLedgerKeyContractCode'; - - readonly value: 0 | 1 | 2 | 3; - - static scsVoid(): ScStatic; - - static scsTrue(): ScStatic; - - static scsFalse(): ScStatic; - - static scsLedgerKeyContractCode(): ScStatic; - } - - class ScStatusType { - readonly name: - | 'sstOk' - | 'sstUnknownError' - | 'sstHostValueError' - | 'sstHostObjectError' - | 'sstHostFunctionError' - | 'sstHostStorageError' - | 'sstHostContextError' - | 'sstVmError'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; - - static sstOk(): ScStatusType; - - static sstUnknownError(): ScStatusType; - - static sstHostValueError(): ScStatusType; - - static sstHostObjectError(): ScStatusType; - - static sstHostFunctionError(): ScStatusType; - - static sstHostStorageError(): ScStatusType; - - static sstHostContextError(): ScStatusType; - - static sstVmError(): ScStatusType; - } - - class ScHostValErrorCode { - readonly name: - | 'hostValueUnknownError' - | 'hostValueReservedTagValue' - | 'hostValueUnexpectedValType' - | 'hostValueU63OutOfRange' - | 'hostValueU32OutOfRange' - | 'hostValueStaticUnknown' - | 'hostValueMissingObject' - | 'hostValueSymbolTooLong' - | 'hostValueSymbolBadChar' - | 'hostValueSymbolContainsNonUtf8' - | 'hostValueBitsetTooManyBits' - | 'hostValueStatusUnknown'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11; - - static hostValueUnknownError(): ScHostValErrorCode; - - static hostValueReservedTagValue(): ScHostValErrorCode; - - static hostValueUnexpectedValType(): ScHostValErrorCode; - - static hostValueU63OutOfRange(): ScHostValErrorCode; - - static hostValueU32OutOfRange(): ScHostValErrorCode; - - static hostValueStaticUnknown(): ScHostValErrorCode; - - static hostValueMissingObject(): ScHostValErrorCode; - - static hostValueSymbolTooLong(): ScHostValErrorCode; - - static hostValueSymbolBadChar(): ScHostValErrorCode; - - static hostValueSymbolContainsNonUtf8(): ScHostValErrorCode; - - static hostValueBitsetTooManyBits(): ScHostValErrorCode; - - static hostValueStatusUnknown(): ScHostValErrorCode; - } - - class ScHostObjErrorCode { - readonly name: - | 'hostObjectUnknownError' - | 'hostObjectUnknownReference' - | 'hostObjectUnexpectedType' - | 'hostObjectObjectCountExceedsU32Max' - | 'hostObjectObjectNotExist' - | 'hostObjectVecIndexOutOfBound' - | 'hostObjectContractHashWrongLength'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6; - - static hostObjectUnknownError(): ScHostObjErrorCode; - - static hostObjectUnknownReference(): ScHostObjErrorCode; - - static hostObjectUnexpectedType(): ScHostObjErrorCode; - - static hostObjectObjectCountExceedsU32Max(): ScHostObjErrorCode; - - static hostObjectObjectNotExist(): ScHostObjErrorCode; - - static hostObjectVecIndexOutOfBound(): ScHostObjErrorCode; - - static hostObjectContractHashWrongLength(): ScHostObjErrorCode; - } - - class ScHostFnErrorCode { - readonly name: - | 'hostFnUnknownError' - | 'hostFnUnexpectedHostFunctionAction' - | 'hostFnInputArgsWrongLength' - | 'hostFnInputArgsWrongType' - | 'hostFnInputArgsInvalid'; - - readonly value: 0 | 1 | 2 | 3 | 4; - - static hostFnUnknownError(): ScHostFnErrorCode; - - static hostFnUnexpectedHostFunctionAction(): ScHostFnErrorCode; - - static hostFnInputArgsWrongLength(): ScHostFnErrorCode; - - static hostFnInputArgsWrongType(): ScHostFnErrorCode; - - static hostFnInputArgsInvalid(): ScHostFnErrorCode; - } - - class ScHostStorageErrorCode { - readonly name: - | 'hostStorageUnknownError' - | 'hostStorageExpectContractData' - | 'hostStorageReadwriteAccessToReadonlyEntry' - | 'hostStorageAccessToUnknownEntry' - | 'hostStorageMissingKeyInGet' - | 'hostStorageGetOnDeletedKey'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5; - - static hostStorageUnknownError(): ScHostStorageErrorCode; - - static hostStorageExpectContractData(): ScHostStorageErrorCode; - - static hostStorageReadwriteAccessToReadonlyEntry(): ScHostStorageErrorCode; - - static hostStorageAccessToUnknownEntry(): ScHostStorageErrorCode; - - static hostStorageMissingKeyInGet(): ScHostStorageErrorCode; - - static hostStorageGetOnDeletedKey(): ScHostStorageErrorCode; - } - - class ScHostContextErrorCode { - readonly name: 'hostContextUnknownError' | 'hostContextNoContractRunning'; - - readonly value: 0 | 1; - - static hostContextUnknownError(): ScHostContextErrorCode; - - static hostContextNoContractRunning(): ScHostContextErrorCode; - } - - class ScVmErrorCode { - readonly name: - | 'vmUnknown' - | 'vmValidation' - | 'vmInstantiation' - | 'vmFunction' - | 'vmTable' - | 'vmMemory' - | 'vmGlobal' - | 'vmValue' - | 'vmTrapUnreachable' - | 'vmTrapMemoryAccessOutOfBounds' - | 'vmTrapTableAccessOutOfBounds' - | 'vmTrapElemUninitialized' - | 'vmTrapDivisionByZero' - | 'vmTrapIntegerOverflow' - | 'vmTrapInvalidConversionToInt' - | 'vmTrapStackOverflow' - | 'vmTrapUnexpectedSignature' - | 'vmTrapMemLimitExceeded' - | 'vmTrapCpuLimitExceeded'; - - readonly value: - | 0 - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 17 - | 18; - - static vmUnknown(): ScVmErrorCode; - - static vmValidation(): ScVmErrorCode; - - static vmInstantiation(): ScVmErrorCode; - - static vmFunction(): ScVmErrorCode; - - static vmTable(): ScVmErrorCode; - - static vmMemory(): ScVmErrorCode; - - static vmGlobal(): ScVmErrorCode; - - static vmValue(): ScVmErrorCode; - - static vmTrapUnreachable(): ScVmErrorCode; - - static vmTrapMemoryAccessOutOfBounds(): ScVmErrorCode; - - static vmTrapTableAccessOutOfBounds(): ScVmErrorCode; - - static vmTrapElemUninitialized(): ScVmErrorCode; - - static vmTrapDivisionByZero(): ScVmErrorCode; - - static vmTrapIntegerOverflow(): ScVmErrorCode; - - static vmTrapInvalidConversionToInt(): ScVmErrorCode; - - static vmTrapStackOverflow(): ScVmErrorCode; - - static vmTrapUnexpectedSignature(): ScVmErrorCode; - - static vmTrapMemLimitExceeded(): ScVmErrorCode; - - static vmTrapCpuLimitExceeded(): ScVmErrorCode; - } - - class ScUnknownErrorCode { - readonly name: 'unknownErrorGeneral' | 'unknownErrorXdr'; - - readonly value: 0 | 1; - - static unknownErrorGeneral(): ScUnknownErrorCode; - - static unknownErrorXdr(): ScUnknownErrorCode; - } - - class ScObjectType { - readonly name: - | 'scoVec' - | 'scoMap' - | 'scoU64' - | 'scoI64' - | 'scoBytes' - | 'scoBigInt' - | 'scoHash' - | 'scoPublicKey' - | 'scoContractCode'; - - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - - static scoVec(): ScObjectType; - - static scoMap(): ScObjectType; - - static scoU64(): ScObjectType; - - static scoI64(): ScObjectType; - - static scoBytes(): ScObjectType; - - static scoBigInt(): ScObjectType; - - static scoHash(): ScObjectType; - - static scoPublicKey(): ScObjectType; - - static scoContractCode(): ScObjectType; - } - - class ScNumSign { - readonly name: 'negative' | 'zero' | 'positive'; - - readonly value: -1 | 0 | 1; - - static negative(): ScNumSign; - - static zero(): ScNumSign; - - static positive(): ScNumSign; - } - - class ScHashType { - readonly name: 'schashSha256'; - - readonly value: 0; - - static schashSha256(): ScHashType; - } - - class ScContractCodeType { - readonly name: 'sccontractCodeWasm' | 'sccontractCodeToken'; - - readonly value: 0 | 1; - - static sccontractCodeWasm(): ScContractCodeType; - - static sccontractCodeToken(): ScContractCodeType; - } - - class ScEnvMetaKind { - readonly name: 'scEnvMetaKindInterfaceVersion'; - - readonly value: 0; - - static scEnvMetaKindInterfaceVersion(): ScEnvMetaKind; - } - - class ScSpecType { - readonly name: - | 'scSpecTypeU32' - | 'scSpecTypeI32' - | 'scSpecTypeU64' - | 'scSpecTypeI64' - | 'scSpecTypeBool' - | 'scSpecTypeSymbol' - | 'scSpecTypeBitset' - | 'scSpecTypeStatus' - | 'scSpecTypeBytes' - | 'scSpecTypeBigInt' - | 'scSpecTypeOption' - | 'scSpecTypeResult' - | 'scSpecTypeVec' - | 'scSpecTypeSet' - | 'scSpecTypeMap' - | 'scSpecTypeTuple' - | 'scSpecTypeUdt'; - - readonly value: - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 1000 - | 1001 - | 1002 - | 1003 - | 1004 - | 1005 - | 2000; - - static scSpecTypeU32(): ScSpecType; - - static scSpecTypeI32(): ScSpecType; - - static scSpecTypeU64(): ScSpecType; - - static scSpecTypeI64(): ScSpecType; - - static scSpecTypeBool(): ScSpecType; - - static scSpecTypeSymbol(): ScSpecType; - - static scSpecTypeBitset(): ScSpecType; - - static scSpecTypeStatus(): ScSpecType; - - static scSpecTypeBytes(): ScSpecType; - - static scSpecTypeBigInt(): ScSpecType; - - static scSpecTypeOption(): ScSpecType; - - static scSpecTypeResult(): ScSpecType; - - static scSpecTypeVec(): ScSpecType; - - static scSpecTypeSet(): ScSpecType; - - static scSpecTypeMap(): ScSpecType; - - static scSpecTypeTuple(): ScSpecType; - - static scSpecTypeUdt(): ScSpecType; - } - - class ScSpecEntryKind { - readonly name: - | 'scSpecEntryFunctionV0' - | 'scSpecEntryUdtStructV0' - | 'scSpecEntryUdtUnionV0'; - - readonly value: 0 | 1 | 2; - - static scSpecEntryFunctionV0(): ScSpecEntryKind; - - static scSpecEntryUdtStructV0(): ScSpecEntryKind; - - static scSpecEntryUdtUnionV0(): ScSpecEntryKind; - } - - const Value: VarOpaque; - - type AccountId = PublicKey; - - const Thresholds: Opaque; - - const String32: XDRString; - - const String64: XDRString; - - type SequenceNumber = Int64; - - type TimePoint = Uint64; - - type Duration = Uint64; - - const DataValue: VarOpaque; - - type PoolId = typeof Hash; - - const AssetCode4: Opaque; - - const AssetCode12: Opaque; - - type SponsorshipDescriptor = undefined | AccountId; - - const UpgradeType: VarOpaque; - - const LedgerEntryChanges: XDRArray; - - const EncryptedBody: VarOpaque; - - const PeerStatList: XDRArray; - - const Hash: Opaque; - - const Uint256: Opaque; - - const Uint32: UnsignedInt; - - const Int32: SignedInt; - - class Uint64 extends UnsignedHyper {} - - class Int64 extends Hyper {} - - const Signature: VarOpaque; - - const SignatureHint: Opaque; - - type NodeId = PublicKey; - - const ScSymbol: XDRString; - - const ScVec: XDRArray; - - const ScMap: XDRArray; - - class ScpBallot { - constructor(attributes: { counter: number; value: Buffer }); - - counter(value?: number): number; - - value(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpBallot; - - static write(value: ScpBallot, io: Buffer): void; - - static isValid(value: ScpBallot): boolean; - - static toXDR(value: ScpBallot): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpBallot; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpBallot; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpNomination { - constructor(attributes: { - quorumSetHash: Buffer; - votes: Buffer[]; - accepted: Buffer[]; - }); - - quorumSetHash(value?: Buffer): Buffer; - - votes(value?: Buffer[]): Buffer[]; - - accepted(value?: Buffer[]): Buffer[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpNomination; - - static write(value: ScpNomination, io: Buffer): void; - - static isValid(value: ScpNomination): boolean; - - static toXDR(value: ScpNomination): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpNomination; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpNomination; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementPrepare { - constructor(attributes: { - quorumSetHash: Buffer; - ballot: ScpBallot; - prepared: null | ScpBallot; - preparedPrime: null | ScpBallot; - nC: number; - nH: number; - }); - - quorumSetHash(value?: Buffer): Buffer; - - ballot(value?: ScpBallot): ScpBallot; - - prepared(value?: null | ScpBallot): null | ScpBallot; - - preparedPrime(value?: null | ScpBallot): null | ScpBallot; - - nC(value?: number): number; - - nH(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementPrepare; - - static write(value: ScpStatementPrepare, io: Buffer): void; - - static isValid(value: ScpStatementPrepare): boolean; - - static toXDR(value: ScpStatementPrepare): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementPrepare; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementPrepare; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementConfirm { - constructor(attributes: { - ballot: ScpBallot; - nPrepared: number; - nCommit: number; - nH: number; - quorumSetHash: Buffer; - }); - - ballot(value?: ScpBallot): ScpBallot; - - nPrepared(value?: number): number; - - nCommit(value?: number): number; - - nH(value?: number): number; - - quorumSetHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementConfirm; - - static write(value: ScpStatementConfirm, io: Buffer): void; - - static isValid(value: ScpStatementConfirm): boolean; - - static toXDR(value: ScpStatementConfirm): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementConfirm; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementConfirm; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementExternalize { - constructor(attributes: { - commit: ScpBallot; - nH: number; - commitQuorumSetHash: Buffer; - }); - - commit(value?: ScpBallot): ScpBallot; - - nH(value?: number): number; - - commitQuorumSetHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementExternalize; - - static write(value: ScpStatementExternalize, io: Buffer): void; - - static isValid(value: ScpStatementExternalize): boolean; - - static toXDR(value: ScpStatementExternalize): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementExternalize; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementExternalize; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatement { - constructor(attributes: { - nodeId: NodeId; - slotIndex: Uint64; - pledges: ScpStatementPledges; - }); - - nodeId(value?: NodeId): NodeId; - - slotIndex(value?: Uint64): Uint64; - - pledges(value?: ScpStatementPledges): ScpStatementPledges; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatement; - - static write(value: ScpStatement, io: Buffer): void; - - static isValid(value: ScpStatement): boolean; - - static toXDR(value: ScpStatement): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatement; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpStatement; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpEnvelope { - constructor(attributes: { statement: ScpStatement; signature: Buffer }); - - statement(value?: ScpStatement): ScpStatement; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpEnvelope; - - static write(value: ScpEnvelope, io: Buffer): void; - - static isValid(value: ScpEnvelope): boolean; - - static toXDR(value: ScpEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpEnvelope; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpQuorumSet { - constructor(attributes: { - threshold: number; - validators: NodeId[]; - innerSets: ScpQuorumSet[]; - }); - - threshold(value?: number): number; - - validators(value?: NodeId[]): NodeId[]; - - innerSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpQuorumSet; - - static write(value: ScpQuorumSet, io: Buffer): void; - - static isValid(value: ScpQuorumSet): boolean; - - static toXDR(value: ScpQuorumSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpQuorumSet; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpQuorumSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AlphaNum4 { - constructor(attributes: { assetCode: Buffer; issuer: AccountId }); - - assetCode(value?: Buffer): Buffer; - - issuer(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AlphaNum4; - - static write(value: AlphaNum4, io: Buffer): void; - - static isValid(value: AlphaNum4): boolean; - - static toXDR(value: AlphaNum4): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AlphaNum4; - - static fromXDR(input: string, format: 'hex' | 'base64'): AlphaNum4; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AlphaNum12 { - constructor(attributes: { assetCode: Buffer; issuer: AccountId }); - - assetCode(value?: Buffer): Buffer; - - issuer(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AlphaNum12; - - static write(value: AlphaNum12, io: Buffer): void; - - static isValid(value: AlphaNum12): boolean; - - static toXDR(value: AlphaNum12): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AlphaNum12; - - static fromXDR(input: string, format: 'hex' | 'base64'): AlphaNum12; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Price { - constructor(attributes: { n: number; d: number }); - - n(value?: number): number; - - d(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Price; - - static write(value: Price, io: Buffer): void; - - static isValid(value: Price): boolean; - - static toXDR(value: Price): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Price; - - static fromXDR(input: string, format: 'hex' | 'base64'): Price; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Liabilities { - constructor(attributes: { buying: Int64; selling: Int64 }); - - buying(value?: Int64): Int64; - - selling(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Liabilities; - - static write(value: Liabilities, io: Buffer): void; - - static isValid(value: Liabilities): boolean; - - static toXDR(value: Liabilities): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Liabilities; - - static fromXDR(input: string, format: 'hex' | 'base64'): Liabilities; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Signer { - constructor(attributes: { key: SignerKey; weight: number }); - - key(value?: SignerKey): SignerKey; - - weight(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Signer; - - static write(value: Signer, io: Buffer): void; - - static isValid(value: Signer): boolean; - - static toXDR(value: Signer): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Signer; - - static fromXDR(input: string, format: 'hex' | 'base64'): Signer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV3 { - constructor(attributes: { - ext: ExtensionPoint; - seqLedger: number; - seqTime: TimePoint; - }); - - ext(value?: ExtensionPoint): ExtensionPoint; - - seqLedger(value?: number): number; - - seqTime(value?: TimePoint): TimePoint; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV3; - - static write(value: AccountEntryExtensionV3, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV3): boolean; - - static toXDR(value: AccountEntryExtensionV3): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV3; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV3; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV2 { - constructor(attributes: { - numSponsored: number; - numSponsoring: number; - signerSponsoringIDs: SponsorshipDescriptor[]; - ext: AccountEntryExtensionV2Ext; - }); - - numSponsored(value?: number): number; - - numSponsoring(value?: number): number; - - signerSponsoringIDs( - value?: SponsorshipDescriptor[] - ): SponsorshipDescriptor[]; - - ext(value?: AccountEntryExtensionV2Ext): AccountEntryExtensionV2Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV2; - - static write(value: AccountEntryExtensionV2, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV2): boolean; - - static toXDR(value: AccountEntryExtensionV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV2; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV1 { - constructor(attributes: { - liabilities: Liabilities; - ext: AccountEntryExtensionV1Ext; - }); - - liabilities(value?: Liabilities): Liabilities; - - ext(value?: AccountEntryExtensionV1Ext): AccountEntryExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV1; - - static write(value: AccountEntryExtensionV1, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV1): boolean; - - static toXDR(value: AccountEntryExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntry { - constructor(attributes: { - accountId: AccountId; - balance: Int64; - seqNum: SequenceNumber; - numSubEntries: number; - inflationDest: null | AccountId; - flags: number; - homeDomain: string | Buffer; - thresholds: Buffer; - signers: Signer[]; - ext: AccountEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - balance(value?: Int64): Int64; - - seqNum(value?: SequenceNumber): SequenceNumber; - - numSubEntries(value?: number): number; - - inflationDest(value?: null | AccountId): null | AccountId; - - flags(value?: number): number; - - homeDomain(value?: string | Buffer): string | Buffer; - - thresholds(value?: Buffer): Buffer; - - signers(value?: Signer[]): Signer[]; - - ext(value?: AccountEntryExt): AccountEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntry; - - static write(value: AccountEntry, io: Buffer): void; - - static isValid(value: AccountEntry): boolean; - - static toXDR(value: AccountEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExtensionV2 { - constructor(attributes: { - liquidityPoolUseCount: number; - ext: TrustLineEntryExtensionV2Ext; - }); - - liquidityPoolUseCount(value?: number): number; - - ext(value?: TrustLineEntryExtensionV2Ext): TrustLineEntryExtensionV2Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExtensionV2; - - static write(value: TrustLineEntryExtensionV2, io: Buffer): void; - - static isValid(value: TrustLineEntryExtensionV2): boolean; - - static toXDR(value: TrustLineEntryExtensionV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExtensionV2; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryExtensionV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryV1 { - constructor(attributes: { - liabilities: Liabilities; - ext: TrustLineEntryV1Ext; - }); - - liabilities(value?: Liabilities): Liabilities; - - ext(value?: TrustLineEntryV1Ext): TrustLineEntryV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryV1; - - static write(value: TrustLineEntryV1, io: Buffer): void; - - static isValid(value: TrustLineEntryV1): boolean; - - static toXDR(value: TrustLineEntryV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntryV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntry { - constructor(attributes: { - accountId: AccountId; - asset: TrustLineAsset; - balance: Int64; - limit: Int64; - flags: number; - ext: TrustLineEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - asset(value?: TrustLineAsset): TrustLineAsset; - - balance(value?: Int64): Int64; - - limit(value?: Int64): Int64; - - flags(value?: number): number; - - ext(value?: TrustLineEntryExt): TrustLineEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntry; - - static write(value: TrustLineEntry, io: Buffer): void; - - static isValid(value: TrustLineEntry): boolean; - - static toXDR(value: TrustLineEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OfferEntry { - constructor(attributes: { - sellerId: AccountId; - offerId: Int64; - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - flags: number; - ext: OfferEntryExt; - }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - flags(value?: number): number; - - ext(value?: OfferEntryExt): OfferEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OfferEntry; - - static write(value: OfferEntry, io: Buffer): void; - - static isValid(value: OfferEntry): boolean; - - static toXDR(value: OfferEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OfferEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): OfferEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DataEntry { - constructor(attributes: { - accountId: AccountId; - dataName: string | Buffer; - dataValue: Buffer; - ext: DataEntryExt; - }); - - accountId(value?: AccountId): AccountId; - - dataName(value?: string | Buffer): string | Buffer; - - dataValue(value?: Buffer): Buffer; - - ext(value?: DataEntryExt): DataEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DataEntry; - - static write(value: DataEntry, io: Buffer): void; - - static isValid(value: DataEntry): boolean; - - static toXDR(value: DataEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DataEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): DataEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimantV0 { - constructor(attributes: { - destination: AccountId; - predicate: ClaimPredicate; - }); - - destination(value?: AccountId): AccountId; - - predicate(value?: ClaimPredicate): ClaimPredicate; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimantV0; - - static write(value: ClaimantV0, io: Buffer): void; - - static isValid(value: ClaimantV0): boolean; - - static toXDR(value: ClaimantV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimantV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimantV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExtensionV1 { - constructor(attributes: { - ext: ClaimableBalanceEntryExtensionV1Ext; - flags: number; - }); - - ext( - value?: ClaimableBalanceEntryExtensionV1Ext - ): ClaimableBalanceEntryExtensionV1Ext; - - flags(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExtensionV1; - - static write(value: ClaimableBalanceEntryExtensionV1, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExtensionV1): boolean; - - static toXDR(value: ClaimableBalanceEntryExtensionV1): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClaimableBalanceEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntry { - constructor(attributes: { - balanceId: ClaimableBalanceId; - claimants: Claimant[]; - asset: Asset; - amount: Int64; - ext: ClaimableBalanceEntryExt; - }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - claimants(value?: Claimant[]): Claimant[]; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - ext(value?: ClaimableBalanceEntryExt): ClaimableBalanceEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntry; - - static write(value: ClaimableBalanceEntry, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntry): boolean; - - static toXDR(value: ClaimableBalanceEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolConstantProductParameters { - constructor(attributes: { assetA: Asset; assetB: Asset; fee: number }); - - assetA(value?: Asset): Asset; - - assetB(value?: Asset): Asset; - - fee(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolConstantProductParameters; - - static write( - value: LiquidityPoolConstantProductParameters, - io: Buffer - ): void; - - static isValid(value: LiquidityPoolConstantProductParameters): boolean; - - static toXDR(value: LiquidityPoolConstantProductParameters): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): LiquidityPoolConstantProductParameters; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolConstantProductParameters; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntryConstantProduct { - constructor(attributes: { - params: LiquidityPoolConstantProductParameters; - reserveA: Int64; - reserveB: Int64; - totalPoolShares: Int64; - poolSharesTrustLineCount: Int64; - }); - - params( - value?: LiquidityPoolConstantProductParameters - ): LiquidityPoolConstantProductParameters; - - reserveA(value?: Int64): Int64; - - reserveB(value?: Int64): Int64; - - totalPoolShares(value?: Int64): Int64; - - poolSharesTrustLineCount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntryConstantProduct; - - static write(value: LiquidityPoolEntryConstantProduct, io: Buffer): void; - - static isValid(value: LiquidityPoolEntryConstantProduct): boolean; - - static toXDR(value: LiquidityPoolEntryConstantProduct): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): LiquidityPoolEntryConstantProduct; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolEntryConstantProduct; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntry { - constructor(attributes: { - liquidityPoolId: PoolId; - body: LiquidityPoolEntryBody; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - body(value?: LiquidityPoolEntryBody): LiquidityPoolEntryBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntry; - - static write(value: LiquidityPoolEntry, io: Buffer): void; - - static isValid(value: LiquidityPoolEntry): boolean; - - static toXDR(value: LiquidityPoolEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): LiquidityPoolEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ContractDataEntry { - constructor(attributes: { contractId: Buffer; key: ScVal; val: ScVal }); - - contractId(value?: Buffer): Buffer; - - key(value?: ScVal): ScVal; - - val(value?: ScVal): ScVal; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ContractDataEntry; - - static write(value: ContractDataEntry, io: Buffer): void; - - static isValid(value: ContractDataEntry): boolean; - - static toXDR(value: ContractDataEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ContractDataEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ContractDataEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ConfigSettingEntry { - constructor(attributes: { - ext: ConfigSettingEntryExt; - configSettingId: ConfigSettingId; - setting: ConfigSetting; - }); - - ext(value?: ConfigSettingEntryExt): ConfigSettingEntryExt; - - configSettingId(value?: ConfigSettingId): ConfigSettingId; - - setting(value?: ConfigSetting): ConfigSetting; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ConfigSettingEntry; - - static write(value: ConfigSettingEntry, io: Buffer): void; - - static isValid(value: ConfigSettingEntry): boolean; - - static toXDR(value: ConfigSettingEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ConfigSettingEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ConfigSettingEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExtensionV1 { - constructor(attributes: { - sponsoringId: SponsorshipDescriptor; - ext: LedgerEntryExtensionV1Ext; - }); - - sponsoringId(value?: SponsorshipDescriptor): SponsorshipDescriptor; - - ext(value?: LedgerEntryExtensionV1Ext): LedgerEntryExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExtensionV1; - - static write(value: LedgerEntryExtensionV1, io: Buffer): void; - - static isValid(value: LedgerEntryExtensionV1): boolean; - - static toXDR(value: LedgerEntryExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerEntryExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntry { - constructor(attributes: { - lastModifiedLedgerSeq: number; - data: LedgerEntryData; - ext: LedgerEntryExt; - }); - - lastModifiedLedgerSeq(value?: number): number; - - data(value?: LedgerEntryData): LedgerEntryData; - - ext(value?: LedgerEntryExt): LedgerEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntry; - - static write(value: LedgerEntry, io: Buffer): void; - - static isValid(value: LedgerEntry): boolean; - - static toXDR(value: LedgerEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyAccount { - constructor(attributes: { accountId: AccountId }); - - accountId(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyAccount; - - static write(value: LedgerKeyAccount, io: Buffer): void; - - static isValid(value: LedgerKeyAccount): boolean; - - static toXDR(value: LedgerKeyAccount): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyAccount; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyAccount; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyTrustLine { - constructor(attributes: { accountId: AccountId; asset: TrustLineAsset }); - - accountId(value?: AccountId): AccountId; - - asset(value?: TrustLineAsset): TrustLineAsset; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyTrustLine; - - static write(value: LedgerKeyTrustLine, io: Buffer): void; - - static isValid(value: LedgerKeyTrustLine): boolean; - - static toXDR(value: LedgerKeyTrustLine): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyTrustLine; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyTrustLine; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyOffer { - constructor(attributes: { sellerId: AccountId; offerId: Int64 }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyOffer; - - static write(value: LedgerKeyOffer, io: Buffer): void; - - static isValid(value: LedgerKeyOffer): boolean; - - static toXDR(value: LedgerKeyOffer): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyOffer; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyOffer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyData { - constructor(attributes: { - accountId: AccountId; - dataName: string | Buffer; - }); - - accountId(value?: AccountId): AccountId; - - dataName(value?: string | Buffer): string | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyData; - - static write(value: LedgerKeyData, io: Buffer): void; - - static isValid(value: LedgerKeyData): boolean; - - static toXDR(value: LedgerKeyData): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyData; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKeyData; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyClaimableBalance { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyClaimableBalance; - - static write(value: LedgerKeyClaimableBalance, io: Buffer): void; - - static isValid(value: LedgerKeyClaimableBalance): boolean; - - static toXDR(value: LedgerKeyClaimableBalance): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyClaimableBalance; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyClaimableBalance; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyLiquidityPool { - constructor(attributes: { liquidityPoolId: PoolId }); - - liquidityPoolId(value?: PoolId): PoolId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyLiquidityPool; - - static write(value: LedgerKeyLiquidityPool, io: Buffer): void; - - static isValid(value: LedgerKeyLiquidityPool): boolean; - - static toXDR(value: LedgerKeyLiquidityPool): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyLiquidityPool; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyLiquidityPool; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyContractData { - constructor(attributes: { contractId: Buffer; key: ScVal }); - - contractId(value?: Buffer): Buffer; - - key(value?: ScVal): ScVal; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyContractData; - - static write(value: LedgerKeyContractData, io: Buffer): void; - - static isValid(value: LedgerKeyContractData): boolean; - - static toXDR(value: LedgerKeyContractData): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyContractData; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyContractData; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKeyConfigSetting { - constructor(attributes: { configSettingId: ConfigSettingId }); - - configSettingId(value?: ConfigSettingId): ConfigSettingId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKeyConfigSetting; - - static write(value: LedgerKeyConfigSetting, io: Buffer): void; - - static isValid(value: LedgerKeyConfigSetting): boolean; - - static toXDR(value: LedgerKeyConfigSetting): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKeyConfigSetting; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerKeyConfigSetting; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseValueSignature { - constructor(attributes: { nodeId: NodeId; signature: Buffer }); - - nodeId(value?: NodeId): NodeId; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseValueSignature; - - static write(value: LedgerCloseValueSignature, io: Buffer): void; - - static isValid(value: LedgerCloseValueSignature): boolean; - - static toXDR(value: LedgerCloseValueSignature): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseValueSignature; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerCloseValueSignature; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarValue { - constructor(attributes: { - txSetHash: Buffer; - closeTime: TimePoint; - upgrades: Buffer[]; - ext: StellarValueExt; - }); - - txSetHash(value?: Buffer): Buffer; - - closeTime(value?: TimePoint): TimePoint; - - upgrades(value?: Buffer[]): Buffer[]; - - ext(value?: StellarValueExt): StellarValueExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarValue; - - static write(value: StellarValue, io: Buffer): void; - - static isValid(value: StellarValue): boolean; - - static toXDR(value: StellarValue): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarValue; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarValue; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExtensionV1 { - constructor(attributes: { flags: number; ext: LedgerHeaderExtensionV1Ext }); - - flags(value?: number): number; - - ext(value?: LedgerHeaderExtensionV1Ext): LedgerHeaderExtensionV1Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExtensionV1; - - static write(value: LedgerHeaderExtensionV1, io: Buffer): void; - - static isValid(value: LedgerHeaderExtensionV1): boolean; - - static toXDR(value: LedgerHeaderExtensionV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExtensionV1; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderExtensionV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeader { - constructor(attributes: { - ledgerVersion: number; - previousLedgerHash: Buffer; - scpValue: StellarValue; - txSetResultHash: Buffer; - bucketListHash: Buffer; - ledgerSeq: number; - totalCoins: Int64; - feePool: Int64; - inflationSeq: number; - idPool: Uint64; - baseFee: number; - baseReserve: number; - maxTxSetSize: number; - skipList: Buffer[]; - ext: LedgerHeaderExt; - }); - - ledgerVersion(value?: number): number; - - previousLedgerHash(value?: Buffer): Buffer; - - scpValue(value?: StellarValue): StellarValue; - - txSetResultHash(value?: Buffer): Buffer; - - bucketListHash(value?: Buffer): Buffer; - - ledgerSeq(value?: number): number; - - totalCoins(value?: Int64): Int64; - - feePool(value?: Int64): Int64; - - inflationSeq(value?: number): number; - - idPool(value?: Uint64): Uint64; - - baseFee(value?: number): number; - - baseReserve(value?: number): number; - - maxTxSetSize(value?: number): number; - - skipList(value?: Buffer[]): Buffer[]; - - ext(value?: LedgerHeaderExt): LedgerHeaderExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeader; - - static write(value: LedgerHeader, io: Buffer): void; - - static isValid(value: LedgerHeader): boolean; - - static toXDR(value: LedgerHeader): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeader; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerHeader; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerUpgradeConfigSetting { - constructor(attributes: { id: ConfigSettingId; setting: ConfigSetting }); - - id(value?: ConfigSettingId): ConfigSettingId; - - setting(value?: ConfigSetting): ConfigSetting; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerUpgradeConfigSetting; - - static write(value: LedgerUpgradeConfigSetting, io: Buffer): void; - - static isValid(value: LedgerUpgradeConfigSetting): boolean; - - static toXDR(value: LedgerUpgradeConfigSetting): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerUpgradeConfigSetting; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerUpgradeConfigSetting; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketMetadata { - constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); - - ledgerVersion(value?: number): number; - - ext(value?: BucketMetadataExt): BucketMetadataExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadata; - - static write(value: BucketMetadata, io: Buffer): void; - - static isValid(value: BucketMetadata): boolean; - - static toXDR(value: BucketMetadata): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TxSetComponentTxsMaybeDiscountedFee { - constructor(attributes: { - baseFee: null | Int64; - txes: TransactionEnvelope[]; - }); - - baseFee(value?: null | Int64): null | Int64; - - txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TxSetComponentTxsMaybeDiscountedFee; - - static write(value: TxSetComponentTxsMaybeDiscountedFee, io: Buffer): void; - - static isValid(value: TxSetComponentTxsMaybeDiscountedFee): boolean; - - static toXDR(value: TxSetComponentTxsMaybeDiscountedFee): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TxSetComponentTxsMaybeDiscountedFee; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TxSetComponentTxsMaybeDiscountedFee; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSet { - constructor(attributes: { - previousLedgerHash: Buffer; - txes: TransactionEnvelope[]; - }); - - previousLedgerHash(value?: Buffer): Buffer; - - txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSet; - - static write(value: TransactionSet, io: Buffer): void; - - static isValid(value: TransactionSet): boolean; - - static toXDR(value: TransactionSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSet; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSetV1 { - constructor(attributes: { - previousLedgerHash: Buffer; - phases: TransactionPhase[]; - }); - - previousLedgerHash(value?: Buffer): Buffer; - - phases(value?: TransactionPhase[]): TransactionPhase[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSetV1; - - static write(value: TransactionSetV1, io: Buffer): void; - - static isValid(value: TransactionSetV1): boolean; - - static toXDR(value: TransactionSetV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSetV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionSetV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultPair { - constructor(attributes: { - transactionHash: Buffer; - result: TransactionResult; - }); - - transactionHash(value?: Buffer): Buffer; - - result(value?: TransactionResult): TransactionResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultPair; - - static write(value: TransactionResultPair, io: Buffer): void; - - static isValid(value: TransactionResultPair): boolean; - - static toXDR(value: TransactionResultPair): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultPair; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultPair; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultSet { - constructor(attributes: { results: TransactionResultPair[] }); - - results(value?: TransactionResultPair[]): TransactionResultPair[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultSet; - - static write(value: TransactionResultSet, io: Buffer): void; - - static isValid(value: TransactionResultSet): boolean; - - static toXDR(value: TransactionResultSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultSet; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryEntry { - constructor(attributes: { - ledgerSeq: number; - txSet: TransactionSet; - ext: TransactionHistoryEntryExt; - }); - - ledgerSeq(value?: number): number; - - txSet(value?: TransactionSet): TransactionSet; - - ext(value?: TransactionHistoryEntryExt): TransactionHistoryEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryEntry; - - static write(value: TransactionHistoryEntry, io: Buffer): void; - - static isValid(value: TransactionHistoryEntry): boolean; - - static toXDR(value: TransactionHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionHistoryEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryResultEntry { - constructor(attributes: { - ledgerSeq: number; - txResultSet: TransactionResultSet; - ext: TransactionHistoryResultEntryExt; - }); - - ledgerSeq(value?: number): number; - - txResultSet(value?: TransactionResultSet): TransactionResultSet; - - ext( - value?: TransactionHistoryResultEntryExt - ): TransactionHistoryResultEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryResultEntry; - - static write(value: TransactionHistoryResultEntry, io: Buffer): void; - - static isValid(value: TransactionHistoryResultEntry): boolean; - - static toXDR(value: TransactionHistoryResultEntry): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionHistoryResultEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryResultEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderHistoryEntry { - constructor(attributes: { - hash: Buffer; - header: LedgerHeader; - ext: LedgerHeaderHistoryEntryExt; - }); - - hash(value?: Buffer): Buffer; - - header(value?: LedgerHeader): LedgerHeader; - - ext(value?: LedgerHeaderHistoryEntryExt): LedgerHeaderHistoryEntryExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderHistoryEntry; - - static write(value: LedgerHeaderHistoryEntry, io: Buffer): void; - - static isValid(value: LedgerHeaderHistoryEntry): boolean; - - static toXDR(value: LedgerHeaderHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderHistoryEntry; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerScpMessages { - constructor(attributes: { ledgerSeq: number; messages: ScpEnvelope[] }); - - ledgerSeq(value?: number): number; - - messages(value?: ScpEnvelope[]): ScpEnvelope[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerScpMessages; - - static write(value: LedgerScpMessages, io: Buffer): void; - - static isValid(value: LedgerScpMessages): boolean; - - static toXDR(value: LedgerScpMessages): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerScpMessages; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerScpMessages; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpHistoryEntryV0 { - constructor(attributes: { - quorumSets: ScpQuorumSet[]; - ledgerMessages: LedgerScpMessages; - }); - - quorumSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; - - ledgerMessages(value?: LedgerScpMessages): LedgerScpMessages; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpHistoryEntryV0; - - static write(value: ScpHistoryEntryV0, io: Buffer): void; - - static isValid(value: ScpHistoryEntryV0): boolean; - - static toXDR(value: ScpHistoryEntryV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpHistoryEntryV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpHistoryEntryV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationMeta { - constructor(attributes: { changes: LedgerEntryChange[] }); - - changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationMeta; - - static write(value: OperationMeta, io: Buffer): void; - - static isValid(value: OperationMeta): boolean; - - static toXDR(value: OperationMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMetaV1 { - constructor(attributes: { - txChanges: LedgerEntryChange[]; - operations: OperationMeta[]; - }); - - txChanges(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - operations(value?: OperationMeta[]): OperationMeta[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMetaV1; - - static write(value: TransactionMetaV1, io: Buffer): void; - - static isValid(value: TransactionMetaV1): boolean; - - static toXDR(value: TransactionMetaV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMetaV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMetaV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMetaV2 { - constructor(attributes: { - txChangesBefore: LedgerEntryChange[]; - operations: OperationMeta[]; - txChangesAfter: LedgerEntryChange[]; - }); - - txChangesBefore(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - operations(value?: OperationMeta[]): OperationMeta[]; - - txChangesAfter(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMetaV2; - - static write(value: TransactionMetaV2, io: Buffer): void; - - static isValid(value: TransactionMetaV2): boolean; - - static toXDR(value: TransactionMetaV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMetaV2; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMetaV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultMeta { - constructor(attributes: { - result: TransactionResultPair; - feeProcessing: LedgerEntryChange[]; - txApplyProcessing: TransactionMeta; - }); - - result(value?: TransactionResultPair): TransactionResultPair; - - feeProcessing(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - txApplyProcessing(value?: TransactionMeta): TransactionMeta; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultMeta; - - static write(value: TransactionResultMeta, io: Buffer): void; - - static isValid(value: TransactionResultMeta): boolean; - - static toXDR(value: TransactionResultMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultMeta; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class UpgradeEntryMeta { - constructor(attributes: { - upgrade: LedgerUpgrade; - changes: LedgerEntryChange[]; - }); - - upgrade(value?: LedgerUpgrade): LedgerUpgrade; - - changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): UpgradeEntryMeta; - - static write(value: UpgradeEntryMeta, io: Buffer): void; - - static isValid(value: UpgradeEntryMeta): boolean; - - static toXDR(value: UpgradeEntryMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): UpgradeEntryMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): UpgradeEntryMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMetaV0 { - constructor(attributes: { - ledgerHeader: LedgerHeaderHistoryEntry; - txSet: TransactionSet; - txProcessing: TransactionResultMeta[]; - upgradesProcessing: UpgradeEntryMeta[]; - scpInfo: ScpHistoryEntry[]; - }); - - ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; - - txSet(value?: TransactionSet): TransactionSet; - - txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; - - upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; - - scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMetaV0; - - static write(value: LedgerCloseMetaV0, io: Buffer): void; - - static isValid(value: LedgerCloseMetaV0): boolean; - - static toXDR(value: LedgerCloseMetaV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMetaV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMetaV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMetaV1 { - constructor(attributes: { - ledgerHeader: LedgerHeaderHistoryEntry; - txSet: GeneralizedTransactionSet; - txProcessing: TransactionResultMeta[]; - upgradesProcessing: UpgradeEntryMeta[]; - scpInfo: ScpHistoryEntry[]; - }); - - ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; - - txSet(value?: GeneralizedTransactionSet): GeneralizedTransactionSet; - - txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; - - upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; - - scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMetaV1; - - static write(value: LedgerCloseMetaV1, io: Buffer): void; - - static isValid(value: LedgerCloseMetaV1): boolean; - - static toXDR(value: LedgerCloseMetaV1): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMetaV1; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMetaV1; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Error { - constructor(attributes: { code: ErrorCode; msg: string | Buffer }); - - code(value?: ErrorCode): ErrorCode; - - msg(value?: string | Buffer): string | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Error; - - static write(value: Error, io: Buffer): void; - - static isValid(value: Error): boolean; - - static toXDR(value: Error): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Error; - - static fromXDR(input: string, format: 'hex' | 'base64'): Error; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SendMore { - constructor(attributes: { numMessages: number }); - - numMessages(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SendMore; - - static write(value: SendMore, io: Buffer): void; - - static isValid(value: SendMore): boolean; - - static toXDR(value: SendMore): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SendMore; - - static fromXDR(input: string, format: 'hex' | 'base64'): SendMore; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthCert { - constructor(attributes: { - pubkey: Curve25519Public; - expiration: Uint64; - sig: Buffer; - }); - - pubkey(value?: Curve25519Public): Curve25519Public; - - expiration(value?: Uint64): Uint64; - - sig(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthCert; - - static write(value: AuthCert, io: Buffer): void; - - static isValid(value: AuthCert): boolean; - - static toXDR(value: AuthCert): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthCert; - - static fromXDR(input: string, format: 'hex' | 'base64'): AuthCert; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Hello { - constructor(attributes: { - ledgerVersion: number; - overlayVersion: number; - overlayMinVersion: number; - networkId: Buffer; - versionStr: string | Buffer; - listeningPort: number; - peerId: NodeId; - cert: AuthCert; - nonce: Buffer; - }); - - ledgerVersion(value?: number): number; - - overlayVersion(value?: number): number; - - overlayMinVersion(value?: number): number; - - networkId(value?: Buffer): Buffer; - - versionStr(value?: string | Buffer): string | Buffer; - - listeningPort(value?: number): number; - - peerId(value?: NodeId): NodeId; - - cert(value?: AuthCert): AuthCert; - - nonce(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Hello; - - static write(value: Hello, io: Buffer): void; - - static isValid(value: Hello): boolean; - - static toXDR(value: Hello): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Hello; - - static fromXDR(input: string, format: 'hex' | 'base64'): Hello; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Auth { - constructor(attributes: { unused: number }); - - unused(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Auth; - - static write(value: Auth, io: Buffer): void; - - static isValid(value: Auth): boolean; - - static toXDR(value: Auth): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Auth; - - static fromXDR(input: string, format: 'hex' | 'base64'): Auth; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerAddress { - constructor(attributes: { - ip: PeerAddressIp; - port: number; - numFailures: number; - }); - - ip(value?: PeerAddressIp): PeerAddressIp; - - port(value?: number): number; - - numFailures(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerAddress; - - static write(value: PeerAddress, io: Buffer): void; - - static isValid(value: PeerAddress): boolean; - - static toXDR(value: PeerAddress): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerAddress; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerAddress; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DontHave { - constructor(attributes: { type: MessageType; reqHash: Buffer }); - - type(value?: MessageType): MessageType; - - reqHash(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DontHave; - - static write(value: DontHave, io: Buffer): void; - - static isValid(value: DontHave): boolean; - - static toXDR(value: DontHave): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DontHave; - - static fromXDR(input: string, format: 'hex' | 'base64'): DontHave; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyRequestMessage { - constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; - ledgerNum: number; - encryptionKey: Curve25519Public; - commandType: SurveyMessageCommandType; - }); - - surveyorPeerId(value?: NodeId): NodeId; - - surveyedPeerId(value?: NodeId): NodeId; - - ledgerNum(value?: number): number; - - encryptionKey(value?: Curve25519Public): Curve25519Public; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyRequestMessage; - - static write(value: SurveyRequestMessage, io: Buffer): void; - - static isValid(value: SurveyRequestMessage): boolean; - - static toXDR(value: SurveyRequestMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyRequestMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SurveyRequestMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignedSurveyRequestMessage { - constructor(attributes: { - requestSignature: Buffer; - request: SurveyRequestMessage; - }); - - requestSignature(value?: Buffer): Buffer; - - request(value?: SurveyRequestMessage): SurveyRequestMessage; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignedSurveyRequestMessage; - - static write(value: SignedSurveyRequestMessage, io: Buffer): void; - - static isValid(value: SignedSurveyRequestMessage): boolean; - - static toXDR(value: SignedSurveyRequestMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignedSurveyRequestMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignedSurveyRequestMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyResponseMessage { - constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; - ledgerNum: number; - commandType: SurveyMessageCommandType; - encryptedBody: Buffer; - }); - - surveyorPeerId(value?: NodeId): NodeId; - - surveyedPeerId(value?: NodeId): NodeId; - - ledgerNum(value?: number): number; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - - encryptedBody(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyResponseMessage; - - static write(value: SurveyResponseMessage, io: Buffer): void; - - static isValid(value: SurveyResponseMessage): boolean; - - static toXDR(value: SurveyResponseMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyResponseMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SurveyResponseMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignedSurveyResponseMessage { - constructor(attributes: { - responseSignature: Buffer; - response: SurveyResponseMessage; - }); - - responseSignature(value?: Buffer): Buffer; - - response(value?: SurveyResponseMessage): SurveyResponseMessage; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignedSurveyResponseMessage; - - static write(value: SignedSurveyResponseMessage, io: Buffer): void; - - static isValid(value: SignedSurveyResponseMessage): boolean; - - static toXDR(value: SignedSurveyResponseMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignedSurveyResponseMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignedSurveyResponseMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerStats { - constructor(attributes: { - id: NodeId; - versionStr: string | Buffer; - messagesRead: Uint64; - messagesWritten: Uint64; - bytesRead: Uint64; - bytesWritten: Uint64; - secondsConnected: Uint64; - uniqueFloodBytesRecv: Uint64; - duplicateFloodBytesRecv: Uint64; - uniqueFetchBytesRecv: Uint64; - duplicateFetchBytesRecv: Uint64; - uniqueFloodMessageRecv: Uint64; - duplicateFloodMessageRecv: Uint64; - uniqueFetchMessageRecv: Uint64; - duplicateFetchMessageRecv: Uint64; - }); - - id(value?: NodeId): NodeId; - - versionStr(value?: string | Buffer): string | Buffer; - - messagesRead(value?: Uint64): Uint64; - - messagesWritten(value?: Uint64): Uint64; - - bytesRead(value?: Uint64): Uint64; - - bytesWritten(value?: Uint64): Uint64; - - secondsConnected(value?: Uint64): Uint64; - - uniqueFloodBytesRecv(value?: Uint64): Uint64; - - duplicateFloodBytesRecv(value?: Uint64): Uint64; - - uniqueFetchBytesRecv(value?: Uint64): Uint64; - - duplicateFetchBytesRecv(value?: Uint64): Uint64; - - uniqueFloodMessageRecv(value?: Uint64): Uint64; - - duplicateFloodMessageRecv(value?: Uint64): Uint64; - - uniqueFetchMessageRecv(value?: Uint64): Uint64; - - duplicateFetchMessageRecv(value?: Uint64): Uint64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerStats; - - static write(value: PeerStats, io: Buffer): void; - - static isValid(value: PeerStats): boolean; - - static toXDR(value: PeerStats): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerStats; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerStats; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TopologyResponseBody { - constructor(attributes: { - inboundPeers: PeerStats[]; - outboundPeers: PeerStats[]; - totalInboundPeerCount: number; - totalOutboundPeerCount: number; - }); - - inboundPeers(value?: PeerStats[]): PeerStats[]; - - outboundPeers(value?: PeerStats[]): PeerStats[]; - - totalInboundPeerCount(value?: number): number; - - totalOutboundPeerCount(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TopologyResponseBody; - - static write(value: TopologyResponseBody, io: Buffer): void; - - static isValid(value: TopologyResponseBody): boolean; - - static toXDR(value: TopologyResponseBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TopologyResponseBody; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TopologyResponseBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthenticatedMessageV0 { - constructor(attributes: { - sequence: Uint64; - message: StellarMessage; - mac: HmacSha256Mac; - }); - - sequence(value?: Uint64): Uint64; - - message(value?: StellarMessage): StellarMessage; - - mac(value?: HmacSha256Mac): HmacSha256Mac; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthenticatedMessageV0; - - static write(value: AuthenticatedMessageV0, io: Buffer): void; - - static isValid(value: AuthenticatedMessageV0): boolean; - - static toXDR(value: AuthenticatedMessageV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthenticatedMessageV0; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AuthenticatedMessageV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class MuxedAccountMed25519 { - constructor(attributes: { id: Uint64; ed25519: Buffer }); - - id(value?: Uint64): Uint64; - - ed25519(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): MuxedAccountMed25519; - - static write(value: MuxedAccountMed25519, io: Buffer): void; - - static isValid(value: MuxedAccountMed25519): boolean; - - static toXDR(value: MuxedAccountMed25519): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): MuxedAccountMed25519; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): MuxedAccountMed25519; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DecoratedSignature { - constructor(attributes: { hint: Buffer; signature: Buffer }); - - hint(value?: Buffer): Buffer; - - signature(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DecoratedSignature; - - static write(value: DecoratedSignature, io: Buffer): void; - - static isValid(value: DecoratedSignature): boolean; - - static toXDR(value: DecoratedSignature): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DecoratedSignature; - - static fromXDR(input: string, format: 'hex' | 'base64'): DecoratedSignature; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerFootprint { - constructor(attributes: { readOnly: LedgerKey[]; readWrite: LedgerKey[] }); - - readOnly(value?: LedgerKey[]): LedgerKey[]; - - readWrite(value?: LedgerKey[]): LedgerKey[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerFootprint; - - static write(value: LedgerFootprint, io: Buffer): void; - - static isValid(value: LedgerFootprint): boolean; - - static toXDR(value: LedgerFootprint): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerFootprint; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerFootprint; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateAccountOp { - constructor(attributes: { destination: AccountId; startingBalance: Int64 }); - - destination(value?: AccountId): AccountId; - - startingBalance(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateAccountOp; - - static write(value: CreateAccountOp, io: Buffer): void; - - static isValid(value: CreateAccountOp): boolean; - - static toXDR(value: CreateAccountOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateAccountOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): CreateAccountOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PaymentOp { - constructor(attributes: { - destination: MuxedAccount; - asset: Asset; - amount: Int64; - }); - - destination(value?: MuxedAccount): MuxedAccount; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PaymentOp; - - static write(value: PaymentOp, io: Buffer): void; - - static isValid(value: PaymentOp): boolean; - - static toXDR(value: PaymentOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PaymentOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): PaymentOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveOp { - constructor(attributes: { - sendAsset: Asset; - sendMax: Int64; - destination: MuxedAccount; - destAsset: Asset; - destAmount: Int64; - path: Asset[]; - }); - - sendAsset(value?: Asset): Asset; - - sendMax(value?: Int64): Int64; - - destination(value?: MuxedAccount): MuxedAccount; - - destAsset(value?: Asset): Asset; - - destAmount(value?: Int64): Int64; - - path(value?: Asset[]): Asset[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveOp; - - static write(value: PathPaymentStrictReceiveOp, io: Buffer): void; - - static isValid(value: PathPaymentStrictReceiveOp): boolean; - - static toXDR(value: PathPaymentStrictReceiveOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictReceiveOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendOp { - constructor(attributes: { - sendAsset: Asset; - sendAmount: Int64; - destination: MuxedAccount; - destAsset: Asset; - destMin: Int64; - path: Asset[]; - }); - - sendAsset(value?: Asset): Asset; - - sendAmount(value?: Int64): Int64; - - destination(value?: MuxedAccount): MuxedAccount; - - destAsset(value?: Asset): Asset; - - destMin(value?: Int64): Int64; - - path(value?: Asset[]): Asset[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendOp; - - static write(value: PathPaymentStrictSendOp, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendOp): boolean; - - static toXDR(value: PathPaymentStrictSendOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictSendOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageSellOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - offerId: Int64; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageSellOfferOp; - - static write(value: ManageSellOfferOp, io: Buffer): void; - - static isValid(value: ManageSellOfferOp): boolean; - - static toXDR(value: ManageSellOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageSellOfferOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageSellOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageBuyOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - buyAmount: Int64; - price: Price; - offerId: Int64; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - buyAmount(value?: Int64): Int64; - - price(value?: Price): Price; - - offerId(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageBuyOfferOp; - - static write(value: ManageBuyOfferOp, io: Buffer): void; - - static isValid(value: ManageBuyOfferOp): boolean; - - static toXDR(value: ManageBuyOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageBuyOfferOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageBuyOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreatePassiveSellOfferOp { - constructor(attributes: { - selling: Asset; - buying: Asset; - amount: Int64; - price: Price; - }); - - selling(value?: Asset): Asset; - - buying(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - price(value?: Price): Price; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreatePassiveSellOfferOp; - - static write(value: CreatePassiveSellOfferOp, io: Buffer): void; - - static isValid(value: CreatePassiveSellOfferOp): boolean; - - static toXDR(value: CreatePassiveSellOfferOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreatePassiveSellOfferOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreatePassiveSellOfferOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetOptionsOp { - constructor(attributes: { - inflationDest: null | AccountId; - clearFlags: null | number; - setFlags: null | number; - masterWeight: null | number; - lowThreshold: null | number; - medThreshold: null | number; - highThreshold: null | number; - homeDomain: null | string | Buffer; - signer: null | Signer; - }); - - inflationDest(value?: null | AccountId): null | AccountId; - - clearFlags(value?: null | number): null | number; - - setFlags(value?: null | number): null | number; - - masterWeight(value?: null | number): null | number; - - lowThreshold(value?: null | number): null | number; - - medThreshold(value?: null | number): null | number; - - highThreshold(value?: null | number): null | number; - - homeDomain(value?: null | string | Buffer): null | string | Buffer; - - signer(value?: null | Signer): null | Signer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetOptionsOp; - - static write(value: SetOptionsOp, io: Buffer): void; - - static isValid(value: SetOptionsOp): boolean; - - static toXDR(value: SetOptionsOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetOptionsOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): SetOptionsOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustOp { - constructor(attributes: { line: ChangeTrustAsset; limit: Int64 }); - - line(value?: ChangeTrustAsset): ChangeTrustAsset; - - limit(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustOp; - - static write(value: ChangeTrustOp, io: Buffer): void; - - static isValid(value: ChangeTrustOp): boolean; - - static toXDR(value: ChangeTrustOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AllowTrustOp { - constructor(attributes: { - trustor: AccountId; - asset: AssetCode; - authorize: number; - }); - - trustor(value?: AccountId): AccountId; - - asset(value?: AssetCode): AssetCode; - - authorize(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AllowTrustOp; - - static write(value: AllowTrustOp, io: Buffer): void; - - static isValid(value: AllowTrustOp): boolean; - - static toXDR(value: AllowTrustOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AllowTrustOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): AllowTrustOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageDataOp { - constructor(attributes: { - dataName: string | Buffer; - dataValue: null | Buffer; - }); - - dataName(value?: string | Buffer): string | Buffer; - - dataValue(value?: null | Buffer): null | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageDataOp; - - static write(value: ManageDataOp, io: Buffer): void; - - static isValid(value: ManageDataOp): boolean; - - static toXDR(value: ManageDataOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageDataOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageDataOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BumpSequenceOp { - constructor(attributes: { bumpTo: SequenceNumber }); - - bumpTo(value?: SequenceNumber): SequenceNumber; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BumpSequenceOp; - - static write(value: BumpSequenceOp, io: Buffer): void; - - static isValid(value: BumpSequenceOp): boolean; - - static toXDR(value: BumpSequenceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BumpSequenceOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): BumpSequenceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateClaimableBalanceOp { - constructor(attributes: { - asset: Asset; - amount: Int64; - claimants: Claimant[]; - }); - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - claimants(value?: Claimant[]): Claimant[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateClaimableBalanceOp; - - static write(value: CreateClaimableBalanceOp, io: Buffer): void; - - static isValid(value: CreateClaimableBalanceOp): boolean; - - static toXDR(value: CreateClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimClaimableBalanceOp { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimClaimableBalanceOp; - - static write(value: ClaimClaimableBalanceOp, io: Buffer): void; - - static isValid(value: ClaimClaimableBalanceOp): boolean; - - static toXDR(value: ClaimClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BeginSponsoringFutureReservesOp { - constructor(attributes: { sponsoredId: AccountId }); - - sponsoredId(value?: AccountId): AccountId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BeginSponsoringFutureReservesOp; - - static write(value: BeginSponsoringFutureReservesOp, io: Buffer): void; - - static isValid(value: BeginSponsoringFutureReservesOp): boolean; - - static toXDR(value: BeginSponsoringFutureReservesOp): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): BeginSponsoringFutureReservesOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): BeginSponsoringFutureReservesOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipOpSigner { - constructor(attributes: { accountId: AccountId; signerKey: SignerKey }); - - accountId(value?: AccountId): AccountId; - - signerKey(value?: SignerKey): SignerKey; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipOpSigner; - - static write(value: RevokeSponsorshipOpSigner, io: Buffer): void; - - static isValid(value: RevokeSponsorshipOpSigner): boolean; - - static toXDR(value: RevokeSponsorshipOpSigner): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipOpSigner; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipOpSigner; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackOp { - constructor(attributes: { - asset: Asset; - from: MuxedAccount; - amount: Int64; - }); - - asset(value?: Asset): Asset; - - from(value?: MuxedAccount): MuxedAccount; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackOp; - - static write(value: ClawbackOp, io: Buffer): void; - - static isValid(value: ClawbackOp): boolean; - - static toXDR(value: ClawbackOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackOp; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClawbackOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackClaimableBalanceOp { - constructor(attributes: { balanceId: ClaimableBalanceId }); - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackClaimableBalanceOp; - - static write(value: ClawbackClaimableBalanceOp, io: Buffer): void; - - static isValid(value: ClawbackClaimableBalanceOp): boolean; - - static toXDR(value: ClawbackClaimableBalanceOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackClaimableBalanceOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClawbackClaimableBalanceOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetTrustLineFlagsOp { - constructor(attributes: { - trustor: AccountId; - asset: Asset; - clearFlags: number; - setFlags: number; - }); - - trustor(value?: AccountId): AccountId; - - asset(value?: Asset): Asset; - - clearFlags(value?: number): number; - - setFlags(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetTrustLineFlagsOp; - - static write(value: SetTrustLineFlagsOp, io: Buffer): void; - - static isValid(value: SetTrustLineFlagsOp): boolean; - - static toXDR(value: SetTrustLineFlagsOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetTrustLineFlagsOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SetTrustLineFlagsOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolDepositOp { - constructor(attributes: { - liquidityPoolId: PoolId; - maxAmountA: Int64; - maxAmountB: Int64; - minPrice: Price; - maxPrice: Price; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - maxAmountA(value?: Int64): Int64; - - maxAmountB(value?: Int64): Int64; - - minPrice(value?: Price): Price; - - maxPrice(value?: Price): Price; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolDepositOp; - - static write(value: LiquidityPoolDepositOp, io: Buffer): void; - - static isValid(value: LiquidityPoolDepositOp): boolean; - - static toXDR(value: LiquidityPoolDepositOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolDepositOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolDepositOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolWithdrawOp { - constructor(attributes: { - liquidityPoolId: PoolId; - amount: Int64; - minAmountA: Int64; - minAmountB: Int64; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - amount(value?: Int64): Int64; - - minAmountA(value?: Int64): Int64; - - minAmountB(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolWithdrawOp; - - static write(value: LiquidityPoolWithdrawOp, io: Buffer): void; - - static isValid(value: LiquidityPoolWithdrawOp): boolean; - - static toXDR(value: LiquidityPoolWithdrawOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolWithdrawOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolWithdrawOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InvokeHostFunctionOp { - constructor(attributes: { - function: HostFunction; - parameters: ScVal[]; - footprint: LedgerFootprint; - }); - - function(value?: HostFunction): HostFunction; - - parameters(value?: ScVal[]): ScVal[]; - - footprint(value?: LedgerFootprint): LedgerFootprint; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InvokeHostFunctionOp; - - static write(value: InvokeHostFunctionOp, io: Buffer): void; - - static isValid(value: InvokeHostFunctionOp): boolean; - - static toXDR(value: InvokeHostFunctionOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InvokeHostFunctionOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InvokeHostFunctionOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Operation2 { - constructor(attributes: { - sourceAccount: null | MuxedAccount; - body: OperationBody; - }); - - sourceAccount(value?: null | MuxedAccount): null | MuxedAccount; - - body(value?: OperationBody): OperationBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Operation; - - static write(value: Operation, io: Buffer): void; - - static isValid(value: Operation): boolean; - - static toXDR(value: Operation): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Operation; - - static fromXDR(input: string, format: 'hex' | 'base64'): Operation; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageOperationId { - constructor(attributes: { - sourceAccount: AccountId; - seqNum: SequenceNumber; - opNum: number; - }); - - sourceAccount(value?: AccountId): AccountId; - - seqNum(value?: SequenceNumber): SequenceNumber; - - opNum(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageOperationId; - - static write(value: HashIdPreimageOperationId, io: Buffer): void; - - static isValid(value: HashIdPreimageOperationId): boolean; - - static toXDR(value: HashIdPreimageOperationId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimageOperationId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageOperationId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageRevokeId { - constructor(attributes: { - sourceAccount: AccountId; - seqNum: SequenceNumber; - opNum: number; - liquidityPoolId: PoolId; - asset: Asset; - }); - - sourceAccount(value?: AccountId): AccountId; - - seqNum(value?: SequenceNumber): SequenceNumber; - - opNum(value?: number): number; - - liquidityPoolId(value?: PoolId): PoolId; - - asset(value?: Asset): Asset; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageRevokeId; - - static write(value: HashIdPreimageRevokeId, io: Buffer): void; - - static isValid(value: HashIdPreimageRevokeId): boolean; - - static toXDR(value: HashIdPreimageRevokeId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimageRevokeId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageRevokeId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageEd25519ContractId { - constructor(attributes: { ed25519: Buffer; salt: Buffer }); - - ed25519(value?: Buffer): Buffer; - - salt(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageEd25519ContractId; - - static write(value: HashIdPreimageEd25519ContractId, io: Buffer): void; - - static isValid(value: HashIdPreimageEd25519ContractId): boolean; - - static toXDR(value: HashIdPreimageEd25519ContractId): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): HashIdPreimageEd25519ContractId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageEd25519ContractId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimageContractId { - constructor(attributes: { contractId: Buffer; salt: Buffer }); - - contractId(value?: Buffer): Buffer; - - salt(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimageContractId; - - static write(value: HashIdPreimageContractId, io: Buffer): void; - - static isValid(value: HashIdPreimageContractId): boolean; - - static toXDR(value: HashIdPreimageContractId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimageContractId; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): HashIdPreimageContractId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TimeBounds { - constructor(attributes: { minTime: TimePoint; maxTime: TimePoint }); - - minTime(value?: TimePoint): TimePoint; - - maxTime(value?: TimePoint): TimePoint; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TimeBounds; - - static write(value: TimeBounds, io: Buffer): void; - - static isValid(value: TimeBounds): boolean; - - static toXDR(value: TimeBounds): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TimeBounds; - - static fromXDR(input: string, format: 'hex' | 'base64'): TimeBounds; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerBounds { - constructor(attributes: { minLedger: number; maxLedger: number }); - - minLedger(value?: number): number; - - maxLedger(value?: number): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerBounds; - - static write(value: LedgerBounds, io: Buffer): void; - - static isValid(value: LedgerBounds): boolean; - - static toXDR(value: LedgerBounds): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerBounds; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerBounds; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PreconditionsV2 { - constructor(attributes: { - timeBounds: null | TimeBounds; - ledgerBounds: null | LedgerBounds; - minSeqNum: null | SequenceNumber; - minSeqAge: Duration; - minSeqLedgerGap: number; - extraSigners: SignerKey[]; - }); - - timeBounds(value?: null | TimeBounds): null | TimeBounds; - - ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; - - minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; - - minSeqAge(value?: Duration): Duration; - - minSeqLedgerGap(value?: number): number; - - extraSigners(value?: SignerKey[]): SignerKey[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PreconditionsV2; - - static write(value: PreconditionsV2, io: Buffer): void; - - static isValid(value: PreconditionsV2): boolean; - - static toXDR(value: PreconditionsV2): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PreconditionsV2; - - static fromXDR(input: string, format: 'hex' | 'base64'): PreconditionsV2; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0 { - constructor(attributes: { - sourceAccountEd25519: Buffer; - fee: number; - seqNum: SequenceNumber; - timeBounds: null | TimeBounds; - memo: Memo; - operations: Operation[]; - ext: TransactionV0Ext; - }); - - sourceAccountEd25519(value?: Buffer): Buffer; - - fee(value?: number): number; - - seqNum(value?: SequenceNumber): SequenceNumber; - - timeBounds(value?: null | TimeBounds): null | TimeBounds; - - memo(value?: Memo): Memo; - - operations(value?: Operation[]): Operation[]; - - ext(value?: TransactionV0Ext): TransactionV0Ext; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0; - - static write(value: TransactionV0, io: Buffer): void; - - static isValid(value: TransactionV0): boolean; - - static toXDR(value: TransactionV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0Envelope { - constructor(attributes: { - tx: TransactionV0; - signatures: DecoratedSignature[]; - }); - - tx(value?: TransactionV0): TransactionV0; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0Envelope; - - static write(value: TransactionV0Envelope, io: Buffer): void; - - static isValid(value: TransactionV0Envelope): boolean; - - static toXDR(value: TransactionV0Envelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0Envelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionV0Envelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Transaction { - constructor(attributes: { - sourceAccount: MuxedAccount; - fee: number; - seqNum: SequenceNumber; - cond: Preconditions; - memo: Memo; - operations: Operation[]; - ext: TransactionExt; - }); - - sourceAccount(value?: MuxedAccount): MuxedAccount; - - fee(value?: number): number; - - seqNum(value?: SequenceNumber): SequenceNumber; - - cond(value?: Preconditions): Preconditions; - - memo(value?: Memo): Memo; - - operations(value?: Operation[]): Operation[]; - - ext(value?: TransactionExt): TransactionExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Transaction; - - static write(value: Transaction, io: Buffer): void; - - static isValid(value: Transaction): boolean; - - static toXDR(value: Transaction): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Transaction; - - static fromXDR(input: string, format: 'hex' | 'base64'): Transaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV1Envelope { - constructor(attributes: { - tx: Transaction; - signatures: DecoratedSignature[]; - }); - - tx(value?: Transaction): Transaction; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV1Envelope; - - static write(value: TransactionV1Envelope, io: Buffer): void; - - static isValid(value: TransactionV1Envelope): boolean; - - static toXDR(value: TransactionV1Envelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV1Envelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionV1Envelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransaction { - constructor(attributes: { - feeSource: MuxedAccount; - fee: Int64; - innerTx: FeeBumpTransactionInnerTx; - ext: FeeBumpTransactionExt; - }); - - feeSource(value?: MuxedAccount): MuxedAccount; - - fee(value?: Int64): Int64; - - innerTx(value?: FeeBumpTransactionInnerTx): FeeBumpTransactionInnerTx; - - ext(value?: FeeBumpTransactionExt): FeeBumpTransactionExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransaction; - - static write(value: FeeBumpTransaction, io: Buffer): void; - - static isValid(value: FeeBumpTransaction): boolean; - - static toXDR(value: FeeBumpTransaction): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransaction; - - static fromXDR(input: string, format: 'hex' | 'base64'): FeeBumpTransaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionEnvelope { - constructor(attributes: { - tx: FeeBumpTransaction; - signatures: DecoratedSignature[]; - }); - - tx(value?: FeeBumpTransaction): FeeBumpTransaction; - - signatures(value?: DecoratedSignature[]): DecoratedSignature[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionEnvelope; - - static write(value: FeeBumpTransactionEnvelope, io: Buffer): void; - - static isValid(value: FeeBumpTransactionEnvelope): boolean; - - static toXDR(value: FeeBumpTransactionEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionEnvelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSignaturePayload { - constructor(attributes: { - networkId: Buffer; - taggedTransaction: TransactionSignaturePayloadTaggedTransaction; - }); - - networkId(value?: Buffer): Buffer; - - taggedTransaction( - value?: TransactionSignaturePayloadTaggedTransaction - ): TransactionSignaturePayloadTaggedTransaction; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSignaturePayload; - - static write(value: TransactionSignaturePayload, io: Buffer): void; - - static isValid(value: TransactionSignaturePayload): boolean; - - static toXDR(value: TransactionSignaturePayload): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionSignaturePayload; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionSignaturePayload; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimOfferAtomV0 { - constructor(attributes: { - sellerEd25519: Buffer; - offerId: Int64; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - sellerEd25519(value?: Buffer): Buffer; - - offerId(value?: Int64): Int64; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimOfferAtomV0; - - static write(value: ClaimOfferAtomV0, io: Buffer): void; - - static isValid(value: ClaimOfferAtomV0): boolean; - - static toXDR(value: ClaimOfferAtomV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimOfferAtomV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimOfferAtomV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimOfferAtom { - constructor(attributes: { - sellerId: AccountId; - offerId: Int64; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - sellerId(value?: AccountId): AccountId; - - offerId(value?: Int64): Int64; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimOfferAtom; - - static write(value: ClaimOfferAtom, io: Buffer): void; - - static isValid(value: ClaimOfferAtom): boolean; - - static toXDR(value: ClaimOfferAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimOfferAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimOfferAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimLiquidityAtom { - constructor(attributes: { - liquidityPoolId: PoolId; - assetSold: Asset; - amountSold: Int64; - assetBought: Asset; - amountBought: Int64; - }); - - liquidityPoolId(value?: PoolId): PoolId; - - assetSold(value?: Asset): Asset; - - amountSold(value?: Int64): Int64; - - assetBought(value?: Asset): Asset; - - amountBought(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimLiquidityAtom; - - static write(value: ClaimLiquidityAtom, io: Buffer): void; - - static isValid(value: ClaimLiquidityAtom): boolean; - - static toXDR(value: ClaimLiquidityAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimLiquidityAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimLiquidityAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SimplePaymentResult { - constructor(attributes: { - destination: AccountId; - asset: Asset; - amount: Int64; - }); - - destination(value?: AccountId): AccountId; - - asset(value?: Asset): Asset; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SimplePaymentResult; - - static write(value: SimplePaymentResult, io: Buffer): void; - - static isValid(value: SimplePaymentResult): boolean; - - static toXDR(value: SimplePaymentResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SimplePaymentResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SimplePaymentResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveResultSuccess { - constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); - - offers(value?: ClaimAtom[]): ClaimAtom[]; - - last(value?: SimplePaymentResult): SimplePaymentResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveResultSuccess; - - static write( - value: PathPaymentStrictReceiveResultSuccess, - io: Buffer - ): void; - - static isValid(value: PathPaymentStrictReceiveResultSuccess): boolean; - - static toXDR(value: PathPaymentStrictReceiveResultSuccess): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictReceiveResultSuccess; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveResultSuccess; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendResultSuccess { - constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); - - offers(value?: ClaimAtom[]): ClaimAtom[]; - - last(value?: SimplePaymentResult): SimplePaymentResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendResultSuccess; - - static write(value: PathPaymentStrictSendResultSuccess, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendResultSuccess): boolean; - - static toXDR(value: PathPaymentStrictSendResultSuccess): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictSendResultSuccess; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendResultSuccess; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageOfferSuccessResult { - constructor(attributes: { - offersClaimed: ClaimAtom[]; - offer: ManageOfferSuccessResultOffer; - }); - - offersClaimed(value?: ClaimAtom[]): ClaimAtom[]; - - offer(value?: ManageOfferSuccessResultOffer): ManageOfferSuccessResultOffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageOfferSuccessResult; - - static write(value: ManageOfferSuccessResult, io: Buffer): void; - - static isValid(value: ManageOfferSuccessResult): boolean; - - static toXDR(value: ManageOfferSuccessResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageOfferSuccessResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageOfferSuccessResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InflationPayout { - constructor(attributes: { destination: AccountId; amount: Int64 }); - - destination(value?: AccountId): AccountId; - - amount(value?: Int64): Int64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InflationPayout; - - static write(value: InflationPayout, io: Buffer): void; - - static isValid(value: InflationPayout): boolean; - - static toXDR(value: InflationPayout): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InflationPayout; - - static fromXDR(input: string, format: 'hex' | 'base64'): InflationPayout; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResult { - constructor(attributes: { - feeCharged: Int64; - result: InnerTransactionResultResult; - ext: InnerTransactionResultExt; - }); - - feeCharged(value?: Int64): Int64; - - result(value?: InnerTransactionResultResult): InnerTransactionResultResult; - - ext(value?: InnerTransactionResultExt): InnerTransactionResultExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResult; - - static write(value: InnerTransactionResult, io: Buffer): void; - - static isValid(value: InnerTransactionResult): boolean; - - static toXDR(value: InnerTransactionResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultPair { - constructor(attributes: { - transactionHash: Buffer; - result: InnerTransactionResult; - }); - - transactionHash(value?: Buffer): Buffer; - - result(value?: InnerTransactionResult): InnerTransactionResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultPair; - - static write(value: InnerTransactionResultPair, io: Buffer): void; - - static isValid(value: InnerTransactionResultPair): boolean; - - static toXDR(value: InnerTransactionResultPair): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultPair; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultPair; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResult { - constructor(attributes: { - feeCharged: Int64; - result: TransactionResultResult; - ext: TransactionResultExt; - }); - - feeCharged(value?: Int64): Int64; - - result(value?: TransactionResultResult): TransactionResultResult; - - ext(value?: TransactionResultExt): TransactionResultExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResult; - - static write(value: TransactionResult, io: Buffer): void; - - static isValid(value: TransactionResult): boolean; - - static toXDR(value: TransactionResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignerKeyEd25519SignedPayload { - constructor(attributes: { ed25519: Buffer; payload: Buffer }); - - ed25519(value?: Buffer): Buffer; - - payload(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignerKeyEd25519SignedPayload; - - static write(value: SignerKeyEd25519SignedPayload, io: Buffer): void; - - static isValid(value: SignerKeyEd25519SignedPayload): boolean; - - static toXDR(value: SignerKeyEd25519SignedPayload): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): SignerKeyEd25519SignedPayload; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SignerKeyEd25519SignedPayload; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Curve25519Secret { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Curve25519Secret; - - static write(value: Curve25519Secret, io: Buffer): void; - - static isValid(value: Curve25519Secret): boolean; - - static toXDR(value: Curve25519Secret): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Curve25519Secret; - - static fromXDR(input: string, format: 'hex' | 'base64'): Curve25519Secret; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Curve25519Public { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Curve25519Public; - - static write(value: Curve25519Public, io: Buffer): void; - - static isValid(value: Curve25519Public): boolean; - - static toXDR(value: Curve25519Public): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Curve25519Public; - - static fromXDR(input: string, format: 'hex' | 'base64'): Curve25519Public; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HmacSha256Key { - constructor(attributes: { key: Buffer }); - - key(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HmacSha256Key; - - static write(value: HmacSha256Key, io: Buffer): void; - - static isValid(value: HmacSha256Key): boolean; - - static toXDR(value: HmacSha256Key): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Key; - - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Key; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HmacSha256Mac { - constructor(attributes: { mac: Buffer }); - - mac(value?: Buffer): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HmacSha256Mac; - - static write(value: HmacSha256Mac, io: Buffer): void; - - static isValid(value: HmacSha256Mac): boolean; - - static toXDR(value: HmacSha256Mac): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Mac; - - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Mac; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScMapEntry { - constructor(attributes: { key: ScVal; val: ScVal }); - - key(value?: ScVal): ScVal; - - val(value?: ScVal): ScVal; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScMapEntry; - - static write(value: ScMapEntry, io: Buffer): void; - - static isValid(value: ScMapEntry): boolean; - - static toXDR(value: ScMapEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScMapEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScMapEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeOption { - constructor(attributes: { valueType: ScSpecTypeDef }); - - valueType(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeOption; - - static write(value: ScSpecTypeOption, io: Buffer): void; - - static isValid(value: ScSpecTypeOption): boolean; - - static toXDR(value: ScSpecTypeOption): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeOption; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeOption; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeResult { - constructor(attributes: { - okType: ScSpecTypeDef; - errorType: ScSpecTypeDef; - }); - - okType(value?: ScSpecTypeDef): ScSpecTypeDef; - - errorType(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeResult; - - static write(value: ScSpecTypeResult, io: Buffer): void; - - static isValid(value: ScSpecTypeResult): boolean; - - static toXDR(value: ScSpecTypeResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeVec { - constructor(attributes: { elementType: ScSpecTypeDef }); - - elementType(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeVec; - - static write(value: ScSpecTypeVec, io: Buffer): void; - - static isValid(value: ScSpecTypeVec): boolean; - - static toXDR(value: ScSpecTypeVec): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeVec; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeVec; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeMap { - constructor(attributes: { - keyType: ScSpecTypeDef; - valueType: ScSpecTypeDef; - }); - - keyType(value?: ScSpecTypeDef): ScSpecTypeDef; - - valueType(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeMap; - - static write(value: ScSpecTypeMap, io: Buffer): void; - - static isValid(value: ScSpecTypeMap): boolean; - - static toXDR(value: ScSpecTypeMap): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeMap; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeMap; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeSet { - constructor(attributes: { elementType: ScSpecTypeDef }); - - elementType(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeSet; - - static write(value: ScSpecTypeSet, io: Buffer): void; - - static isValid(value: ScSpecTypeSet): boolean; - - static toXDR(value: ScSpecTypeSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeSet; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeTuple { - constructor(attributes: { valueTypes: ScSpecTypeDef[] }); - - valueTypes(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeTuple; - - static write(value: ScSpecTypeTuple, io: Buffer): void; - - static isValid(value: ScSpecTypeTuple): boolean; - - static toXDR(value: ScSpecTypeTuple): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeTuple; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeTuple; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeUdt { - constructor(attributes: { name: string | Buffer }); - - name(value?: string | Buffer): string | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeUdt; - - static write(value: ScSpecTypeUdt, io: Buffer): void; - - static isValid(value: ScSpecTypeUdt): boolean; - - static toXDR(value: ScSpecTypeUdt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeUdt; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeUdt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecUdtStructFieldV0 { - constructor(attributes: { name: string | Buffer; type: ScSpecTypeDef }); - - name(value?: string | Buffer): string | Buffer; - - type(value?: ScSpecTypeDef): ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecUdtStructFieldV0; - - static write(value: ScSpecUdtStructFieldV0, io: Buffer): void; - - static isValid(value: ScSpecUdtStructFieldV0): boolean; - - static toXDR(value: ScSpecUdtStructFieldV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecUdtStructFieldV0; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScSpecUdtStructFieldV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecUdtStructV0 { - constructor(attributes: { - name: string | Buffer; - fields: ScSpecUdtStructFieldV0[]; - }); - - name(value?: string | Buffer): string | Buffer; - - fields(value?: ScSpecUdtStructFieldV0[]): ScSpecUdtStructFieldV0[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecUdtStructV0; - - static write(value: ScSpecUdtStructV0, io: Buffer): void; - - static isValid(value: ScSpecUdtStructV0): boolean; - - static toXDR(value: ScSpecUdtStructV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecUdtStructV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecUdtStructV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecUdtUnionCaseV0 { - constructor(attributes: { - name: string | Buffer; - type: null | ScSpecTypeDef; - }); - - name(value?: string | Buffer): string | Buffer; - - type(value?: null | ScSpecTypeDef): null | ScSpecTypeDef; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecUdtUnionCaseV0; - - static write(value: ScSpecUdtUnionCaseV0, io: Buffer): void; - - static isValid(value: ScSpecUdtUnionCaseV0): boolean; - - static toXDR(value: ScSpecUdtUnionCaseV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecUdtUnionCaseV0; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScSpecUdtUnionCaseV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecUdtUnionV0 { - constructor(attributes: { - name: string | Buffer; - cases: ScSpecUdtUnionCaseV0[]; - }); - - name(value?: string | Buffer): string | Buffer; - - cases(value?: ScSpecUdtUnionCaseV0[]): ScSpecUdtUnionCaseV0[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecUdtUnionV0; - - static write(value: ScSpecUdtUnionV0, io: Buffer): void; - - static isValid(value: ScSpecUdtUnionV0): boolean; - - static toXDR(value: ScSpecUdtUnionV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecUdtUnionV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecUdtUnionV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecFunctionV0 { - constructor(attributes: { - name: string | Buffer; - inputTypes: ScSpecTypeDef[]; - outputTypes: ScSpecTypeDef[]; - }); - - name(value?: string | Buffer): string | Buffer; - - inputTypes(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; - - outputTypes(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecFunctionV0; - - static write(value: ScSpecFunctionV0, io: Buffer): void; - - static isValid(value: ScSpecFunctionV0): boolean; - - static toXDR(value: ScSpecFunctionV0): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecFunctionV0; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecFunctionV0; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpStatementPledges { - switch(): ScpStatementType; - - prepare(value?: ScpStatementPrepare): ScpStatementPrepare; - - confirm(value?: ScpStatementConfirm): ScpStatementConfirm; - - externalize(value?: ScpStatementExternalize): ScpStatementExternalize; - - nominate(value?: ScpNomination): ScpNomination; - - static scpStPrepare(value: ScpStatementPrepare): ScpStatementPledges; - - static scpStConfirm(value: ScpStatementConfirm): ScpStatementPledges; - - static scpStExternalize( - value: ScpStatementExternalize - ): ScpStatementPledges; - - static scpStNominate(value: ScpNomination): ScpStatementPledges; - - value(): - | ScpStatementPrepare - | ScpStatementConfirm - | ScpStatementExternalize - | ScpNomination; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpStatementPledges; - - static write(value: ScpStatementPledges, io: Buffer): void; - - static isValid(value: ScpStatementPledges): boolean; - - static toXDR(value: ScpStatementPledges): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpStatementPledges; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ScpStatementPledges; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AssetCode { - switch(): AssetType; - - assetCode4(value?: Buffer): Buffer; - - assetCode12(value?: Buffer): Buffer; - - static assetTypeCreditAlphanum4(value: Buffer): AssetCode; - - static assetTypeCreditAlphanum12(value: Buffer): AssetCode; - - value(): Buffer | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AssetCode; - - static write(value: AssetCode, io: Buffer): void; - - static isValid(value: AssetCode): boolean; - - static toXDR(value: AssetCode): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AssetCode; - - static fromXDR(input: string, format: 'hex' | 'base64'): AssetCode; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Asset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - static assetTypeNative(): Asset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): Asset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): Asset; - - value(): AlphaNum4 | AlphaNum12 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Asset; - - static write(value: Asset, io: Buffer): void; - - static isValid(value: Asset): boolean; - - static toXDR(value: Asset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Asset; - - static fromXDR(input: string, format: 'hex' | 'base64'): Asset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV2Ext { - switch(): number; - - v3(value?: AccountEntryExtensionV3): AccountEntryExtensionV3; - - static 0(): AccountEntryExtensionV2Ext; - - static 3(value: AccountEntryExtensionV3): AccountEntryExtensionV2Ext; - - value(): AccountEntryExtensionV3 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV2Ext; - - static write(value: AccountEntryExtensionV2Ext, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV2Ext): boolean; - - static toXDR(value: AccountEntryExtensionV2Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV2Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV2Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExtensionV1Ext { - switch(): number; - - v2(value?: AccountEntryExtensionV2): AccountEntryExtensionV2; - - static 0(): AccountEntryExtensionV1Ext; - - static 2(value: AccountEntryExtensionV2): AccountEntryExtensionV1Ext; - - value(): AccountEntryExtensionV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExtensionV1Ext; - - static write(value: AccountEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: AccountEntryExtensionV1Ext): boolean; - - static toXDR(value: AccountEntryExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AccountEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountEntryExt { - switch(): number; - - v1(value?: AccountEntryExtensionV1): AccountEntryExtensionV1; - - static 0(): AccountEntryExt; - - static 1(value: AccountEntryExtensionV1): AccountEntryExt; - - value(): AccountEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountEntryExt; - - static write(value: AccountEntryExt, io: Buffer): void; - - static isValid(value: AccountEntryExt): boolean; - - static toXDR(value: AccountEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineAsset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - liquidityPoolId(value?: PoolId): PoolId; - - static assetTypeNative(): TrustLineAsset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): TrustLineAsset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): TrustLineAsset; - - static assetTypePoolShare(value: PoolId): TrustLineAsset; - - value(): AlphaNum4 | AlphaNum12 | PoolId | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineAsset; - - static write(value: TrustLineAsset, io: Buffer): void; - - static isValid(value: TrustLineAsset): boolean; - - static toXDR(value: TrustLineAsset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineAsset; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineAsset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExtensionV2Ext { - switch(): number; - - static 0(): TrustLineEntryExtensionV2Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExtensionV2Ext; - - static write(value: TrustLineEntryExtensionV2Ext, io: Buffer): void; - - static isValid(value: TrustLineEntryExtensionV2Ext): boolean; - - static toXDR(value: TrustLineEntryExtensionV2Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExtensionV2Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryExtensionV2Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryV1Ext { - switch(): number; - - v2(value?: TrustLineEntryExtensionV2): TrustLineEntryExtensionV2; - - static 0(): TrustLineEntryV1Ext; - - static 2(value: TrustLineEntryExtensionV2): TrustLineEntryV1Ext; - - value(): TrustLineEntryExtensionV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryV1Ext; - - static write(value: TrustLineEntryV1Ext, io: Buffer): void; - - static isValid(value: TrustLineEntryV1Ext): boolean; - - static toXDR(value: TrustLineEntryV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TrustLineEntryV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TrustLineEntryExt { - switch(): number; - - v1(value?: TrustLineEntryV1): TrustLineEntryV1; - - static 0(): TrustLineEntryExt; - - static 1(value: TrustLineEntryV1): TrustLineEntryExt; - - value(): TrustLineEntryV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TrustLineEntryExt; - - static write(value: TrustLineEntryExt, io: Buffer): void; - - static isValid(value: TrustLineEntryExt): boolean; - - static toXDR(value: TrustLineEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TrustLineEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): TrustLineEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OfferEntryExt { - switch(): number; - - static 0(): OfferEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OfferEntryExt; - - static write(value: OfferEntryExt, io: Buffer): void; - - static isValid(value: OfferEntryExt): boolean; - - static toXDR(value: OfferEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OfferEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): OfferEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class DataEntryExt { - switch(): number; - - static 0(): DataEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): DataEntryExt; - - static write(value: DataEntryExt, io: Buffer): void; - - static isValid(value: DataEntryExt): boolean; - - static toXDR(value: DataEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): DataEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): DataEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimPredicate { - switch(): ClaimPredicateType; - - andPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; - - orPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; - - notPredicate(value?: null | ClaimPredicate): null | ClaimPredicate; - - absBefore(value?: Int64): Int64; - - relBefore(value?: Int64): Int64; - - static claimPredicateUnconditional(): ClaimPredicate; - - static claimPredicateAnd(value: ClaimPredicate[]): ClaimPredicate; - - static claimPredicateOr(value: ClaimPredicate[]): ClaimPredicate; - - static claimPredicateNot(value: null | ClaimPredicate): ClaimPredicate; - - static claimPredicateBeforeAbsoluteTime(value: Int64): ClaimPredicate; - - static claimPredicateBeforeRelativeTime(value: Int64): ClaimPredicate; - - value(): - | ClaimPredicate[] - | ClaimPredicate[] - | null - | ClaimPredicate - | Int64 - | Int64 - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimPredicate; - - static write(value: ClaimPredicate, io: Buffer): void; - - static isValid(value: ClaimPredicate): boolean; - - static toXDR(value: ClaimPredicate): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimPredicate; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimPredicate; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Claimant { - switch(): ClaimantType; - - v0(value?: ClaimantV0): ClaimantV0; - - static claimantTypeV0(value: ClaimantV0): Claimant; - - value(): ClaimantV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Claimant; - - static write(value: Claimant, io: Buffer): void; - - static isValid(value: Claimant): boolean; - - static toXDR(value: Claimant): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Claimant; - - static fromXDR(input: string, format: 'hex' | 'base64'): Claimant; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceId { - switch(): ClaimableBalanceIdType; - - v0(value?: Buffer): Buffer; - - static claimableBalanceIdTypeV0(value: Buffer): ClaimableBalanceId; - - value(): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceId; - - static write(value: ClaimableBalanceId, io: Buffer): void; - - static isValid(value: ClaimableBalanceId): boolean; - - static toXDR(value: ClaimableBalanceId): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceId; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimableBalanceId; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExtensionV1Ext { - switch(): number; - - static 0(): ClaimableBalanceEntryExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExtensionV1Ext; - - static write(value: ClaimableBalanceEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExtensionV1Ext): boolean; - - static toXDR(value: ClaimableBalanceEntryExtensionV1Ext): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClaimableBalanceEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimableBalanceEntryExt { - switch(): number; - - v1( - value?: ClaimableBalanceEntryExtensionV1 - ): ClaimableBalanceEntryExtensionV1; - - static 0(): ClaimableBalanceEntryExt; - - static 1(value: ClaimableBalanceEntryExtensionV1): ClaimableBalanceEntryExt; - - value(): ClaimableBalanceEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimableBalanceEntryExt; - - static write(value: ClaimableBalanceEntryExt, io: Buffer): void; - - static isValid(value: ClaimableBalanceEntryExt): boolean; - - static toXDR(value: ClaimableBalanceEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimableBalanceEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimableBalanceEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolEntryBody { - switch(): LiquidityPoolType; - - constantProduct( - value?: LiquidityPoolEntryConstantProduct - ): LiquidityPoolEntryConstantProduct; - - static liquidityPoolConstantProduct( - value: LiquidityPoolEntryConstantProduct - ): LiquidityPoolEntryBody; - - value(): LiquidityPoolEntryConstantProduct; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolEntryBody; - - static write(value: LiquidityPoolEntryBody, io: Buffer): void; - - static isValid(value: LiquidityPoolEntryBody): boolean; - - static toXDR(value: LiquidityPoolEntryBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolEntryBody; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolEntryBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ConfigSetting { - switch(): ConfigSettingType; - - uint32Val(value?: number): number; - - static configSettingTypeUint32(value: number): ConfigSetting; - - value(): number; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ConfigSetting; - - static write(value: ConfigSetting, io: Buffer): void; - - static isValid(value: ConfigSetting): boolean; - - static toXDR(value: ConfigSetting): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ConfigSetting; - - static fromXDR(input: string, format: 'hex' | 'base64'): ConfigSetting; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ConfigSettingEntryExt { - switch(): number; - - static 0(): ConfigSettingEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ConfigSettingEntryExt; - - static write(value: ConfigSettingEntryExt, io: Buffer): void; - - static isValid(value: ConfigSettingEntryExt): boolean; - - static toXDR(value: ConfigSettingEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ConfigSettingEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ConfigSettingEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExtensionV1Ext { - switch(): number; - - static 0(): LedgerEntryExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExtensionV1Ext; - - static write(value: LedgerEntryExtensionV1Ext, io: Buffer): void; - - static isValid(value: LedgerEntryExtensionV1Ext): boolean; - - static toXDR(value: LedgerEntryExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerEntryExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryData { - switch(): LedgerEntryType; - - account(value?: AccountEntry): AccountEntry; - - trustLine(value?: TrustLineEntry): TrustLineEntry; - - offer(value?: OfferEntry): OfferEntry; - - data(value?: DataEntry): DataEntry; - - claimableBalance(value?: ClaimableBalanceEntry): ClaimableBalanceEntry; - - liquidityPool(value?: LiquidityPoolEntry): LiquidityPoolEntry; - - contractData(value?: ContractDataEntry): ContractDataEntry; - - configSetting(value?: ConfigSettingEntry): ConfigSettingEntry; - - static account(value: AccountEntry): LedgerEntryData; - - static trustline(value: TrustLineEntry): LedgerEntryData; - - static offer(value: OfferEntry): LedgerEntryData; - - static data(value: DataEntry): LedgerEntryData; - - static claimableBalance(value: ClaimableBalanceEntry): LedgerEntryData; - - static liquidityPool(value: LiquidityPoolEntry): LedgerEntryData; - - static contractData(value: ContractDataEntry): LedgerEntryData; - - static configSetting(value: ConfigSettingEntry): LedgerEntryData; - - value(): - | AccountEntry - | TrustLineEntry - | OfferEntry - | DataEntry - | ClaimableBalanceEntry - | LiquidityPoolEntry - | ContractDataEntry - | ConfigSettingEntry; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryData; - - static write(value: LedgerEntryData, io: Buffer): void; - - static isValid(value: LedgerEntryData): boolean; - - static toXDR(value: LedgerEntryData): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryData; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryData; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryExt { - switch(): number; - - v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; - - static 0(): LedgerEntryExt; - - static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; - - value(): LedgerEntryExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryExt; - - static write(value: LedgerEntryExt, io: Buffer): void; - - static isValid(value: LedgerEntryExt): boolean; - - static toXDR(value: LedgerEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerKey { - switch(): LedgerEntryType; - - account(value?: LedgerKeyAccount): LedgerKeyAccount; - - trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; - - offer(value?: LedgerKeyOffer): LedgerKeyOffer; - - data(value?: LedgerKeyData): LedgerKeyData; - - claimableBalance( - value?: LedgerKeyClaimableBalance - ): LedgerKeyClaimableBalance; - - liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; - - contractData(value?: LedgerKeyContractData): LedgerKeyContractData; - - configSetting(value?: LedgerKeyConfigSetting): LedgerKeyConfigSetting; - - static account(value: LedgerKeyAccount): LedgerKey; - - static trustline(value: LedgerKeyTrustLine): LedgerKey; - - static offer(value: LedgerKeyOffer): LedgerKey; - - static data(value: LedgerKeyData): LedgerKey; - - static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; - - static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; - - static contractData(value: LedgerKeyContractData): LedgerKey; - - static configSetting(value: LedgerKeyConfigSetting): LedgerKey; - - value(): - | LedgerKeyAccount - | LedgerKeyTrustLine - | LedgerKeyOffer - | LedgerKeyData - | LedgerKeyClaimableBalance - | LedgerKeyLiquidityPool - | LedgerKeyContractData - | LedgerKeyConfigSetting; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerKey; - - static write(value: LedgerKey, io: Buffer): void; - - static isValid(value: LedgerKey): boolean; - - static toXDR(value: LedgerKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarValueExt { - switch(): StellarValueType; - - lcValueSignature( - value?: LedgerCloseValueSignature - ): LedgerCloseValueSignature; - - static stellarValueBasic(): StellarValueExt; - - static stellarValueSigned( - value: LedgerCloseValueSignature - ): StellarValueExt; - - value(): LedgerCloseValueSignature | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarValueExt; - - static write(value: StellarValueExt, io: Buffer): void; - - static isValid(value: StellarValueExt): boolean; - - static toXDR(value: StellarValueExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarValueExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarValueExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExtensionV1Ext { - switch(): number; - - static 0(): LedgerHeaderExtensionV1Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExtensionV1Ext; - - static write(value: LedgerHeaderExtensionV1Ext, io: Buffer): void; - - static isValid(value: LedgerHeaderExtensionV1Ext): boolean; - - static toXDR(value: LedgerHeaderExtensionV1Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExtensionV1Ext; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderExtensionV1Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderExt { - switch(): number; - - v1(value?: LedgerHeaderExtensionV1): LedgerHeaderExtensionV1; - - static 0(): LedgerHeaderExt; - - static 1(value: LedgerHeaderExtensionV1): LedgerHeaderExt; - - value(): LedgerHeaderExtensionV1 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderExt; - - static write(value: LedgerHeaderExt, io: Buffer): void; - - static isValid(value: LedgerHeaderExt): boolean; - - static toXDR(value: LedgerHeaderExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerHeaderExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerUpgrade { - switch(): LedgerUpgradeType; - - newLedgerVersion(value?: number): number; - - newBaseFee(value?: number): number; - - newMaxTxSetSize(value?: number): number; - - newBaseReserve(value?: number): number; - - newFlags(value?: number): number; - - configSetting( - value?: LedgerUpgradeConfigSetting - ): LedgerUpgradeConfigSetting; - - static ledgerUpgradeVersion(value: number): LedgerUpgrade; - - static ledgerUpgradeBaseFee(value: number): LedgerUpgrade; - - static ledgerUpgradeMaxTxSetSize(value: number): LedgerUpgrade; - - static ledgerUpgradeBaseReserve(value: number): LedgerUpgrade; - - static ledgerUpgradeFlags(value: number): LedgerUpgrade; - - static ledgerUpgradeConfig( - value: LedgerUpgradeConfigSetting - ): LedgerUpgrade; - - value(): - | number - | number - | number - | number - | number - | LedgerUpgradeConfigSetting; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerUpgrade; - - static write(value: LedgerUpgrade, io: Buffer): void; - - static isValid(value: LedgerUpgrade): boolean; - - static toXDR(value: LedgerUpgrade): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerUpgrade; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerUpgrade; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketMetadataExt { - switch(): number; - - static 0(): BucketMetadataExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadataExt; - - static write(value: BucketMetadataExt, io: Buffer): void; - - static isValid(value: BucketMetadataExt): boolean; - - static toXDR(value: BucketMetadataExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketEntry { - switch(): BucketEntryType; - - liveEntry(value?: LedgerEntry): LedgerEntry; - - deadEntry(value?: LedgerKey): LedgerKey; - - metaEntry(value?: BucketMetadata): BucketMetadata; - - static liveentry(value: LedgerEntry): BucketEntry; - - static initentry(value: LedgerEntry): BucketEntry; - - static deadentry(value: LedgerKey): BucketEntry; - - static metaentry(value: BucketMetadata): BucketEntry; - - value(): LedgerEntry | LedgerKey | BucketMetadata; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketEntry; - - static write(value: BucketEntry, io: Buffer): void; - - static isValid(value: BucketEntry): boolean; - - static toXDR(value: BucketEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TxSetComponent { - switch(): TxSetComponentType; - - txsMaybeDiscountedFee( - value?: TxSetComponentTxsMaybeDiscountedFee - ): TxSetComponentTxsMaybeDiscountedFee; - - static txsetCompTxsMaybeDiscountedFee( - value: TxSetComponentTxsMaybeDiscountedFee - ): TxSetComponent; - - value(): TxSetComponentTxsMaybeDiscountedFee; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TxSetComponent; - - static write(value: TxSetComponent, io: Buffer): void; - - static isValid(value: TxSetComponent): boolean; - - static toXDR(value: TxSetComponent): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TxSetComponent; - - static fromXDR(input: string, format: 'hex' | 'base64'): TxSetComponent; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionPhase { - switch(): number; - - v0Components(value?: TxSetComponent[]): TxSetComponent[]; - - static 0(value: TxSetComponent[]): TransactionPhase; - - value(): TxSetComponent[]; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionPhase; - - static write(value: TransactionPhase, io: Buffer): void; - - static isValid(value: TransactionPhase): boolean; - - static toXDR(value: TransactionPhase): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionPhase; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionPhase; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class GeneralizedTransactionSet { - switch(): number; - - v1TxSet(value?: TransactionSetV1): TransactionSetV1; - - static 1(value: TransactionSetV1): GeneralizedTransactionSet; - - value(): TransactionSetV1; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): GeneralizedTransactionSet; - - static write(value: GeneralizedTransactionSet, io: Buffer): void; - - static isValid(value: GeneralizedTransactionSet): boolean; - - static toXDR(value: GeneralizedTransactionSet): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): GeneralizedTransactionSet; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): GeneralizedTransactionSet; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryEntryExt { - switch(): number; - - generalizedTxSet( - value?: GeneralizedTransactionSet - ): GeneralizedTransactionSet; - - static 0(): TransactionHistoryEntryExt; - - static 1(value: GeneralizedTransactionSet): TransactionHistoryEntryExt; - - value(): GeneralizedTransactionSet | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryEntryExt; - - static write(value: TransactionHistoryEntryExt, io: Buffer): void; - - static isValid(value: TransactionHistoryEntryExt): boolean; - - static toXDR(value: TransactionHistoryEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionHistoryEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionHistoryResultEntryExt { - switch(): number; - - static 0(): TransactionHistoryResultEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionHistoryResultEntryExt; - - static write(value: TransactionHistoryResultEntryExt, io: Buffer): void; - - static isValid(value: TransactionHistoryResultEntryExt): boolean; - - static toXDR(value: TransactionHistoryResultEntryExt): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionHistoryResultEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionHistoryResultEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerHeaderHistoryEntryExt { - switch(): number; - - static 0(): LedgerHeaderHistoryEntryExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerHeaderHistoryEntryExt; - - static write(value: LedgerHeaderHistoryEntryExt, io: Buffer): void; - - static isValid(value: LedgerHeaderHistoryEntryExt): boolean; - - static toXDR(value: LedgerHeaderHistoryEntryExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerHeaderHistoryEntryExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LedgerHeaderHistoryEntryExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScpHistoryEntry { - switch(): number; - - v0(value?: ScpHistoryEntryV0): ScpHistoryEntryV0; - - static 0(value: ScpHistoryEntryV0): ScpHistoryEntry; - - value(): ScpHistoryEntryV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScpHistoryEntry; - - static write(value: ScpHistoryEntry, io: Buffer): void; - - static isValid(value: ScpHistoryEntry): boolean; - - static toXDR(value: ScpHistoryEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScpHistoryEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScpHistoryEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerEntryChange { - switch(): LedgerEntryChangeType; - - created(value?: LedgerEntry): LedgerEntry; - - updated(value?: LedgerEntry): LedgerEntry; - - removed(value?: LedgerKey): LedgerKey; - - state(value?: LedgerEntry): LedgerEntry; - - static ledgerEntryCreated(value: LedgerEntry): LedgerEntryChange; - - static ledgerEntryUpdated(value: LedgerEntry): LedgerEntryChange; - - static ledgerEntryRemoved(value: LedgerKey): LedgerEntryChange; - - static ledgerEntryState(value: LedgerEntry): LedgerEntryChange; - - value(): LedgerEntry | LedgerEntry | LedgerKey | LedgerEntry; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerEntryChange; - - static write(value: LedgerEntryChange, io: Buffer): void; - - static isValid(value: LedgerEntryChange): boolean; - - static toXDR(value: LedgerEntryChange): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryChange; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryChange; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionMeta { - switch(): number; - - operations(value?: OperationMeta[]): OperationMeta[]; - - v1(value?: TransactionMetaV1): TransactionMetaV1; - - v2(value?: TransactionMetaV2): TransactionMetaV2; - - static 0(value: OperationMeta[]): TransactionMeta; - - static 1(value: TransactionMetaV1): TransactionMeta; - - static 2(value: TransactionMetaV2): TransactionMeta; - - value(): OperationMeta[] | TransactionMetaV1 | TransactionMetaV2; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionMeta; - - static write(value: TransactionMeta, io: Buffer): void; - - static isValid(value: TransactionMeta): boolean; - - static toXDR(value: TransactionMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LedgerCloseMeta { - switch(): number; - - v0(value?: LedgerCloseMetaV0): LedgerCloseMetaV0; - - v1(value?: LedgerCloseMetaV1): LedgerCloseMetaV1; - - static 0(value: LedgerCloseMetaV0): LedgerCloseMeta; - - static 1(value: LedgerCloseMetaV1): LedgerCloseMeta; - - value(): LedgerCloseMetaV0 | LedgerCloseMetaV1; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LedgerCloseMeta; - - static write(value: LedgerCloseMeta, io: Buffer): void; - - static isValid(value: LedgerCloseMeta): boolean; - - static toXDR(value: LedgerCloseMeta): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LedgerCloseMeta; - - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerCloseMeta; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PeerAddressIp { - switch(): IpAddrType; - - ipv4(value?: Buffer): Buffer; - - ipv6(value?: Buffer): Buffer; - - static iPv4(value: Buffer): PeerAddressIp; - - static iPv6(value: Buffer): PeerAddressIp; - - value(): Buffer | Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PeerAddressIp; - - static write(value: PeerAddressIp, io: Buffer): void; - - static isValid(value: PeerAddressIp): boolean; - - static toXDR(value: PeerAddressIp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PeerAddressIp; - - static fromXDR(input: string, format: 'hex' | 'base64'): PeerAddressIp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SurveyResponseBody { - switch(): SurveyMessageCommandType; - - topologyResponseBody(value?: TopologyResponseBody): TopologyResponseBody; - - static surveyTopology(value: TopologyResponseBody): SurveyResponseBody; - - value(): TopologyResponseBody; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SurveyResponseBody; - - static write(value: SurveyResponseBody, io: Buffer): void; - - static isValid(value: SurveyResponseBody): boolean; - - static toXDR(value: SurveyResponseBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SurveyResponseBody; - - static fromXDR(input: string, format: 'hex' | 'base64'): SurveyResponseBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class StellarMessage { - switch(): MessageType; - - error(value?: Error): Error; - - hello(value?: Hello): Hello; - - auth(value?: Auth): Auth; - - dontHave(value?: DontHave): DontHave; - - peers(value?: PeerAddress[]): PeerAddress[]; - - txSetHash(value?: Buffer): Buffer; - - txSet(value?: TransactionSet): TransactionSet; - - generalizedTxSet( - value?: GeneralizedTransactionSet - ): GeneralizedTransactionSet; - - transaction(value?: TransactionEnvelope): TransactionEnvelope; - - signedSurveyRequestMessage( - value?: SignedSurveyRequestMessage - ): SignedSurveyRequestMessage; - - signedSurveyResponseMessage( - value?: SignedSurveyResponseMessage - ): SignedSurveyResponseMessage; - - qSetHash(value?: Buffer): Buffer; - - qSet(value?: ScpQuorumSet): ScpQuorumSet; - - envelope(value?: ScpEnvelope): ScpEnvelope; - - getScpLedgerSeq(value?: number): number; - - sendMoreMessage(value?: SendMore): SendMore; - - static errorMsg(value: Error): StellarMessage; - - static hello(value: Hello): StellarMessage; - - static auth(value: Auth): StellarMessage; - - static dontHave(value: DontHave): StellarMessage; - - static getPeers(): StellarMessage; - - static peers(value: PeerAddress[]): StellarMessage; - - static getTxSet(value: Buffer): StellarMessage; - - static txSet(value: TransactionSet): StellarMessage; - - static generalizedTxSet(value: GeneralizedTransactionSet): StellarMessage; - - static transaction(value: TransactionEnvelope): StellarMessage; - - static surveyRequest(value: SignedSurveyRequestMessage): StellarMessage; - - static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; - - static getScpQuorumset(value: Buffer): StellarMessage; - - static scpQuorumset(value: ScpQuorumSet): StellarMessage; - - static scpMessage(value: ScpEnvelope): StellarMessage; - - static getScpState(value: number): StellarMessage; - - static sendMore(value: SendMore): StellarMessage; - - value(): - | Error - | Hello - | Auth - | DontHave - | PeerAddress[] - | Buffer - | TransactionSet - | GeneralizedTransactionSet - | TransactionEnvelope - | SignedSurveyRequestMessage - | SignedSurveyResponseMessage - | Buffer - | ScpQuorumSet - | ScpEnvelope - | number - | SendMore - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): StellarMessage; - - static write(value: StellarMessage, io: Buffer): void; - - static isValid(value: StellarMessage): boolean; - - static toXDR(value: StellarMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): StellarMessage; - - static fromXDR(input: string, format: 'hex' | 'base64'): StellarMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AuthenticatedMessage { - switch(): number; - - v0(value?: AuthenticatedMessageV0): AuthenticatedMessageV0; - - static 0(value: AuthenticatedMessageV0): AuthenticatedMessage; - - value(): AuthenticatedMessageV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AuthenticatedMessage; - - static write(value: AuthenticatedMessage, io: Buffer): void; - - static isValid(value: AuthenticatedMessage): boolean; - - static toXDR(value: AuthenticatedMessage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AuthenticatedMessage; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): AuthenticatedMessage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolParameters { - switch(): LiquidityPoolType; - - constantProduct( - value?: LiquidityPoolConstantProductParameters - ): LiquidityPoolConstantProductParameters; - - static liquidityPoolConstantProduct( - value: LiquidityPoolConstantProductParameters - ): LiquidityPoolParameters; - - value(): LiquidityPoolConstantProductParameters; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolParameters; - - static write(value: LiquidityPoolParameters, io: Buffer): void; - - static isValid(value: LiquidityPoolParameters): boolean; - - static toXDR(value: LiquidityPoolParameters): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolParameters; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolParameters; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class MuxedAccount { - switch(): CryptoKeyType; - - ed25519(value?: Buffer): Buffer; - - med25519(value?: MuxedAccountMed25519): MuxedAccountMed25519; - - static keyTypeEd25519(value: Buffer): MuxedAccount; - - static keyTypeMuxedEd25519(value: MuxedAccountMed25519): MuxedAccount; - - value(): Buffer | MuxedAccountMed25519; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): MuxedAccount; - - static write(value: MuxedAccount, io: Buffer): void; - - static isValid(value: MuxedAccount): boolean; - - static toXDR(value: MuxedAccount): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): MuxedAccount; - - static fromXDR(input: string, format: 'hex' | 'base64'): MuxedAccount; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustAsset { - switch(): AssetType; - - alphaNum4(value?: AlphaNum4): AlphaNum4; - - alphaNum12(value?: AlphaNum12): AlphaNum12; - - liquidityPool(value?: LiquidityPoolParameters): LiquidityPoolParameters; - - static assetTypeNative(): ChangeTrustAsset; - - static assetTypeCreditAlphanum4(value: AlphaNum4): ChangeTrustAsset; - - static assetTypeCreditAlphanum12(value: AlphaNum12): ChangeTrustAsset; - - static assetTypePoolShare(value: LiquidityPoolParameters): ChangeTrustAsset; - - value(): AlphaNum4 | AlphaNum12 | LiquidityPoolParameters | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustAsset; - - static write(value: ChangeTrustAsset, io: Buffer): void; - - static isValid(value: ChangeTrustAsset): boolean; - - static toXDR(value: ChangeTrustAsset): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustAsset; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustAsset; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipOp { - switch(): RevokeSponsorshipType; - - ledgerKey(value?: LedgerKey): LedgerKey; - - signer(value?: RevokeSponsorshipOpSigner): RevokeSponsorshipOpSigner; - - static revokeSponsorshipLedgerEntry(value: LedgerKey): RevokeSponsorshipOp; - - static revokeSponsorshipSigner( - value: RevokeSponsorshipOpSigner - ): RevokeSponsorshipOp; - - value(): LedgerKey | RevokeSponsorshipOpSigner; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipOp; - - static write(value: RevokeSponsorshipOp, io: Buffer): void; - - static isValid(value: RevokeSponsorshipOp): boolean; - - static toXDR(value: RevokeSponsorshipOp): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipOp; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipOp; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationBody { - switch(): OperationType; - - createAccountOp(value?: CreateAccountOp): CreateAccountOp; - - paymentOp(value?: PaymentOp): PaymentOp; - - pathPaymentStrictReceiveOp( - value?: PathPaymentStrictReceiveOp - ): PathPaymentStrictReceiveOp; - - manageSellOfferOp(value?: ManageSellOfferOp): ManageSellOfferOp; - - createPassiveSellOfferOp( - value?: CreatePassiveSellOfferOp - ): CreatePassiveSellOfferOp; - - setOptionsOp(value?: SetOptionsOp): SetOptionsOp; - - changeTrustOp(value?: ChangeTrustOp): ChangeTrustOp; - - allowTrustOp(value?: AllowTrustOp): AllowTrustOp; - - destination(value?: MuxedAccount): MuxedAccount; - - manageDataOp(value?: ManageDataOp): ManageDataOp; - - bumpSequenceOp(value?: BumpSequenceOp): BumpSequenceOp; - - manageBuyOfferOp(value?: ManageBuyOfferOp): ManageBuyOfferOp; - - pathPaymentStrictSendOp( - value?: PathPaymentStrictSendOp - ): PathPaymentStrictSendOp; - - createClaimableBalanceOp( - value?: CreateClaimableBalanceOp - ): CreateClaimableBalanceOp; - - claimClaimableBalanceOp( - value?: ClaimClaimableBalanceOp - ): ClaimClaimableBalanceOp; - - beginSponsoringFutureReservesOp( - value?: BeginSponsoringFutureReservesOp - ): BeginSponsoringFutureReservesOp; - - revokeSponsorshipOp(value?: RevokeSponsorshipOp): RevokeSponsorshipOp; - - clawbackOp(value?: ClawbackOp): ClawbackOp; - - clawbackClaimableBalanceOp( - value?: ClawbackClaimableBalanceOp - ): ClawbackClaimableBalanceOp; - - setTrustLineFlagsOp(value?: SetTrustLineFlagsOp): SetTrustLineFlagsOp; - - liquidityPoolDepositOp( - value?: LiquidityPoolDepositOp - ): LiquidityPoolDepositOp; - - liquidityPoolWithdrawOp( - value?: LiquidityPoolWithdrawOp - ): LiquidityPoolWithdrawOp; - - invokeHostFunctionOp(value?: InvokeHostFunctionOp): InvokeHostFunctionOp; - - static createAccount(value: CreateAccountOp): OperationBody; - - static payment(value: PaymentOp): OperationBody; - - static pathPaymentStrictReceive( - value: PathPaymentStrictReceiveOp - ): OperationBody; - - static manageSellOffer(value: ManageSellOfferOp): OperationBody; - - static createPassiveSellOffer( - value: CreatePassiveSellOfferOp - ): OperationBody; - - static setOptions(value: SetOptionsOp): OperationBody; - - static changeTrust(value: ChangeTrustOp): OperationBody; - - static allowTrust(value: AllowTrustOp): OperationBody; - - static accountMerge(value: MuxedAccount): OperationBody; - - static inflation(): OperationBody; - - static manageData(value: ManageDataOp): OperationBody; - - static bumpSequence(value: BumpSequenceOp): OperationBody; - - static manageBuyOffer(value: ManageBuyOfferOp): OperationBody; - - static pathPaymentStrictSend(value: PathPaymentStrictSendOp): OperationBody; - - static createClaimableBalance( - value: CreateClaimableBalanceOp - ): OperationBody; - - static claimClaimableBalance(value: ClaimClaimableBalanceOp): OperationBody; - - static beginSponsoringFutureReserves( - value: BeginSponsoringFutureReservesOp - ): OperationBody; - - static endSponsoringFutureReserves(): OperationBody; - - static revokeSponsorship(value: RevokeSponsorshipOp): OperationBody; - - static clawback(value: ClawbackOp): OperationBody; - - static clawbackClaimableBalance( - value: ClawbackClaimableBalanceOp - ): OperationBody; - - static setTrustLineFlags(value: SetTrustLineFlagsOp): OperationBody; - - static liquidityPoolDeposit(value: LiquidityPoolDepositOp): OperationBody; - - static liquidityPoolWithdraw(value: LiquidityPoolWithdrawOp): OperationBody; - - static invokeHostFunction(value: InvokeHostFunctionOp): OperationBody; - - value(): - | CreateAccountOp - | PaymentOp - | PathPaymentStrictReceiveOp - | ManageSellOfferOp - | CreatePassiveSellOfferOp - | SetOptionsOp - | ChangeTrustOp - | AllowTrustOp - | MuxedAccount - | ManageDataOp - | BumpSequenceOp - | ManageBuyOfferOp - | PathPaymentStrictSendOp - | CreateClaimableBalanceOp - | ClaimClaimableBalanceOp - | BeginSponsoringFutureReservesOp - | RevokeSponsorshipOp - | ClawbackOp - | ClawbackClaimableBalanceOp - | SetTrustLineFlagsOp - | LiquidityPoolDepositOp - | LiquidityPoolWithdrawOp - | InvokeHostFunctionOp - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationBody; - - static write(value: OperationBody, io: Buffer): void; - - static isValid(value: OperationBody): boolean; - - static toXDR(value: OperationBody): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationBody; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationBody; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class HashIdPreimage { - switch(): EnvelopeType; - - operationId(value?: HashIdPreimageOperationId): HashIdPreimageOperationId; - - revokeId(value?: HashIdPreimageRevokeId): HashIdPreimageRevokeId; - - ed25519ContractId( - value?: HashIdPreimageEd25519ContractId - ): HashIdPreimageEd25519ContractId; - - contractId(value?: HashIdPreimageContractId): HashIdPreimageContractId; - - static envelopeTypeOpId(value: HashIdPreimageOperationId): HashIdPreimage; - - static envelopeTypePoolRevokeOpId( - value: HashIdPreimageRevokeId - ): HashIdPreimage; - - static envelopeTypeContractIdFromEd25519( - value: HashIdPreimageEd25519ContractId - ): HashIdPreimage; - - static envelopeTypeContractIdFromContract( - value: HashIdPreimageContractId - ): HashIdPreimage; - - value(): - | HashIdPreimageOperationId - | HashIdPreimageRevokeId - | HashIdPreimageEd25519ContractId - | HashIdPreimageContractId; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): HashIdPreimage; - - static write(value: HashIdPreimage, io: Buffer): void; - - static isValid(value: HashIdPreimage): boolean; - - static toXDR(value: HashIdPreimage): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): HashIdPreimage; - - static fromXDR(input: string, format: 'hex' | 'base64'): HashIdPreimage; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Memo { - switch(): MemoType; - - text(value?: string | Buffer): string | Buffer; - - id(value?: Uint64): Uint64; - - hash(value?: Buffer): Buffer; - - retHash(value?: Buffer): Buffer; - - static memoNone(): Memo; - - static memoText(value: string | Buffer): Memo; - - static memoId(value: Uint64): Memo; - - static memoHash(value: Buffer): Memo; - - static memoReturn(value: Buffer): Memo; - - value(): string | Buffer | Uint64 | Buffer | Buffer | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Memo; - - static write(value: Memo, io: Buffer): void; - - static isValid(value: Memo): boolean; - - static toXDR(value: Memo): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Memo; - - static fromXDR(input: string, format: 'hex' | 'base64'): Memo; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class Preconditions { - switch(): PreconditionType; - - timeBounds(value?: TimeBounds): TimeBounds; - - v2(value?: PreconditionsV2): PreconditionsV2; - - static precondNone(): Preconditions; - - static precondTime(value: TimeBounds): Preconditions; - - static precondV2(value: PreconditionsV2): Preconditions; - - value(): TimeBounds | PreconditionsV2 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): Preconditions; - - static write(value: Preconditions, io: Buffer): void; - - static isValid(value: Preconditions): boolean; - - static toXDR(value: Preconditions): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): Preconditions; - - static fromXDR(input: string, format: 'hex' | 'base64'): Preconditions; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionV0Ext { - switch(): number; - - static 0(): TransactionV0Ext; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionV0Ext; - - static write(value: TransactionV0Ext, io: Buffer): void; - - static isValid(value: TransactionV0Ext): boolean; - - static toXDR(value: TransactionV0Ext): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionV0Ext; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionV0Ext; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionExt { - switch(): number; - - static 0(): TransactionExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionExt; - - static write(value: TransactionExt, io: Buffer): void; - - static isValid(value: TransactionExt): boolean; - - static toXDR(value: TransactionExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): TransactionExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionInnerTx { - switch(): EnvelopeType; - - v1(value?: TransactionV1Envelope): TransactionV1Envelope; - - static envelopeTypeTx( - value: TransactionV1Envelope - ): FeeBumpTransactionInnerTx; - - value(): TransactionV1Envelope; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionInnerTx; - - static write(value: FeeBumpTransactionInnerTx, io: Buffer): void; - - static isValid(value: FeeBumpTransactionInnerTx): boolean; - - static toXDR(value: FeeBumpTransactionInnerTx): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionInnerTx; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionInnerTx; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class FeeBumpTransactionExt { - switch(): number; - - static 0(): FeeBumpTransactionExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): FeeBumpTransactionExt; - - static write(value: FeeBumpTransactionExt, io: Buffer): void; - - static isValid(value: FeeBumpTransactionExt): boolean; - - static toXDR(value: FeeBumpTransactionExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): FeeBumpTransactionExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): FeeBumpTransactionExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionEnvelope { - switch(): EnvelopeType; - - v0(value?: TransactionV0Envelope): TransactionV0Envelope; - - v1(value?: TransactionV1Envelope): TransactionV1Envelope; - - feeBump(value?: FeeBumpTransactionEnvelope): FeeBumpTransactionEnvelope; - - static envelopeTypeTxV0(value: TransactionV0Envelope): TransactionEnvelope; - - static envelopeTypeTx(value: TransactionV1Envelope): TransactionEnvelope; - - static envelopeTypeTxFeeBump( - value: FeeBumpTransactionEnvelope - ): TransactionEnvelope; - - value(): - | TransactionV0Envelope - | TransactionV1Envelope - | FeeBumpTransactionEnvelope; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionEnvelope; - - static write(value: TransactionEnvelope, io: Buffer): void; - - static isValid(value: TransactionEnvelope): boolean; - - static toXDR(value: TransactionEnvelope): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionEnvelope; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionEnvelope; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionSignaturePayloadTaggedTransaction { - switch(): EnvelopeType; - - tx(value?: Transaction): Transaction; - - feeBump(value?: FeeBumpTransaction): FeeBumpTransaction; - - static envelopeTypeTx( - value: Transaction - ): TransactionSignaturePayloadTaggedTransaction; - - static envelopeTypeTxFeeBump( - value: FeeBumpTransaction - ): TransactionSignaturePayloadTaggedTransaction; - - value(): Transaction | FeeBumpTransaction; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionSignaturePayloadTaggedTransaction; - - static write( - value: TransactionSignaturePayloadTaggedTransaction, - io: Buffer - ): void; - - static isValid( - value: TransactionSignaturePayloadTaggedTransaction - ): boolean; - - static toXDR(value: TransactionSignaturePayloadTaggedTransaction): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): TransactionSignaturePayloadTaggedTransaction; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionSignaturePayloadTaggedTransaction; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimAtom { - switch(): ClaimAtomType; - - v0(value?: ClaimOfferAtomV0): ClaimOfferAtomV0; - - orderBook(value?: ClaimOfferAtom): ClaimOfferAtom; - - liquidityPool(value?: ClaimLiquidityAtom): ClaimLiquidityAtom; - - static claimAtomTypeV0(value: ClaimOfferAtomV0): ClaimAtom; - - static claimAtomTypeOrderBook(value: ClaimOfferAtom): ClaimAtom; - - static claimAtomTypeLiquidityPool(value: ClaimLiquidityAtom): ClaimAtom; - - value(): ClaimOfferAtomV0 | ClaimOfferAtom | ClaimLiquidityAtom; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimAtom; - - static write(value: ClaimAtom, io: Buffer): void; - - static isValid(value: ClaimAtom): boolean; - - static toXDR(value: ClaimAtom): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimAtom; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClaimAtom; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateAccountResult { - switch(): CreateAccountResultCode; - - static createAccountSuccess(): CreateAccountResult; - - static createAccountMalformed(): CreateAccountResult; - - static createAccountUnderfunded(): CreateAccountResult; - - static createAccountLowReserve(): CreateAccountResult; - - static createAccountAlreadyExist(): CreateAccountResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateAccountResult; - - static write(value: CreateAccountResult, io: Buffer): void; - - static isValid(value: CreateAccountResult): boolean; - - static toXDR(value: CreateAccountResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateAccountResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateAccountResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PaymentResult { - switch(): PaymentResultCode; - - static paymentSuccess(): PaymentResult; - - static paymentMalformed(): PaymentResult; - - static paymentUnderfunded(): PaymentResult; - - static paymentSrcNoTrust(): PaymentResult; - - static paymentSrcNotAuthorized(): PaymentResult; - - static paymentNoDestination(): PaymentResult; - - static paymentNoTrust(): PaymentResult; - - static paymentNotAuthorized(): PaymentResult; - - static paymentLineFull(): PaymentResult; - - static paymentNoIssuer(): PaymentResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PaymentResult; - - static write(value: PaymentResult, io: Buffer): void; - - static isValid(value: PaymentResult): boolean; - - static toXDR(value: PaymentResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PaymentResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): PaymentResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictReceiveResult { - switch(): PathPaymentStrictReceiveResultCode; - - success( - value?: PathPaymentStrictReceiveResultSuccess - ): PathPaymentStrictReceiveResultSuccess; - - noIssuer(value?: Asset): Asset; - - static pathPaymentStrictReceiveSuccess( - value: PathPaymentStrictReceiveResultSuccess - ): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveNoIssuer( - value: Asset - ): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResult; - - static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResult; - - value(): PathPaymentStrictReceiveResultSuccess | Asset | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictReceiveResult; - - static write(value: PathPaymentStrictReceiveResult, io: Buffer): void; - - static isValid(value: PathPaymentStrictReceiveResult): boolean; - - static toXDR(value: PathPaymentStrictReceiveResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): PathPaymentStrictReceiveResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictReceiveResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PathPaymentStrictSendResult { - switch(): PathPaymentStrictSendResultCode; - - success( - value?: PathPaymentStrictSendResultSuccess - ): PathPaymentStrictSendResultSuccess; - - noIssuer(value?: Asset): Asset; - - static pathPaymentStrictSendSuccess( - value: PathPaymentStrictSendResultSuccess - ): PathPaymentStrictSendResult; - - static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendNoIssuer( - value: Asset - ): PathPaymentStrictSendResult; - - static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResult; - - static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResult; - - value(): PathPaymentStrictSendResultSuccess | Asset | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PathPaymentStrictSendResult; - - static write(value: PathPaymentStrictSendResult, io: Buffer): void; - - static isValid(value: PathPaymentStrictSendResult): boolean; - - static toXDR(value: PathPaymentStrictSendResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PathPaymentStrictSendResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): PathPaymentStrictSendResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageOfferSuccessResultOffer { - switch(): ManageOfferEffect; - - offer(value?: OfferEntry): OfferEntry; - - static manageOfferCreated(value: OfferEntry): ManageOfferSuccessResultOffer; - - static manageOfferUpdated(value: OfferEntry): ManageOfferSuccessResultOffer; - - static manageOfferDeleted(): ManageOfferSuccessResultOffer; - - value(): OfferEntry | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageOfferSuccessResultOffer; - - static write(value: ManageOfferSuccessResultOffer, io: Buffer): void; - - static isValid(value: ManageOfferSuccessResultOffer): boolean; - - static toXDR(value: ManageOfferSuccessResultOffer): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ManageOfferSuccessResultOffer; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageOfferSuccessResultOffer; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageSellOfferResult { - switch(): ManageSellOfferResultCode; - - success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; - - static manageSellOfferSuccess( - value: ManageOfferSuccessResult - ): ManageSellOfferResult; - - static manageSellOfferMalformed(): ManageSellOfferResult; - - static manageSellOfferSellNoTrust(): ManageSellOfferResult; - - static manageSellOfferBuyNoTrust(): ManageSellOfferResult; - - static manageSellOfferSellNotAuthorized(): ManageSellOfferResult; - - static manageSellOfferBuyNotAuthorized(): ManageSellOfferResult; - - static manageSellOfferLineFull(): ManageSellOfferResult; - - static manageSellOfferUnderfunded(): ManageSellOfferResult; - - static manageSellOfferCrossSelf(): ManageSellOfferResult; - - static manageSellOfferSellNoIssuer(): ManageSellOfferResult; - - static manageSellOfferBuyNoIssuer(): ManageSellOfferResult; - - static manageSellOfferNotFound(): ManageSellOfferResult; - - static manageSellOfferLowReserve(): ManageSellOfferResult; - - value(): ManageOfferSuccessResult | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageSellOfferResult; - - static write(value: ManageSellOfferResult, io: Buffer): void; - - static isValid(value: ManageSellOfferResult): boolean; - - static toXDR(value: ManageSellOfferResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageSellOfferResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageSellOfferResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageBuyOfferResult { - switch(): ManageBuyOfferResultCode; - - success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; - - static manageBuyOfferSuccess( - value: ManageOfferSuccessResult - ): ManageBuyOfferResult; - - static manageBuyOfferMalformed(): ManageBuyOfferResult; - - static manageBuyOfferSellNoTrust(): ManageBuyOfferResult; - - static manageBuyOfferBuyNoTrust(): ManageBuyOfferResult; - - static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResult; - - static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResult; - - static manageBuyOfferLineFull(): ManageBuyOfferResult; - - static manageBuyOfferUnderfunded(): ManageBuyOfferResult; - - static manageBuyOfferCrossSelf(): ManageBuyOfferResult; - - static manageBuyOfferSellNoIssuer(): ManageBuyOfferResult; - - static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResult; - - static manageBuyOfferNotFound(): ManageBuyOfferResult; - - static manageBuyOfferLowReserve(): ManageBuyOfferResult; - - value(): ManageOfferSuccessResult | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageBuyOfferResult; - - static write(value: ManageBuyOfferResult, io: Buffer): void; - - static isValid(value: ManageBuyOfferResult): boolean; - - static toXDR(value: ManageBuyOfferResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageBuyOfferResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ManageBuyOfferResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetOptionsResult { - switch(): SetOptionsResultCode; - - static setOptionsSuccess(): SetOptionsResult; - - static setOptionsLowReserve(): SetOptionsResult; - - static setOptionsTooManySigners(): SetOptionsResult; - - static setOptionsBadFlags(): SetOptionsResult; - - static setOptionsInvalidInflation(): SetOptionsResult; - - static setOptionsCantChange(): SetOptionsResult; - - static setOptionsUnknownFlag(): SetOptionsResult; - - static setOptionsThresholdOutOfRange(): SetOptionsResult; - - static setOptionsBadSigner(): SetOptionsResult; - - static setOptionsInvalidHomeDomain(): SetOptionsResult; - - static setOptionsAuthRevocableRequired(): SetOptionsResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetOptionsResult; - - static write(value: SetOptionsResult, io: Buffer): void; - - static isValid(value: SetOptionsResult): boolean; - - static toXDR(value: SetOptionsResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetOptionsResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): SetOptionsResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ChangeTrustResult { - switch(): ChangeTrustResultCode; - - static changeTrustSuccess(): ChangeTrustResult; - - static changeTrustMalformed(): ChangeTrustResult; - - static changeTrustNoIssuer(): ChangeTrustResult; - - static changeTrustInvalidLimit(): ChangeTrustResult; - - static changeTrustLowReserve(): ChangeTrustResult; - - static changeTrustSelfNotAllowed(): ChangeTrustResult; - - static changeTrustTrustLineMissing(): ChangeTrustResult; - - static changeTrustCannotDelete(): ChangeTrustResult; - - static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ChangeTrustResult; - - static write(value: ChangeTrustResult, io: Buffer): void; - - static isValid(value: ChangeTrustResult): boolean; - - static toXDR(value: ChangeTrustResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ChangeTrustResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ChangeTrustResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AllowTrustResult { - switch(): AllowTrustResultCode; - - static allowTrustSuccess(): AllowTrustResult; - - static allowTrustMalformed(): AllowTrustResult; - - static allowTrustNoTrustLine(): AllowTrustResult; - - static allowTrustTrustNotRequired(): AllowTrustResult; - - static allowTrustCantRevoke(): AllowTrustResult; - - static allowTrustSelfNotAllowed(): AllowTrustResult; - - static allowTrustLowReserve(): AllowTrustResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AllowTrustResult; - - static write(value: AllowTrustResult, io: Buffer): void; - - static isValid(value: AllowTrustResult): boolean; - - static toXDR(value: AllowTrustResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AllowTrustResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): AllowTrustResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class AccountMergeResult { - switch(): AccountMergeResultCode; - - sourceAccountBalance(value?: Int64): Int64; - - static accountMergeSuccess(value: Int64): AccountMergeResult; - - static accountMergeMalformed(): AccountMergeResult; - - static accountMergeNoAccount(): AccountMergeResult; - - static accountMergeImmutableSet(): AccountMergeResult; - - static accountMergeHasSubEntries(): AccountMergeResult; - - static accountMergeSeqnumTooFar(): AccountMergeResult; - - static accountMergeDestFull(): AccountMergeResult; - - static accountMergeIsSponsor(): AccountMergeResult; - - value(): Int64 | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): AccountMergeResult; - - static write(value: AccountMergeResult, io: Buffer): void; - - static isValid(value: AccountMergeResult): boolean; - - static toXDR(value: AccountMergeResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): AccountMergeResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): AccountMergeResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InflationResult { - switch(): InflationResultCode; - - payouts(value?: InflationPayout[]): InflationPayout[]; - - static inflationSuccess(value: InflationPayout[]): InflationResult; - - static inflationNotTime(): InflationResult; - - value(): InflationPayout[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InflationResult; - - static write(value: InflationResult, io: Buffer): void; - - static isValid(value: InflationResult): boolean; - - static toXDR(value: InflationResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InflationResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): InflationResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ManageDataResult { - switch(): ManageDataResultCode; - - static manageDataSuccess(): ManageDataResult; - - static manageDataNotSupportedYet(): ManageDataResult; - - static manageDataNameNotFound(): ManageDataResult; - - static manageDataLowReserve(): ManageDataResult; - - static manageDataInvalidName(): ManageDataResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ManageDataResult; - - static write(value: ManageDataResult, io: Buffer): void; - - static isValid(value: ManageDataResult): boolean; - - static toXDR(value: ManageDataResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ManageDataResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ManageDataResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BumpSequenceResult { - switch(): BumpSequenceResultCode; - - static bumpSequenceSuccess(): BumpSequenceResult; - - static bumpSequenceBadSeq(): BumpSequenceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BumpSequenceResult; - - static write(value: BumpSequenceResult, io: Buffer): void; - - static isValid(value: BumpSequenceResult): boolean; - - static toXDR(value: BumpSequenceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BumpSequenceResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): BumpSequenceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class CreateClaimableBalanceResult { - switch(): CreateClaimableBalanceResultCode; - - balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; - - static createClaimableBalanceSuccess( - value: ClaimableBalanceId - ): CreateClaimableBalanceResult; - - static createClaimableBalanceMalformed(): CreateClaimableBalanceResult; - - static createClaimableBalanceLowReserve(): CreateClaimableBalanceResult; - - static createClaimableBalanceNoTrust(): CreateClaimableBalanceResult; - - static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResult; - - static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResult; - - value(): ClaimableBalanceId | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): CreateClaimableBalanceResult; - - static write(value: CreateClaimableBalanceResult, io: Buffer): void; - - static isValid(value: CreateClaimableBalanceResult): boolean; - - static toXDR(value: CreateClaimableBalanceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): CreateClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): CreateClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClaimClaimableBalanceResult { - switch(): ClaimClaimableBalanceResultCode; - - static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResult; - - static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClaimClaimableBalanceResult; - - static write(value: ClaimClaimableBalanceResult, io: Buffer): void; - - static isValid(value: ClaimClaimableBalanceResult): boolean; - - static toXDR(value: ClaimClaimableBalanceResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClaimClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClaimClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BeginSponsoringFutureReservesResult { - switch(): BeginSponsoringFutureReservesResultCode; - - static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResult; - - static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BeginSponsoringFutureReservesResult; - - static write(value: BeginSponsoringFutureReservesResult, io: Buffer): void; - - static isValid(value: BeginSponsoringFutureReservesResult): boolean; - - static toXDR(value: BeginSponsoringFutureReservesResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): BeginSponsoringFutureReservesResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): BeginSponsoringFutureReservesResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class EndSponsoringFutureReservesResult { - switch(): EndSponsoringFutureReservesResultCode; - - static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResult; - - static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): EndSponsoringFutureReservesResult; - - static write(value: EndSponsoringFutureReservesResult, io: Buffer): void; - - static isValid(value: EndSponsoringFutureReservesResult): boolean; - - static toXDR(value: EndSponsoringFutureReservesResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): EndSponsoringFutureReservesResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): EndSponsoringFutureReservesResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class RevokeSponsorshipResult { - switch(): RevokeSponsorshipResultCode; - - static revokeSponsorshipSuccess(): RevokeSponsorshipResult; - - static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResult; - - static revokeSponsorshipNotSponsor(): RevokeSponsorshipResult; - - static revokeSponsorshipLowReserve(): RevokeSponsorshipResult; - - static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResult; - - static revokeSponsorshipMalformed(): RevokeSponsorshipResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): RevokeSponsorshipResult; - - static write(value: RevokeSponsorshipResult, io: Buffer): void; - - static isValid(value: RevokeSponsorshipResult): boolean; - - static toXDR(value: RevokeSponsorshipResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): RevokeSponsorshipResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): RevokeSponsorshipResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackResult { - switch(): ClawbackResultCode; - - static clawbackSuccess(): ClawbackResult; - - static clawbackMalformed(): ClawbackResult; - - static clawbackNotClawbackEnabled(): ClawbackResult; - - static clawbackNoTrust(): ClawbackResult; - - static clawbackUnderfunded(): ClawbackResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackResult; - - static write(value: ClawbackResult, io: Buffer): void; - - static isValid(value: ClawbackResult): boolean; - - static toXDR(value: ClawbackResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ClawbackResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): ClawbackResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ClawbackClaimableBalanceResult { - switch(): ClawbackClaimableBalanceResultCode; - - static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResult; - - static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ClawbackClaimableBalanceResult; - - static write(value: ClawbackClaimableBalanceResult, io: Buffer): void; - - static isValid(value: ClawbackClaimableBalanceResult): boolean; - - static toXDR(value: ClawbackClaimableBalanceResult): Buffer; - - static fromXDR( - input: Buffer, - format?: 'raw' - ): ClawbackClaimableBalanceResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): ClawbackClaimableBalanceResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SetTrustLineFlagsResult { - switch(): SetTrustLineFlagsResultCode; - - static setTrustLineFlagsSuccess(): SetTrustLineFlagsResult; - - static setTrustLineFlagsMalformed(): SetTrustLineFlagsResult; - - static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResult; - - static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResult; - - static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResult; - - static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SetTrustLineFlagsResult; - - static write(value: SetTrustLineFlagsResult, io: Buffer): void; - - static isValid(value: SetTrustLineFlagsResult): boolean; - - static toXDR(value: SetTrustLineFlagsResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SetTrustLineFlagsResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): SetTrustLineFlagsResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolDepositResult { - switch(): LiquidityPoolDepositResultCode; - - static liquidityPoolDepositSuccess(): LiquidityPoolDepositResult; - - static liquidityPoolDepositMalformed(): LiquidityPoolDepositResult; - - static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResult; - - static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResult; - - static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResult; - - static liquidityPoolDepositLineFull(): LiquidityPoolDepositResult; - - static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResult; - - static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolDepositResult; - - static write(value: LiquidityPoolDepositResult, io: Buffer): void; - - static isValid(value: LiquidityPoolDepositResult): boolean; - - static toXDR(value: LiquidityPoolDepositResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolDepositResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolDepositResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class LiquidityPoolWithdrawResult { - switch(): LiquidityPoolWithdrawResultCode; - - static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResult; - - static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): LiquidityPoolWithdrawResult; - - static write(value: LiquidityPoolWithdrawResult, io: Buffer): void; - - static isValid(value: LiquidityPoolWithdrawResult): boolean; - - static toXDR(value: LiquidityPoolWithdrawResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): LiquidityPoolWithdrawResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): LiquidityPoolWithdrawResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InvokeHostFunctionResult { - switch(): InvokeHostFunctionResultCode; - - static invokeHostFunctionSuccess(): InvokeHostFunctionResult; - - static invokeHostFunctionMalformed(): InvokeHostFunctionResult; - - static invokeHostFunctionTrapped(): InvokeHostFunctionResult; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InvokeHostFunctionResult; - - static write(value: InvokeHostFunctionResult, io: Buffer): void; - - static isValid(value: InvokeHostFunctionResult): boolean; - - static toXDR(value: InvokeHostFunctionResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InvokeHostFunctionResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InvokeHostFunctionResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationResultTr { - switch(): OperationType; - - createAccountResult(value?: CreateAccountResult): CreateAccountResult; - - paymentResult(value?: PaymentResult): PaymentResult; - - pathPaymentStrictReceiveResult( - value?: PathPaymentStrictReceiveResult - ): PathPaymentStrictReceiveResult; - - manageSellOfferResult(value?: ManageSellOfferResult): ManageSellOfferResult; - - createPassiveSellOfferResult( - value?: ManageSellOfferResult - ): ManageSellOfferResult; - - setOptionsResult(value?: SetOptionsResult): SetOptionsResult; - - changeTrustResult(value?: ChangeTrustResult): ChangeTrustResult; - - allowTrustResult(value?: AllowTrustResult): AllowTrustResult; - - accountMergeResult(value?: AccountMergeResult): AccountMergeResult; - - inflationResult(value?: InflationResult): InflationResult; - - manageDataResult(value?: ManageDataResult): ManageDataResult; - - bumpSeqResult(value?: BumpSequenceResult): BumpSequenceResult; - - manageBuyOfferResult(value?: ManageBuyOfferResult): ManageBuyOfferResult; - - pathPaymentStrictSendResult( - value?: PathPaymentStrictSendResult - ): PathPaymentStrictSendResult; - - createClaimableBalanceResult( - value?: CreateClaimableBalanceResult - ): CreateClaimableBalanceResult; - - claimClaimableBalanceResult( - value?: ClaimClaimableBalanceResult - ): ClaimClaimableBalanceResult; - - beginSponsoringFutureReservesResult( - value?: BeginSponsoringFutureReservesResult - ): BeginSponsoringFutureReservesResult; - - endSponsoringFutureReservesResult( - value?: EndSponsoringFutureReservesResult - ): EndSponsoringFutureReservesResult; - - revokeSponsorshipResult( - value?: RevokeSponsorshipResult - ): RevokeSponsorshipResult; - - clawbackResult(value?: ClawbackResult): ClawbackResult; - - clawbackClaimableBalanceResult( - value?: ClawbackClaimableBalanceResult - ): ClawbackClaimableBalanceResult; - - setTrustLineFlagsResult( - value?: SetTrustLineFlagsResult - ): SetTrustLineFlagsResult; - - liquidityPoolDepositResult( - value?: LiquidityPoolDepositResult - ): LiquidityPoolDepositResult; - - liquidityPoolWithdrawResult( - value?: LiquidityPoolWithdrawResult - ): LiquidityPoolWithdrawResult; - - invokeHostFunctionResult( - value?: InvokeHostFunctionResult - ): InvokeHostFunctionResult; - - static createAccount(value: CreateAccountResult): OperationResultTr; - - static payment(value: PaymentResult): OperationResultTr; - - static pathPaymentStrictReceive( - value: PathPaymentStrictReceiveResult - ): OperationResultTr; - - static manageSellOffer(value: ManageSellOfferResult): OperationResultTr; - - static createPassiveSellOffer( - value: ManageSellOfferResult - ): OperationResultTr; - - static setOptions(value: SetOptionsResult): OperationResultTr; - - static changeTrust(value: ChangeTrustResult): OperationResultTr; - - static allowTrust(value: AllowTrustResult): OperationResultTr; - - static accountMerge(value: AccountMergeResult): OperationResultTr; - - static inflation(value: InflationResult): OperationResultTr; - - static manageData(value: ManageDataResult): OperationResultTr; - - static bumpSequence(value: BumpSequenceResult): OperationResultTr; - - static manageBuyOffer(value: ManageBuyOfferResult): OperationResultTr; - - static pathPaymentStrictSend( - value: PathPaymentStrictSendResult - ): OperationResultTr; - - static createClaimableBalance( - value: CreateClaimableBalanceResult - ): OperationResultTr; - - static claimClaimableBalance( - value: ClaimClaimableBalanceResult - ): OperationResultTr; - - static beginSponsoringFutureReserves( - value: BeginSponsoringFutureReservesResult - ): OperationResultTr; - - static endSponsoringFutureReserves( - value: EndSponsoringFutureReservesResult - ): OperationResultTr; - - static revokeSponsorship(value: RevokeSponsorshipResult): OperationResultTr; - - static clawback(value: ClawbackResult): OperationResultTr; - - static clawbackClaimableBalance( - value: ClawbackClaimableBalanceResult - ): OperationResultTr; - - static setTrustLineFlags(value: SetTrustLineFlagsResult): OperationResultTr; - - static liquidityPoolDeposit( - value: LiquidityPoolDepositResult - ): OperationResultTr; - - static liquidityPoolWithdraw( - value: LiquidityPoolWithdrawResult - ): OperationResultTr; - - static invokeHostFunction( - value: InvokeHostFunctionResult - ): OperationResultTr; - - value(): - | CreateAccountResult - | PaymentResult - | PathPaymentStrictReceiveResult - | ManageSellOfferResult - | ManageSellOfferResult - | SetOptionsResult - | ChangeTrustResult - | AllowTrustResult - | AccountMergeResult - | InflationResult - | ManageDataResult - | BumpSequenceResult - | ManageBuyOfferResult - | PathPaymentStrictSendResult - | CreateClaimableBalanceResult - | ClaimClaimableBalanceResult - | BeginSponsoringFutureReservesResult - | EndSponsoringFutureReservesResult - | RevokeSponsorshipResult - | ClawbackResult - | ClawbackClaimableBalanceResult - | SetTrustLineFlagsResult - | LiquidityPoolDepositResult - | LiquidityPoolWithdrawResult - | InvokeHostFunctionResult; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationResultTr; - - static write(value: OperationResultTr, io: Buffer): void; - - static isValid(value: OperationResultTr): boolean; - - static toXDR(value: OperationResultTr): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationResultTr; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationResultTr; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class OperationResult { - switch(): OperationResultCode; - - tr(value?: OperationResultTr): OperationResultTr; - - static opInner(value: OperationResultTr): OperationResult; - - static opBadAuth(): OperationResult; - - static opNoAccount(): OperationResult; - - static opNotSupported(): OperationResult; - - static opTooManySubentries(): OperationResult; - - static opExceededWorkLimit(): OperationResult; - - static opTooManySponsoring(): OperationResult; - - value(): OperationResultTr | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): OperationResult; - - static write(value: OperationResult, io: Buffer): void; - - static isValid(value: OperationResult): boolean; - - static toXDR(value: OperationResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): OperationResult; - - static fromXDR(input: string, format: 'hex' | 'base64'): OperationResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultResult { - switch(): TransactionResultCode; - - results(value?: OperationResult[]): OperationResult[]; - - static txSuccess(value: OperationResult[]): InnerTransactionResultResult; - - static txFailed(value: OperationResult[]): InnerTransactionResultResult; - - static txTooEarly(): InnerTransactionResultResult; - - static txTooLate(): InnerTransactionResultResult; - - static txMissingOperation(): InnerTransactionResultResult; - - static txBadSeq(): InnerTransactionResultResult; - - static txBadAuth(): InnerTransactionResultResult; - - static txInsufficientBalance(): InnerTransactionResultResult; - - static txNoAccount(): InnerTransactionResultResult; - - static txInsufficientFee(): InnerTransactionResultResult; - - static txBadAuthExtra(): InnerTransactionResultResult; - - static txInternalError(): InnerTransactionResultResult; - - static txNotSupported(): InnerTransactionResultResult; - - static txBadSponsorship(): InnerTransactionResultResult; - - static txBadMinSeqAgeOrGap(): InnerTransactionResultResult; - - static txMalformed(): InnerTransactionResultResult; - - value(): OperationResult[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultResult; - - static write(value: InnerTransactionResultResult, io: Buffer): void; - - static isValid(value: InnerTransactionResultResult): boolean; - - static toXDR(value: InnerTransactionResultResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class InnerTransactionResultExt { - switch(): number; - - static 0(): InnerTransactionResultExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): InnerTransactionResultExt; - - static write(value: InnerTransactionResultExt, io: Buffer): void; - - static isValid(value: InnerTransactionResultExt): boolean; - - static toXDR(value: InnerTransactionResultExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): InnerTransactionResultExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): InnerTransactionResultExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultResult { - switch(): TransactionResultCode; - - innerResultPair( - value?: InnerTransactionResultPair - ): InnerTransactionResultPair; - - results(value?: OperationResult[]): OperationResult[]; - - static txFeeBumpInnerSuccess( - value: InnerTransactionResultPair - ): TransactionResultResult; - - static txFeeBumpInnerFailed( - value: InnerTransactionResultPair - ): TransactionResultResult; - - static txSuccess(value: OperationResult[]): TransactionResultResult; - - static txFailed(value: OperationResult[]): TransactionResultResult; - - static txTooEarly(): TransactionResultResult; - - static txTooLate(): TransactionResultResult; - - static txMissingOperation(): TransactionResultResult; - - static txBadSeq(): TransactionResultResult; - - static txBadAuth(): TransactionResultResult; - - static txInsufficientBalance(): TransactionResultResult; - - static txNoAccount(): TransactionResultResult; - - static txInsufficientFee(): TransactionResultResult; - - static txBadAuthExtra(): TransactionResultResult; - - static txInternalError(): TransactionResultResult; - - static txNotSupported(): TransactionResultResult; - - static txBadSponsorship(): TransactionResultResult; - - static txBadMinSeqAgeOrGap(): TransactionResultResult; - - static txMalformed(): TransactionResultResult; - - value(): InnerTransactionResultPair | OperationResult[] | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultResult; - - static write(value: TransactionResultResult, io: Buffer): void; - - static isValid(value: TransactionResultResult): boolean; - - static toXDR(value: TransactionResultResult): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultResult; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultResult; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class TransactionResultExt { - switch(): number; - - static 0(): TransactionResultExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): TransactionResultExt; - - static write(value: TransactionResultExt, io: Buffer): void; - - static isValid(value: TransactionResultExt): boolean; - - static toXDR(value: TransactionResultExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): TransactionResultExt; - - static fromXDR( - input: string, - format: 'hex' | 'base64' - ): TransactionResultExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ExtensionPoint { - switch(): number; - - static 0(): ExtensionPoint; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ExtensionPoint; - - static write(value: ExtensionPoint, io: Buffer): void; - - static isValid(value: ExtensionPoint): boolean; - - static toXDR(value: ExtensionPoint): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ExtensionPoint; - - static fromXDR(input: string, format: 'hex' | 'base64'): ExtensionPoint; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class PublicKey { - switch(): PublicKeyType; - - ed25519(value?: Buffer): Buffer; - - static publicKeyTypeEd25519(value: Buffer): PublicKey; - - value(): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): PublicKey; - - static write(value: PublicKey, io: Buffer): void; - - static isValid(value: PublicKey): boolean; - - static toXDR(value: PublicKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): PublicKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): PublicKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class SignerKey { - switch(): SignerKeyType; - - ed25519(value?: Buffer): Buffer; - - preAuthTx(value?: Buffer): Buffer; - - hashX(value?: Buffer): Buffer; - - ed25519SignedPayload( - value?: SignerKeyEd25519SignedPayload - ): SignerKeyEd25519SignedPayload; - - static signerKeyTypeEd25519(value: Buffer): SignerKey; - - static signerKeyTypePreAuthTx(value: Buffer): SignerKey; - - static signerKeyTypeHashX(value: Buffer): SignerKey; - - static signerKeyTypeEd25519SignedPayload( - value: SignerKeyEd25519SignedPayload - ): SignerKey; - - value(): Buffer | Buffer | Buffer | SignerKeyEd25519SignedPayload; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): SignerKey; - - static write(value: SignerKey, io: Buffer): void; - - static isValid(value: SignerKey): boolean; - - static toXDR(value: SignerKey): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): SignerKey; - - static fromXDR(input: string, format: 'hex' | 'base64'): SignerKey; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScStatus { - switch(): ScStatusType; - - unknownCode(value?: ScUnknownErrorCode): ScUnknownErrorCode; - - errorCode(value?: ScHostValErrorCode): ScHostValErrorCode; - - errorCode(value?: ScHostObjErrorCode): ScHostObjErrorCode; - - errorCode(value?: ScHostFnErrorCode): ScHostFnErrorCode; - - errorCode(value?: ScHostStorageErrorCode): ScHostStorageErrorCode; - - errorCode(value?: ScHostContextErrorCode): ScHostContextErrorCode; - - errorCode(value?: ScVmErrorCode): ScVmErrorCode; - - static sstOk(): ScStatus; - - static sstUnknownError(value: ScUnknownErrorCode): ScStatus; - - static sstHostValueError(value: ScVmErrorCode): ScStatus; - - static sstHostObjectError(value: ScVmErrorCode): ScStatus; - - static sstHostFunctionError(value: ScVmErrorCode): ScStatus; - - static sstHostStorageError(value: ScVmErrorCode): ScStatus; - - static sstHostContextError(value: ScVmErrorCode): ScStatus; - - static sstVmError(value: ScVmErrorCode): ScStatus; - - value(): - | ScUnknownErrorCode - | ScHostValErrorCode - | ScHostObjErrorCode - | ScHostFnErrorCode - | ScHostStorageErrorCode - | ScHostContextErrorCode - | ScVmErrorCode - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScStatus; - - static write(value: ScStatus, io: Buffer): void; - - static isValid(value: ScStatus): boolean; - - static toXDR(value: ScStatus): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScStatus; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScStatus; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScVal { - switch(): ScValType; - - u63(value?: Int64): Int64; - - u32(value?: number): number; - - i32(value?: number): number; - - ic(value?: ScStatic): ScStatic; - - obj(value?: null | ScObject): null | ScObject; - - sym(value?: string | Buffer): string | Buffer; - - bits(value?: Uint64): Uint64; - - status(value?: ScStatus): ScStatus; - - static scvU63(value: Int64): ScVal; - - static scvU32(value: number): ScVal; - - static scvI32(value: number): ScVal; - - static scvStatic(value: ScStatic): ScVal; - - static scvObject(value: null | ScObject): ScVal; - - static scvSymbol(value: string | Buffer): ScVal; - - static scvBitset(value: Uint64): ScVal; - - static scvStatus(value: ScStatus): ScVal; - - value(): - | Int64 - | number - | number - | ScStatic - | null - | ScObject - | string - | Buffer - | Uint64 - | ScStatus; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScVal; - - static write(value: ScVal, io: Buffer): void; - - static isValid(value: ScVal): boolean; - - static toXDR(value: ScVal): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScVal; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScVal; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScBigInt { - switch(): ScNumSign; - - magnitude(value?: Buffer): Buffer; - - static zero(): ScBigInt; - - static positive(value: Buffer): ScBigInt; - - static negative(value: Buffer): ScBigInt; - - value(): Buffer | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScBigInt; - - static write(value: ScBigInt, io: Buffer): void; - - static isValid(value: ScBigInt): boolean; - - static toXDR(value: ScBigInt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScBigInt; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScBigInt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScHash { - switch(): ScHashType; - - sha256(value?: Buffer): Buffer; - - static schashSha256(value: Buffer): ScHash; - - value(): Buffer; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScHash; - - static write(value: ScHash, io: Buffer): void; - - static isValid(value: ScHash): boolean; - - static toXDR(value: ScHash): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScHash; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScHash; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScContractCode { - switch(): ScContractCodeType; - - wasm(value?: Buffer): Buffer; - - static sccontractCodeWasm(value: Buffer): ScContractCode; - - static sccontractCodeToken(): ScContractCode; - - value(): Buffer | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScContractCode; - - static write(value: ScContractCode, io: Buffer): void; - - static isValid(value: ScContractCode): boolean; - - static toXDR(value: ScContractCode): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScContractCode; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScContractCode; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScObject { - switch(): ScObjectType; - - vec(value?: ScVal[]): ScVal[]; - - map(value?: ScMapEntry[]): ScMapEntry[]; - - u64(value?: Uint64): Uint64; - - i64(value?: Int64): Int64; - - bin(value?: Buffer): Buffer; - - bigInt(value?: ScBigInt): ScBigInt; - - hash(value?: ScHash): ScHash; - - publicKey(value?: PublicKey): PublicKey; - - contractCode(value?: ScContractCode): ScContractCode; - - static scoVec(value: ScVal[]): ScObject; - - static scoMap(value: ScMapEntry[]): ScObject; - - static scoU64(value: Uint64): ScObject; - - static scoI64(value: Int64): ScObject; - - static scoBytes(value: Buffer): ScObject; - - static scoBigInt(value: ScBigInt): ScObject; - - static scoHash(value: ScHash): ScObject; - - static scoPublicKey(value: PublicKey): ScObject; - - static scoContractCode(value: ScContractCode): ScObject; - - value(): - | ScVal[] - | ScMapEntry[] - | Uint64 - | Int64 - | Buffer - | ScBigInt - | ScHash - | PublicKey - | ScContractCode; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScObject; - - static write(value: ScObject, io: Buffer): void; - - static isValid(value: ScObject): boolean; - - static toXDR(value: ScObject): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScObject; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScObject; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScEnvMetaEntry { - switch(): ScEnvMetaKind; - - interfaceVersion(value?: Uint64): Uint64; - - static scEnvMetaKindInterfaceVersion(value: Uint64): ScEnvMetaEntry; - - value(): Uint64; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScEnvMetaEntry; - - static write(value: ScEnvMetaEntry, io: Buffer): void; - - static isValid(value: ScEnvMetaEntry): boolean; - - static toXDR(value: ScEnvMetaEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScEnvMetaEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScEnvMetaEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecTypeDef { - switch(): ScSpecType; - - option(value?: ScSpecTypeOption): ScSpecTypeOption; - - result(value?: ScSpecTypeResult): ScSpecTypeResult; - - vec(value?: ScSpecTypeVec): ScSpecTypeVec; - - map(value?: ScSpecTypeMap): ScSpecTypeMap; - - set(value?: ScSpecTypeSet): ScSpecTypeSet; - - tuple(value?: ScSpecTypeTuple): ScSpecTypeTuple; - - udt(value?: ScSpecTypeUdt): ScSpecTypeUdt; - - static scSpecTypeU64(): ScSpecTypeDef; - - static scSpecTypeI64(): ScSpecTypeDef; - - static scSpecTypeU32(): ScSpecTypeDef; - - static scSpecTypeI32(): ScSpecTypeDef; - - static scSpecTypeBool(): ScSpecTypeDef; - - static scSpecTypeSymbol(): ScSpecTypeDef; - - static scSpecTypeBitset(): ScSpecTypeDef; - - static scSpecTypeStatus(): ScSpecTypeDef; - - static scSpecTypeBytes(): ScSpecTypeDef; - - static scSpecTypeBigInt(): ScSpecTypeDef; - - static scSpecTypeOption(value: ScSpecTypeOption): ScSpecTypeDef; - - static scSpecTypeResult(value: ScSpecTypeResult): ScSpecTypeDef; - - static scSpecTypeVec(value: ScSpecTypeVec): ScSpecTypeDef; - - static scSpecTypeMap(value: ScSpecTypeMap): ScSpecTypeDef; - - static scSpecTypeSet(value: ScSpecTypeSet): ScSpecTypeDef; - - static scSpecTypeTuple(value: ScSpecTypeTuple): ScSpecTypeDef; - - static scSpecTypeUdt(value: ScSpecTypeUdt): ScSpecTypeDef; - - value(): - | ScSpecTypeOption - | ScSpecTypeResult - | ScSpecTypeVec - | ScSpecTypeMap - | ScSpecTypeSet - | ScSpecTypeTuple - | ScSpecTypeUdt - | void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecTypeDef; - - static write(value: ScSpecTypeDef, io: Buffer): void; - - static isValid(value: ScSpecTypeDef): boolean; - - static toXDR(value: ScSpecTypeDef): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecTypeDef; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecTypeDef; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class ScSpecEntry { - switch(): ScSpecEntryKind; - - functionV0(value?: ScSpecFunctionV0): ScSpecFunctionV0; - - udtStructV0(value?: ScSpecUdtStructV0): ScSpecUdtStructV0; - - udtUnionV0(value?: ScSpecUdtUnionV0): ScSpecUdtUnionV0; - - static scSpecEntryFunctionV0(value: ScSpecFunctionV0): ScSpecEntry; - - static scSpecEntryUdtStructV0(value: ScSpecUdtStructV0): ScSpecEntry; - - static scSpecEntryUdtUnionV0(value: ScSpecUdtUnionV0): ScSpecEntry; - - value(): ScSpecFunctionV0 | ScSpecUdtStructV0 | ScSpecUdtUnionV0; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): ScSpecEntry; - - static write(value: ScSpecEntry, io: Buffer): void; - - static isValid(value: ScSpecEntry): boolean; - - static toXDR(value: ScSpecEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): ScSpecEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): ScSpecEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } -} +// Automatically generated on 2022-08-12T12:40:00+01:00 +import { Operation } from './index'; + +export {}; + +// Hidden namespace as hack to work around name collision. +declare namespace xdrHidden { + // tslint:disable-line:strict-export-declare-modifiers + class Operation2 { + constructor(attributes: { + sourceAccount: null | xdr.MuxedAccount; + body: xdr.OperationBody; + }); + + sourceAccount(value?: null | xdr.MuxedAccount): null | xdr.MuxedAccount; + + body(value?: xdr.OperationBody): xdr.OperationBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Operation; + + static write(value: Operation, io: Buffer): void; + + static isValid(value: Operation): boolean; + + static toXDR(value: Operation): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Operation; + + static fromXDR(input: string, format: "hex" | "base64"): Operation; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } +} + +export namespace xdr { + export import Operation = xdrHidden.Operation2; // tslint:disable-line:strict-export-declare-modifiers + + interface SignedInt { + readonly MAX_VALUE: 2147483647; + readonly MIN_VALUE: -2147483648; + read(io: Buffer): number; + write(value: number, io: Buffer): void; + isValid(value: number): boolean; + toXDR(value: number): Buffer; + fromXDR(input: Buffer, format?: "raw"): number; + fromXDR(input: string, format: "hex" | "base64"): number; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + interface UnsignedInt { + readonly MAX_VALUE: 4294967295; + readonly MIN_VALUE: 0; + read(io: Buffer): number; + write(value: number, io: Buffer): void; + isValid(value: number): boolean; + toXDR(value: number): Buffer; + fromXDR(input: Buffer, format?: "raw"): number; + fromXDR(input: string, format: "hex" | "base64"): number; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + interface Bool { + read(io: Buffer): boolean; + write(value: boolean, io: Buffer): void; + isValid(value: boolean): boolean; + toXDR(value: boolean): Buffer; + fromXDR(input: Buffer, format?: "raw"): boolean; + fromXDR(input: string, format: "hex" | "base64"): boolean; + validateXDR(input: Buffer, format?: "raw"): boolean; + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Hyper { + low: number; + + high: number; + + unsigned: boolean; + + constructor(low: number, high: number); + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static toXDR(value: Hyper): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Hyper; + + static fromXDR(input: string, format: "hex" | "base64"): Hyper; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + + static readonly MAX_VALUE: Hyper; + + static readonly MIN_VALUE: Hyper; + + static read(io: Buffer): Hyper; + + static write(value: Hyper, io: Buffer): void; + + static fromString(input: string): Hyper; + + static fromBytes(low: number, high: number): Hyper; + + static isValid(value: Hyper): boolean; + } + + class UnsignedHyper { + low: number; + + high: number; + + unsigned: boolean; + + constructor(low: number, high: number); + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static toXDR(value: UnsignedHyper): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UnsignedHyper; + + static fromXDR(input: string, format: "hex" | "base64"): UnsignedHyper; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + + static readonly MAX_VALUE: UnsignedHyper; + + static readonly MIN_VALUE: UnsignedHyper; + + static read(io: Buffer): UnsignedHyper; + + static write(value: UnsignedHyper, io: Buffer): void; + + static fromString(input: string): UnsignedHyper; + + static fromBytes(low: number, high: number): UnsignedHyper; + + static isValid(value: UnsignedHyper): boolean; + } + + class XDRString { + constructor(maxLength: 4294967295); + + read(io: Buffer): Buffer; + + readString(io: Buffer): string; + + write(value: string | Buffer, io: Buffer): void; + + isValid(value: string | number[] | Buffer): boolean; + + toXDR(value: string | Buffer): Buffer; + + fromXDR(input: Buffer, format?: "raw"): Buffer; + + fromXDR(input: string, format: "hex" | "base64"): Buffer; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class XDRArray { + read(io: Buffer): Buffer; + + write(value: T[], io: Buffer): void; + + isValid(value: T[]): boolean; + + toXDR(value: T[]): Buffer; + + fromXDR(input: Buffer, format?: "raw"): T[]; + + fromXDR(input: string, format: "hex" | "base64"): T[]; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Opaque { + constructor(length: number); + + read(io: Buffer): Buffer; + + write(value: Buffer, io: Buffer): void; + + isValid(value: Buffer): boolean; + + toXDR(value: Buffer): Buffer; + + fromXDR(input: Buffer, format?: "raw"): Buffer; + + fromXDR(input: string, format: "hex" | "base64"): Buffer; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class VarOpaque extends Opaque {} + + class Option { + constructor(childType: { + read(io: any): any; + write(value: any, io: Buffer): void; + isValid(value: any): boolean; + }); + + read(io: Buffer): any; + + write(value: any, io: Buffer): void; + + isValid(value: any): boolean; + + toXDR(value: any): Buffer; + + fromXDR(input: Buffer, format?: "raw"): any; + + fromXDR(input: string, format: "hex" | "base64"): any; + + validateXDR(input: Buffer, format?: "raw"): boolean; + + validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementType { + readonly name: + | "scpStPrepare" + | "scpStConfirm" + | "scpStExternalize" + | "scpStNominate"; + + readonly value: 0 | 1 | 2 | 3; + + static scpStPrepare(): ScpStatementType; + + static scpStConfirm(): ScpStatementType; + + static scpStExternalize(): ScpStatementType; + + static scpStNominate(): ScpStatementType; + } + + class AssetType { + readonly name: + | "assetTypeNative" + | "assetTypeCreditAlphanum4" + | "assetTypeCreditAlphanum12" + | "assetTypePoolShare"; + + readonly value: 0 | 1 | 2 | 3; + + static assetTypeNative(): AssetType; + + static assetTypeCreditAlphanum4(): AssetType; + + static assetTypeCreditAlphanum12(): AssetType; + + static assetTypePoolShare(): AssetType; + } + + class ThresholdIndices { + readonly name: + | "thresholdMasterWeight" + | "thresholdLow" + | "thresholdMed" + | "thresholdHigh"; + + readonly value: 0 | 1 | 2 | 3; + + static thresholdMasterWeight(): ThresholdIndices; + + static thresholdLow(): ThresholdIndices; + + static thresholdMed(): ThresholdIndices; + + static thresholdHigh(): ThresholdIndices; + } + + class LedgerEntryType { + readonly name: + | "account" + | "trustline" + | "offer" + | "data" + | "claimableBalance" + | "liquidityPool" + | "contractData" + | "contractCode" + | "configSetting"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + + static account(): LedgerEntryType; + + static trustline(): LedgerEntryType; + + static offer(): LedgerEntryType; + + static data(): LedgerEntryType; + + static claimableBalance(): LedgerEntryType; + + static liquidityPool(): LedgerEntryType; + + static contractData(): LedgerEntryType; + + static contractCode(): LedgerEntryType; + + static configSetting(): LedgerEntryType; + } + + class AccountFlags { + readonly name: + | "authRequiredFlag" + | "authRevocableFlag" + | "authImmutableFlag" + | "authClawbackEnabledFlag"; + + readonly value: 1 | 2 | 4 | 8; + + static authRequiredFlag(): AccountFlags; + + static authRevocableFlag(): AccountFlags; + + static authImmutableFlag(): AccountFlags; + + static authClawbackEnabledFlag(): AccountFlags; + } + + class TrustLineFlags { + readonly name: + | "authorizedFlag" + | "authorizedToMaintainLiabilitiesFlag" + | "trustlineClawbackEnabledFlag"; + + readonly value: 1 | 2 | 4; + + static authorizedFlag(): TrustLineFlags; + + static authorizedToMaintainLiabilitiesFlag(): TrustLineFlags; + + static trustlineClawbackEnabledFlag(): TrustLineFlags; + } + + class LiquidityPoolType { + readonly name: "liquidityPoolConstantProduct"; + + readonly value: 0; + + static liquidityPoolConstantProduct(): LiquidityPoolType; + } + + class OfferEntryFlags { + readonly name: "passiveFlag"; + + readonly value: 1; + + static passiveFlag(): OfferEntryFlags; + } + + class ClaimPredicateType { + readonly name: + | "claimPredicateUnconditional" + | "claimPredicateAnd" + | "claimPredicateOr" + | "claimPredicateNot" + | "claimPredicateBeforeAbsoluteTime" + | "claimPredicateBeforeRelativeTime"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5; + + static claimPredicateUnconditional(): ClaimPredicateType; + + static claimPredicateAnd(): ClaimPredicateType; + + static claimPredicateOr(): ClaimPredicateType; + + static claimPredicateNot(): ClaimPredicateType; + + static claimPredicateBeforeAbsoluteTime(): ClaimPredicateType; + + static claimPredicateBeforeRelativeTime(): ClaimPredicateType; + } + + class ClaimantType { + readonly name: "claimantTypeV0"; + + readonly value: 0; + + static claimantTypeV0(): ClaimantType; + } + + class ClaimableBalanceIdType { + readonly name: "claimableBalanceIdTypeV0"; + + readonly value: 0; + + static claimableBalanceIdTypeV0(): ClaimableBalanceIdType; + } + + class ClaimableBalanceFlags { + readonly name: "claimableBalanceClawbackEnabledFlag"; + + readonly value: 1; + + static claimableBalanceClawbackEnabledFlag(): ClaimableBalanceFlags; + } + + class ConfigSettingId { + readonly name: + | "configSettingContractMaxSizeBytes" + | "configSettingContractComputeV0" + | "configSettingContractLedgerCostV0" + | "configSettingContractHistoricalDataV0" + | "configSettingContractMetaDataV0" + | "configSettingContractBandwidthV0" + | "configSettingContractHostLogicVersion"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6; + + static configSettingContractMaxSizeBytes(): ConfigSettingId; + + static configSettingContractComputeV0(): ConfigSettingId; + + static configSettingContractLedgerCostV0(): ConfigSettingId; + + static configSettingContractHistoricalDataV0(): ConfigSettingId; + + static configSettingContractMetaDataV0(): ConfigSettingId; + + static configSettingContractBandwidthV0(): ConfigSettingId; + + static configSettingContractHostLogicVersion(): ConfigSettingId; + } + + class EnvelopeType { + readonly name: + | "envelopeTypeTxV0" + | "envelopeTypeScp" + | "envelopeTypeTx" + | "envelopeTypeAuth" + | "envelopeTypeScpvalue" + | "envelopeTypeTxFeeBump" + | "envelopeTypeOpId" + | "envelopeTypePoolRevokeOpId" + | "envelopeTypeContractIdFromEd25519" + | "envelopeTypeContractIdFromContract" + | "envelopeTypeContractIdFromAsset" + | "envelopeTypeContractIdFromSourceAccount" + | "envelopeTypeCreateContractArgs" + | "envelopeTypeContractAuth"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13; + + static envelopeTypeTxV0(): EnvelopeType; + + static envelopeTypeScp(): EnvelopeType; + + static envelopeTypeTx(): EnvelopeType; + + static envelopeTypeAuth(): EnvelopeType; + + static envelopeTypeScpvalue(): EnvelopeType; + + static envelopeTypeTxFeeBump(): EnvelopeType; + + static envelopeTypeOpId(): EnvelopeType; + + static envelopeTypePoolRevokeOpId(): EnvelopeType; + + static envelopeTypeContractIdFromEd25519(): EnvelopeType; + + static envelopeTypeContractIdFromContract(): EnvelopeType; + + static envelopeTypeContractIdFromAsset(): EnvelopeType; + + static envelopeTypeContractIdFromSourceAccount(): EnvelopeType; + + static envelopeTypeCreateContractArgs(): EnvelopeType; + + static envelopeTypeContractAuth(): EnvelopeType; + } + + class StellarValueType { + readonly name: "stellarValueBasic" | "stellarValueSigned"; + + readonly value: 0 | 1; + + static stellarValueBasic(): StellarValueType; + + static stellarValueSigned(): StellarValueType; + } + + class LedgerHeaderFlags { + readonly name: + | "disableLiquidityPoolTradingFlag" + | "disableLiquidityPoolDepositFlag" + | "disableLiquidityPoolWithdrawalFlag" + | "disableContractCreate" + | "disableContractUpdate" + | "disableContractRemove" + | "disableContractInvoke"; + + readonly value: 1 | 2 | 4 | 8 | 16 | 32 | 64; + + static disableLiquidityPoolTradingFlag(): LedgerHeaderFlags; + + static disableLiquidityPoolDepositFlag(): LedgerHeaderFlags; + + static disableLiquidityPoolWithdrawalFlag(): LedgerHeaderFlags; + + static disableContractCreate(): LedgerHeaderFlags; + + static disableContractUpdate(): LedgerHeaderFlags; + + static disableContractRemove(): LedgerHeaderFlags; + + static disableContractInvoke(): LedgerHeaderFlags; + } + + class LedgerUpgradeType { + readonly name: + | "ledgerUpgradeVersion" + | "ledgerUpgradeBaseFee" + | "ledgerUpgradeMaxTxSetSize" + | "ledgerUpgradeBaseReserve" + | "ledgerUpgradeFlags" + | "ledgerUpgradeConfig"; + + readonly value: 1 | 2 | 3 | 4 | 5 | 6; + + static ledgerUpgradeVersion(): LedgerUpgradeType; + + static ledgerUpgradeBaseFee(): LedgerUpgradeType; + + static ledgerUpgradeMaxTxSetSize(): LedgerUpgradeType; + + static ledgerUpgradeBaseReserve(): LedgerUpgradeType; + + static ledgerUpgradeFlags(): LedgerUpgradeType; + + static ledgerUpgradeConfig(): LedgerUpgradeType; + } + + class BucketEntryType { + readonly name: "metaentry" | "liveentry" | "deadentry" | "initentry"; + + readonly value: -1 | 0 | 1 | 2; + + static metaentry(): BucketEntryType; + + static liveentry(): BucketEntryType; + + static deadentry(): BucketEntryType; + + static initentry(): BucketEntryType; + } + + class TxSetComponentType { + readonly name: "txsetCompTxsMaybeDiscountedFee"; + + readonly value: 0; + + static txsetCompTxsMaybeDiscountedFee(): TxSetComponentType; + } + + class LedgerEntryChangeType { + readonly name: + | "ledgerEntryCreated" + | "ledgerEntryUpdated" + | "ledgerEntryRemoved" + | "ledgerEntryState"; + + readonly value: 0 | 1 | 2 | 3; + + static ledgerEntryCreated(): LedgerEntryChangeType; + + static ledgerEntryUpdated(): LedgerEntryChangeType; + + static ledgerEntryRemoved(): LedgerEntryChangeType; + + static ledgerEntryState(): LedgerEntryChangeType; + } + + class ContractEventType { + readonly name: "system" | "contract" | "diagnostic"; + + readonly value: 0 | 1 | 2; + + static system(): ContractEventType; + + static contract(): ContractEventType; + + static diagnostic(): ContractEventType; + } + + class ErrorCode { + readonly name: "errMisc" | "errData" | "errConf" | "errAuth" | "errLoad"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static errMisc(): ErrorCode; + + static errData(): ErrorCode; + + static errConf(): ErrorCode; + + static errAuth(): ErrorCode; + + static errLoad(): ErrorCode; + } + + class IpAddrType { + readonly name: "iPv4" | "iPv6"; + + readonly value: 0 | 1; + + static iPv4(): IpAddrType; + + static iPv6(): IpAddrType; + } + + class MessageType { + readonly name: + | "errorMsg" + | "auth" + | "dontHave" + | "getPeers" + | "peers" + | "getTxSet" + | "txSet" + | "generalizedTxSet" + | "transaction" + | "getScpQuorumset" + | "scpQuorumset" + | "scpMessage" + | "getScpState" + | "hello" + | "surveyRequest" + | "surveyResponse" + | "sendMore" + | "floodAdvert" + | "floodDemand"; + + readonly value: + | 0 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 17 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 18 + | 19; + + static errorMsg(): MessageType; + + static auth(): MessageType; + + static dontHave(): MessageType; + + static getPeers(): MessageType; + + static peers(): MessageType; + + static getTxSet(): MessageType; + + static txSet(): MessageType; + + static generalizedTxSet(): MessageType; + + static transaction(): MessageType; + + static getScpQuorumset(): MessageType; + + static scpQuorumset(): MessageType; + + static scpMessage(): MessageType; + + static getScpState(): MessageType; + + static hello(): MessageType; + + static surveyRequest(): MessageType; + + static surveyResponse(): MessageType; + + static sendMore(): MessageType; + + static floodAdvert(): MessageType; + + static floodDemand(): MessageType; + } + + class SurveyMessageCommandType { + readonly name: "surveyTopology"; + + readonly value: 0; + + static surveyTopology(): SurveyMessageCommandType; + } + + class SurveyMessageResponseType { + readonly name: "surveyTopologyResponseV0" | "surveyTopologyResponseV1"; + + readonly value: 0 | 1; + + static surveyTopologyResponseV0(): SurveyMessageResponseType; + + static surveyTopologyResponseV1(): SurveyMessageResponseType; + } + + class OperationType { + readonly name: + | "createAccount" + | "payment" + | "pathPaymentStrictReceive" + | "manageSellOffer" + | "createPassiveSellOffer" + | "setOptions" + | "changeTrust" + | "allowTrust" + | "accountMerge" + | "inflation" + | "manageData" + | "bumpSequence" + | "manageBuyOffer" + | "pathPaymentStrictSend" + | "createClaimableBalance" + | "claimClaimableBalance" + | "beginSponsoringFutureReserves" + | "endSponsoringFutureReserves" + | "revokeSponsorship" + | "clawback" + | "clawbackClaimableBalance" + | "setTrustLineFlags" + | "liquidityPoolDeposit" + | "liquidityPoolWithdraw" + | "invokeHostFunction"; + + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20 + | 21 + | 22 + | 23 + | 24; + + static createAccount(): OperationType; + + static payment(): OperationType; + + static pathPaymentStrictReceive(): OperationType; + + static manageSellOffer(): OperationType; + + static createPassiveSellOffer(): OperationType; + + static setOptions(): OperationType; + + static changeTrust(): OperationType; + + static allowTrust(): OperationType; + + static accountMerge(): OperationType; + + static inflation(): OperationType; + + static manageData(): OperationType; + + static bumpSequence(): OperationType; + + static manageBuyOffer(): OperationType; + + static pathPaymentStrictSend(): OperationType; + + static createClaimableBalance(): OperationType; + + static claimClaimableBalance(): OperationType; + + static beginSponsoringFutureReserves(): OperationType; + + static endSponsoringFutureReserves(): OperationType; + + static revokeSponsorship(): OperationType; + + static clawback(): OperationType; + + static clawbackClaimableBalance(): OperationType; + + static setTrustLineFlags(): OperationType; + + static liquidityPoolDeposit(): OperationType; + + static liquidityPoolWithdraw(): OperationType; + + static invokeHostFunction(): OperationType; + } + + class RevokeSponsorshipType { + readonly name: "revokeSponsorshipLedgerEntry" | "revokeSponsorshipSigner"; + + readonly value: 0 | 1; + + static revokeSponsorshipLedgerEntry(): RevokeSponsorshipType; + + static revokeSponsorshipSigner(): RevokeSponsorshipType; + } + + class HostFunctionType { + readonly name: + | "hostFunctionTypeInvokeContract" + | "hostFunctionTypeCreateContract" + | "hostFunctionTypeInstallContractCode"; + + readonly value: 0 | 1 | 2; + + static hostFunctionTypeInvokeContract(): HostFunctionType; + + static hostFunctionTypeCreateContract(): HostFunctionType; + + static hostFunctionTypeInstallContractCode(): HostFunctionType; + } + + class ContractIdType { + readonly name: + | "contractIdFromSourceAccount" + | "contractIdFromEd25519PublicKey" + | "contractIdFromAsset"; + + readonly value: 0 | 1 | 2; + + static contractIdFromSourceAccount(): ContractIdType; + + static contractIdFromEd25519PublicKey(): ContractIdType; + + static contractIdFromAsset(): ContractIdType; + } + + class ContractIdPublicKeyType { + readonly name: + | "contractIdPublicKeySourceAccount" + | "contractIdPublicKeyEd25519"; + + readonly value: 0 | 1; + + static contractIdPublicKeySourceAccount(): ContractIdPublicKeyType; + + static contractIdPublicKeyEd25519(): ContractIdPublicKeyType; + } + + class MemoType { + readonly name: + | "memoNone" + | "memoText" + | "memoId" + | "memoHash" + | "memoReturn"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static memoNone(): MemoType; + + static memoText(): MemoType; + + static memoId(): MemoType; + + static memoHash(): MemoType; + + static memoReturn(): MemoType; + } + + class PreconditionType { + readonly name: "precondNone" | "precondTime" | "precondV2"; + + readonly value: 0 | 1 | 2; + + static precondNone(): PreconditionType; + + static precondTime(): PreconditionType; + + static precondV2(): PreconditionType; + } + + class ClaimAtomType { + readonly name: + | "claimAtomTypeV0" + | "claimAtomTypeOrderBook" + | "claimAtomTypeLiquidityPool"; + + readonly value: 0 | 1 | 2; + + static claimAtomTypeV0(): ClaimAtomType; + + static claimAtomTypeOrderBook(): ClaimAtomType; + + static claimAtomTypeLiquidityPool(): ClaimAtomType; + } + + class CreateAccountResultCode { + readonly name: + | "createAccountSuccess" + | "createAccountMalformed" + | "createAccountUnderfunded" + | "createAccountLowReserve" + | "createAccountAlreadyExist"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static createAccountSuccess(): CreateAccountResultCode; + + static createAccountMalformed(): CreateAccountResultCode; + + static createAccountUnderfunded(): CreateAccountResultCode; + + static createAccountLowReserve(): CreateAccountResultCode; + + static createAccountAlreadyExist(): CreateAccountResultCode; + } + + class PaymentResultCode { + readonly name: + | "paymentSuccess" + | "paymentMalformed" + | "paymentUnderfunded" + | "paymentSrcNoTrust" + | "paymentSrcNotAuthorized" + | "paymentNoDestination" + | "paymentNoTrust" + | "paymentNotAuthorized" + | "paymentLineFull" + | "paymentNoIssuer"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9; + + static paymentSuccess(): PaymentResultCode; + + static paymentMalformed(): PaymentResultCode; + + static paymentUnderfunded(): PaymentResultCode; + + static paymentSrcNoTrust(): PaymentResultCode; + + static paymentSrcNotAuthorized(): PaymentResultCode; + + static paymentNoDestination(): PaymentResultCode; + + static paymentNoTrust(): PaymentResultCode; + + static paymentNotAuthorized(): PaymentResultCode; + + static paymentLineFull(): PaymentResultCode; + + static paymentNoIssuer(): PaymentResultCode; + } + + class PathPaymentStrictReceiveResultCode { + readonly name: + | "pathPaymentStrictReceiveSuccess" + | "pathPaymentStrictReceiveMalformed" + | "pathPaymentStrictReceiveUnderfunded" + | "pathPaymentStrictReceiveSrcNoTrust" + | "pathPaymentStrictReceiveSrcNotAuthorized" + | "pathPaymentStrictReceiveNoDestination" + | "pathPaymentStrictReceiveNoTrust" + | "pathPaymentStrictReceiveNotAuthorized" + | "pathPaymentStrictReceiveLineFull" + | "pathPaymentStrictReceiveNoIssuer" + | "pathPaymentStrictReceiveTooFewOffers" + | "pathPaymentStrictReceiveOfferCrossSelf" + | "pathPaymentStrictReceiveOverSendmax"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static pathPaymentStrictReceiveSuccess(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveNoIssuer(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResultCode; + + static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResultCode; + } + + class PathPaymentStrictSendResultCode { + readonly name: + | "pathPaymentStrictSendSuccess" + | "pathPaymentStrictSendMalformed" + | "pathPaymentStrictSendUnderfunded" + | "pathPaymentStrictSendSrcNoTrust" + | "pathPaymentStrictSendSrcNotAuthorized" + | "pathPaymentStrictSendNoDestination" + | "pathPaymentStrictSendNoTrust" + | "pathPaymentStrictSendNotAuthorized" + | "pathPaymentStrictSendLineFull" + | "pathPaymentStrictSendNoIssuer" + | "pathPaymentStrictSendTooFewOffers" + | "pathPaymentStrictSendOfferCrossSelf" + | "pathPaymentStrictSendUnderDestmin"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static pathPaymentStrictSendSuccess(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendNoIssuer(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResultCode; + + static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResultCode; + } + + class ManageSellOfferResultCode { + readonly name: + | "manageSellOfferSuccess" + | "manageSellOfferMalformed" + | "manageSellOfferSellNoTrust" + | "manageSellOfferBuyNoTrust" + | "manageSellOfferSellNotAuthorized" + | "manageSellOfferBuyNotAuthorized" + | "manageSellOfferLineFull" + | "manageSellOfferUnderfunded" + | "manageSellOfferCrossSelf" + | "manageSellOfferSellNoIssuer" + | "manageSellOfferBuyNoIssuer" + | "manageSellOfferNotFound" + | "manageSellOfferLowReserve"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static manageSellOfferSuccess(): ManageSellOfferResultCode; + + static manageSellOfferMalformed(): ManageSellOfferResultCode; + + static manageSellOfferSellNoTrust(): ManageSellOfferResultCode; + + static manageSellOfferBuyNoTrust(): ManageSellOfferResultCode; + + static manageSellOfferSellNotAuthorized(): ManageSellOfferResultCode; + + static manageSellOfferBuyNotAuthorized(): ManageSellOfferResultCode; + + static manageSellOfferLineFull(): ManageSellOfferResultCode; + + static manageSellOfferUnderfunded(): ManageSellOfferResultCode; + + static manageSellOfferCrossSelf(): ManageSellOfferResultCode; + + static manageSellOfferSellNoIssuer(): ManageSellOfferResultCode; + + static manageSellOfferBuyNoIssuer(): ManageSellOfferResultCode; + + static manageSellOfferNotFound(): ManageSellOfferResultCode; + + static manageSellOfferLowReserve(): ManageSellOfferResultCode; + } + + class ManageOfferEffect { + readonly name: + | "manageOfferCreated" + | "manageOfferUpdated" + | "manageOfferDeleted"; + + readonly value: 0 | 1 | 2; + + static manageOfferCreated(): ManageOfferEffect; + + static manageOfferUpdated(): ManageOfferEffect; + + static manageOfferDeleted(): ManageOfferEffect; + } + + class ManageBuyOfferResultCode { + readonly name: + | "manageBuyOfferSuccess" + | "manageBuyOfferMalformed" + | "manageBuyOfferSellNoTrust" + | "manageBuyOfferBuyNoTrust" + | "manageBuyOfferSellNotAuthorized" + | "manageBuyOfferBuyNotAuthorized" + | "manageBuyOfferLineFull" + | "manageBuyOfferUnderfunded" + | "manageBuyOfferCrossSelf" + | "manageBuyOfferSellNoIssuer" + | "manageBuyOfferBuyNoIssuer" + | "manageBuyOfferNotFound" + | "manageBuyOfferLowReserve"; + + readonly value: + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12; + + static manageBuyOfferSuccess(): ManageBuyOfferResultCode; + + static manageBuyOfferMalformed(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNoTrust(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNoTrust(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResultCode; + + static manageBuyOfferLineFull(): ManageBuyOfferResultCode; + + static manageBuyOfferUnderfunded(): ManageBuyOfferResultCode; + + static manageBuyOfferCrossSelf(): ManageBuyOfferResultCode; + + static manageBuyOfferSellNoIssuer(): ManageBuyOfferResultCode; + + static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResultCode; + + static manageBuyOfferNotFound(): ManageBuyOfferResultCode; + + static manageBuyOfferLowReserve(): ManageBuyOfferResultCode; + } + + class SetOptionsResultCode { + readonly name: + | "setOptionsSuccess" + | "setOptionsLowReserve" + | "setOptionsTooManySigners" + | "setOptionsBadFlags" + | "setOptionsInvalidInflation" + | "setOptionsCantChange" + | "setOptionsUnknownFlag" + | "setOptionsThresholdOutOfRange" + | "setOptionsBadSigner" + | "setOptionsInvalidHomeDomain" + | "setOptionsAuthRevocableRequired"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10; + + static setOptionsSuccess(): SetOptionsResultCode; + + static setOptionsLowReserve(): SetOptionsResultCode; + + static setOptionsTooManySigners(): SetOptionsResultCode; + + static setOptionsBadFlags(): SetOptionsResultCode; + + static setOptionsInvalidInflation(): SetOptionsResultCode; + + static setOptionsCantChange(): SetOptionsResultCode; + + static setOptionsUnknownFlag(): SetOptionsResultCode; + + static setOptionsThresholdOutOfRange(): SetOptionsResultCode; + + static setOptionsBadSigner(): SetOptionsResultCode; + + static setOptionsInvalidHomeDomain(): SetOptionsResultCode; + + static setOptionsAuthRevocableRequired(): SetOptionsResultCode; + } + + class ChangeTrustResultCode { + readonly name: + | "changeTrustSuccess" + | "changeTrustMalformed" + | "changeTrustNoIssuer" + | "changeTrustInvalidLimit" + | "changeTrustLowReserve" + | "changeTrustSelfNotAllowed" + | "changeTrustTrustLineMissing" + | "changeTrustCannotDelete" + | "changeTrustNotAuthMaintainLiabilities"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8; + + static changeTrustSuccess(): ChangeTrustResultCode; + + static changeTrustMalformed(): ChangeTrustResultCode; + + static changeTrustNoIssuer(): ChangeTrustResultCode; + + static changeTrustInvalidLimit(): ChangeTrustResultCode; + + static changeTrustLowReserve(): ChangeTrustResultCode; + + static changeTrustSelfNotAllowed(): ChangeTrustResultCode; + + static changeTrustTrustLineMissing(): ChangeTrustResultCode; + + static changeTrustCannotDelete(): ChangeTrustResultCode; + + static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResultCode; + } + + class AllowTrustResultCode { + readonly name: + | "allowTrustSuccess" + | "allowTrustMalformed" + | "allowTrustNoTrustLine" + | "allowTrustTrustNotRequired" + | "allowTrustCantRevoke" + | "allowTrustSelfNotAllowed" + | "allowTrustLowReserve"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; + + static allowTrustSuccess(): AllowTrustResultCode; + + static allowTrustMalformed(): AllowTrustResultCode; + + static allowTrustNoTrustLine(): AllowTrustResultCode; + + static allowTrustTrustNotRequired(): AllowTrustResultCode; + + static allowTrustCantRevoke(): AllowTrustResultCode; + + static allowTrustSelfNotAllowed(): AllowTrustResultCode; + + static allowTrustLowReserve(): AllowTrustResultCode; + } + + class AccountMergeResultCode { + readonly name: + | "accountMergeSuccess" + | "accountMergeMalformed" + | "accountMergeNoAccount" + | "accountMergeImmutableSet" + | "accountMergeHasSubEntries" + | "accountMergeSeqnumTooFar" + | "accountMergeDestFull" + | "accountMergeIsSponsor"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; + + static accountMergeSuccess(): AccountMergeResultCode; + + static accountMergeMalformed(): AccountMergeResultCode; + + static accountMergeNoAccount(): AccountMergeResultCode; + + static accountMergeImmutableSet(): AccountMergeResultCode; + + static accountMergeHasSubEntries(): AccountMergeResultCode; + + static accountMergeSeqnumTooFar(): AccountMergeResultCode; + + static accountMergeDestFull(): AccountMergeResultCode; + + static accountMergeIsSponsor(): AccountMergeResultCode; + } + + class InflationResultCode { + readonly name: "inflationSuccess" | "inflationNotTime"; + + readonly value: 0 | -1; + + static inflationSuccess(): InflationResultCode; + + static inflationNotTime(): InflationResultCode; + } + + class ManageDataResultCode { + readonly name: + | "manageDataSuccess" + | "manageDataNotSupportedYet" + | "manageDataNameNotFound" + | "manageDataLowReserve" + | "manageDataInvalidName"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static manageDataSuccess(): ManageDataResultCode; + + static manageDataNotSupportedYet(): ManageDataResultCode; + + static manageDataNameNotFound(): ManageDataResultCode; + + static manageDataLowReserve(): ManageDataResultCode; + + static manageDataInvalidName(): ManageDataResultCode; + } + + class BumpSequenceResultCode { + readonly name: "bumpSequenceSuccess" | "bumpSequenceBadSeq"; + + readonly value: 0 | -1; + + static bumpSequenceSuccess(): BumpSequenceResultCode; + + static bumpSequenceBadSeq(): BumpSequenceResultCode; + } + + class CreateClaimableBalanceResultCode { + readonly name: + | "createClaimableBalanceSuccess" + | "createClaimableBalanceMalformed" + | "createClaimableBalanceLowReserve" + | "createClaimableBalanceNoTrust" + | "createClaimableBalanceNotAuthorized" + | "createClaimableBalanceUnderfunded"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static createClaimableBalanceSuccess(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceMalformed(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceLowReserve(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceNoTrust(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResultCode; + + static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResultCode; + } + + class ClaimClaimableBalanceResultCode { + readonly name: + | "claimClaimableBalanceSuccess" + | "claimClaimableBalanceDoesNotExist" + | "claimClaimableBalanceCannotClaim" + | "claimClaimableBalanceLineFull" + | "claimClaimableBalanceNoTrust" + | "claimClaimableBalanceNotAuthorized"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResultCode; + } + + class BeginSponsoringFutureReservesResultCode { + readonly name: + | "beginSponsoringFutureReservesSuccess" + | "beginSponsoringFutureReservesMalformed" + | "beginSponsoringFutureReservesAlreadySponsored" + | "beginSponsoringFutureReservesRecursive"; + + readonly value: 0 | -1 | -2 | -3; + + static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResultCode; + } + + class EndSponsoringFutureReservesResultCode { + readonly name: + | "endSponsoringFutureReservesSuccess" + | "endSponsoringFutureReservesNotSponsored"; + + readonly value: 0 | -1; + + static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResultCode; + + static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResultCode; + } + + class RevokeSponsorshipResultCode { + readonly name: + | "revokeSponsorshipSuccess" + | "revokeSponsorshipDoesNotExist" + | "revokeSponsorshipNotSponsor" + | "revokeSponsorshipLowReserve" + | "revokeSponsorshipOnlyTransferable" + | "revokeSponsorshipMalformed"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static revokeSponsorshipSuccess(): RevokeSponsorshipResultCode; + + static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResultCode; + + static revokeSponsorshipNotSponsor(): RevokeSponsorshipResultCode; + + static revokeSponsorshipLowReserve(): RevokeSponsorshipResultCode; + + static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResultCode; + + static revokeSponsorshipMalformed(): RevokeSponsorshipResultCode; + } + + class ClawbackResultCode { + readonly name: + | "clawbackSuccess" + | "clawbackMalformed" + | "clawbackNotClawbackEnabled" + | "clawbackNoTrust" + | "clawbackUnderfunded"; + + readonly value: 0 | -1 | -2 | -3 | -4; + + static clawbackSuccess(): ClawbackResultCode; + + static clawbackMalformed(): ClawbackResultCode; + + static clawbackNotClawbackEnabled(): ClawbackResultCode; + + static clawbackNoTrust(): ClawbackResultCode; + + static clawbackUnderfunded(): ClawbackResultCode; + } + + class ClawbackClaimableBalanceResultCode { + readonly name: + | "clawbackClaimableBalanceSuccess" + | "clawbackClaimableBalanceDoesNotExist" + | "clawbackClaimableBalanceNotIssuer" + | "clawbackClaimableBalanceNotClawbackEnabled"; + + readonly value: 0 | -1 | -2 | -3; + + static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResultCode; + } + + class SetTrustLineFlagsResultCode { + readonly name: + | "setTrustLineFlagsSuccess" + | "setTrustLineFlagsMalformed" + | "setTrustLineFlagsNoTrustLine" + | "setTrustLineFlagsCantRevoke" + | "setTrustLineFlagsInvalidState" + | "setTrustLineFlagsLowReserve"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static setTrustLineFlagsSuccess(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsMalformed(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResultCode; + } + + class LiquidityPoolDepositResultCode { + readonly name: + | "liquidityPoolDepositSuccess" + | "liquidityPoolDepositMalformed" + | "liquidityPoolDepositNoTrust" + | "liquidityPoolDepositNotAuthorized" + | "liquidityPoolDepositUnderfunded" + | "liquidityPoolDepositLineFull" + | "liquidityPoolDepositBadPrice" + | "liquidityPoolDepositPoolFull"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7; + + static liquidityPoolDepositSuccess(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositMalformed(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositLineFull(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResultCode; + } + + class LiquidityPoolWithdrawResultCode { + readonly name: + | "liquidityPoolWithdrawSuccess" + | "liquidityPoolWithdrawMalformed" + | "liquidityPoolWithdrawNoTrust" + | "liquidityPoolWithdrawUnderfunded" + | "liquidityPoolWithdrawLineFull" + | "liquidityPoolWithdrawUnderMinimum"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5; + + static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResultCode; + } + + class InvokeHostFunctionResultCode { + readonly name: + | "invokeHostFunctionSuccess" + | "invokeHostFunctionMalformed" + | "invokeHostFunctionTrapped"; + + readonly value: 0 | -1 | -2; + + static invokeHostFunctionSuccess(): InvokeHostFunctionResultCode; + + static invokeHostFunctionMalformed(): InvokeHostFunctionResultCode; + + static invokeHostFunctionTrapped(): InvokeHostFunctionResultCode; + } + + class OperationResultCode { + readonly name: + | "opInner" + | "opBadAuth" + | "opNoAccount" + | "opNotSupported" + | "opTooManySubentries" + | "opExceededWorkLimit" + | "opTooManySponsoring"; + + readonly value: 0 | -1 | -2 | -3 | -4 | -5 | -6; + + static opInner(): OperationResultCode; + + static opBadAuth(): OperationResultCode; + + static opNoAccount(): OperationResultCode; + + static opNotSupported(): OperationResultCode; + + static opTooManySubentries(): OperationResultCode; + + static opExceededWorkLimit(): OperationResultCode; + + static opTooManySponsoring(): OperationResultCode; + } + + class TransactionResultCode { + readonly name: + | "txFeeBumpInnerSuccess" + | "txSuccess" + | "txFailed" + | "txTooEarly" + | "txTooLate" + | "txMissingOperation" + | "txBadSeq" + | "txBadAuth" + | "txInsufficientBalance" + | "txNoAccount" + | "txInsufficientFee" + | "txBadAuthExtra" + | "txInternalError" + | "txNotSupported" + | "txFeeBumpInnerFailed" + | "txBadSponsorship" + | "txBadMinSeqAgeOrGap" + | "txMalformed"; + + readonly value: + | 1 + | 0 + | -1 + | -2 + | -3 + | -4 + | -5 + | -6 + | -7 + | -8 + | -9 + | -10 + | -11 + | -12 + | -13 + | -14 + | -15 + | -16; + + static txFeeBumpInnerSuccess(): TransactionResultCode; + + static txSuccess(): TransactionResultCode; + + static txFailed(): TransactionResultCode; + + static txTooEarly(): TransactionResultCode; + + static txTooLate(): TransactionResultCode; + + static txMissingOperation(): TransactionResultCode; + + static txBadSeq(): TransactionResultCode; + + static txBadAuth(): TransactionResultCode; + + static txInsufficientBalance(): TransactionResultCode; + + static txNoAccount(): TransactionResultCode; + + static txInsufficientFee(): TransactionResultCode; + + static txBadAuthExtra(): TransactionResultCode; + + static txInternalError(): TransactionResultCode; + + static txNotSupported(): TransactionResultCode; + + static txFeeBumpInnerFailed(): TransactionResultCode; + + static txBadSponsorship(): TransactionResultCode; + + static txBadMinSeqAgeOrGap(): TransactionResultCode; + + static txMalformed(): TransactionResultCode; + } + + class CryptoKeyType { + readonly name: + | "keyTypeEd25519" + | "keyTypePreAuthTx" + | "keyTypeHashX" + | "keyTypeEd25519SignedPayload" + | "keyTypeMuxedEd25519"; + + readonly value: 0 | 1 | 2 | 3 | 256; + + static keyTypeEd25519(): CryptoKeyType; + + static keyTypePreAuthTx(): CryptoKeyType; + + static keyTypeHashX(): CryptoKeyType; + + static keyTypeEd25519SignedPayload(): CryptoKeyType; + + static keyTypeMuxedEd25519(): CryptoKeyType; + } + + class PublicKeyType { + readonly name: "publicKeyTypeEd25519"; + + readonly value: 0; + + static publicKeyTypeEd25519(): PublicKeyType; + } + + class SignerKeyType { + readonly name: + | "signerKeyTypeEd25519" + | "signerKeyTypePreAuthTx" + | "signerKeyTypeHashX" + | "signerKeyTypeEd25519SignedPayload"; + + readonly value: 0 | 1 | 2 | 3; + + static signerKeyTypeEd25519(): SignerKeyType; + + static signerKeyTypePreAuthTx(): SignerKeyType; + + static signerKeyTypeHashX(): SignerKeyType; + + static signerKeyTypeEd25519SignedPayload(): SignerKeyType; + } + + class ScValType { + readonly name: + | "scvBool" + | "scvVoid" + | "scvStatus" + | "scvU32" + | "scvI32" + | "scvU64" + | "scvI64" + | "scvTimepoint" + | "scvDuration" + | "scvU128" + | "scvI128" + | "scvU256" + | "scvI256" + | "scvBytes" + | "scvString" + | "scvSymbol" + | "scvVec" + | "scvMap" + | "scvContractExecutable" + | "scvAddress" + | "scvLedgerKeyContractExecutable" + | "scvLedgerKeyNonce"; + + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20 + | 21; + + static scvBool(): ScValType; + + static scvVoid(): ScValType; + + static scvStatus(): ScValType; + + static scvU32(): ScValType; + + static scvI32(): ScValType; + + static scvU64(): ScValType; + + static scvI64(): ScValType; + + static scvTimepoint(): ScValType; + + static scvDuration(): ScValType; + + static scvU128(): ScValType; + + static scvI128(): ScValType; + + static scvU256(): ScValType; + + static scvI256(): ScValType; + + static scvBytes(): ScValType; + + static scvString(): ScValType; + + static scvSymbol(): ScValType; + + static scvVec(): ScValType; + + static scvMap(): ScValType; + + static scvContractExecutable(): ScValType; + + static scvAddress(): ScValType; + + static scvLedgerKeyContractExecutable(): ScValType; + + static scvLedgerKeyNonce(): ScValType; + } + + class ScStatusType { + readonly name: + | "sstOk" + | "sstUnknownError" + | "sstHostValueError" + | "sstHostObjectError" + | "sstHostFunctionError" + | "sstHostStorageError" + | "sstHostContextError" + | "sstVmError" + | "sstContractError" + | "sstHostAuthError"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; + + static sstOk(): ScStatusType; + + static sstUnknownError(): ScStatusType; + + static sstHostValueError(): ScStatusType; + + static sstHostObjectError(): ScStatusType; + + static sstHostFunctionError(): ScStatusType; + + static sstHostStorageError(): ScStatusType; + + static sstHostContextError(): ScStatusType; + + static sstVmError(): ScStatusType; + + static sstContractError(): ScStatusType; + + static sstHostAuthError(): ScStatusType; + } + + class ScHostValErrorCode { + readonly name: + | "hostValueUnknownError" + | "hostValueReservedTagValue" + | "hostValueUnexpectedValType" + | "hostValueU63OutOfRange" + | "hostValueU32OutOfRange" + | "hostValueStaticUnknown" + | "hostValueMissingObject" + | "hostValueSymbolTooLong" + | "hostValueSymbolBadChar" + | "hostValueSymbolContainsNonUtf8" + | "hostValueBitsetTooManyBits" + | "hostValueStatusUnknown"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11; + + static hostValueUnknownError(): ScHostValErrorCode; + + static hostValueReservedTagValue(): ScHostValErrorCode; + + static hostValueUnexpectedValType(): ScHostValErrorCode; + + static hostValueU63OutOfRange(): ScHostValErrorCode; + + static hostValueU32OutOfRange(): ScHostValErrorCode; + + static hostValueStaticUnknown(): ScHostValErrorCode; + + static hostValueMissingObject(): ScHostValErrorCode; + + static hostValueSymbolTooLong(): ScHostValErrorCode; + + static hostValueSymbolBadChar(): ScHostValErrorCode; + + static hostValueSymbolContainsNonUtf8(): ScHostValErrorCode; + + static hostValueBitsetTooManyBits(): ScHostValErrorCode; + + static hostValueStatusUnknown(): ScHostValErrorCode; + } + + class ScHostObjErrorCode { + readonly name: + | "hostObjectUnknownError" + | "hostObjectUnknownReference" + | "hostObjectUnexpectedType" + | "hostObjectObjectCountExceedsU32Max" + | "hostObjectObjectNotExist" + | "hostObjectVecIndexOutOfBound" + | "hostObjectContractHashWrongLength"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6; + + static hostObjectUnknownError(): ScHostObjErrorCode; + + static hostObjectUnknownReference(): ScHostObjErrorCode; + + static hostObjectUnexpectedType(): ScHostObjErrorCode; + + static hostObjectObjectCountExceedsU32Max(): ScHostObjErrorCode; + + static hostObjectObjectNotExist(): ScHostObjErrorCode; + + static hostObjectVecIndexOutOfBound(): ScHostObjErrorCode; + + static hostObjectContractHashWrongLength(): ScHostObjErrorCode; + } + + class ScHostFnErrorCode { + readonly name: + | "hostFnUnknownError" + | "hostFnUnexpectedHostFunctionAction" + | "hostFnInputArgsWrongLength" + | "hostFnInputArgsWrongType" + | "hostFnInputArgsInvalid"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static hostFnUnknownError(): ScHostFnErrorCode; + + static hostFnUnexpectedHostFunctionAction(): ScHostFnErrorCode; + + static hostFnInputArgsWrongLength(): ScHostFnErrorCode; + + static hostFnInputArgsWrongType(): ScHostFnErrorCode; + + static hostFnInputArgsInvalid(): ScHostFnErrorCode; + } + + class ScHostStorageErrorCode { + readonly name: + | "hostStorageUnknownError" + | "hostStorageExpectContractData" + | "hostStorageReadwriteAccessToReadonlyEntry" + | "hostStorageAccessToUnknownEntry" + | "hostStorageMissingKeyInGet" + | "hostStorageGetOnDeletedKey"; + + readonly value: 0 | 1 | 2 | 3 | 4 | 5; + + static hostStorageUnknownError(): ScHostStorageErrorCode; + + static hostStorageExpectContractData(): ScHostStorageErrorCode; + + static hostStorageReadwriteAccessToReadonlyEntry(): ScHostStorageErrorCode; + + static hostStorageAccessToUnknownEntry(): ScHostStorageErrorCode; + + static hostStorageMissingKeyInGet(): ScHostStorageErrorCode; + + static hostStorageGetOnDeletedKey(): ScHostStorageErrorCode; + } + + class ScHostAuthErrorCode { + readonly name: + | "hostAuthUnknownError" + | "hostAuthNonceError" + | "hostAuthDuplicateAuthorization" + | "hostAuthNotAuthorized"; + + readonly value: 0 | 1 | 2 | 3; + + static hostAuthUnknownError(): ScHostAuthErrorCode; + + static hostAuthNonceError(): ScHostAuthErrorCode; + + static hostAuthDuplicateAuthorization(): ScHostAuthErrorCode; + + static hostAuthNotAuthorized(): ScHostAuthErrorCode; + } + + class ScHostContextErrorCode { + readonly name: "hostContextUnknownError" | "hostContextNoContractRunning"; + + readonly value: 0 | 1; + + static hostContextUnknownError(): ScHostContextErrorCode; + + static hostContextNoContractRunning(): ScHostContextErrorCode; + } + + class ScVmErrorCode { + readonly name: + | "vmUnknown" + | "vmValidation" + | "vmInstantiation" + | "vmFunction" + | "vmTable" + | "vmMemory" + | "vmGlobal" + | "vmValue" + | "vmTrapUnreachable" + | "vmTrapMemoryAccessOutOfBounds" + | "vmTrapTableAccessOutOfBounds" + | "vmTrapElemUninitialized" + | "vmTrapDivisionByZero" + | "vmTrapIntegerOverflow" + | "vmTrapInvalidConversionToInt" + | "vmTrapStackOverflow" + | "vmTrapUnexpectedSignature" + | "vmTrapMemLimitExceeded" + | "vmTrapCpuLimitExceeded"; + + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18; + + static vmUnknown(): ScVmErrorCode; + + static vmValidation(): ScVmErrorCode; + + static vmInstantiation(): ScVmErrorCode; + + static vmFunction(): ScVmErrorCode; + + static vmTable(): ScVmErrorCode; + + static vmMemory(): ScVmErrorCode; + + static vmGlobal(): ScVmErrorCode; + + static vmValue(): ScVmErrorCode; + + static vmTrapUnreachable(): ScVmErrorCode; + + static vmTrapMemoryAccessOutOfBounds(): ScVmErrorCode; + + static vmTrapTableAccessOutOfBounds(): ScVmErrorCode; + + static vmTrapElemUninitialized(): ScVmErrorCode; + + static vmTrapDivisionByZero(): ScVmErrorCode; + + static vmTrapIntegerOverflow(): ScVmErrorCode; + + static vmTrapInvalidConversionToInt(): ScVmErrorCode; + + static vmTrapStackOverflow(): ScVmErrorCode; + + static vmTrapUnexpectedSignature(): ScVmErrorCode; + + static vmTrapMemLimitExceeded(): ScVmErrorCode; + + static vmTrapCpuLimitExceeded(): ScVmErrorCode; + } + + class ScUnknownErrorCode { + readonly name: "unknownErrorGeneral" | "unknownErrorXdr"; + + readonly value: 0 | 1; + + static unknownErrorGeneral(): ScUnknownErrorCode; + + static unknownErrorXdr(): ScUnknownErrorCode; + } + + class ScContractExecutableType { + readonly name: "sccontractExecutableWasmRef" | "sccontractExecutableToken"; + + readonly value: 0 | 1; + + static sccontractExecutableWasmRef(): ScContractExecutableType; + + static sccontractExecutableToken(): ScContractExecutableType; + } + + class ScAddressType { + readonly name: "scAddressTypeAccount" | "scAddressTypeContract"; + + readonly value: 0 | 1; + + static scAddressTypeAccount(): ScAddressType; + + static scAddressTypeContract(): ScAddressType; + } + + class ScEnvMetaKind { + readonly name: "scEnvMetaKindInterfaceVersion"; + + readonly value: 0; + + static scEnvMetaKindInterfaceVersion(): ScEnvMetaKind; + } + + class ScSpecType { + readonly name: + | "scSpecTypeVal" + | "scSpecTypeBool" + | "scSpecTypeVoid" + | "scSpecTypeStatus" + | "scSpecTypeU32" + | "scSpecTypeI32" + | "scSpecTypeU64" + | "scSpecTypeI64" + | "scSpecTypeTimepoint" + | "scSpecTypeDuration" + | "scSpecTypeU128" + | "scSpecTypeI128" + | "scSpecTypeU256" + | "scSpecTypeI256" + | "scSpecTypeBytes" + | "scSpecTypeString" + | "scSpecTypeSymbol" + | "scSpecTypeAddress" + | "scSpecTypeOption" + | "scSpecTypeResult" + | "scSpecTypeVec" + | "scSpecTypeSet" + | "scSpecTypeMap" + | "scSpecTypeTuple" + | "scSpecTypeBytesN" + | "scSpecTypeUdt"; + + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 16 + | 17 + | 19 + | 1000 + | 1001 + | 1002 + | 1003 + | 1004 + | 1005 + | 1006 + | 2000; + + static scSpecTypeVal(): ScSpecType; + + static scSpecTypeBool(): ScSpecType; + + static scSpecTypeVoid(): ScSpecType; + + static scSpecTypeStatus(): ScSpecType; + + static scSpecTypeU32(): ScSpecType; + + static scSpecTypeI32(): ScSpecType; + + static scSpecTypeU64(): ScSpecType; + + static scSpecTypeI64(): ScSpecType; + + static scSpecTypeTimepoint(): ScSpecType; + + static scSpecTypeDuration(): ScSpecType; + + static scSpecTypeU128(): ScSpecType; + + static scSpecTypeI128(): ScSpecType; + + static scSpecTypeU256(): ScSpecType; + + static scSpecTypeI256(): ScSpecType; + + static scSpecTypeBytes(): ScSpecType; + + static scSpecTypeString(): ScSpecType; + + static scSpecTypeSymbol(): ScSpecType; + + static scSpecTypeAddress(): ScSpecType; + + static scSpecTypeOption(): ScSpecType; + + static scSpecTypeResult(): ScSpecType; + + static scSpecTypeVec(): ScSpecType; + + static scSpecTypeSet(): ScSpecType; + + static scSpecTypeMap(): ScSpecType; + + static scSpecTypeTuple(): ScSpecType; + + static scSpecTypeBytesN(): ScSpecType; + + static scSpecTypeUdt(): ScSpecType; + } + + class ScSpecUdtUnionCaseV0Kind { + readonly name: "scSpecUdtUnionCaseVoidV0" | "scSpecUdtUnionCaseTupleV0"; + + readonly value: 0 | 1; + + static scSpecUdtUnionCaseVoidV0(): ScSpecUdtUnionCaseV0Kind; + + static scSpecUdtUnionCaseTupleV0(): ScSpecUdtUnionCaseV0Kind; + } + + class ScSpecEntryKind { + readonly name: + | "scSpecEntryFunctionV0" + | "scSpecEntryUdtStructV0" + | "scSpecEntryUdtUnionV0" + | "scSpecEntryUdtEnumV0" + | "scSpecEntryUdtErrorEnumV0"; + + readonly value: 0 | 1 | 2 | 3 | 4; + + static scSpecEntryFunctionV0(): ScSpecEntryKind; + + static scSpecEntryUdtStructV0(): ScSpecEntryKind; + + static scSpecEntryUdtUnionV0(): ScSpecEntryKind; + + static scSpecEntryUdtEnumV0(): ScSpecEntryKind; + + static scSpecEntryUdtErrorEnumV0(): ScSpecEntryKind; + } + + const Value: VarOpaque; + + const Thresholds: Opaque; + + const String32: XDRString; + + const String64: XDRString; + + type SequenceNumber = Int64; + + const DataValue: VarOpaque; + + type Hash = Opaque[]; + + type PoolId = Hash; + + const AssetCode4: Opaque; + + const AssetCode12: Opaque; + + type SponsorshipDescriptor = undefined | AccountId; + + const UpgradeType: VarOpaque; + + const LedgerEntryChanges: XDRArray; + + const EncryptedBody: VarOpaque; + + const PeerStatList: XDRArray; + + const TxAdvertVector: XDRArray; + + const TxDemandVector: XDRArray; + + const Hash: Opaque; + + const Uint256: Opaque; + + const Uint32: UnsignedInt; + + const Int32: SignedInt; + + class Uint64 extends UnsignedHyper {} + + class Int64 extends Hyper {} + + type TimePoint = Uint64; + + type Duration = Uint64; + + const Signature: VarOpaque; + + const SignatureHint: Opaque; + + type NodeId = PublicKey; + + type AccountId = PublicKey; + + const ScVec: XDRArray; + + const ScMap: XDRArray; + + const ScBytes: VarOpaque; + + const ScString: XDRString; + + const ScSymbol: XDRString; + + class ScpBallot { + constructor(attributes: { counter: number; value: Buffer }); + + counter(value?: number): number; + + value(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpBallot; + + static write(value: ScpBallot, io: Buffer): void; + + static isValid(value: ScpBallot): boolean; + + static toXDR(value: ScpBallot): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpBallot; + + static fromXDR(input: string, format: "hex" | "base64"): ScpBallot; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpNomination { + constructor(attributes: { + quorumSetHash: Buffer; + votes: Buffer[]; + accepted: Buffer[]; + }); + + quorumSetHash(value?: Buffer): Buffer; + + votes(value?: Buffer[]): Buffer[]; + + accepted(value?: Buffer[]): Buffer[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpNomination; + + static write(value: ScpNomination, io: Buffer): void; + + static isValid(value: ScpNomination): boolean; + + static toXDR(value: ScpNomination): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpNomination; + + static fromXDR(input: string, format: "hex" | "base64"): ScpNomination; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementPrepare { + constructor(attributes: { + quorumSetHash: Buffer; + ballot: ScpBallot; + prepared: null | ScpBallot; + preparedPrime: null | ScpBallot; + nC: number; + nH: number; + }); + + quorumSetHash(value?: Buffer): Buffer; + + ballot(value?: ScpBallot): ScpBallot; + + prepared(value?: null | ScpBallot): null | ScpBallot; + + preparedPrime(value?: null | ScpBallot): null | ScpBallot; + + nC(value?: number): number; + + nH(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementPrepare; + + static write(value: ScpStatementPrepare, io: Buffer): void; + + static isValid(value: ScpStatementPrepare): boolean; + + static toXDR(value: ScpStatementPrepare): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementPrepare; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementPrepare; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementConfirm { + constructor(attributes: { + ballot: ScpBallot; + nPrepared: number; + nCommit: number; + nH: number; + quorumSetHash: Buffer; + }); + + ballot(value?: ScpBallot): ScpBallot; + + nPrepared(value?: number): number; + + nCommit(value?: number): number; + + nH(value?: number): number; + + quorumSetHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementConfirm; + + static write(value: ScpStatementConfirm, io: Buffer): void; + + static isValid(value: ScpStatementConfirm): boolean; + + static toXDR(value: ScpStatementConfirm): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementConfirm; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementConfirm; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementExternalize { + constructor(attributes: { + commit: ScpBallot; + nH: number; + commitQuorumSetHash: Buffer; + }); + + commit(value?: ScpBallot): ScpBallot; + + nH(value?: number): number; + + commitQuorumSetHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementExternalize; + + static write(value: ScpStatementExternalize, io: Buffer): void; + + static isValid(value: ScpStatementExternalize): boolean; + + static toXDR(value: ScpStatementExternalize): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementExternalize; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementExternalize; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatement { + constructor(attributes: { + nodeId: NodeId; + slotIndex: Uint64; + pledges: ScpStatementPledges; + }); + + nodeId(value?: NodeId): NodeId; + + slotIndex(value?: Uint64): Uint64; + + pledges(value?: ScpStatementPledges): ScpStatementPledges; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatement; + + static write(value: ScpStatement, io: Buffer): void; + + static isValid(value: ScpStatement): boolean; + + static toXDR(value: ScpStatement): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatement; + + static fromXDR(input: string, format: "hex" | "base64"): ScpStatement; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpEnvelope { + constructor(attributes: { statement: ScpStatement; signature: Buffer }); + + statement(value?: ScpStatement): ScpStatement; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpEnvelope; + + static write(value: ScpEnvelope, io: Buffer): void; + + static isValid(value: ScpEnvelope): boolean; + + static toXDR(value: ScpEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpEnvelope; + + static fromXDR(input: string, format: "hex" | "base64"): ScpEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpQuorumSet { + constructor(attributes: { + threshold: number; + validators: NodeId[]; + innerSets: ScpQuorumSet[]; + }); + + threshold(value?: number): number; + + validators(value?: NodeId[]): NodeId[]; + + innerSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpQuorumSet; + + static write(value: ScpQuorumSet, io: Buffer): void; + + static isValid(value: ScpQuorumSet): boolean; + + static toXDR(value: ScpQuorumSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpQuorumSet; + + static fromXDR(input: string, format: "hex" | "base64"): ScpQuorumSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AlphaNum4 { + constructor(attributes: { assetCode: Buffer; issuer: AccountId }); + + assetCode(value?: Buffer): Buffer; + + issuer(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AlphaNum4; + + static write(value: AlphaNum4, io: Buffer): void; + + static isValid(value: AlphaNum4): boolean; + + static toXDR(value: AlphaNum4): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AlphaNum4; + + static fromXDR(input: string, format: "hex" | "base64"): AlphaNum4; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AlphaNum12 { + constructor(attributes: { assetCode: Buffer; issuer: AccountId }); + + assetCode(value?: Buffer): Buffer; + + issuer(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AlphaNum12; + + static write(value: AlphaNum12, io: Buffer): void; + + static isValid(value: AlphaNum12): boolean; + + static toXDR(value: AlphaNum12): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AlphaNum12; + + static fromXDR(input: string, format: "hex" | "base64"): AlphaNum12; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Price { + constructor(attributes: { n: number; d: number }); + + n(value?: number): number; + + d(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Price; + + static write(value: Price, io: Buffer): void; + + static isValid(value: Price): boolean; + + static toXDR(value: Price): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Price; + + static fromXDR(input: string, format: "hex" | "base64"): Price; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Liabilities { + constructor(attributes: { buying: Int64; selling: Int64 }); + + buying(value?: Int64): Int64; + + selling(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Liabilities; + + static write(value: Liabilities, io: Buffer): void; + + static isValid(value: Liabilities): boolean; + + static toXDR(value: Liabilities): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Liabilities; + + static fromXDR(input: string, format: "hex" | "base64"): Liabilities; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Signer { + constructor(attributes: { key: SignerKey; weight: number }); + + key(value?: SignerKey): SignerKey; + + weight(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Signer; + + static write(value: Signer, io: Buffer): void; + + static isValid(value: Signer): boolean; + + static toXDR(value: Signer): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Signer; + + static fromXDR(input: string, format: "hex" | "base64"): Signer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV3 { + constructor(attributes: { + ext: ExtensionPoint; + seqLedger: number; + seqTime: TimePoint; + }); + + ext(value?: ExtensionPoint): ExtensionPoint; + + seqLedger(value?: number): number; + + seqTime(value?: TimePoint): TimePoint; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV3; + + static write(value: AccountEntryExtensionV3, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV3): boolean; + + static toXDR(value: AccountEntryExtensionV3): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV3; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV3; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV2 { + constructor(attributes: { + numSponsored: number; + numSponsoring: number; + signerSponsoringIDs: SponsorshipDescriptor[]; + ext: AccountEntryExtensionV2Ext; + }); + + numSponsored(value?: number): number; + + numSponsoring(value?: number): number; + + signerSponsoringIDs( + value?: SponsorshipDescriptor[] + ): SponsorshipDescriptor[]; + + ext(value?: AccountEntryExtensionV2Ext): AccountEntryExtensionV2Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV2; + + static write(value: AccountEntryExtensionV2, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV2): boolean; + + static toXDR(value: AccountEntryExtensionV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV1 { + constructor(attributes: { + liabilities: Liabilities; + ext: AccountEntryExtensionV1Ext; + }); + + liabilities(value?: Liabilities): Liabilities; + + ext(value?: AccountEntryExtensionV1Ext): AccountEntryExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV1; + + static write(value: AccountEntryExtensionV1, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV1): boolean; + + static toXDR(value: AccountEntryExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntry { + constructor(attributes: { + accountId: AccountId; + balance: Int64; + seqNum: SequenceNumber; + numSubEntries: number; + inflationDest: null | AccountId; + flags: number; + homeDomain: string | Buffer; + thresholds: Buffer; + signers: Signer[]; + ext: AccountEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + balance(value?: Int64): Int64; + + seqNum(value?: SequenceNumber): SequenceNumber; + + numSubEntries(value?: number): number; + + inflationDest(value?: null | AccountId): null | AccountId; + + flags(value?: number): number; + + homeDomain(value?: string | Buffer): string | Buffer; + + thresholds(value?: Buffer): Buffer; + + signers(value?: Signer[]): Signer[]; + + ext(value?: AccountEntryExt): AccountEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntry; + + static write(value: AccountEntry, io: Buffer): void; + + static isValid(value: AccountEntry): boolean; + + static toXDR(value: AccountEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntry; + + static fromXDR(input: string, format: "hex" | "base64"): AccountEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExtensionV2 { + constructor(attributes: { + liquidityPoolUseCount: number; + ext: TrustLineEntryExtensionV2Ext; + }); + + liquidityPoolUseCount(value?: number): number; + + ext(value?: TrustLineEntryExtensionV2Ext): TrustLineEntryExtensionV2Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExtensionV2; + + static write(value: TrustLineEntryExtensionV2, io: Buffer): void; + + static isValid(value: TrustLineEntryExtensionV2): boolean; + + static toXDR(value: TrustLineEntryExtensionV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExtensionV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryExtensionV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryV1 { + constructor(attributes: { + liabilities: Liabilities; + ext: TrustLineEntryV1Ext; + }); + + liabilities(value?: Liabilities): Liabilities; + + ext(value?: TrustLineEntryV1Ext): TrustLineEntryV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryV1; + + static write(value: TrustLineEntryV1, io: Buffer): void; + + static isValid(value: TrustLineEntryV1): boolean; + + static toXDR(value: TrustLineEntryV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryV1; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntryV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntry { + constructor(attributes: { + accountId: AccountId; + asset: TrustLineAsset; + balance: Int64; + limit: Int64; + flags: number; + ext: TrustLineEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + asset(value?: TrustLineAsset): TrustLineAsset; + + balance(value?: Int64): Int64; + + limit(value?: Int64): Int64; + + flags(value?: number): number; + + ext(value?: TrustLineEntryExt): TrustLineEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntry; + + static write(value: TrustLineEntry, io: Buffer): void; + + static isValid(value: TrustLineEntry): boolean; + + static toXDR(value: TrustLineEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntry; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OfferEntry { + constructor(attributes: { + sellerId: AccountId; + offerId: Int64; + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + flags: number; + ext: OfferEntryExt; + }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + flags(value?: number): number; + + ext(value?: OfferEntryExt): OfferEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OfferEntry; + + static write(value: OfferEntry, io: Buffer): void; + + static isValid(value: OfferEntry): boolean; + + static toXDR(value: OfferEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OfferEntry; + + static fromXDR(input: string, format: "hex" | "base64"): OfferEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DataEntry { + constructor(attributes: { + accountId: AccountId; + dataName: string | Buffer; + dataValue: Buffer; + ext: DataEntryExt; + }); + + accountId(value?: AccountId): AccountId; + + dataName(value?: string | Buffer): string | Buffer; + + dataValue(value?: Buffer): Buffer; + + ext(value?: DataEntryExt): DataEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DataEntry; + + static write(value: DataEntry, io: Buffer): void; + + static isValid(value: DataEntry): boolean; + + static toXDR(value: DataEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DataEntry; + + static fromXDR(input: string, format: "hex" | "base64"): DataEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimantV0 { + constructor(attributes: { + destination: AccountId; + predicate: ClaimPredicate; + }); + + destination(value?: AccountId): AccountId; + + predicate(value?: ClaimPredicate): ClaimPredicate; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimantV0; + + static write(value: ClaimantV0, io: Buffer): void; + + static isValid(value: ClaimantV0): boolean; + + static toXDR(value: ClaimantV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimantV0; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimantV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExtensionV1 { + constructor(attributes: { + ext: ClaimableBalanceEntryExtensionV1Ext; + flags: number; + }); + + ext( + value?: ClaimableBalanceEntryExtensionV1Ext + ): ClaimableBalanceEntryExtensionV1Ext; + + flags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExtensionV1; + + static write(value: ClaimableBalanceEntryExtensionV1, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExtensionV1): boolean; + + static toXDR(value: ClaimableBalanceEntryExtensionV1): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClaimableBalanceEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntry { + constructor(attributes: { + balanceId: ClaimableBalanceId; + claimants: Claimant[]; + asset: Asset; + amount: Int64; + ext: ClaimableBalanceEntryExt; + }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + claimants(value?: Claimant[]): Claimant[]; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + ext(value?: ClaimableBalanceEntryExt): ClaimableBalanceEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntry; + + static write(value: ClaimableBalanceEntry, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntry): boolean; + + static toXDR(value: ClaimableBalanceEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolConstantProductParameters { + constructor(attributes: { assetA: Asset; assetB: Asset; fee: number }); + + assetA(value?: Asset): Asset; + + assetB(value?: Asset): Asset; + + fee(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolConstantProductParameters; + + static write( + value: LiquidityPoolConstantProductParameters, + io: Buffer + ): void; + + static isValid(value: LiquidityPoolConstantProductParameters): boolean; + + static toXDR(value: LiquidityPoolConstantProductParameters): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): LiquidityPoolConstantProductParameters; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolConstantProductParameters; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntryConstantProduct { + constructor(attributes: { + params: LiquidityPoolConstantProductParameters; + reserveA: Int64; + reserveB: Int64; + totalPoolShares: Int64; + poolSharesTrustLineCount: Int64; + }); + + params( + value?: LiquidityPoolConstantProductParameters + ): LiquidityPoolConstantProductParameters; + + reserveA(value?: Int64): Int64; + + reserveB(value?: Int64): Int64; + + totalPoolShares(value?: Int64): Int64; + + poolSharesTrustLineCount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntryConstantProduct; + + static write(value: LiquidityPoolEntryConstantProduct, io: Buffer): void; + + static isValid(value: LiquidityPoolEntryConstantProduct): boolean; + + static toXDR(value: LiquidityPoolEntryConstantProduct): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): LiquidityPoolEntryConstantProduct; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolEntryConstantProduct; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntry { + constructor(attributes: { + liquidityPoolId: PoolId; + body: LiquidityPoolEntryBody; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + body(value?: LiquidityPoolEntryBody): LiquidityPoolEntryBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntry; + + static write(value: LiquidityPoolEntry, io: Buffer): void; + + static isValid(value: LiquidityPoolEntry): boolean; + + static toXDR(value: LiquidityPoolEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolEntry; + + static fromXDR(input: string, format: "hex" | "base64"): LiquidityPoolEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractDataEntry { + constructor(attributes: { contractId: Buffer; key: ScVal; val: ScVal }); + + contractId(value?: Buffer): Buffer; + + key(value?: ScVal): ScVal; + + val(value?: ScVal): ScVal; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractDataEntry; + + static write(value: ContractDataEntry, io: Buffer): void; + + static isValid(value: ContractDataEntry): boolean; + + static toXDR(value: ContractDataEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractDataEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ContractDataEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractCodeEntry { + constructor(attributes: { + ext: ExtensionPoint; + hash: Buffer; + code: Buffer; + }); + + ext(value?: ExtensionPoint): ExtensionPoint; + + hash(value?: Buffer): Buffer; + + code(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractCodeEntry; + + static write(value: ContractCodeEntry, io: Buffer): void; + + static isValid(value: ContractCodeEntry): boolean; + + static toXDR(value: ContractCodeEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractCodeEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ContractCodeEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingContractComputeV0 { + constructor(attributes: { + ledgerMaxInstructions: Int64; + txMaxInstructions: Int64; + feeRatePerInstructionsIncrement: Int64; + memoryLimit: number; + }); + + ledgerMaxInstructions(value?: Int64): Int64; + + txMaxInstructions(value?: Int64): Int64; + + feeRatePerInstructionsIncrement(value?: Int64): Int64; + + memoryLimit(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingContractComputeV0; + + static write(value: ConfigSettingContractComputeV0, io: Buffer): void; + + static isValid(value: ConfigSettingContractComputeV0): boolean; + + static toXDR(value: ConfigSettingContractComputeV0): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ConfigSettingContractComputeV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigSettingContractComputeV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingContractLedgerCostV0 { + constructor(attributes: { + ledgerMaxReadLedgerEntries: number; + ledgerMaxReadBytes: number; + ledgerMaxWriteLedgerEntries: number; + ledgerMaxWriteBytes: number; + txMaxReadLedgerEntries: number; + txMaxReadBytes: number; + txMaxWriteLedgerEntries: number; + txMaxWriteBytes: number; + feeReadLedgerEntry: Int64; + feeWriteLedgerEntry: Int64; + feeRead1Kb: Int64; + feeWrite1Kb: Int64; + bucketListSizeBytes: Int64; + bucketListFeeRateLow: Int64; + bucketListFeeRateHigh: Int64; + bucketListGrowthFactor: number; + }); + + ledgerMaxReadLedgerEntries(value?: number): number; + + ledgerMaxReadBytes(value?: number): number; + + ledgerMaxWriteLedgerEntries(value?: number): number; + + ledgerMaxWriteBytes(value?: number): number; + + txMaxReadLedgerEntries(value?: number): number; + + txMaxReadBytes(value?: number): number; + + txMaxWriteLedgerEntries(value?: number): number; + + txMaxWriteBytes(value?: number): number; + + feeReadLedgerEntry(value?: Int64): Int64; + + feeWriteLedgerEntry(value?: Int64): Int64; + + feeRead1Kb(value?: Int64): Int64; + + feeWrite1Kb(value?: Int64): Int64; + + bucketListSizeBytes(value?: Int64): Int64; + + bucketListFeeRateLow(value?: Int64): Int64; + + bucketListFeeRateHigh(value?: Int64): Int64; + + bucketListGrowthFactor(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingContractLedgerCostV0; + + static write(value: ConfigSettingContractLedgerCostV0, io: Buffer): void; + + static isValid(value: ConfigSettingContractLedgerCostV0): boolean; + + static toXDR(value: ConfigSettingContractLedgerCostV0): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ConfigSettingContractLedgerCostV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigSettingContractLedgerCostV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingContractHistoricalDataV0 { + constructor(attributes: { feeHistorical1Kb: Int64 }); + + feeHistorical1Kb(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingContractHistoricalDataV0; + + static write( + value: ConfigSettingContractHistoricalDataV0, + io: Buffer + ): void; + + static isValid(value: ConfigSettingContractHistoricalDataV0): boolean; + + static toXDR(value: ConfigSettingContractHistoricalDataV0): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ConfigSettingContractHistoricalDataV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigSettingContractHistoricalDataV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingContractMetaDataV0 { + constructor(attributes: { + txMaxExtendedMetaDataSizeBytes: number; + feeExtendedMetaData1Kb: Int64; + }); + + txMaxExtendedMetaDataSizeBytes(value?: number): number; + + feeExtendedMetaData1Kb(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingContractMetaDataV0; + + static write(value: ConfigSettingContractMetaDataV0, io: Buffer): void; + + static isValid(value: ConfigSettingContractMetaDataV0): boolean; + + static toXDR(value: ConfigSettingContractMetaDataV0): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ConfigSettingContractMetaDataV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigSettingContractMetaDataV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingContractBandwidthV0 { + constructor(attributes: { + ledgerMaxPropagateSizeBytes: number; + txMaxSizeBytes: number; + feePropagateData1Kb: Int64; + }); + + ledgerMaxPropagateSizeBytes(value?: number): number; + + txMaxSizeBytes(value?: number): number; + + feePropagateData1Kb(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingContractBandwidthV0; + + static write(value: ConfigSettingContractBandwidthV0, io: Buffer): void; + + static isValid(value: ConfigSettingContractBandwidthV0): boolean; + + static toXDR(value: ConfigSettingContractBandwidthV0): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ConfigSettingContractBandwidthV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigSettingContractBandwidthV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExtensionV1 { + constructor(attributes: { + sponsoringId: SponsorshipDescriptor; + ext: LedgerEntryExtensionV1Ext; + }); + + sponsoringId(value?: SponsorshipDescriptor): SponsorshipDescriptor; + + ext(value?: LedgerEntryExtensionV1Ext): LedgerEntryExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExtensionV1; + + static write(value: LedgerEntryExtensionV1, io: Buffer): void; + + static isValid(value: LedgerEntryExtensionV1): boolean; + + static toXDR(value: LedgerEntryExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerEntryExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntry { + constructor(attributes: { + lastModifiedLedgerSeq: number; + data: LedgerEntryData; + ext: LedgerEntryExt; + }); + + lastModifiedLedgerSeq(value?: number): number; + + data(value?: LedgerEntryData): LedgerEntryData; + + ext(value?: LedgerEntryExt): LedgerEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntry; + + static write(value: LedgerEntry, io: Buffer): void; + + static isValid(value: LedgerEntry): boolean; + + static toXDR(value: LedgerEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntry; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyAccount { + constructor(attributes: { accountId: AccountId }); + + accountId(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyAccount; + + static write(value: LedgerKeyAccount, io: Buffer): void; + + static isValid(value: LedgerKeyAccount): boolean; + + static toXDR(value: LedgerKeyAccount): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyAccount; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyAccount; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyTrustLine { + constructor(attributes: { accountId: AccountId; asset: TrustLineAsset }); + + accountId(value?: AccountId): AccountId; + + asset(value?: TrustLineAsset): TrustLineAsset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyTrustLine; + + static write(value: LedgerKeyTrustLine, io: Buffer): void; + + static isValid(value: LedgerKeyTrustLine): boolean; + + static toXDR(value: LedgerKeyTrustLine): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyTrustLine; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyTrustLine; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyOffer { + constructor(attributes: { sellerId: AccountId; offerId: Int64 }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyOffer; + + static write(value: LedgerKeyOffer, io: Buffer): void; + + static isValid(value: LedgerKeyOffer): boolean; + + static toXDR(value: LedgerKeyOffer): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyOffer; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyOffer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyData { + constructor(attributes: { + accountId: AccountId; + dataName: string | Buffer; + }); + + accountId(value?: AccountId): AccountId; + + dataName(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyData; + + static write(value: LedgerKeyData, io: Buffer): void; + + static isValid(value: LedgerKeyData): boolean; + + static toXDR(value: LedgerKeyData): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyData; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKeyData; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyClaimableBalance { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyClaimableBalance; + + static write(value: LedgerKeyClaimableBalance, io: Buffer): void; + + static isValid(value: LedgerKeyClaimableBalance): boolean; + + static toXDR(value: LedgerKeyClaimableBalance): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyClaimableBalance; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyClaimableBalance; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyLiquidityPool { + constructor(attributes: { liquidityPoolId: PoolId }); + + liquidityPoolId(value?: PoolId): PoolId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyLiquidityPool; + + static write(value: LedgerKeyLiquidityPool, io: Buffer): void; + + static isValid(value: LedgerKeyLiquidityPool): boolean; + + static toXDR(value: LedgerKeyLiquidityPool): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyLiquidityPool; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyLiquidityPool; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyContractData { + constructor(attributes: { contractId: Buffer; key: ScVal }); + + contractId(value?: Buffer): Buffer; + + key(value?: ScVal): ScVal; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyContractData; + + static write(value: LedgerKeyContractData, io: Buffer): void; + + static isValid(value: LedgerKeyContractData): boolean; + + static toXDR(value: LedgerKeyContractData): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyContractData; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyContractData; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyContractCode { + constructor(attributes: { hash: Buffer }); + + hash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyContractCode; + + static write(value: LedgerKeyContractCode, io: Buffer): void; + + static isValid(value: LedgerKeyContractCode): boolean; + + static toXDR(value: LedgerKeyContractCode): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyContractCode; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyContractCode; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKeyConfigSetting { + constructor(attributes: { configSettingId: ConfigSettingId }); + + configSettingId(value?: ConfigSettingId): ConfigSettingId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKeyConfigSetting; + + static write(value: LedgerKeyConfigSetting, io: Buffer): void; + + static isValid(value: LedgerKeyConfigSetting): boolean; + + static toXDR(value: LedgerKeyConfigSetting): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKeyConfigSetting; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerKeyConfigSetting; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseValueSignature { + constructor(attributes: { nodeId: NodeId; signature: Buffer }); + + nodeId(value?: NodeId): NodeId; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseValueSignature; + + static write(value: LedgerCloseValueSignature, io: Buffer): void; + + static isValid(value: LedgerCloseValueSignature): boolean; + + static toXDR(value: LedgerCloseValueSignature): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseValueSignature; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerCloseValueSignature; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarValue { + constructor(attributes: { + txSetHash: Buffer; + closeTime: TimePoint; + upgrades: Buffer[]; + ext: StellarValueExt; + }); + + txSetHash(value?: Buffer): Buffer; + + closeTime(value?: TimePoint): TimePoint; + + upgrades(value?: Buffer[]): Buffer[]; + + ext(value?: StellarValueExt): StellarValueExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarValue; + + static write(value: StellarValue, io: Buffer): void; + + static isValid(value: StellarValue): boolean; + + static toXDR(value: StellarValue): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarValue; + + static fromXDR(input: string, format: "hex" | "base64"): StellarValue; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExtensionV1 { + constructor(attributes: { flags: number; ext: LedgerHeaderExtensionV1Ext }); + + flags(value?: number): number; + + ext(value?: LedgerHeaderExtensionV1Ext): LedgerHeaderExtensionV1Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExtensionV1; + + static write(value: LedgerHeaderExtensionV1, io: Buffer): void; + + static isValid(value: LedgerHeaderExtensionV1): boolean; + + static toXDR(value: LedgerHeaderExtensionV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExtensionV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderExtensionV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeader { + constructor(attributes: { + ledgerVersion: number; + previousLedgerHash: Buffer; + scpValue: StellarValue; + txSetResultHash: Buffer; + bucketListHash: Buffer; + ledgerSeq: number; + totalCoins: Int64; + feePool: Int64; + inflationSeq: number; + idPool: Uint64; + baseFee: number; + baseReserve: number; + maxTxSetSize: number; + skipList: Buffer[]; + ext: LedgerHeaderExt; + }); + + ledgerVersion(value?: number): number; + + previousLedgerHash(value?: Buffer): Buffer; + + scpValue(value?: StellarValue): StellarValue; + + txSetResultHash(value?: Buffer): Buffer; + + bucketListHash(value?: Buffer): Buffer; + + ledgerSeq(value?: number): number; + + totalCoins(value?: Int64): Int64; + + feePool(value?: Int64): Int64; + + inflationSeq(value?: number): number; + + idPool(value?: Uint64): Uint64; + + baseFee(value?: number): number; + + baseReserve(value?: number): number; + + maxTxSetSize(value?: number): number; + + skipList(value?: Buffer[]): Buffer[]; + + ext(value?: LedgerHeaderExt): LedgerHeaderExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeader; + + static write(value: LedgerHeader, io: Buffer): void; + + static isValid(value: LedgerHeader): boolean; + + static toXDR(value: LedgerHeader): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeader; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerHeader; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigUpgradeSetKey { + constructor(attributes: { contractId: Buffer; contentHash: Buffer }); + + contractId(value?: Buffer): Buffer; + + contentHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigUpgradeSetKey; + + static write(value: ConfigUpgradeSetKey, io: Buffer): void; + + static isValid(value: ConfigUpgradeSetKey): boolean; + + static toXDR(value: ConfigUpgradeSetKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ConfigUpgradeSetKey; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ConfigUpgradeSetKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigUpgradeSet { + constructor(attributes: { updatedEntry: ConfigSettingEntry[] }); + + updatedEntry(value?: ConfigSettingEntry[]): ConfigSettingEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigUpgradeSet; + + static write(value: ConfigUpgradeSet, io: Buffer): void; + + static isValid(value: ConfigUpgradeSet): boolean; + + static toXDR(value: ConfigUpgradeSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ConfigUpgradeSet; + + static fromXDR(input: string, format: "hex" | "base64"): ConfigUpgradeSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketMetadata { + constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); + + ledgerVersion(value?: number): number; + + ext(value?: BucketMetadataExt): BucketMetadataExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketMetadata; + + static write(value: BucketMetadata, io: Buffer): void; + + static isValid(value: BucketMetadata): boolean; + + static toXDR(value: BucketMetadata): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketMetadata; + + static fromXDR(input: string, format: "hex" | "base64"): BucketMetadata; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TxSetComponentTxsMaybeDiscountedFee { + constructor(attributes: { + baseFee: null | Int64; + txes: TransactionEnvelope[]; + }); + + baseFee(value?: null | Int64): null | Int64; + + txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TxSetComponentTxsMaybeDiscountedFee; + + static write(value: TxSetComponentTxsMaybeDiscountedFee, io: Buffer): void; + + static isValid(value: TxSetComponentTxsMaybeDiscountedFee): boolean; + + static toXDR(value: TxSetComponentTxsMaybeDiscountedFee): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TxSetComponentTxsMaybeDiscountedFee; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TxSetComponentTxsMaybeDiscountedFee; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSet { + constructor(attributes: { + previousLedgerHash: Buffer; + txes: TransactionEnvelope[]; + }); + + previousLedgerHash(value?: Buffer): Buffer; + + txes(value?: TransactionEnvelope[]): TransactionEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSet; + + static write(value: TransactionSet, io: Buffer): void; + + static isValid(value: TransactionSet): boolean; + + static toXDR(value: TransactionSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSet; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSetV1 { + constructor(attributes: { + previousLedgerHash: Buffer; + phases: TransactionPhase[]; + }); + + previousLedgerHash(value?: Buffer): Buffer; + + phases(value?: TransactionPhase[]): TransactionPhase[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSetV1; + + static write(value: TransactionSetV1, io: Buffer): void; + + static isValid(value: TransactionSetV1): boolean; + + static toXDR(value: TransactionSetV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSetV1; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionSetV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultPair { + constructor(attributes: { + transactionHash: Buffer; + result: TransactionResult; + }); + + transactionHash(value?: Buffer): Buffer; + + result(value?: TransactionResult): TransactionResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultPair; + + static write(value: TransactionResultPair, io: Buffer): void; + + static isValid(value: TransactionResultPair): boolean; + + static toXDR(value: TransactionResultPair): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultPair; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultPair; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultSet { + constructor(attributes: { results: TransactionResultPair[] }); + + results(value?: TransactionResultPair[]): TransactionResultPair[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultSet; + + static write(value: TransactionResultSet, io: Buffer): void; + + static isValid(value: TransactionResultSet): boolean; + + static toXDR(value: TransactionResultSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultSet; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryEntry { + constructor(attributes: { + ledgerSeq: number; + txSet: TransactionSet; + ext: TransactionHistoryEntryExt; + }); + + ledgerSeq(value?: number): number; + + txSet(value?: TransactionSet): TransactionSet; + + ext(value?: TransactionHistoryEntryExt): TransactionHistoryEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryEntry; + + static write(value: TransactionHistoryEntry, io: Buffer): void; + + static isValid(value: TransactionHistoryEntry): boolean; + + static toXDR(value: TransactionHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionHistoryEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntry { + constructor(attributes: { + ledgerSeq: number; + txResultSet: TransactionResultSet; + ext: TransactionHistoryResultEntryExt; + }); + + ledgerSeq(value?: number): number; + + txResultSet(value?: TransactionResultSet): TransactionResultSet; + + ext( + value?: TransactionHistoryResultEntryExt + ): TransactionHistoryResultEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntry; + + static write(value: TransactionHistoryResultEntry, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntry): boolean; + + static toXDR(value: TransactionHistoryResultEntry): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultPairV2 { + constructor(attributes: { + transactionHash: Buffer; + hashOfMetaHashes: Buffer; + }); + + transactionHash(value?: Buffer): Buffer; + + hashOfMetaHashes(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultPairV2; + + static write(value: TransactionResultPairV2, io: Buffer): void; + + static isValid(value: TransactionResultPairV2): boolean; + + static toXDR(value: TransactionResultPairV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultPairV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultPairV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultSetV2 { + constructor(attributes: { results: TransactionResultPairV2[] }); + + results(value?: TransactionResultPairV2[]): TransactionResultPairV2[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultSetV2; + + static write(value: TransactionResultSetV2, io: Buffer): void; + + static isValid(value: TransactionResultSetV2): boolean; + + static toXDR(value: TransactionResultSetV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultSetV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultSetV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntryV2 { + constructor(attributes: { + ledgerSeq: number; + txResultSet: TransactionResultSetV2; + ext: TransactionHistoryResultEntryV2Ext; + }); + + ledgerSeq(value?: number): number; + + txResultSet(value?: TransactionResultSetV2): TransactionResultSetV2; + + ext( + value?: TransactionHistoryResultEntryV2Ext + ): TransactionHistoryResultEntryV2Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntryV2; + + static write(value: TransactionHistoryResultEntryV2, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntryV2): boolean; + + static toXDR(value: TransactionHistoryResultEntryV2): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntryV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntryV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderHistoryEntry { + constructor(attributes: { + hash: Buffer; + header: LedgerHeader; + ext: LedgerHeaderHistoryEntryExt; + }); + + hash(value?: Buffer): Buffer; + + header(value?: LedgerHeader): LedgerHeader; + + ext(value?: LedgerHeaderHistoryEntryExt): LedgerHeaderHistoryEntryExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderHistoryEntry; + + static write(value: LedgerHeaderHistoryEntry, io: Buffer): void; + + static isValid(value: LedgerHeaderHistoryEntry): boolean; + + static toXDR(value: LedgerHeaderHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderHistoryEntry; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerScpMessages { + constructor(attributes: { ledgerSeq: number; messages: ScpEnvelope[] }); + + ledgerSeq(value?: number): number; + + messages(value?: ScpEnvelope[]): ScpEnvelope[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerScpMessages; + + static write(value: LedgerScpMessages, io: Buffer): void; + + static isValid(value: LedgerScpMessages): boolean; + + static toXDR(value: LedgerScpMessages): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerScpMessages; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerScpMessages; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpHistoryEntryV0 { + constructor(attributes: { + quorumSets: ScpQuorumSet[]; + ledgerMessages: LedgerScpMessages; + }); + + quorumSets(value?: ScpQuorumSet[]): ScpQuorumSet[]; + + ledgerMessages(value?: LedgerScpMessages): LedgerScpMessages; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpHistoryEntryV0; + + static write(value: ScpHistoryEntryV0, io: Buffer): void; + + static isValid(value: ScpHistoryEntryV0): boolean; + + static toXDR(value: ScpHistoryEntryV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpHistoryEntryV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScpHistoryEntryV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationMeta { + constructor(attributes: { changes: LedgerEntryChange[] }); + + changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationMeta; + + static write(value: OperationMeta, io: Buffer): void; + + static isValid(value: OperationMeta): boolean; + + static toXDR(value: OperationMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationMeta; + + static fromXDR(input: string, format: "hex" | "base64"): OperationMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMetaV1 { + constructor(attributes: { + txChanges: LedgerEntryChange[]; + operations: OperationMeta[]; + }); + + txChanges(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + operations(value?: OperationMeta[]): OperationMeta[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMetaV1; + + static write(value: TransactionMetaV1, io: Buffer): void; + + static isValid(value: TransactionMetaV1): boolean; + + static toXDR(value: TransactionMetaV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMetaV1; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMetaV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMetaV2 { + constructor(attributes: { + txChangesBefore: LedgerEntryChange[]; + operations: OperationMeta[]; + txChangesAfter: LedgerEntryChange[]; + }); + + txChangesBefore(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + operations(value?: OperationMeta[]): OperationMeta[]; + + txChangesAfter(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMetaV2; + + static write(value: TransactionMetaV2, io: Buffer): void; + + static isValid(value: TransactionMetaV2): boolean; + + static toXDR(value: TransactionMetaV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMetaV2; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMetaV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractEventV0 { + constructor(attributes: { topics: ScVal[]; data: ScVal }); + + topics(value?: ScVal[]): ScVal[]; + + data(value?: ScVal): ScVal; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractEventV0; + + static write(value: ContractEventV0, io: Buffer): void; + + static isValid(value: ContractEventV0): boolean; + + static toXDR(value: ContractEventV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractEventV0; + + static fromXDR(input: string, format: "hex" | "base64"): ContractEventV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractEvent { + constructor(attributes: { + ext: ExtensionPoint; + contractId: null | Buffer; + type: ContractEventType; + body: ContractEventBody; + }); + + ext(value?: ExtensionPoint): ExtensionPoint; + + contractId(value?: null | Buffer): null | Buffer; + + type(value?: ContractEventType): ContractEventType; + + body(value?: ContractEventBody): ContractEventBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractEvent; + + static write(value: ContractEvent, io: Buffer): void; + + static isValid(value: ContractEvent): boolean; + + static toXDR(value: ContractEvent): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractEvent; + + static fromXDR(input: string, format: "hex" | "base64"): ContractEvent; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DiagnosticEvent { + constructor(attributes: { + inSuccessfulContractCall: boolean; + event: ContractEvent; + }); + + inSuccessfulContractCall(value?: boolean): boolean; + + event(value?: ContractEvent): ContractEvent; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DiagnosticEvent; + + static write(value: DiagnosticEvent, io: Buffer): void; + + static isValid(value: DiagnosticEvent): boolean; + + static toXDR(value: DiagnosticEvent): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DiagnosticEvent; + + static fromXDR(input: string, format: "hex" | "base64"): DiagnosticEvent; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationDiagnosticEvents { + constructor(attributes: { events: DiagnosticEvent[] }); + + events(value?: DiagnosticEvent[]): DiagnosticEvent[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationDiagnosticEvents; + + static write(value: OperationDiagnosticEvents, io: Buffer): void; + + static isValid(value: OperationDiagnosticEvents): boolean; + + static toXDR(value: OperationDiagnosticEvents): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationDiagnosticEvents; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): OperationDiagnosticEvents; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationEvents { + constructor(attributes: { events: ContractEvent[] }); + + events(value?: ContractEvent[]): ContractEvent[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationEvents; + + static write(value: OperationEvents, io: Buffer): void; + + static isValid(value: OperationEvents): boolean; + + static toXDR(value: OperationEvents): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationEvents; + + static fromXDR(input: string, format: "hex" | "base64"): OperationEvents; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMetaV3 { + constructor(attributes: { + txChangesBefore: LedgerEntryChange[]; + operations: OperationMeta[]; + txChangesAfter: LedgerEntryChange[]; + events: OperationEvents[]; + txResult: TransactionResult; + hashes: Buffer[]; + diagnosticEvents: OperationDiagnosticEvents[]; + }); + + txChangesBefore(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + operations(value?: OperationMeta[]): OperationMeta[]; + + txChangesAfter(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + events(value?: OperationEvents[]): OperationEvents[]; + + txResult(value?: TransactionResult): TransactionResult; + + hashes(value?: Buffer[]): Buffer[]; + + diagnosticEvents( + value?: OperationDiagnosticEvents[] + ): OperationDiagnosticEvents[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMetaV3; + + static write(value: TransactionMetaV3, io: Buffer): void; + + static isValid(value: TransactionMetaV3): boolean; + + static toXDR(value: TransactionMetaV3): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMetaV3; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMetaV3; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultMeta { + constructor(attributes: { + result: TransactionResultPair; + feeProcessing: LedgerEntryChange[]; + txApplyProcessing: TransactionMeta; + }); + + result(value?: TransactionResultPair): TransactionResultPair; + + feeProcessing(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + txApplyProcessing(value?: TransactionMeta): TransactionMeta; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultMeta; + + static write(value: TransactionResultMeta, io: Buffer): void; + + static isValid(value: TransactionResultMeta): boolean; + + static toXDR(value: TransactionResultMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultMeta; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultMetaV2 { + constructor(attributes: { + result: TransactionResultPairV2; + feeProcessing: LedgerEntryChange[]; + txApplyProcessing: TransactionMeta; + }); + + result(value?: TransactionResultPairV2): TransactionResultPairV2; + + feeProcessing(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + txApplyProcessing(value?: TransactionMeta): TransactionMeta; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultMetaV2; + + static write(value: TransactionResultMetaV2, io: Buffer): void; + + static isValid(value: TransactionResultMetaV2): boolean; + + static toXDR(value: TransactionResultMetaV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultMetaV2; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultMetaV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class UpgradeEntryMeta { + constructor(attributes: { + upgrade: LedgerUpgrade; + changes: LedgerEntryChange[]; + }); + + upgrade(value?: LedgerUpgrade): LedgerUpgrade; + + changes(value?: LedgerEntryChange[]): LedgerEntryChange[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): UpgradeEntryMeta; + + static write(value: UpgradeEntryMeta, io: Buffer): void; + + static isValid(value: UpgradeEntryMeta): boolean; + + static toXDR(value: UpgradeEntryMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UpgradeEntryMeta; + + static fromXDR(input: string, format: "hex" | "base64"): UpgradeEntryMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMetaV0 { + constructor(attributes: { + ledgerHeader: LedgerHeaderHistoryEntry; + txSet: TransactionSet; + txProcessing: TransactionResultMeta[]; + upgradesProcessing: UpgradeEntryMeta[]; + scpInfo: ScpHistoryEntry[]; + }); + + ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; + + txSet(value?: TransactionSet): TransactionSet; + + txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; + + upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; + + scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMetaV0; + + static write(value: LedgerCloseMetaV0, io: Buffer): void; + + static isValid(value: LedgerCloseMetaV0): boolean; + + static toXDR(value: LedgerCloseMetaV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMetaV0; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMetaV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMetaV1 { + constructor(attributes: { + ledgerHeader: LedgerHeaderHistoryEntry; + txSet: GeneralizedTransactionSet; + txProcessing: TransactionResultMeta[]; + upgradesProcessing: UpgradeEntryMeta[]; + scpInfo: ScpHistoryEntry[]; + }); + + ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; + + txSet(value?: GeneralizedTransactionSet): GeneralizedTransactionSet; + + txProcessing(value?: TransactionResultMeta[]): TransactionResultMeta[]; + + upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; + + scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMetaV1; + + static write(value: LedgerCloseMetaV1, io: Buffer): void; + + static isValid(value: LedgerCloseMetaV1): boolean; + + static toXDR(value: LedgerCloseMetaV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMetaV1; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMetaV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMetaV2 { + constructor(attributes: { + ledgerHeader: LedgerHeaderHistoryEntry; + txSet: GeneralizedTransactionSet; + txProcessing: TransactionResultMetaV2[]; + upgradesProcessing: UpgradeEntryMeta[]; + scpInfo: ScpHistoryEntry[]; + }); + + ledgerHeader(value?: LedgerHeaderHistoryEntry): LedgerHeaderHistoryEntry; + + txSet(value?: GeneralizedTransactionSet): GeneralizedTransactionSet; + + txProcessing(value?: TransactionResultMetaV2[]): TransactionResultMetaV2[]; + + upgradesProcessing(value?: UpgradeEntryMeta[]): UpgradeEntryMeta[]; + + scpInfo(value?: ScpHistoryEntry[]): ScpHistoryEntry[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMetaV2; + + static write(value: LedgerCloseMetaV2, io: Buffer): void; + + static isValid(value: LedgerCloseMetaV2): boolean; + + static toXDR(value: LedgerCloseMetaV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMetaV2; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMetaV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Error { + constructor(attributes: { code: ErrorCode; msg: string | Buffer }); + + code(value?: ErrorCode): ErrorCode; + + msg(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Error; + + static write(value: Error, io: Buffer): void; + + static isValid(value: Error): boolean; + + static toXDR(value: Error): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Error; + + static fromXDR(input: string, format: "hex" | "base64"): Error; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SendMore { + constructor(attributes: { numMessages: number }); + + numMessages(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SendMore; + + static write(value: SendMore, io: Buffer): void; + + static isValid(value: SendMore): boolean; + + static toXDR(value: SendMore): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SendMore; + + static fromXDR(input: string, format: "hex" | "base64"): SendMore; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthCert { + constructor(attributes: { + pubkey: Curve25519Public; + expiration: Uint64; + sig: Buffer; + }); + + pubkey(value?: Curve25519Public): Curve25519Public; + + expiration(value?: Uint64): Uint64; + + sig(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthCert; + + static write(value: AuthCert, io: Buffer): void; + + static isValid(value: AuthCert): boolean; + + static toXDR(value: AuthCert): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthCert; + + static fromXDR(input: string, format: "hex" | "base64"): AuthCert; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Hello { + constructor(attributes: { + ledgerVersion: number; + overlayVersion: number; + overlayMinVersion: number; + networkId: Buffer; + versionStr: string | Buffer; + listeningPort: number; + peerId: NodeId; + cert: AuthCert; + nonce: Buffer; + }); + + ledgerVersion(value?: number): number; + + overlayVersion(value?: number): number; + + overlayMinVersion(value?: number): number; + + networkId(value?: Buffer): Buffer; + + versionStr(value?: string | Buffer): string | Buffer; + + listeningPort(value?: number): number; + + peerId(value?: NodeId): NodeId; + + cert(value?: AuthCert): AuthCert; + + nonce(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Hello; + + static write(value: Hello, io: Buffer): void; + + static isValid(value: Hello): boolean; + + static toXDR(value: Hello): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Hello; + + static fromXDR(input: string, format: "hex" | "base64"): Hello; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Auth { + constructor(attributes: { flags: number }); + + flags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Auth; + + static write(value: Auth, io: Buffer): void; + + static isValid(value: Auth): boolean; + + static toXDR(value: Auth): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Auth; + + static fromXDR(input: string, format: "hex" | "base64"): Auth; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerAddress { + constructor(attributes: { + ip: PeerAddressIp; + port: number; + numFailures: number; + }); + + ip(value?: PeerAddressIp): PeerAddressIp; + + port(value?: number): number; + + numFailures(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerAddress; + + static write(value: PeerAddress, io: Buffer): void; + + static isValid(value: PeerAddress): boolean; + + static toXDR(value: PeerAddress): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerAddress; + + static fromXDR(input: string, format: "hex" | "base64"): PeerAddress; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DontHave { + constructor(attributes: { type: MessageType; reqHash: Buffer }); + + type(value?: MessageType): MessageType; + + reqHash(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DontHave; + + static write(value: DontHave, io: Buffer): void; + + static isValid(value: DontHave): boolean; + + static toXDR(value: DontHave): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DontHave; + + static fromXDR(input: string, format: "hex" | "base64"): DontHave; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyRequestMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + encryptionKey: Curve25519Public; + commandType: SurveyMessageCommandType; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + encryptionKey(value?: Curve25519Public): Curve25519Public; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyRequestMessage; + + static write(value: SurveyRequestMessage, io: Buffer): void; + + static isValid(value: SurveyRequestMessage): boolean; + + static toXDR(value: SurveyRequestMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyRequestMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SurveyRequestMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignedSurveyRequestMessage { + constructor(attributes: { + requestSignature: Buffer; + request: SurveyRequestMessage; + }); + + requestSignature(value?: Buffer): Buffer; + + request(value?: SurveyRequestMessage): SurveyRequestMessage; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignedSurveyRequestMessage; + + static write(value: SignedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: SignedSurveyRequestMessage): boolean; + + static toXDR(value: SignedSurveyRequestMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignedSurveyRequestMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignedSurveyRequestMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyResponseMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + commandType: SurveyMessageCommandType; + encryptedBody: Buffer; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + encryptedBody(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyResponseMessage; + + static write(value: SurveyResponseMessage, io: Buffer): void; + + static isValid(value: SurveyResponseMessage): boolean; + + static toXDR(value: SurveyResponseMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyResponseMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SurveyResponseMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignedSurveyResponseMessage { + constructor(attributes: { + responseSignature: Buffer; + response: SurveyResponseMessage; + }); + + responseSignature(value?: Buffer): Buffer; + + response(value?: SurveyResponseMessage): SurveyResponseMessage; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignedSurveyResponseMessage; + + static write(value: SignedSurveyResponseMessage, io: Buffer): void; + + static isValid(value: SignedSurveyResponseMessage): boolean; + + static toXDR(value: SignedSurveyResponseMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignedSurveyResponseMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerStats { + constructor(attributes: { + id: NodeId; + versionStr: string | Buffer; + messagesRead: Uint64; + messagesWritten: Uint64; + bytesRead: Uint64; + bytesWritten: Uint64; + secondsConnected: Uint64; + uniqueFloodBytesRecv: Uint64; + duplicateFloodBytesRecv: Uint64; + uniqueFetchBytesRecv: Uint64; + duplicateFetchBytesRecv: Uint64; + uniqueFloodMessageRecv: Uint64; + duplicateFloodMessageRecv: Uint64; + uniqueFetchMessageRecv: Uint64; + duplicateFetchMessageRecv: Uint64; + }); + + id(value?: NodeId): NodeId; + + versionStr(value?: string | Buffer): string | Buffer; + + messagesRead(value?: Uint64): Uint64; + + messagesWritten(value?: Uint64): Uint64; + + bytesRead(value?: Uint64): Uint64; + + bytesWritten(value?: Uint64): Uint64; + + secondsConnected(value?: Uint64): Uint64; + + uniqueFloodBytesRecv(value?: Uint64): Uint64; + + duplicateFloodBytesRecv(value?: Uint64): Uint64; + + uniqueFetchBytesRecv(value?: Uint64): Uint64; + + duplicateFetchBytesRecv(value?: Uint64): Uint64; + + uniqueFloodMessageRecv(value?: Uint64): Uint64; + + duplicateFloodMessageRecv(value?: Uint64): Uint64; + + uniqueFetchMessageRecv(value?: Uint64): Uint64; + + duplicateFetchMessageRecv(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerStats; + + static write(value: PeerStats, io: Buffer): void; + + static isValid(value: PeerStats): boolean; + + static toXDR(value: PeerStats): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerStats; + + static fromXDR(input: string, format: "hex" | "base64"): PeerStats; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TopologyResponseBodyV0 { + constructor(attributes: { + inboundPeers: PeerStats[]; + outboundPeers: PeerStats[]; + totalInboundPeerCount: number; + totalOutboundPeerCount: number; + }); + + inboundPeers(value?: PeerStats[]): PeerStats[]; + + outboundPeers(value?: PeerStats[]): PeerStats[]; + + totalInboundPeerCount(value?: number): number; + + totalOutboundPeerCount(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TopologyResponseBodyV0; + + static write(value: TopologyResponseBodyV0, io: Buffer): void; + + static isValid(value: TopologyResponseBodyV0): boolean; + + static toXDR(value: TopologyResponseBodyV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TopologyResponseBodyV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TopologyResponseBodyV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TopologyResponseBodyV1 { + constructor(attributes: { + inboundPeers: PeerStats[]; + outboundPeers: PeerStats[]; + totalInboundPeerCount: number; + totalOutboundPeerCount: number; + maxInboundPeerCount: number; + maxOutboundPeerCount: number; + }); + + inboundPeers(value?: PeerStats[]): PeerStats[]; + + outboundPeers(value?: PeerStats[]): PeerStats[]; + + totalInboundPeerCount(value?: number): number; + + totalOutboundPeerCount(value?: number): number; + + maxInboundPeerCount(value?: number): number; + + maxOutboundPeerCount(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TopologyResponseBodyV1; + + static write(value: TopologyResponseBodyV1, io: Buffer): void; + + static isValid(value: TopologyResponseBodyV1): boolean; + + static toXDR(value: TopologyResponseBodyV1): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TopologyResponseBodyV1; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TopologyResponseBodyV1; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FloodAdvert { + constructor(attributes: { txHashes: Hash[] }); + + txHashes(value?: Hash[]): Hash[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FloodAdvert; + + static write(value: FloodAdvert, io: Buffer): void; + + static isValid(value: FloodAdvert): boolean; + + static toXDR(value: FloodAdvert): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FloodAdvert; + + static fromXDR(input: string, format: "hex" | "base64"): FloodAdvert; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FloodDemand { + constructor(attributes: { txHashes: Hash[] }); + + txHashes(value?: Hash[]): Hash[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FloodDemand; + + static write(value: FloodDemand, io: Buffer): void; + + static isValid(value: FloodDemand): boolean; + + static toXDR(value: FloodDemand): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FloodDemand; + + static fromXDR(input: string, format: "hex" | "base64"): FloodDemand; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthenticatedMessageV0 { + constructor(attributes: { + sequence: Uint64; + message: StellarMessage; + mac: HmacSha256Mac; + }); + + sequence(value?: Uint64): Uint64; + + message(value?: StellarMessage): StellarMessage; + + mac(value?: HmacSha256Mac): HmacSha256Mac; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthenticatedMessageV0; + + static write(value: AuthenticatedMessageV0, io: Buffer): void; + + static isValid(value: AuthenticatedMessageV0): boolean; + + static toXDR(value: AuthenticatedMessageV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthenticatedMessageV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AuthenticatedMessageV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class MuxedAccountMed25519 { + constructor(attributes: { id: Uint64; ed25519: Buffer }); + + id(value?: Uint64): Uint64; + + ed25519(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): MuxedAccountMed25519; + + static write(value: MuxedAccountMed25519, io: Buffer): void; + + static isValid(value: MuxedAccountMed25519): boolean; + + static toXDR(value: MuxedAccountMed25519): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): MuxedAccountMed25519; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): MuxedAccountMed25519; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DecoratedSignature { + constructor(attributes: { hint: Buffer; signature: Buffer }); + + hint(value?: Buffer): Buffer; + + signature(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DecoratedSignature; + + static write(value: DecoratedSignature, io: Buffer): void; + + static isValid(value: DecoratedSignature): boolean; + + static toXDR(value: DecoratedSignature): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DecoratedSignature; + + static fromXDR(input: string, format: "hex" | "base64"): DecoratedSignature; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerFootprint { + constructor(attributes: { readOnly: LedgerKey[]; readWrite: LedgerKey[] }); + + readOnly(value?: LedgerKey[]): LedgerKey[]; + + readWrite(value?: LedgerKey[]): LedgerKey[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerFootprint; + + static write(value: LedgerFootprint, io: Buffer): void; + + static isValid(value: LedgerFootprint): boolean; + + static toXDR(value: LedgerFootprint): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerFootprint; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerFootprint; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateAccountOp { + constructor(attributes: { destination: AccountId; startingBalance: Int64 }); + + destination(value?: AccountId): AccountId; + + startingBalance(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateAccountOp; + + static write(value: CreateAccountOp, io: Buffer): void; + + static isValid(value: CreateAccountOp): boolean; + + static toXDR(value: CreateAccountOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateAccountOp; + + static fromXDR(input: string, format: "hex" | "base64"): CreateAccountOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PaymentOp { + constructor(attributes: { + destination: MuxedAccount; + asset: Asset; + amount: Int64; + }); + + destination(value?: MuxedAccount): MuxedAccount; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PaymentOp; + + static write(value: PaymentOp, io: Buffer): void; + + static isValid(value: PaymentOp): boolean; + + static toXDR(value: PaymentOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PaymentOp; + + static fromXDR(input: string, format: "hex" | "base64"): PaymentOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveOp { + constructor(attributes: { + sendAsset: Asset; + sendMax: Int64; + destination: MuxedAccount; + destAsset: Asset; + destAmount: Int64; + path: Asset[]; + }); + + sendAsset(value?: Asset): Asset; + + sendMax(value?: Int64): Int64; + + destination(value?: MuxedAccount): MuxedAccount; + + destAsset(value?: Asset): Asset; + + destAmount(value?: Int64): Int64; + + path(value?: Asset[]): Asset[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveOp; + + static write(value: PathPaymentStrictReceiveOp, io: Buffer): void; + + static isValid(value: PathPaymentStrictReceiveOp): boolean; + + static toXDR(value: PathPaymentStrictReceiveOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictReceiveOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendOp { + constructor(attributes: { + sendAsset: Asset; + sendAmount: Int64; + destination: MuxedAccount; + destAsset: Asset; + destMin: Int64; + path: Asset[]; + }); + + sendAsset(value?: Asset): Asset; + + sendAmount(value?: Int64): Int64; + + destination(value?: MuxedAccount): MuxedAccount; + + destAsset(value?: Asset): Asset; + + destMin(value?: Int64): Int64; + + path(value?: Asset[]): Asset[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendOp; + + static write(value: PathPaymentStrictSendOp, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendOp): boolean; + + static toXDR(value: PathPaymentStrictSendOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictSendOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageSellOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + offerId: Int64; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageSellOfferOp; + + static write(value: ManageSellOfferOp, io: Buffer): void; + + static isValid(value: ManageSellOfferOp): boolean; + + static toXDR(value: ManageSellOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageSellOfferOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageSellOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageBuyOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + buyAmount: Int64; + price: Price; + offerId: Int64; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + buyAmount(value?: Int64): Int64; + + price(value?: Price): Price; + + offerId(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageBuyOfferOp; + + static write(value: ManageBuyOfferOp, io: Buffer): void; + + static isValid(value: ManageBuyOfferOp): boolean; + + static toXDR(value: ManageBuyOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageBuyOfferOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageBuyOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreatePassiveSellOfferOp { + constructor(attributes: { + selling: Asset; + buying: Asset; + amount: Int64; + price: Price; + }); + + selling(value?: Asset): Asset; + + buying(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + price(value?: Price): Price; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreatePassiveSellOfferOp; + + static write(value: CreatePassiveSellOfferOp, io: Buffer): void; + + static isValid(value: CreatePassiveSellOfferOp): boolean; + + static toXDR(value: CreatePassiveSellOfferOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreatePassiveSellOfferOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreatePassiveSellOfferOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetOptionsOp { + constructor(attributes: { + inflationDest: null | AccountId; + clearFlags: null | number; + setFlags: null | number; + masterWeight: null | number; + lowThreshold: null | number; + medThreshold: null | number; + highThreshold: null | number; + homeDomain: null | string | Buffer; + signer: null | Signer; + }); + + inflationDest(value?: null | AccountId): null | AccountId; + + clearFlags(value?: null | number): null | number; + + setFlags(value?: null | number): null | number; + + masterWeight(value?: null | number): null | number; + + lowThreshold(value?: null | number): null | number; + + medThreshold(value?: null | number): null | number; + + highThreshold(value?: null | number): null | number; + + homeDomain(value?: null | string | Buffer): null | string | Buffer; + + signer(value?: null | Signer): null | Signer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetOptionsOp; + + static write(value: SetOptionsOp, io: Buffer): void; + + static isValid(value: SetOptionsOp): boolean; + + static toXDR(value: SetOptionsOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetOptionsOp; + + static fromXDR(input: string, format: "hex" | "base64"): SetOptionsOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustOp { + constructor(attributes: { line: ChangeTrustAsset; limit: Int64 }); + + line(value?: ChangeTrustAsset): ChangeTrustAsset; + + limit(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustOp; + + static write(value: ChangeTrustOp, io: Buffer): void; + + static isValid(value: ChangeTrustOp): boolean; + + static toXDR(value: ChangeTrustOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustOp; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AllowTrustOp { + constructor(attributes: { + trustor: AccountId; + asset: AssetCode; + authorize: number; + }); + + trustor(value?: AccountId): AccountId; + + asset(value?: AssetCode): AssetCode; + + authorize(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AllowTrustOp; + + static write(value: AllowTrustOp, io: Buffer): void; + + static isValid(value: AllowTrustOp): boolean; + + static toXDR(value: AllowTrustOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AllowTrustOp; + + static fromXDR(input: string, format: "hex" | "base64"): AllowTrustOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageDataOp { + constructor(attributes: { + dataName: string | Buffer; + dataValue: null | Buffer; + }); + + dataName(value?: string | Buffer): string | Buffer; + + dataValue(value?: null | Buffer): null | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageDataOp; + + static write(value: ManageDataOp, io: Buffer): void; + + static isValid(value: ManageDataOp): boolean; + + static toXDR(value: ManageDataOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageDataOp; + + static fromXDR(input: string, format: "hex" | "base64"): ManageDataOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BumpSequenceOp { + constructor(attributes: { bumpTo: SequenceNumber }); + + bumpTo(value?: SequenceNumber): SequenceNumber; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BumpSequenceOp; + + static write(value: BumpSequenceOp, io: Buffer): void; + + static isValid(value: BumpSequenceOp): boolean; + + static toXDR(value: BumpSequenceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BumpSequenceOp; + + static fromXDR(input: string, format: "hex" | "base64"): BumpSequenceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateClaimableBalanceOp { + constructor(attributes: { + asset: Asset; + amount: Int64; + claimants: Claimant[]; + }); + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + claimants(value?: Claimant[]): Claimant[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateClaimableBalanceOp; + + static write(value: CreateClaimableBalanceOp, io: Buffer): void; + + static isValid(value: CreateClaimableBalanceOp): boolean; + + static toXDR(value: CreateClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimClaimableBalanceOp { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimClaimableBalanceOp; + + static write(value: ClaimClaimableBalanceOp, io: Buffer): void; + + static isValid(value: ClaimClaimableBalanceOp): boolean; + + static toXDR(value: ClaimClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BeginSponsoringFutureReservesOp { + constructor(attributes: { sponsoredId: AccountId }); + + sponsoredId(value?: AccountId): AccountId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BeginSponsoringFutureReservesOp; + + static write(value: BeginSponsoringFutureReservesOp, io: Buffer): void; + + static isValid(value: BeginSponsoringFutureReservesOp): boolean; + + static toXDR(value: BeginSponsoringFutureReservesOp): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): BeginSponsoringFutureReservesOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): BeginSponsoringFutureReservesOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipOpSigner { + constructor(attributes: { accountId: AccountId; signerKey: SignerKey }); + + accountId(value?: AccountId): AccountId; + + signerKey(value?: SignerKey): SignerKey; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipOpSigner; + + static write(value: RevokeSponsorshipOpSigner, io: Buffer): void; + + static isValid(value: RevokeSponsorshipOpSigner): boolean; + + static toXDR(value: RevokeSponsorshipOpSigner): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipOpSigner; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipOpSigner; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackOp { + constructor(attributes: { + asset: Asset; + from: MuxedAccount; + amount: Int64; + }); + + asset(value?: Asset): Asset; + + from(value?: MuxedAccount): MuxedAccount; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackOp; + + static write(value: ClawbackOp, io: Buffer): void; + + static isValid(value: ClawbackOp): boolean; + + static toXDR(value: ClawbackOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackOp; + + static fromXDR(input: string, format: "hex" | "base64"): ClawbackOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackClaimableBalanceOp { + constructor(attributes: { balanceId: ClaimableBalanceId }); + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackClaimableBalanceOp; + + static write(value: ClawbackClaimableBalanceOp, io: Buffer): void; + + static isValid(value: ClawbackClaimableBalanceOp): boolean; + + static toXDR(value: ClawbackClaimableBalanceOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackClaimableBalanceOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClawbackClaimableBalanceOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetTrustLineFlagsOp { + constructor(attributes: { + trustor: AccountId; + asset: Asset; + clearFlags: number; + setFlags: number; + }); + + trustor(value?: AccountId): AccountId; + + asset(value?: Asset): Asset; + + clearFlags(value?: number): number; + + setFlags(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetTrustLineFlagsOp; + + static write(value: SetTrustLineFlagsOp, io: Buffer): void; + + static isValid(value: SetTrustLineFlagsOp): boolean; + + static toXDR(value: SetTrustLineFlagsOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetTrustLineFlagsOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SetTrustLineFlagsOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolDepositOp { + constructor(attributes: { + liquidityPoolId: PoolId; + maxAmountA: Int64; + maxAmountB: Int64; + minPrice: Price; + maxPrice: Price; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + maxAmountA(value?: Int64): Int64; + + maxAmountB(value?: Int64): Int64; + + minPrice(value?: Price): Price; + + maxPrice(value?: Price): Price; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolDepositOp; + + static write(value: LiquidityPoolDepositOp, io: Buffer): void; + + static isValid(value: LiquidityPoolDepositOp): boolean; + + static toXDR(value: LiquidityPoolDepositOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolDepositOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolDepositOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolWithdrawOp { + constructor(attributes: { + liquidityPoolId: PoolId; + amount: Int64; + minAmountA: Int64; + minAmountB: Int64; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + amount(value?: Int64): Int64; + + minAmountA(value?: Int64): Int64; + + minAmountB(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolWithdrawOp; + + static write(value: LiquidityPoolWithdrawOp, io: Buffer): void; + + static isValid(value: LiquidityPoolWithdrawOp): boolean; + + static toXDR(value: LiquidityPoolWithdrawOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolWithdrawOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolWithdrawOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InstallContractCodeArgs { + constructor(attributes: { code: Buffer }); + + code(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InstallContractCodeArgs; + + static write(value: InstallContractCodeArgs, io: Buffer): void; + + static isValid(value: InstallContractCodeArgs): boolean; + + static toXDR(value: InstallContractCodeArgs): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InstallContractCodeArgs; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InstallContractCodeArgs; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractIdFromEd25519PublicKey { + constructor(attributes: { key: Buffer; signature: Buffer; salt: Buffer }); + + key(value?: Buffer): Buffer; + + signature(value?: Buffer): Buffer; + + salt(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractIdFromEd25519PublicKey; + + static write(value: ContractIdFromEd25519PublicKey, io: Buffer): void; + + static isValid(value: ContractIdFromEd25519PublicKey): boolean; + + static toXDR(value: ContractIdFromEd25519PublicKey): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ContractIdFromEd25519PublicKey; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ContractIdFromEd25519PublicKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateContractArgs { + constructor(attributes: { + contractId: ContractId; + source: ScContractExecutable; + }); + + contractId(value?: ContractId): ContractId; + + source(value?: ScContractExecutable): ScContractExecutable; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateContractArgs; + + static write(value: CreateContractArgs, io: Buffer): void; + + static isValid(value: CreateContractArgs): boolean; + + static toXDR(value: CreateContractArgs): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateContractArgs; + + static fromXDR(input: string, format: "hex" | "base64"): CreateContractArgs; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthorizedInvocation { + constructor(attributes: { + contractId: Buffer; + functionName: string | Buffer; + args: ScVal[]; + subInvocations: AuthorizedInvocation[]; + }); + + contractId(value?: Buffer): Buffer; + + functionName(value?: string | Buffer): string | Buffer; + + args(value?: ScVal[]): ScVal[]; + + subInvocations(value?: AuthorizedInvocation[]): AuthorizedInvocation[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthorizedInvocation; + + static write(value: AuthorizedInvocation, io: Buffer): void; + + static isValid(value: AuthorizedInvocation): boolean; + + static toXDR(value: AuthorizedInvocation): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthorizedInvocation; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AuthorizedInvocation; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AddressWithNonce { + constructor(attributes: { address: ScAddress; nonce: Uint64 }); + + address(value?: ScAddress): ScAddress; + + nonce(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AddressWithNonce; + + static write(value: AddressWithNonce, io: Buffer): void; + + static isValid(value: AddressWithNonce): boolean; + + static toXDR(value: AddressWithNonce): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AddressWithNonce; + + static fromXDR(input: string, format: "hex" | "base64"): AddressWithNonce; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractAuth { + constructor(attributes: { + addressWithNonce: null | AddressWithNonce; + rootInvocation: AuthorizedInvocation; + signatureArgs: ScVal[]; + }); + + addressWithNonce(value?: null | AddressWithNonce): null | AddressWithNonce; + + rootInvocation(value?: AuthorizedInvocation): AuthorizedInvocation; + + signatureArgs(value?: ScVal[]): ScVal[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractAuth; + + static write(value: ContractAuth, io: Buffer): void; + + static isValid(value: ContractAuth): boolean; + + static toXDR(value: ContractAuth): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractAuth; + + static fromXDR(input: string, format: "hex" | "base64"): ContractAuth; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InvokeHostFunctionOp { + constructor(attributes: { + function: HostFunction; + footprint: LedgerFootprint; + auth: ContractAuth[]; + }); + + function(value?: HostFunction): HostFunction; + + footprint(value?: LedgerFootprint): LedgerFootprint; + + auth(value?: ContractAuth[]): ContractAuth[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InvokeHostFunctionOp; + + static write(value: InvokeHostFunctionOp, io: Buffer): void; + + static isValid(value: InvokeHostFunctionOp): boolean; + + static toXDR(value: InvokeHostFunctionOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InvokeHostFunctionOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InvokeHostFunctionOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Operation { + constructor(attributes: { + sourceAccount: null | MuxedAccount; + body: OperationBody; + }); + + sourceAccount(value?: null | MuxedAccount): null | MuxedAccount; + + body(value?: OperationBody): OperationBody; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Operation; + + static write(value: Operation, io: Buffer): void; + + static isValid(value: Operation): boolean; + + static toXDR(value: Operation): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Operation; + + static fromXDR(input: string, format: "hex" | "base64"): Operation; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageOperationId { + constructor(attributes: { + sourceAccount: AccountId; + seqNum: SequenceNumber; + opNum: number; + }); + + sourceAccount(value?: AccountId): AccountId; + + seqNum(value?: SequenceNumber): SequenceNumber; + + opNum(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageOperationId; + + static write(value: HashIdPreimageOperationId, io: Buffer): void; + + static isValid(value: HashIdPreimageOperationId): boolean; + + static toXDR(value: HashIdPreimageOperationId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageOperationId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageOperationId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageRevokeId { + constructor(attributes: { + sourceAccount: AccountId; + seqNum: SequenceNumber; + opNum: number; + liquidityPoolId: PoolId; + asset: Asset; + }); + + sourceAccount(value?: AccountId): AccountId; + + seqNum(value?: SequenceNumber): SequenceNumber; + + opNum(value?: number): number; + + liquidityPoolId(value?: PoolId): PoolId; + + asset(value?: Asset): Asset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageRevokeId; + + static write(value: HashIdPreimageRevokeId, io: Buffer): void; + + static isValid(value: HashIdPreimageRevokeId): boolean; + + static toXDR(value: HashIdPreimageRevokeId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageRevokeId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageRevokeId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageEd25519ContractId { + constructor(attributes: { + networkId: Buffer; + ed25519: Buffer; + salt: Buffer; + }); + + networkId(value?: Buffer): Buffer; + + ed25519(value?: Buffer): Buffer; + + salt(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageEd25519ContractId; + + static write(value: HashIdPreimageEd25519ContractId, io: Buffer): void; + + static isValid(value: HashIdPreimageEd25519ContractId): boolean; + + static toXDR(value: HashIdPreimageEd25519ContractId): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): HashIdPreimageEd25519ContractId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageEd25519ContractId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageContractId { + constructor(attributes: { + networkId: Buffer; + contractId: Buffer; + salt: Buffer; + }); + + networkId(value?: Buffer): Buffer; + + contractId(value?: Buffer): Buffer; + + salt(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageContractId; + + static write(value: HashIdPreimageContractId, io: Buffer): void; + + static isValid(value: HashIdPreimageContractId): boolean; + + static toXDR(value: HashIdPreimageContractId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageContractId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageContractId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageFromAsset { + constructor(attributes: { networkId: Buffer; asset: Asset }); + + networkId(value?: Buffer): Buffer; + + asset(value?: Asset): Asset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageFromAsset; + + static write(value: HashIdPreimageFromAsset, io: Buffer): void; + + static isValid(value: HashIdPreimageFromAsset): boolean; + + static toXDR(value: HashIdPreimageFromAsset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageFromAsset; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageFromAsset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageSourceAccountContractId { + constructor(attributes: { + networkId: Buffer; + sourceAccount: AccountId; + salt: Buffer; + }); + + networkId(value?: Buffer): Buffer; + + sourceAccount(value?: AccountId): AccountId; + + salt(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageSourceAccountContractId; + + static write( + value: HashIdPreimageSourceAccountContractId, + io: Buffer + ): void; + + static isValid(value: HashIdPreimageSourceAccountContractId): boolean; + + static toXDR(value: HashIdPreimageSourceAccountContractId): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): HashIdPreimageSourceAccountContractId; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageSourceAccountContractId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageCreateContractArgs { + constructor(attributes: { + networkId: Buffer; + source: ScContractExecutable; + salt: Buffer; + }); + + networkId(value?: Buffer): Buffer; + + source(value?: ScContractExecutable): ScContractExecutable; + + salt(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageCreateContractArgs; + + static write(value: HashIdPreimageCreateContractArgs, io: Buffer): void; + + static isValid(value: HashIdPreimageCreateContractArgs): boolean; + + static toXDR(value: HashIdPreimageCreateContractArgs): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): HashIdPreimageCreateContractArgs; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageCreateContractArgs; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimageContractAuth { + constructor(attributes: { + networkId: Buffer; + nonce: Uint64; + invocation: AuthorizedInvocation; + }); + + networkId(value?: Buffer): Buffer; + + nonce(value?: Uint64): Uint64; + + invocation(value?: AuthorizedInvocation): AuthorizedInvocation; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimageContractAuth; + + static write(value: HashIdPreimageContractAuth, io: Buffer): void; + + static isValid(value: HashIdPreimageContractAuth): boolean; + + static toXDR(value: HashIdPreimageContractAuth): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimageContractAuth; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): HashIdPreimageContractAuth; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TimeBounds { + constructor(attributes: { minTime: TimePoint; maxTime: TimePoint }); + + minTime(value?: TimePoint): TimePoint; + + maxTime(value?: TimePoint): TimePoint; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TimeBounds; + + static write(value: TimeBounds, io: Buffer): void; + + static isValid(value: TimeBounds): boolean; + + static toXDR(value: TimeBounds): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TimeBounds; + + static fromXDR(input: string, format: "hex" | "base64"): TimeBounds; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerBounds { + constructor(attributes: { minLedger: number; maxLedger: number }); + + minLedger(value?: number): number; + + maxLedger(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerBounds; + + static write(value: LedgerBounds, io: Buffer): void; + + static isValid(value: LedgerBounds): boolean; + + static toXDR(value: LedgerBounds): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerBounds; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerBounds; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PreconditionsV2 { + constructor(attributes: { + timeBounds: null | TimeBounds; + ledgerBounds: null | LedgerBounds; + minSeqNum: null | SequenceNumber; + minSeqAge: Duration; + minSeqLedgerGap: number; + extraSigners: SignerKey[]; + }); + + timeBounds(value?: null | TimeBounds): null | TimeBounds; + + ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; + + minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; + + minSeqAge(value?: Duration): Duration; + + minSeqLedgerGap(value?: number): number; + + extraSigners(value?: SignerKey[]): SignerKey[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PreconditionsV2; + + static write(value: PreconditionsV2, io: Buffer): void; + + static isValid(value: PreconditionsV2): boolean; + + static toXDR(value: PreconditionsV2): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PreconditionsV2; + + static fromXDR(input: string, format: "hex" | "base64"): PreconditionsV2; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0 { + constructor(attributes: { + sourceAccountEd25519: Buffer; + fee: number; + seqNum: SequenceNumber; + timeBounds: null | TimeBounds; + memo: Memo; + operations: Operation[]; + ext: TransactionV0Ext; + }); + + sourceAccountEd25519(value?: Buffer): Buffer; + + fee(value?: number): number; + + seqNum(value?: SequenceNumber): SequenceNumber; + + timeBounds(value?: null | TimeBounds): null | TimeBounds; + + memo(value?: Memo): Memo; + + operations(value?: Operation[]): Operation[]; + + ext(value?: TransactionV0Ext): TransactionV0Ext; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0; + + static write(value: TransactionV0, io: Buffer): void; + + static isValid(value: TransactionV0): boolean; + + static toXDR(value: TransactionV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0Envelope { + constructor(attributes: { + tx: TransactionV0; + signatures: DecoratedSignature[]; + }); + + tx(value?: TransactionV0): TransactionV0; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0Envelope; + + static write(value: TransactionV0Envelope, io: Buffer): void; + + static isValid(value: TransactionV0Envelope): boolean; + + static toXDR(value: TransactionV0Envelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0Envelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionV0Envelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Transaction { + constructor(attributes: { + sourceAccount: MuxedAccount; + fee: number; + seqNum: SequenceNumber; + cond: Preconditions; + memo: Memo; + operations: Operation[]; + ext: TransactionExt; + }); + + sourceAccount(value?: MuxedAccount): MuxedAccount; + + fee(value?: number): number; + + seqNum(value?: SequenceNumber): SequenceNumber; + + cond(value?: Preconditions): Preconditions; + + memo(value?: Memo): Memo; + + operations(value?: Operation[]): Operation[]; + + ext(value?: TransactionExt): TransactionExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Transaction; + + static write(value: Transaction, io: Buffer): void; + + static isValid(value: Transaction): boolean; + + static toXDR(value: Transaction): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Transaction; + + static fromXDR(input: string, format: "hex" | "base64"): Transaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV1Envelope { + constructor(attributes: { + tx: Transaction; + signatures: DecoratedSignature[]; + }); + + tx(value?: Transaction): Transaction; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV1Envelope; + + static write(value: TransactionV1Envelope, io: Buffer): void; + + static isValid(value: TransactionV1Envelope): boolean; + + static toXDR(value: TransactionV1Envelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV1Envelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionV1Envelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransaction { + constructor(attributes: { + feeSource: MuxedAccount; + fee: Int64; + innerTx: FeeBumpTransactionInnerTx; + ext: FeeBumpTransactionExt; + }); + + feeSource(value?: MuxedAccount): MuxedAccount; + + fee(value?: Int64): Int64; + + innerTx(value?: FeeBumpTransactionInnerTx): FeeBumpTransactionInnerTx; + + ext(value?: FeeBumpTransactionExt): FeeBumpTransactionExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransaction; + + static write(value: FeeBumpTransaction, io: Buffer): void; + + static isValid(value: FeeBumpTransaction): boolean; + + static toXDR(value: FeeBumpTransaction): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransaction; + + static fromXDR(input: string, format: "hex" | "base64"): FeeBumpTransaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionEnvelope { + constructor(attributes: { + tx: FeeBumpTransaction; + signatures: DecoratedSignature[]; + }); + + tx(value?: FeeBumpTransaction): FeeBumpTransaction; + + signatures(value?: DecoratedSignature[]): DecoratedSignature[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionEnvelope; + + static write(value: FeeBumpTransactionEnvelope, io: Buffer): void; + + static isValid(value: FeeBumpTransactionEnvelope): boolean; + + static toXDR(value: FeeBumpTransactionEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionEnvelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSignaturePayload { + constructor(attributes: { + networkId: Buffer; + taggedTransaction: TransactionSignaturePayloadTaggedTransaction; + }); + + networkId(value?: Buffer): Buffer; + + taggedTransaction( + value?: TransactionSignaturePayloadTaggedTransaction + ): TransactionSignaturePayloadTaggedTransaction; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSignaturePayload; + + static write(value: TransactionSignaturePayload, io: Buffer): void; + + static isValid(value: TransactionSignaturePayload): boolean; + + static toXDR(value: TransactionSignaturePayload): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionSignaturePayload; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionSignaturePayload; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimOfferAtomV0 { + constructor(attributes: { + sellerEd25519: Buffer; + offerId: Int64; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + sellerEd25519(value?: Buffer): Buffer; + + offerId(value?: Int64): Int64; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimOfferAtomV0; + + static write(value: ClaimOfferAtomV0, io: Buffer): void; + + static isValid(value: ClaimOfferAtomV0): boolean; + + static toXDR(value: ClaimOfferAtomV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimOfferAtomV0; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimOfferAtomV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimOfferAtom { + constructor(attributes: { + sellerId: AccountId; + offerId: Int64; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + sellerId(value?: AccountId): AccountId; + + offerId(value?: Int64): Int64; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimOfferAtom; + + static write(value: ClaimOfferAtom, io: Buffer): void; + + static isValid(value: ClaimOfferAtom): boolean; + + static toXDR(value: ClaimOfferAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimOfferAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimOfferAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimLiquidityAtom { + constructor(attributes: { + liquidityPoolId: PoolId; + assetSold: Asset; + amountSold: Int64; + assetBought: Asset; + amountBought: Int64; + }); + + liquidityPoolId(value?: PoolId): PoolId; + + assetSold(value?: Asset): Asset; + + amountSold(value?: Int64): Int64; + + assetBought(value?: Asset): Asset; + + amountBought(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimLiquidityAtom; + + static write(value: ClaimLiquidityAtom, io: Buffer): void; + + static isValid(value: ClaimLiquidityAtom): boolean; + + static toXDR(value: ClaimLiquidityAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimLiquidityAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimLiquidityAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SimplePaymentResult { + constructor(attributes: { + destination: AccountId; + asset: Asset; + amount: Int64; + }); + + destination(value?: AccountId): AccountId; + + asset(value?: Asset): Asset; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SimplePaymentResult; + + static write(value: SimplePaymentResult, io: Buffer): void; + + static isValid(value: SimplePaymentResult): boolean; + + static toXDR(value: SimplePaymentResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SimplePaymentResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SimplePaymentResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveResultSuccess { + constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); + + offers(value?: ClaimAtom[]): ClaimAtom[]; + + last(value?: SimplePaymentResult): SimplePaymentResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveResultSuccess; + + static write( + value: PathPaymentStrictReceiveResultSuccess, + io: Buffer + ): void; + + static isValid(value: PathPaymentStrictReceiveResultSuccess): boolean; + + static toXDR(value: PathPaymentStrictReceiveResultSuccess): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictReceiveResultSuccess; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveResultSuccess; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendResultSuccess { + constructor(attributes: { offers: ClaimAtom[]; last: SimplePaymentResult }); + + offers(value?: ClaimAtom[]): ClaimAtom[]; + + last(value?: SimplePaymentResult): SimplePaymentResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendResultSuccess; + + static write(value: PathPaymentStrictSendResultSuccess, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendResultSuccess): boolean; + + static toXDR(value: PathPaymentStrictSendResultSuccess): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictSendResultSuccess; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendResultSuccess; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageOfferSuccessResult { + constructor(attributes: { + offersClaimed: ClaimAtom[]; + offer: ManageOfferSuccessResultOffer; + }); + + offersClaimed(value?: ClaimAtom[]): ClaimAtom[]; + + offer(value?: ManageOfferSuccessResultOffer): ManageOfferSuccessResultOffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageOfferSuccessResult; + + static write(value: ManageOfferSuccessResult, io: Buffer): void; + + static isValid(value: ManageOfferSuccessResult): boolean; + + static toXDR(value: ManageOfferSuccessResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageOfferSuccessResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageOfferSuccessResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InflationPayout { + constructor(attributes: { destination: AccountId; amount: Int64 }); + + destination(value?: AccountId): AccountId; + + amount(value?: Int64): Int64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InflationPayout; + + static write(value: InflationPayout, io: Buffer): void; + + static isValid(value: InflationPayout): boolean; + + static toXDR(value: InflationPayout): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InflationPayout; + + static fromXDR(input: string, format: "hex" | "base64"): InflationPayout; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResult { + constructor(attributes: { + feeCharged: Int64; + result: InnerTransactionResultResult; + ext: InnerTransactionResultExt; + }); + + feeCharged(value?: Int64): Int64; + + result(value?: InnerTransactionResultResult): InnerTransactionResultResult; + + ext(value?: InnerTransactionResultExt): InnerTransactionResultExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResult; + + static write(value: InnerTransactionResult, io: Buffer): void; + + static isValid(value: InnerTransactionResult): boolean; + + static toXDR(value: InnerTransactionResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultPair { + constructor(attributes: { + transactionHash: Buffer; + result: InnerTransactionResult; + }); + + transactionHash(value?: Buffer): Buffer; + + result(value?: InnerTransactionResult): InnerTransactionResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultPair; + + static write(value: InnerTransactionResultPair, io: Buffer): void; + + static isValid(value: InnerTransactionResultPair): boolean; + + static toXDR(value: InnerTransactionResultPair): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultPair; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultPair; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResult { + constructor(attributes: { + feeCharged: Int64; + result: TransactionResultResult; + ext: TransactionResultExt; + }); + + feeCharged(value?: Int64): Int64; + + result(value?: TransactionResultResult): TransactionResultResult; + + ext(value?: TransactionResultExt): TransactionResultExt; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResult; + + static write(value: TransactionResult, io: Buffer): void; + + static isValid(value: TransactionResult): boolean; + + static toXDR(value: TransactionResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResult; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignerKeyEd25519SignedPayload { + constructor(attributes: { ed25519: Buffer; payload: Buffer }); + + ed25519(value?: Buffer): Buffer; + + payload(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignerKeyEd25519SignedPayload; + + static write(value: SignerKeyEd25519SignedPayload, io: Buffer): void; + + static isValid(value: SignerKeyEd25519SignedPayload): boolean; + + static toXDR(value: SignerKeyEd25519SignedPayload): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): SignerKeyEd25519SignedPayload; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SignerKeyEd25519SignedPayload; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Curve25519Secret { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Curve25519Secret; + + static write(value: Curve25519Secret, io: Buffer): void; + + static isValid(value: Curve25519Secret): boolean; + + static toXDR(value: Curve25519Secret): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Curve25519Secret; + + static fromXDR(input: string, format: "hex" | "base64"): Curve25519Secret; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Curve25519Public { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Curve25519Public; + + static write(value: Curve25519Public, io: Buffer): void; + + static isValid(value: Curve25519Public): boolean; + + static toXDR(value: Curve25519Public): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Curve25519Public; + + static fromXDR(input: string, format: "hex" | "base64"): Curve25519Public; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HmacSha256Key { + constructor(attributes: { key: Buffer }); + + key(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HmacSha256Key; + + static write(value: HmacSha256Key, io: Buffer): void; + + static isValid(value: HmacSha256Key): boolean; + + static toXDR(value: HmacSha256Key): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HmacSha256Key; + + static fromXDR(input: string, format: "hex" | "base64"): HmacSha256Key; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HmacSha256Mac { + constructor(attributes: { mac: Buffer }); + + mac(value?: Buffer): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HmacSha256Mac; + + static write(value: HmacSha256Mac, io: Buffer): void; + + static isValid(value: HmacSha256Mac): boolean; + + static toXDR(value: HmacSha256Mac): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HmacSha256Mac; + + static fromXDR(input: string, format: "hex" | "base64"): HmacSha256Mac; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class UInt128Parts { + constructor(attributes: { hi: Uint64; lo: Uint64 }); + + hi(value?: Uint64): Uint64; + + lo(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): UInt128Parts; + + static write(value: UInt128Parts, io: Buffer): void; + + static isValid(value: UInt128Parts): boolean; + + static toXDR(value: UInt128Parts): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UInt128Parts; + + static fromXDR(input: string, format: "hex" | "base64"): UInt128Parts; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Int128Parts { + constructor(attributes: { hi: Int64; lo: Uint64 }); + + hi(value?: Int64): Int64; + + lo(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Int128Parts; + + static write(value: Int128Parts, io: Buffer): void; + + static isValid(value: Int128Parts): boolean; + + static toXDR(value: Int128Parts): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Int128Parts; + + static fromXDR(input: string, format: "hex" | "base64"): Int128Parts; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class UInt256Parts { + constructor(attributes: { + hiHi: Uint64; + hiLo: Uint64; + loHi: Uint64; + loLo: Uint64; + }); + + hiHi(value?: Uint64): Uint64; + + hiLo(value?: Uint64): Uint64; + + loHi(value?: Uint64): Uint64; + + loLo(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): UInt256Parts; + + static write(value: UInt256Parts, io: Buffer): void; + + static isValid(value: UInt256Parts): boolean; + + static toXDR(value: UInt256Parts): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): UInt256Parts; + + static fromXDR(input: string, format: "hex" | "base64"): UInt256Parts; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Int256Parts { + constructor(attributes: { + hiHi: Int64; + hiLo: Uint64; + loHi: Uint64; + loLo: Uint64; + }); + + hiHi(value?: Int64): Int64; + + hiLo(value?: Uint64): Uint64; + + loHi(value?: Uint64): Uint64; + + loLo(value?: Uint64): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Int256Parts; + + static write(value: Int256Parts, io: Buffer): void; + + static isValid(value: Int256Parts): boolean; + + static toXDR(value: Int256Parts): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Int256Parts; + + static fromXDR(input: string, format: "hex" | "base64"): Int256Parts; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScNonceKey { + constructor(attributes: { nonceAddress: ScAddress }); + + nonceAddress(value?: ScAddress): ScAddress; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScNonceKey; + + static write(value: ScNonceKey, io: Buffer): void; + + static isValid(value: ScNonceKey): boolean; + + static toXDR(value: ScNonceKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScNonceKey; + + static fromXDR(input: string, format: "hex" | "base64"): ScNonceKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScMapEntry { + constructor(attributes: { key: ScVal; val: ScVal }); + + key(value?: ScVal): ScVal; + + val(value?: ScVal): ScVal; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScMapEntry; + + static write(value: ScMapEntry, io: Buffer): void; + + static isValid(value: ScMapEntry): boolean; + + static toXDR(value: ScMapEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScMapEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ScMapEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeOption { + constructor(attributes: { valueType: ScSpecTypeDef }); + + valueType(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeOption; + + static write(value: ScSpecTypeOption, io: Buffer): void; + + static isValid(value: ScSpecTypeOption): boolean; + + static toXDR(value: ScSpecTypeOption): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeOption; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeOption; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeResult { + constructor(attributes: { + okType: ScSpecTypeDef; + errorType: ScSpecTypeDef; + }); + + okType(value?: ScSpecTypeDef): ScSpecTypeDef; + + errorType(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeResult; + + static write(value: ScSpecTypeResult, io: Buffer): void; + + static isValid(value: ScSpecTypeResult): boolean; + + static toXDR(value: ScSpecTypeResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeResult; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeVec { + constructor(attributes: { elementType: ScSpecTypeDef }); + + elementType(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeVec; + + static write(value: ScSpecTypeVec, io: Buffer): void; + + static isValid(value: ScSpecTypeVec): boolean; + + static toXDR(value: ScSpecTypeVec): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeVec; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeVec; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeMap { + constructor(attributes: { + keyType: ScSpecTypeDef; + valueType: ScSpecTypeDef; + }); + + keyType(value?: ScSpecTypeDef): ScSpecTypeDef; + + valueType(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeMap; + + static write(value: ScSpecTypeMap, io: Buffer): void; + + static isValid(value: ScSpecTypeMap): boolean; + + static toXDR(value: ScSpecTypeMap): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeMap; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeMap; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeSet { + constructor(attributes: { elementType: ScSpecTypeDef }); + + elementType(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeSet; + + static write(value: ScSpecTypeSet, io: Buffer): void; + + static isValid(value: ScSpecTypeSet): boolean; + + static toXDR(value: ScSpecTypeSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeSet; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeTuple { + constructor(attributes: { valueTypes: ScSpecTypeDef[] }); + + valueTypes(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeTuple; + + static write(value: ScSpecTypeTuple, io: Buffer): void; + + static isValid(value: ScSpecTypeTuple): boolean; + + static toXDR(value: ScSpecTypeTuple): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeTuple; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeTuple; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeBytesN { + constructor(attributes: { n: number }); + + n(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeBytesN; + + static write(value: ScSpecTypeBytesN, io: Buffer): void; + + static isValid(value: ScSpecTypeBytesN): boolean; + + static toXDR(value: ScSpecTypeBytesN): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeBytesN; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeBytesN; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeUdt { + constructor(attributes: { name: string | Buffer }); + + name(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeUdt; + + static write(value: ScSpecTypeUdt, io: Buffer): void; + + static isValid(value: ScSpecTypeUdt): boolean; + + static toXDR(value: ScSpecTypeUdt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeUdt; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeUdt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtStructFieldV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + type: ScSpecTypeDef; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + type(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtStructFieldV0; + + static write(value: ScSpecUdtStructFieldV0, io: Buffer): void; + + static isValid(value: ScSpecUdtStructFieldV0): boolean; + + static toXDR(value: ScSpecUdtStructFieldV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtStructFieldV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtStructFieldV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtStructV0 { + constructor(attributes: { + doc: string | Buffer; + lib: string | Buffer; + name: string | Buffer; + fields: ScSpecUdtStructFieldV0[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + lib(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + fields(value?: ScSpecUdtStructFieldV0[]): ScSpecUdtStructFieldV0[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtStructV0; + + static write(value: ScSpecUdtStructV0, io: Buffer): void; + + static isValid(value: ScSpecUdtStructV0): boolean; + + static toXDR(value: ScSpecUdtStructV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtStructV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecUdtStructV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtUnionCaseVoidV0 { + constructor(attributes: { doc: string | Buffer; name: string | Buffer }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtUnionCaseVoidV0; + + static write(value: ScSpecUdtUnionCaseVoidV0, io: Buffer): void; + + static isValid(value: ScSpecUdtUnionCaseVoidV0): boolean; + + static toXDR(value: ScSpecUdtUnionCaseVoidV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtUnionCaseVoidV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtUnionCaseVoidV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtUnionCaseTupleV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + type: ScSpecTypeDef[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + type(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtUnionCaseTupleV0; + + static write(value: ScSpecUdtUnionCaseTupleV0, io: Buffer): void; + + static isValid(value: ScSpecUdtUnionCaseTupleV0): boolean; + + static toXDR(value: ScSpecUdtUnionCaseTupleV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtUnionCaseTupleV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtUnionCaseTupleV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtUnionV0 { + constructor(attributes: { + doc: string | Buffer; + lib: string | Buffer; + name: string | Buffer; + cases: ScSpecUdtUnionCaseV0[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + lib(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + cases(value?: ScSpecUdtUnionCaseV0[]): ScSpecUdtUnionCaseV0[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtUnionV0; + + static write(value: ScSpecUdtUnionV0, io: Buffer): void; + + static isValid(value: ScSpecUdtUnionV0): boolean; + + static toXDR(value: ScSpecUdtUnionV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtUnionV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecUdtUnionV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtEnumCaseV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + value: number; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + value(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtEnumCaseV0; + + static write(value: ScSpecUdtEnumCaseV0, io: Buffer): void; + + static isValid(value: ScSpecUdtEnumCaseV0): boolean; + + static toXDR(value: ScSpecUdtEnumCaseV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtEnumCaseV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtEnumCaseV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtEnumV0 { + constructor(attributes: { + doc: string | Buffer; + lib: string | Buffer; + name: string | Buffer; + cases: ScSpecUdtEnumCaseV0[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + lib(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + cases(value?: ScSpecUdtEnumCaseV0[]): ScSpecUdtEnumCaseV0[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtEnumV0; + + static write(value: ScSpecUdtEnumV0, io: Buffer): void; + + static isValid(value: ScSpecUdtEnumV0): boolean; + + static toXDR(value: ScSpecUdtEnumV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtEnumV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecUdtEnumV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtErrorEnumCaseV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + value: number; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + value(value?: number): number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtErrorEnumCaseV0; + + static write(value: ScSpecUdtErrorEnumCaseV0, io: Buffer): void; + + static isValid(value: ScSpecUdtErrorEnumCaseV0): boolean; + + static toXDR(value: ScSpecUdtErrorEnumCaseV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtErrorEnumCaseV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtErrorEnumCaseV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtErrorEnumV0 { + constructor(attributes: { + doc: string | Buffer; + lib: string | Buffer; + name: string | Buffer; + cases: ScSpecUdtErrorEnumCaseV0[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + lib(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + cases(value?: ScSpecUdtErrorEnumCaseV0[]): ScSpecUdtErrorEnumCaseV0[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtErrorEnumV0; + + static write(value: ScSpecUdtErrorEnumV0, io: Buffer): void; + + static isValid(value: ScSpecUdtErrorEnumV0): boolean; + + static toXDR(value: ScSpecUdtErrorEnumV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtErrorEnumV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtErrorEnumV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecFunctionInputV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + type: ScSpecTypeDef; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + type(value?: ScSpecTypeDef): ScSpecTypeDef; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecFunctionInputV0; + + static write(value: ScSpecFunctionInputV0, io: Buffer): void; + + static isValid(value: ScSpecFunctionInputV0): boolean; + + static toXDR(value: ScSpecFunctionInputV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecFunctionInputV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecFunctionInputV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecFunctionV0 { + constructor(attributes: { + doc: string | Buffer; + name: string | Buffer; + inputs: ScSpecFunctionInputV0[]; + outputs: ScSpecTypeDef[]; + }); + + doc(value?: string | Buffer): string | Buffer; + + name(value?: string | Buffer): string | Buffer; + + inputs(value?: ScSpecFunctionInputV0[]): ScSpecFunctionInputV0[]; + + outputs(value?: ScSpecTypeDef[]): ScSpecTypeDef[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecFunctionV0; + + static write(value: ScSpecFunctionV0, io: Buffer): void; + + static isValid(value: ScSpecFunctionV0): boolean; + + static toXDR(value: ScSpecFunctionV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecFunctionV0; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecFunctionV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpStatementPledges { + switch(): ScpStatementType; + + prepare(value?: ScpStatementPrepare): ScpStatementPrepare; + + confirm(value?: ScpStatementConfirm): ScpStatementConfirm; + + externalize(value?: ScpStatementExternalize): ScpStatementExternalize; + + nominate(value?: ScpNomination): ScpNomination; + + static scpStPrepare(value: ScpStatementPrepare): ScpStatementPledges; + + static scpStConfirm(value: ScpStatementConfirm): ScpStatementPledges; + + static scpStExternalize( + value: ScpStatementExternalize + ): ScpStatementPledges; + + static scpStNominate(value: ScpNomination): ScpStatementPledges; + + value(): + | ScpStatementPrepare + | ScpStatementConfirm + | ScpStatementExternalize + | ScpNomination; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpStatementPledges; + + static write(value: ScpStatementPledges, io: Buffer): void; + + static isValid(value: ScpStatementPledges): boolean; + + static toXDR(value: ScpStatementPledges): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpStatementPledges; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScpStatementPledges; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AssetCode { + switch(): AssetType; + + assetCode4(value?: Buffer): Buffer; + + assetCode12(value?: Buffer): Buffer; + + static assetTypeCreditAlphanum4(value: Buffer): AssetCode; + + static assetTypeCreditAlphanum12(value: Buffer): AssetCode; + + value(): Buffer | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AssetCode; + + static write(value: AssetCode, io: Buffer): void; + + static isValid(value: AssetCode): boolean; + + static toXDR(value: AssetCode): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AssetCode; + + static fromXDR(input: string, format: "hex" | "base64"): AssetCode; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Asset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + static assetTypeNative(): Asset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): Asset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): Asset; + + value(): AlphaNum4 | AlphaNum12 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Asset; + + static write(value: Asset, io: Buffer): void; + + static isValid(value: Asset): boolean; + + static toXDR(value: Asset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Asset; + + static fromXDR(input: string, format: "hex" | "base64"): Asset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV2Ext { + switch(): number; + + v3(value?: AccountEntryExtensionV3): AccountEntryExtensionV3; + + static 0(): AccountEntryExtensionV2Ext; + + static 3(value: AccountEntryExtensionV3): AccountEntryExtensionV2Ext; + + value(): AccountEntryExtensionV3 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV2Ext; + + static write(value: AccountEntryExtensionV2Ext, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV2Ext): boolean; + + static toXDR(value: AccountEntryExtensionV2Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV2Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV2Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExtensionV1Ext { + switch(): number; + + v2(value?: AccountEntryExtensionV2): AccountEntryExtensionV2; + + static 0(): AccountEntryExtensionV1Ext; + + static 2(value: AccountEntryExtensionV2): AccountEntryExtensionV1Ext; + + value(): AccountEntryExtensionV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExtensionV1Ext; + + static write(value: AccountEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: AccountEntryExtensionV1Ext): boolean; + + static toXDR(value: AccountEntryExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AccountEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountEntryExt { + switch(): number; + + v1(value?: AccountEntryExtensionV1): AccountEntryExtensionV1; + + static 0(): AccountEntryExt; + + static 1(value: AccountEntryExtensionV1): AccountEntryExt; + + value(): AccountEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountEntryExt; + + static write(value: AccountEntryExt, io: Buffer): void; + + static isValid(value: AccountEntryExt): boolean; + + static toXDR(value: AccountEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): AccountEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineAsset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + liquidityPoolId(value?: PoolId): PoolId; + + static assetTypeNative(): TrustLineAsset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): TrustLineAsset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): TrustLineAsset; + + static assetTypePoolShare(value: PoolId): TrustLineAsset; + + value(): AlphaNum4 | AlphaNum12 | PoolId | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineAsset; + + static write(value: TrustLineAsset, io: Buffer): void; + + static isValid(value: TrustLineAsset): boolean; + + static toXDR(value: TrustLineAsset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineAsset; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineAsset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExtensionV2Ext { + switch(): number; + + static 0(): TrustLineEntryExtensionV2Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExtensionV2Ext; + + static write(value: TrustLineEntryExtensionV2Ext, io: Buffer): void; + + static isValid(value: TrustLineEntryExtensionV2Ext): boolean; + + static toXDR(value: TrustLineEntryExtensionV2Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExtensionV2Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryExtensionV2Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryV1Ext { + switch(): number; + + v2(value?: TrustLineEntryExtensionV2): TrustLineEntryExtensionV2; + + static 0(): TrustLineEntryV1Ext; + + static 2(value: TrustLineEntryExtensionV2): TrustLineEntryV1Ext; + + value(): TrustLineEntryExtensionV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryV1Ext; + + static write(value: TrustLineEntryV1Ext, io: Buffer): void; + + static isValid(value: TrustLineEntryV1Ext): boolean; + + static toXDR(value: TrustLineEntryV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TrustLineEntryV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TrustLineEntryExt { + switch(): number; + + v1(value?: TrustLineEntryV1): TrustLineEntryV1; + + static 0(): TrustLineEntryExt; + + static 1(value: TrustLineEntryV1): TrustLineEntryExt; + + value(): TrustLineEntryV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TrustLineEntryExt; + + static write(value: TrustLineEntryExt, io: Buffer): void; + + static isValid(value: TrustLineEntryExt): boolean; + + static toXDR(value: TrustLineEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TrustLineEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): TrustLineEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OfferEntryExt { + switch(): number; + + static 0(): OfferEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OfferEntryExt; + + static write(value: OfferEntryExt, io: Buffer): void; + + static isValid(value: OfferEntryExt): boolean; + + static toXDR(value: OfferEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OfferEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): OfferEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class DataEntryExt { + switch(): number; + + static 0(): DataEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): DataEntryExt; + + static write(value: DataEntryExt, io: Buffer): void; + + static isValid(value: DataEntryExt): boolean; + + static toXDR(value: DataEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): DataEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): DataEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimPredicate { + switch(): ClaimPredicateType; + + andPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; + + orPredicates(value?: ClaimPredicate[]): ClaimPredicate[]; + + notPredicate(value?: null | ClaimPredicate): null | ClaimPredicate; + + absBefore(value?: Int64): Int64; + + relBefore(value?: Int64): Int64; + + static claimPredicateUnconditional(): ClaimPredicate; + + static claimPredicateAnd(value: ClaimPredicate[]): ClaimPredicate; + + static claimPredicateOr(value: ClaimPredicate[]): ClaimPredicate; + + static claimPredicateNot(value: null | ClaimPredicate): ClaimPredicate; + + static claimPredicateBeforeAbsoluteTime(value: Int64): ClaimPredicate; + + static claimPredicateBeforeRelativeTime(value: Int64): ClaimPredicate; + + value(): + | ClaimPredicate[] + | ClaimPredicate[] + | null + | ClaimPredicate + | Int64 + | Int64 + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimPredicate; + + static write(value: ClaimPredicate, io: Buffer): void; + + static isValid(value: ClaimPredicate): boolean; + + static toXDR(value: ClaimPredicate): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimPredicate; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimPredicate; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Claimant { + switch(): ClaimantType; + + v0(value?: ClaimantV0): ClaimantV0; + + static claimantTypeV0(value: ClaimantV0): Claimant; + + value(): ClaimantV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Claimant; + + static write(value: Claimant, io: Buffer): void; + + static isValid(value: Claimant): boolean; + + static toXDR(value: Claimant): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Claimant; + + static fromXDR(input: string, format: "hex" | "base64"): Claimant; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceId { + switch(): ClaimableBalanceIdType; + + v0(value?: Buffer): Buffer; + + static claimableBalanceIdTypeV0(value: Buffer): ClaimableBalanceId; + + value(): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceId; + + static write(value: ClaimableBalanceId, io: Buffer): void; + + static isValid(value: ClaimableBalanceId): boolean; + + static toXDR(value: ClaimableBalanceId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceId; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimableBalanceId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExtensionV1Ext { + switch(): number; + + static 0(): ClaimableBalanceEntryExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExtensionV1Ext; + + static write(value: ClaimableBalanceEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExtensionV1Ext): boolean; + + static toXDR(value: ClaimableBalanceEntryExtensionV1Ext): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClaimableBalanceEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimableBalanceEntryExt { + switch(): number; + + v1( + value?: ClaimableBalanceEntryExtensionV1 + ): ClaimableBalanceEntryExtensionV1; + + static 0(): ClaimableBalanceEntryExt; + + static 1(value: ClaimableBalanceEntryExtensionV1): ClaimableBalanceEntryExt; + + value(): ClaimableBalanceEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimableBalanceEntryExt; + + static write(value: ClaimableBalanceEntryExt, io: Buffer): void; + + static isValid(value: ClaimableBalanceEntryExt): boolean; + + static toXDR(value: ClaimableBalanceEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimableBalanceEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimableBalanceEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolEntryBody { + switch(): LiquidityPoolType; + + constantProduct( + value?: LiquidityPoolEntryConstantProduct + ): LiquidityPoolEntryConstantProduct; + + static liquidityPoolConstantProduct( + value: LiquidityPoolEntryConstantProduct + ): LiquidityPoolEntryBody; + + value(): LiquidityPoolEntryConstantProduct; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolEntryBody; + + static write(value: LiquidityPoolEntryBody, io: Buffer): void; + + static isValid(value: LiquidityPoolEntryBody): boolean; + + static toXDR(value: LiquidityPoolEntryBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolEntryBody; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolEntryBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ConfigSettingEntry { + switch(): ConfigSettingId; + + contractMaxSizeBytes(value?: number): number; + + contractCompute( + value?: ConfigSettingContractComputeV0 + ): ConfigSettingContractComputeV0; + + contractLedgerCost( + value?: ConfigSettingContractLedgerCostV0 + ): ConfigSettingContractLedgerCostV0; + + contractHistoricalData( + value?: ConfigSettingContractHistoricalDataV0 + ): ConfigSettingContractHistoricalDataV0; + + contractMetaData( + value?: ConfigSettingContractMetaDataV0 + ): ConfigSettingContractMetaDataV0; + + contractBandwidth( + value?: ConfigSettingContractBandwidthV0 + ): ConfigSettingContractBandwidthV0; + + contractHostLogicVersion(value?: number): number; + + static configSettingContractMaxSizeBytes(value: number): ConfigSettingEntry; + + static configSettingContractComputeV0( + value: ConfigSettingContractComputeV0 + ): ConfigSettingEntry; + + static configSettingContractLedgerCostV0( + value: ConfigSettingContractLedgerCostV0 + ): ConfigSettingEntry; + + static configSettingContractHistoricalDataV0( + value: ConfigSettingContractHistoricalDataV0 + ): ConfigSettingEntry; + + static configSettingContractMetaDataV0( + value: ConfigSettingContractMetaDataV0 + ): ConfigSettingEntry; + + static configSettingContractBandwidthV0( + value: ConfigSettingContractBandwidthV0 + ): ConfigSettingEntry; + + static configSettingContractHostLogicVersion( + value: number + ): ConfigSettingEntry; + + value(): + | number + | ConfigSettingContractComputeV0 + | ConfigSettingContractLedgerCostV0 + | ConfigSettingContractHistoricalDataV0 + | ConfigSettingContractMetaDataV0 + | ConfigSettingContractBandwidthV0 + | number; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ConfigSettingEntry; + + static write(value: ConfigSettingEntry, io: Buffer): void; + + static isValid(value: ConfigSettingEntry): boolean; + + static toXDR(value: ConfigSettingEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ConfigSettingEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ConfigSettingEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExtensionV1Ext { + switch(): number; + + static 0(): LedgerEntryExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExtensionV1Ext; + + static write(value: LedgerEntryExtensionV1Ext, io: Buffer): void; + + static isValid(value: LedgerEntryExtensionV1Ext): boolean; + + static toXDR(value: LedgerEntryExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerEntryExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryData { + switch(): LedgerEntryType; + + account(value?: AccountEntry): AccountEntry; + + trustLine(value?: TrustLineEntry): TrustLineEntry; + + offer(value?: OfferEntry): OfferEntry; + + data(value?: DataEntry): DataEntry; + + claimableBalance(value?: ClaimableBalanceEntry): ClaimableBalanceEntry; + + liquidityPool(value?: LiquidityPoolEntry): LiquidityPoolEntry; + + contractData(value?: ContractDataEntry): ContractDataEntry; + + contractCode(value?: ContractCodeEntry): ContractCodeEntry; + + configSetting(value?: ConfigSettingEntry): ConfigSettingEntry; + + static account(value: AccountEntry): LedgerEntryData; + + static trustline(value: TrustLineEntry): LedgerEntryData; + + static offer(value: OfferEntry): LedgerEntryData; + + static data(value: DataEntry): LedgerEntryData; + + static claimableBalance(value: ClaimableBalanceEntry): LedgerEntryData; + + static liquidityPool(value: LiquidityPoolEntry): LedgerEntryData; + + static contractData(value: ContractDataEntry): LedgerEntryData; + + static contractCode(value: ContractCodeEntry): LedgerEntryData; + + static configSetting(value: ConfigSettingEntry): LedgerEntryData; + + value(): + | AccountEntry + | TrustLineEntry + | OfferEntry + | DataEntry + | ClaimableBalanceEntry + | LiquidityPoolEntry + | ContractDataEntry + | ContractCodeEntry + | ConfigSettingEntry; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryData; + + static write(value: LedgerEntryData, io: Buffer): void; + + static isValid(value: LedgerEntryData): boolean; + + static toXDR(value: LedgerEntryData): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryData; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryData; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryExt { + switch(): number; + + v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; + + static 0(): LedgerEntryExt; + + static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; + + value(): LedgerEntryExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryExt; + + static write(value: LedgerEntryExt, io: Buffer): void; + + static isValid(value: LedgerEntryExt): boolean; + + static toXDR(value: LedgerEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryExt; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerKey { + switch(): LedgerEntryType; + + account(value?: LedgerKeyAccount): LedgerKeyAccount; + + trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; + + offer(value?: LedgerKeyOffer): LedgerKeyOffer; + + data(value?: LedgerKeyData): LedgerKeyData; + + claimableBalance( + value?: LedgerKeyClaimableBalance + ): LedgerKeyClaimableBalance; + + liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; + + contractData(value?: LedgerKeyContractData): LedgerKeyContractData; + + contractCode(value?: LedgerKeyContractCode): LedgerKeyContractCode; + + configSetting(value?: LedgerKeyConfigSetting): LedgerKeyConfigSetting; + + static account(value: LedgerKeyAccount): LedgerKey; + + static trustline(value: LedgerKeyTrustLine): LedgerKey; + + static offer(value: LedgerKeyOffer): LedgerKey; + + static data(value: LedgerKeyData): LedgerKey; + + static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; + + static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; + + static contractData(value: LedgerKeyContractData): LedgerKey; + + static contractCode(value: LedgerKeyContractCode): LedgerKey; + + static configSetting(value: LedgerKeyConfigSetting): LedgerKey; + + value(): + | LedgerKeyAccount + | LedgerKeyTrustLine + | LedgerKeyOffer + | LedgerKeyData + | LedgerKeyClaimableBalance + | LedgerKeyLiquidityPool + | LedgerKeyContractData + | LedgerKeyContractCode + | LedgerKeyConfigSetting; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerKey; + + static write(value: LedgerKey, io: Buffer): void; + + static isValid(value: LedgerKey): boolean; + + static toXDR(value: LedgerKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerKey; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarValueExt { + switch(): StellarValueType; + + lcValueSignature( + value?: LedgerCloseValueSignature + ): LedgerCloseValueSignature; + + static stellarValueBasic(): StellarValueExt; + + static stellarValueSigned( + value: LedgerCloseValueSignature + ): StellarValueExt; + + value(): LedgerCloseValueSignature | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarValueExt; + + static write(value: StellarValueExt, io: Buffer): void; + + static isValid(value: StellarValueExt): boolean; + + static toXDR(value: StellarValueExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarValueExt; + + static fromXDR(input: string, format: "hex" | "base64"): StellarValueExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExtensionV1Ext { + switch(): number; + + static 0(): LedgerHeaderExtensionV1Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExtensionV1Ext; + + static write(value: LedgerHeaderExtensionV1Ext, io: Buffer): void; + + static isValid(value: LedgerHeaderExtensionV1Ext): boolean; + + static toXDR(value: LedgerHeaderExtensionV1Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExtensionV1Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderExtensionV1Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderExt { + switch(): number; + + v1(value?: LedgerHeaderExtensionV1): LedgerHeaderExtensionV1; + + static 0(): LedgerHeaderExt; + + static 1(value: LedgerHeaderExtensionV1): LedgerHeaderExt; + + value(): LedgerHeaderExtensionV1 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderExt; + + static write(value: LedgerHeaderExt, io: Buffer): void; + + static isValid(value: LedgerHeaderExt): boolean; + + static toXDR(value: LedgerHeaderExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderExt; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerHeaderExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerUpgrade { + switch(): LedgerUpgradeType; + + newLedgerVersion(value?: number): number; + + newBaseFee(value?: number): number; + + newMaxTxSetSize(value?: number): number; + + newBaseReserve(value?: number): number; + + newFlags(value?: number): number; + + newConfig(value?: ConfigUpgradeSetKey): ConfigUpgradeSetKey; + + static ledgerUpgradeVersion(value: number): LedgerUpgrade; + + static ledgerUpgradeBaseFee(value: number): LedgerUpgrade; + + static ledgerUpgradeMaxTxSetSize(value: number): LedgerUpgrade; + + static ledgerUpgradeBaseReserve(value: number): LedgerUpgrade; + + static ledgerUpgradeFlags(value: number): LedgerUpgrade; + + static ledgerUpgradeConfig(value: ConfigUpgradeSetKey): LedgerUpgrade; + + value(): number | number | number | number | number | ConfigUpgradeSetKey; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerUpgrade; + + static write(value: LedgerUpgrade, io: Buffer): void; + + static isValid(value: LedgerUpgrade): boolean; + + static toXDR(value: LedgerUpgrade): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerUpgrade; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerUpgrade; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketMetadataExt { + switch(): number; + + static 0(): BucketMetadataExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketMetadataExt; + + static write(value: BucketMetadataExt, io: Buffer): void; + + static isValid(value: BucketMetadataExt): boolean; + + static toXDR(value: BucketMetadataExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketMetadataExt; + + static fromXDR(input: string, format: "hex" | "base64"): BucketMetadataExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BucketEntry { + switch(): BucketEntryType; + + liveEntry(value?: LedgerEntry): LedgerEntry; + + deadEntry(value?: LedgerKey): LedgerKey; + + metaEntry(value?: BucketMetadata): BucketMetadata; + + static liveentry(value: LedgerEntry): BucketEntry; + + static initentry(value: LedgerEntry): BucketEntry; + + static deadentry(value: LedgerKey): BucketEntry; + + static metaentry(value: BucketMetadata): BucketEntry; + + value(): LedgerEntry | LedgerKey | BucketMetadata; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BucketEntry; + + static write(value: BucketEntry, io: Buffer): void; + + static isValid(value: BucketEntry): boolean; + + static toXDR(value: BucketEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BucketEntry; + + static fromXDR(input: string, format: "hex" | "base64"): BucketEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TxSetComponent { + switch(): TxSetComponentType; + + txsMaybeDiscountedFee( + value?: TxSetComponentTxsMaybeDiscountedFee + ): TxSetComponentTxsMaybeDiscountedFee; + + static txsetCompTxsMaybeDiscountedFee( + value: TxSetComponentTxsMaybeDiscountedFee + ): TxSetComponent; + + value(): TxSetComponentTxsMaybeDiscountedFee; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TxSetComponent; + + static write(value: TxSetComponent, io: Buffer): void; + + static isValid(value: TxSetComponent): boolean; + + static toXDR(value: TxSetComponent): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TxSetComponent; + + static fromXDR(input: string, format: "hex" | "base64"): TxSetComponent; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionPhase { + switch(): number; + + v0Components(value?: TxSetComponent[]): TxSetComponent[]; + + static 0(value: TxSetComponent[]): TransactionPhase; + + value(): TxSetComponent[]; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionPhase; + + static write(value: TransactionPhase, io: Buffer): void; + + static isValid(value: TransactionPhase): boolean; + + static toXDR(value: TransactionPhase): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionPhase; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionPhase; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class GeneralizedTransactionSet { + switch(): number; + + v1TxSet(value?: TransactionSetV1): TransactionSetV1; + + static 1(value: TransactionSetV1): GeneralizedTransactionSet; + + value(): TransactionSetV1; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): GeneralizedTransactionSet; + + static write(value: GeneralizedTransactionSet, io: Buffer): void; + + static isValid(value: GeneralizedTransactionSet): boolean; + + static toXDR(value: GeneralizedTransactionSet): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): GeneralizedTransactionSet; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): GeneralizedTransactionSet; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryEntryExt { + switch(): number; + + generalizedTxSet( + value?: GeneralizedTransactionSet + ): GeneralizedTransactionSet; + + static 0(): TransactionHistoryEntryExt; + + static 1(value: GeneralizedTransactionSet): TransactionHistoryEntryExt; + + value(): GeneralizedTransactionSet | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryEntryExt; + + static write(value: TransactionHistoryEntryExt, io: Buffer): void; + + static isValid(value: TransactionHistoryEntryExt): boolean; + + static toXDR(value: TransactionHistoryEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionHistoryEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntryExt { + switch(): number; + + static 0(): TransactionHistoryResultEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntryExt; + + static write(value: TransactionHistoryResultEntryExt, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntryExt): boolean; + + static toXDR(value: TransactionHistoryResultEntryExt): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionHistoryResultEntryV2Ext { + switch(): number; + + static 0(): TransactionHistoryResultEntryV2Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionHistoryResultEntryV2Ext; + + static write(value: TransactionHistoryResultEntryV2Ext, io: Buffer): void; + + static isValid(value: TransactionHistoryResultEntryV2Ext): boolean; + + static toXDR(value: TransactionHistoryResultEntryV2Ext): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionHistoryResultEntryV2Ext; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionHistoryResultEntryV2Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerHeaderHistoryEntryExt { + switch(): number; + + static 0(): LedgerHeaderHistoryEntryExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerHeaderHistoryEntryExt; + + static write(value: LedgerHeaderHistoryEntryExt, io: Buffer): void; + + static isValid(value: LedgerHeaderHistoryEntryExt): boolean; + + static toXDR(value: LedgerHeaderHistoryEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerHeaderHistoryEntryExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LedgerHeaderHistoryEntryExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScpHistoryEntry { + switch(): number; + + v0(value?: ScpHistoryEntryV0): ScpHistoryEntryV0; + + static 0(value: ScpHistoryEntryV0): ScpHistoryEntry; + + value(): ScpHistoryEntryV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScpHistoryEntry; + + static write(value: ScpHistoryEntry, io: Buffer): void; + + static isValid(value: ScpHistoryEntry): boolean; + + static toXDR(value: ScpHistoryEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScpHistoryEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ScpHistoryEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerEntryChange { + switch(): LedgerEntryChangeType; + + created(value?: LedgerEntry): LedgerEntry; + + updated(value?: LedgerEntry): LedgerEntry; + + removed(value?: LedgerKey): LedgerKey; + + state(value?: LedgerEntry): LedgerEntry; + + static ledgerEntryCreated(value: LedgerEntry): LedgerEntryChange; + + static ledgerEntryUpdated(value: LedgerEntry): LedgerEntryChange; + + static ledgerEntryRemoved(value: LedgerKey): LedgerEntryChange; + + static ledgerEntryState(value: LedgerEntry): LedgerEntryChange; + + value(): LedgerEntry | LedgerEntry | LedgerKey | LedgerEntry; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerEntryChange; + + static write(value: LedgerEntryChange, io: Buffer): void; + + static isValid(value: LedgerEntryChange): boolean; + + static toXDR(value: LedgerEntryChange): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerEntryChange; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerEntryChange; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractEventBody { + switch(): number; + + v0(value?: ContractEventV0): ContractEventV0; + + static 0(value: ContractEventV0): ContractEventBody; + + value(): ContractEventV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractEventBody; + + static write(value: ContractEventBody, io: Buffer): void; + + static isValid(value: ContractEventBody): boolean; + + static toXDR(value: ContractEventBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractEventBody; + + static fromXDR(input: string, format: "hex" | "base64"): ContractEventBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionMeta { + switch(): number; + + operations(value?: OperationMeta[]): OperationMeta[]; + + v1(value?: TransactionMetaV1): TransactionMetaV1; + + v2(value?: TransactionMetaV2): TransactionMetaV2; + + v3(value?: TransactionMetaV3): TransactionMetaV3; + + static 0(value: OperationMeta[]): TransactionMeta; + + static 1(value: TransactionMetaV1): TransactionMeta; + + static 2(value: TransactionMetaV2): TransactionMeta; + + static 3(value: TransactionMetaV3): TransactionMeta; + + value(): + | OperationMeta[] + | TransactionMetaV1 + | TransactionMetaV2 + | TransactionMetaV3; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionMeta; + + static write(value: TransactionMeta, io: Buffer): void; + + static isValid(value: TransactionMeta): boolean; + + static toXDR(value: TransactionMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionMeta; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LedgerCloseMeta { + switch(): number; + + v0(value?: LedgerCloseMetaV0): LedgerCloseMetaV0; + + v1(value?: LedgerCloseMetaV1): LedgerCloseMetaV1; + + v2(value?: LedgerCloseMetaV2): LedgerCloseMetaV2; + + static 0(value: LedgerCloseMetaV0): LedgerCloseMeta; + + static 1(value: LedgerCloseMetaV1): LedgerCloseMeta; + + static 2(value: LedgerCloseMetaV2): LedgerCloseMeta; + + value(): LedgerCloseMetaV0 | LedgerCloseMetaV1 | LedgerCloseMetaV2; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LedgerCloseMeta; + + static write(value: LedgerCloseMeta, io: Buffer): void; + + static isValid(value: LedgerCloseMeta): boolean; + + static toXDR(value: LedgerCloseMeta): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LedgerCloseMeta; + + static fromXDR(input: string, format: "hex" | "base64"): LedgerCloseMeta; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PeerAddressIp { + switch(): IpAddrType; + + ipv4(value?: Buffer): Buffer; + + ipv6(value?: Buffer): Buffer; + + static iPv4(value: Buffer): PeerAddressIp; + + static iPv6(value: Buffer): PeerAddressIp; + + value(): Buffer | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PeerAddressIp; + + static write(value: PeerAddressIp, io: Buffer): void; + + static isValid(value: PeerAddressIp): boolean; + + static toXDR(value: PeerAddressIp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PeerAddressIp; + + static fromXDR(input: string, format: "hex" | "base64"): PeerAddressIp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SurveyResponseBody { + switch(): SurveyMessageResponseType; + + topologyResponseBodyV0( + value?: TopologyResponseBodyV0 + ): TopologyResponseBodyV0; + + topologyResponseBodyV1( + value?: TopologyResponseBodyV1 + ): TopologyResponseBodyV1; + + static surveyTopologyResponseV0( + value: TopologyResponseBodyV0 + ): SurveyResponseBody; + + static surveyTopologyResponseV1( + value: TopologyResponseBodyV1 + ): SurveyResponseBody; + + value(): TopologyResponseBodyV0 | TopologyResponseBodyV1; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SurveyResponseBody; + + static write(value: SurveyResponseBody, io: Buffer): void; + + static isValid(value: SurveyResponseBody): boolean; + + static toXDR(value: SurveyResponseBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SurveyResponseBody; + + static fromXDR(input: string, format: "hex" | "base64"): SurveyResponseBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class StellarMessage { + switch(): MessageType; + + error(value?: Error): Error; + + hello(value?: Hello): Hello; + + auth(value?: Auth): Auth; + + dontHave(value?: DontHave): DontHave; + + peers(value?: PeerAddress[]): PeerAddress[]; + + txSetHash(value?: Buffer): Buffer; + + txSet(value?: TransactionSet): TransactionSet; + + generalizedTxSet( + value?: GeneralizedTransactionSet + ): GeneralizedTransactionSet; + + transaction(value?: TransactionEnvelope): TransactionEnvelope; + + signedSurveyRequestMessage( + value?: SignedSurveyRequestMessage + ): SignedSurveyRequestMessage; + + signedSurveyResponseMessage( + value?: SignedSurveyResponseMessage + ): SignedSurveyResponseMessage; + + qSetHash(value?: Buffer): Buffer; + + qSet(value?: ScpQuorumSet): ScpQuorumSet; + + envelope(value?: ScpEnvelope): ScpEnvelope; + + getScpLedgerSeq(value?: number): number; + + sendMoreMessage(value?: SendMore): SendMore; + + floodAdvert(value?: FloodAdvert): FloodAdvert; + + floodDemand(value?: FloodDemand): FloodDemand; + + static errorMsg(value: Error): StellarMessage; + + static hello(value: Hello): StellarMessage; + + static auth(value: Auth): StellarMessage; + + static dontHave(value: DontHave): StellarMessage; + + static getPeers(): StellarMessage; + + static peers(value: PeerAddress[]): StellarMessage; + + static getTxSet(value: Buffer): StellarMessage; + + static txSet(value: TransactionSet): StellarMessage; + + static generalizedTxSet(value: GeneralizedTransactionSet): StellarMessage; + + static transaction(value: TransactionEnvelope): StellarMessage; + + static surveyRequest(value: SignedSurveyRequestMessage): StellarMessage; + + static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; + + static getScpQuorumset(value: Buffer): StellarMessage; + + static scpQuorumset(value: ScpQuorumSet): StellarMessage; + + static scpMessage(value: ScpEnvelope): StellarMessage; + + static getScpState(value: number): StellarMessage; + + static sendMore(value: SendMore): StellarMessage; + + static floodAdvert(value: FloodAdvert): StellarMessage; + + static floodDemand(value: FloodDemand): StellarMessage; + + value(): + | Error + | Hello + | Auth + | DontHave + | PeerAddress[] + | Buffer + | TransactionSet + | GeneralizedTransactionSet + | TransactionEnvelope + | SignedSurveyRequestMessage + | SignedSurveyResponseMessage + | Buffer + | ScpQuorumSet + | ScpEnvelope + | number + | SendMore + | FloodAdvert + | FloodDemand + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): StellarMessage; + + static write(value: StellarMessage, io: Buffer): void; + + static isValid(value: StellarMessage): boolean; + + static toXDR(value: StellarMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): StellarMessage; + + static fromXDR(input: string, format: "hex" | "base64"): StellarMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AuthenticatedMessage { + switch(): number; + + v0(value?: AuthenticatedMessageV0): AuthenticatedMessageV0; + + static 0(value: AuthenticatedMessageV0): AuthenticatedMessage; + + value(): AuthenticatedMessageV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AuthenticatedMessage; + + static write(value: AuthenticatedMessage, io: Buffer): void; + + static isValid(value: AuthenticatedMessage): boolean; + + static toXDR(value: AuthenticatedMessage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AuthenticatedMessage; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): AuthenticatedMessage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolParameters { + switch(): LiquidityPoolType; + + constantProduct( + value?: LiquidityPoolConstantProductParameters + ): LiquidityPoolConstantProductParameters; + + static liquidityPoolConstantProduct( + value: LiquidityPoolConstantProductParameters + ): LiquidityPoolParameters; + + value(): LiquidityPoolConstantProductParameters; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolParameters; + + static write(value: LiquidityPoolParameters, io: Buffer): void; + + static isValid(value: LiquidityPoolParameters): boolean; + + static toXDR(value: LiquidityPoolParameters): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolParameters; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolParameters; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class MuxedAccount { + switch(): CryptoKeyType; + + ed25519(value?: Buffer): Buffer; + + med25519(value?: MuxedAccountMed25519): MuxedAccountMed25519; + + static keyTypeEd25519(value: Buffer): MuxedAccount; + + static keyTypeMuxedEd25519(value: MuxedAccountMed25519): MuxedAccount; + + value(): Buffer | MuxedAccountMed25519; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): MuxedAccount; + + static write(value: MuxedAccount, io: Buffer): void; + + static isValid(value: MuxedAccount): boolean; + + static toXDR(value: MuxedAccount): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): MuxedAccount; + + static fromXDR(input: string, format: "hex" | "base64"): MuxedAccount; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustAsset { + switch(): AssetType; + + alphaNum4(value?: AlphaNum4): AlphaNum4; + + alphaNum12(value?: AlphaNum12): AlphaNum12; + + liquidityPool(value?: LiquidityPoolParameters): LiquidityPoolParameters; + + static assetTypeNative(): ChangeTrustAsset; + + static assetTypeCreditAlphanum4(value: AlphaNum4): ChangeTrustAsset; + + static assetTypeCreditAlphanum12(value: AlphaNum12): ChangeTrustAsset; + + static assetTypePoolShare(value: LiquidityPoolParameters): ChangeTrustAsset; + + value(): AlphaNum4 | AlphaNum12 | LiquidityPoolParameters | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustAsset; + + static write(value: ChangeTrustAsset, io: Buffer): void; + + static isValid(value: ChangeTrustAsset): boolean; + + static toXDR(value: ChangeTrustAsset): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustAsset; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustAsset; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipOp { + switch(): RevokeSponsorshipType; + + ledgerKey(value?: LedgerKey): LedgerKey; + + signer(value?: RevokeSponsorshipOpSigner): RevokeSponsorshipOpSigner; + + static revokeSponsorshipLedgerEntry(value: LedgerKey): RevokeSponsorshipOp; + + static revokeSponsorshipSigner( + value: RevokeSponsorshipOpSigner + ): RevokeSponsorshipOp; + + value(): LedgerKey | RevokeSponsorshipOpSigner; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipOp; + + static write(value: RevokeSponsorshipOp, io: Buffer): void; + + static isValid(value: RevokeSponsorshipOp): boolean; + + static toXDR(value: RevokeSponsorshipOp): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipOp; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipOp; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ContractId { + switch(): ContractIdType; + + salt(value?: Buffer): Buffer; + + fromEd25519PublicKey( + value?: ContractIdFromEd25519PublicKey + ): ContractIdFromEd25519PublicKey; + + asset(value?: Asset): Asset; + + static contractIdFromSourceAccount(value: Buffer): ContractId; + + static contractIdFromEd25519PublicKey( + value: ContractIdFromEd25519PublicKey + ): ContractId; + + static contractIdFromAsset(value: Asset): ContractId; + + value(): Buffer | ContractIdFromEd25519PublicKey | Asset; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ContractId; + + static write(value: ContractId, io: Buffer): void; + + static isValid(value: ContractId): boolean; + + static toXDR(value: ContractId): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ContractId; + + static fromXDR(input: string, format: "hex" | "base64"): ContractId; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HostFunction { + switch(): HostFunctionType; + + invokeArgs(value?: ScVal[]): ScVal[]; + + createContractArgs(value?: CreateContractArgs): CreateContractArgs; + + installContractCodeArgs( + value?: InstallContractCodeArgs + ): InstallContractCodeArgs; + + static hostFunctionTypeInvokeContract(value: ScVal[]): HostFunction; + + static hostFunctionTypeCreateContract( + value: CreateContractArgs + ): HostFunction; + + static hostFunctionTypeInstallContractCode( + value: InstallContractCodeArgs + ): HostFunction; + + value(): ScVal[] | CreateContractArgs | InstallContractCodeArgs; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HostFunction; + + static write(value: HostFunction, io: Buffer): void; + + static isValid(value: HostFunction): boolean; + + static toXDR(value: HostFunction): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HostFunction; + + static fromXDR(input: string, format: "hex" | "base64"): HostFunction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationBody { + switch(): OperationType; + + createAccountOp(value?: CreateAccountOp): CreateAccountOp; + + paymentOp(value?: PaymentOp): PaymentOp; + + pathPaymentStrictReceiveOp( + value?: PathPaymentStrictReceiveOp + ): PathPaymentStrictReceiveOp; + + manageSellOfferOp(value?: ManageSellOfferOp): ManageSellOfferOp; + + createPassiveSellOfferOp( + value?: CreatePassiveSellOfferOp + ): CreatePassiveSellOfferOp; + + setOptionsOp(value?: SetOptionsOp): SetOptionsOp; + + changeTrustOp(value?: ChangeTrustOp): ChangeTrustOp; + + allowTrustOp(value?: AllowTrustOp): AllowTrustOp; + + destination(value?: MuxedAccount): MuxedAccount; + + manageDataOp(value?: ManageDataOp): ManageDataOp; + + bumpSequenceOp(value?: BumpSequenceOp): BumpSequenceOp; + + manageBuyOfferOp(value?: ManageBuyOfferOp): ManageBuyOfferOp; + + pathPaymentStrictSendOp( + value?: PathPaymentStrictSendOp + ): PathPaymentStrictSendOp; + + createClaimableBalanceOp( + value?: CreateClaimableBalanceOp + ): CreateClaimableBalanceOp; + + claimClaimableBalanceOp( + value?: ClaimClaimableBalanceOp + ): ClaimClaimableBalanceOp; + + beginSponsoringFutureReservesOp( + value?: BeginSponsoringFutureReservesOp + ): BeginSponsoringFutureReservesOp; + + revokeSponsorshipOp(value?: RevokeSponsorshipOp): RevokeSponsorshipOp; + + clawbackOp(value?: ClawbackOp): ClawbackOp; + + clawbackClaimableBalanceOp( + value?: ClawbackClaimableBalanceOp + ): ClawbackClaimableBalanceOp; + + setTrustLineFlagsOp(value?: SetTrustLineFlagsOp): SetTrustLineFlagsOp; + + liquidityPoolDepositOp( + value?: LiquidityPoolDepositOp + ): LiquidityPoolDepositOp; + + liquidityPoolWithdrawOp( + value?: LiquidityPoolWithdrawOp + ): LiquidityPoolWithdrawOp; + + invokeHostFunctionOp(value?: InvokeHostFunctionOp): InvokeHostFunctionOp; + + static createAccount(value: CreateAccountOp): OperationBody; + + static payment(value: PaymentOp): OperationBody; + + static pathPaymentStrictReceive( + value: PathPaymentStrictReceiveOp + ): OperationBody; + + static manageSellOffer(value: ManageSellOfferOp): OperationBody; + + static createPassiveSellOffer( + value: CreatePassiveSellOfferOp + ): OperationBody; + + static setOptions(value: SetOptionsOp): OperationBody; + + static changeTrust(value: ChangeTrustOp): OperationBody; + + static allowTrust(value: AllowTrustOp): OperationBody; + + static accountMerge(value: MuxedAccount): OperationBody; + + static inflation(): OperationBody; + + static manageData(value: ManageDataOp): OperationBody; + + static bumpSequence(value: BumpSequenceOp): OperationBody; + + static manageBuyOffer(value: ManageBuyOfferOp): OperationBody; + + static pathPaymentStrictSend(value: PathPaymentStrictSendOp): OperationBody; + + static createClaimableBalance( + value: CreateClaimableBalanceOp + ): OperationBody; + + static claimClaimableBalance(value: ClaimClaimableBalanceOp): OperationBody; + + static beginSponsoringFutureReserves( + value: BeginSponsoringFutureReservesOp + ): OperationBody; + + static endSponsoringFutureReserves(): OperationBody; + + static revokeSponsorship(value: RevokeSponsorshipOp): OperationBody; + + static clawback(value: ClawbackOp): OperationBody; + + static clawbackClaimableBalance( + value: ClawbackClaimableBalanceOp + ): OperationBody; + + static setTrustLineFlags(value: SetTrustLineFlagsOp): OperationBody; + + static liquidityPoolDeposit(value: LiquidityPoolDepositOp): OperationBody; + + static liquidityPoolWithdraw(value: LiquidityPoolWithdrawOp): OperationBody; + + static invokeHostFunction(value: InvokeHostFunctionOp): OperationBody; + + value(): + | CreateAccountOp + | PaymentOp + | PathPaymentStrictReceiveOp + | ManageSellOfferOp + | CreatePassiveSellOfferOp + | SetOptionsOp + | ChangeTrustOp + | AllowTrustOp + | MuxedAccount + | ManageDataOp + | BumpSequenceOp + | ManageBuyOfferOp + | PathPaymentStrictSendOp + | CreateClaimableBalanceOp + | ClaimClaimableBalanceOp + | BeginSponsoringFutureReservesOp + | RevokeSponsorshipOp + | ClawbackOp + | ClawbackClaimableBalanceOp + | SetTrustLineFlagsOp + | LiquidityPoolDepositOp + | LiquidityPoolWithdrawOp + | InvokeHostFunctionOp + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationBody; + + static write(value: OperationBody, io: Buffer): void; + + static isValid(value: OperationBody): boolean; + + static toXDR(value: OperationBody): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationBody; + + static fromXDR(input: string, format: "hex" | "base64"): OperationBody; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class HashIdPreimage { + switch(): EnvelopeType; + + operationId(value?: HashIdPreimageOperationId): HashIdPreimageOperationId; + + revokeId(value?: HashIdPreimageRevokeId): HashIdPreimageRevokeId; + + ed25519ContractId( + value?: HashIdPreimageEd25519ContractId + ): HashIdPreimageEd25519ContractId; + + contractId(value?: HashIdPreimageContractId): HashIdPreimageContractId; + + fromAsset(value?: HashIdPreimageFromAsset): HashIdPreimageFromAsset; + + sourceAccountContractId( + value?: HashIdPreimageSourceAccountContractId + ): HashIdPreimageSourceAccountContractId; + + createContractArgs( + value?: HashIdPreimageCreateContractArgs + ): HashIdPreimageCreateContractArgs; + + contractAuth( + value?: HashIdPreimageContractAuth + ): HashIdPreimageContractAuth; + + static envelopeTypeOpId(value: HashIdPreimageOperationId): HashIdPreimage; + + static envelopeTypePoolRevokeOpId( + value: HashIdPreimageRevokeId + ): HashIdPreimage; + + static envelopeTypeContractIdFromEd25519( + value: HashIdPreimageEd25519ContractId + ): HashIdPreimage; + + static envelopeTypeContractIdFromContract( + value: HashIdPreimageContractId + ): HashIdPreimage; + + static envelopeTypeContractIdFromAsset( + value: HashIdPreimageFromAsset + ): HashIdPreimage; + + static envelopeTypeContractIdFromSourceAccount( + value: HashIdPreimageSourceAccountContractId + ): HashIdPreimage; + + static envelopeTypeCreateContractArgs( + value: HashIdPreimageCreateContractArgs + ): HashIdPreimage; + + static envelopeTypeContractAuth( + value: HashIdPreimageContractAuth + ): HashIdPreimage; + + value(): + | HashIdPreimageOperationId + | HashIdPreimageRevokeId + | HashIdPreimageEd25519ContractId + | HashIdPreimageContractId + | HashIdPreimageFromAsset + | HashIdPreimageSourceAccountContractId + | HashIdPreimageCreateContractArgs + | HashIdPreimageContractAuth; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): HashIdPreimage; + + static write(value: HashIdPreimage, io: Buffer): void; + + static isValid(value: HashIdPreimage): boolean; + + static toXDR(value: HashIdPreimage): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): HashIdPreimage; + + static fromXDR(input: string, format: "hex" | "base64"): HashIdPreimage; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Memo { + switch(): MemoType; + + text(value?: string | Buffer): string | Buffer; + + id(value?: Uint64): Uint64; + + hash(value?: Buffer): Buffer; + + retHash(value?: Buffer): Buffer; + + static memoNone(): Memo; + + static memoText(value: string | Buffer): Memo; + + static memoId(value: Uint64): Memo; + + static memoHash(value: Buffer): Memo; + + static memoReturn(value: Buffer): Memo; + + value(): string | Buffer | Uint64 | Buffer | Buffer | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Memo; + + static write(value: Memo, io: Buffer): void; + + static isValid(value: Memo): boolean; + + static toXDR(value: Memo): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Memo; + + static fromXDR(input: string, format: "hex" | "base64"): Memo; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class Preconditions { + switch(): PreconditionType; + + timeBounds(value?: TimeBounds): TimeBounds; + + v2(value?: PreconditionsV2): PreconditionsV2; + + static precondNone(): Preconditions; + + static precondTime(value: TimeBounds): Preconditions; + + static precondV2(value: PreconditionsV2): Preconditions; + + value(): TimeBounds | PreconditionsV2 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): Preconditions; + + static write(value: Preconditions, io: Buffer): void; + + static isValid(value: Preconditions): boolean; + + static toXDR(value: Preconditions): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): Preconditions; + + static fromXDR(input: string, format: "hex" | "base64"): Preconditions; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionV0Ext { + switch(): number; + + static 0(): TransactionV0Ext; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionV0Ext; + + static write(value: TransactionV0Ext, io: Buffer): void; + + static isValid(value: TransactionV0Ext): boolean; + + static toXDR(value: TransactionV0Ext): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionV0Ext; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionV0Ext; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionExt { + switch(): number; + + static 0(): TransactionExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionExt; + + static write(value: TransactionExt, io: Buffer): void; + + static isValid(value: TransactionExt): boolean; + + static toXDR(value: TransactionExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionExt; + + static fromXDR(input: string, format: "hex" | "base64"): TransactionExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionInnerTx { + switch(): EnvelopeType; + + v1(value?: TransactionV1Envelope): TransactionV1Envelope; + + static envelopeTypeTx( + value: TransactionV1Envelope + ): FeeBumpTransactionInnerTx; + + value(): TransactionV1Envelope; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionInnerTx; + + static write(value: FeeBumpTransactionInnerTx, io: Buffer): void; + + static isValid(value: FeeBumpTransactionInnerTx): boolean; + + static toXDR(value: FeeBumpTransactionInnerTx): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionInnerTx; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionInnerTx; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class FeeBumpTransactionExt { + switch(): number; + + static 0(): FeeBumpTransactionExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): FeeBumpTransactionExt; + + static write(value: FeeBumpTransactionExt, io: Buffer): void; + + static isValid(value: FeeBumpTransactionExt): boolean; + + static toXDR(value: FeeBumpTransactionExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): FeeBumpTransactionExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): FeeBumpTransactionExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionEnvelope { + switch(): EnvelopeType; + + v0(value?: TransactionV0Envelope): TransactionV0Envelope; + + v1(value?: TransactionV1Envelope): TransactionV1Envelope; + + feeBump(value?: FeeBumpTransactionEnvelope): FeeBumpTransactionEnvelope; + + static envelopeTypeTxV0(value: TransactionV0Envelope): TransactionEnvelope; + + static envelopeTypeTx(value: TransactionV1Envelope): TransactionEnvelope; + + static envelopeTypeTxFeeBump( + value: FeeBumpTransactionEnvelope + ): TransactionEnvelope; + + value(): + | TransactionV0Envelope + | TransactionV1Envelope + | FeeBumpTransactionEnvelope; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionEnvelope; + + static write(value: TransactionEnvelope, io: Buffer): void; + + static isValid(value: TransactionEnvelope): boolean; + + static toXDR(value: TransactionEnvelope): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionEnvelope; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionEnvelope; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionSignaturePayloadTaggedTransaction { + switch(): EnvelopeType; + + tx(value?: Transaction): Transaction; + + feeBump(value?: FeeBumpTransaction): FeeBumpTransaction; + + static envelopeTypeTx( + value: Transaction + ): TransactionSignaturePayloadTaggedTransaction; + + static envelopeTypeTxFeeBump( + value: FeeBumpTransaction + ): TransactionSignaturePayloadTaggedTransaction; + + value(): Transaction | FeeBumpTransaction; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionSignaturePayloadTaggedTransaction; + + static write( + value: TransactionSignaturePayloadTaggedTransaction, + io: Buffer + ): void; + + static isValid( + value: TransactionSignaturePayloadTaggedTransaction + ): boolean; + + static toXDR(value: TransactionSignaturePayloadTaggedTransaction): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): TransactionSignaturePayloadTaggedTransaction; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionSignaturePayloadTaggedTransaction; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimAtom { + switch(): ClaimAtomType; + + v0(value?: ClaimOfferAtomV0): ClaimOfferAtomV0; + + orderBook(value?: ClaimOfferAtom): ClaimOfferAtom; + + liquidityPool(value?: ClaimLiquidityAtom): ClaimLiquidityAtom; + + static claimAtomTypeV0(value: ClaimOfferAtomV0): ClaimAtom; + + static claimAtomTypeOrderBook(value: ClaimOfferAtom): ClaimAtom; + + static claimAtomTypeLiquidityPool(value: ClaimLiquidityAtom): ClaimAtom; + + value(): ClaimOfferAtomV0 | ClaimOfferAtom | ClaimLiquidityAtom; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimAtom; + + static write(value: ClaimAtom, io: Buffer): void; + + static isValid(value: ClaimAtom): boolean; + + static toXDR(value: ClaimAtom): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimAtom; + + static fromXDR(input: string, format: "hex" | "base64"): ClaimAtom; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateAccountResult { + switch(): CreateAccountResultCode; + + static createAccountSuccess(): CreateAccountResult; + + static createAccountMalformed(): CreateAccountResult; + + static createAccountUnderfunded(): CreateAccountResult; + + static createAccountLowReserve(): CreateAccountResult; + + static createAccountAlreadyExist(): CreateAccountResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateAccountResult; + + static write(value: CreateAccountResult, io: Buffer): void; + + static isValid(value: CreateAccountResult): boolean; + + static toXDR(value: CreateAccountResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateAccountResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateAccountResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PaymentResult { + switch(): PaymentResultCode; + + static paymentSuccess(): PaymentResult; + + static paymentMalformed(): PaymentResult; + + static paymentUnderfunded(): PaymentResult; + + static paymentSrcNoTrust(): PaymentResult; + + static paymentSrcNotAuthorized(): PaymentResult; + + static paymentNoDestination(): PaymentResult; + + static paymentNoTrust(): PaymentResult; + + static paymentNotAuthorized(): PaymentResult; + + static paymentLineFull(): PaymentResult; + + static paymentNoIssuer(): PaymentResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PaymentResult; + + static write(value: PaymentResult, io: Buffer): void; + + static isValid(value: PaymentResult): boolean; + + static toXDR(value: PaymentResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PaymentResult; + + static fromXDR(input: string, format: "hex" | "base64"): PaymentResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictReceiveResult { + switch(): PathPaymentStrictReceiveResultCode; + + success( + value?: PathPaymentStrictReceiveResultSuccess + ): PathPaymentStrictReceiveResultSuccess; + + noIssuer(value?: Asset): Asset; + + static pathPaymentStrictReceiveSuccess( + value: PathPaymentStrictReceiveResultSuccess + ): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveMalformed(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveUnderfunded(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveSrcNoTrust(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveSrcNotAuthorized(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoDestination(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoTrust(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNotAuthorized(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveLineFull(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveNoIssuer( + value: Asset + ): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveTooFewOffers(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveOfferCrossSelf(): PathPaymentStrictReceiveResult; + + static pathPaymentStrictReceiveOverSendmax(): PathPaymentStrictReceiveResult; + + value(): PathPaymentStrictReceiveResultSuccess | Asset | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictReceiveResult; + + static write(value: PathPaymentStrictReceiveResult, io: Buffer): void; + + static isValid(value: PathPaymentStrictReceiveResult): boolean; + + static toXDR(value: PathPaymentStrictReceiveResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): PathPaymentStrictReceiveResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictReceiveResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PathPaymentStrictSendResult { + switch(): PathPaymentStrictSendResultCode; + + success( + value?: PathPaymentStrictSendResultSuccess + ): PathPaymentStrictSendResultSuccess; + + noIssuer(value?: Asset): Asset; + + static pathPaymentStrictSendSuccess( + value: PathPaymentStrictSendResultSuccess + ): PathPaymentStrictSendResult; + + static pathPaymentStrictSendMalformed(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendUnderfunded(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendSrcNoTrust(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendSrcNotAuthorized(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoDestination(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoTrust(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNotAuthorized(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendLineFull(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendNoIssuer( + value: Asset + ): PathPaymentStrictSendResult; + + static pathPaymentStrictSendTooFewOffers(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendOfferCrossSelf(): PathPaymentStrictSendResult; + + static pathPaymentStrictSendUnderDestmin(): PathPaymentStrictSendResult; + + value(): PathPaymentStrictSendResultSuccess | Asset | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PathPaymentStrictSendResult; + + static write(value: PathPaymentStrictSendResult, io: Buffer): void; + + static isValid(value: PathPaymentStrictSendResult): boolean; + + static toXDR(value: PathPaymentStrictSendResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PathPaymentStrictSendResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): PathPaymentStrictSendResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageOfferSuccessResultOffer { + switch(): ManageOfferEffect; + + offer(value?: OfferEntry): OfferEntry; + + static manageOfferCreated(value: OfferEntry): ManageOfferSuccessResultOffer; + + static manageOfferUpdated(value: OfferEntry): ManageOfferSuccessResultOffer; + + static manageOfferDeleted(): ManageOfferSuccessResultOffer; + + value(): OfferEntry | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageOfferSuccessResultOffer; + + static write(value: ManageOfferSuccessResultOffer, io: Buffer): void; + + static isValid(value: ManageOfferSuccessResultOffer): boolean; + + static toXDR(value: ManageOfferSuccessResultOffer): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ManageOfferSuccessResultOffer; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageOfferSuccessResultOffer; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageSellOfferResult { + switch(): ManageSellOfferResultCode; + + success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; + + static manageSellOfferSuccess( + value: ManageOfferSuccessResult + ): ManageSellOfferResult; + + static manageSellOfferMalformed(): ManageSellOfferResult; + + static manageSellOfferSellNoTrust(): ManageSellOfferResult; + + static manageSellOfferBuyNoTrust(): ManageSellOfferResult; + + static manageSellOfferSellNotAuthorized(): ManageSellOfferResult; + + static manageSellOfferBuyNotAuthorized(): ManageSellOfferResult; + + static manageSellOfferLineFull(): ManageSellOfferResult; + + static manageSellOfferUnderfunded(): ManageSellOfferResult; + + static manageSellOfferCrossSelf(): ManageSellOfferResult; + + static manageSellOfferSellNoIssuer(): ManageSellOfferResult; + + static manageSellOfferBuyNoIssuer(): ManageSellOfferResult; + + static manageSellOfferNotFound(): ManageSellOfferResult; + + static manageSellOfferLowReserve(): ManageSellOfferResult; + + value(): ManageOfferSuccessResult | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageSellOfferResult; + + static write(value: ManageSellOfferResult, io: Buffer): void; + + static isValid(value: ManageSellOfferResult): boolean; + + static toXDR(value: ManageSellOfferResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageSellOfferResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageSellOfferResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageBuyOfferResult { + switch(): ManageBuyOfferResultCode; + + success(value?: ManageOfferSuccessResult): ManageOfferSuccessResult; + + static manageBuyOfferSuccess( + value: ManageOfferSuccessResult + ): ManageBuyOfferResult; + + static manageBuyOfferMalformed(): ManageBuyOfferResult; + + static manageBuyOfferSellNoTrust(): ManageBuyOfferResult; + + static manageBuyOfferBuyNoTrust(): ManageBuyOfferResult; + + static manageBuyOfferSellNotAuthorized(): ManageBuyOfferResult; + + static manageBuyOfferBuyNotAuthorized(): ManageBuyOfferResult; + + static manageBuyOfferLineFull(): ManageBuyOfferResult; + + static manageBuyOfferUnderfunded(): ManageBuyOfferResult; + + static manageBuyOfferCrossSelf(): ManageBuyOfferResult; + + static manageBuyOfferSellNoIssuer(): ManageBuyOfferResult; + + static manageBuyOfferBuyNoIssuer(): ManageBuyOfferResult; + + static manageBuyOfferNotFound(): ManageBuyOfferResult; + + static manageBuyOfferLowReserve(): ManageBuyOfferResult; + + value(): ManageOfferSuccessResult | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageBuyOfferResult; + + static write(value: ManageBuyOfferResult, io: Buffer): void; + + static isValid(value: ManageBuyOfferResult): boolean; + + static toXDR(value: ManageBuyOfferResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageBuyOfferResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ManageBuyOfferResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetOptionsResult { + switch(): SetOptionsResultCode; + + static setOptionsSuccess(): SetOptionsResult; + + static setOptionsLowReserve(): SetOptionsResult; + + static setOptionsTooManySigners(): SetOptionsResult; + + static setOptionsBadFlags(): SetOptionsResult; + + static setOptionsInvalidInflation(): SetOptionsResult; + + static setOptionsCantChange(): SetOptionsResult; + + static setOptionsUnknownFlag(): SetOptionsResult; + + static setOptionsThresholdOutOfRange(): SetOptionsResult; + + static setOptionsBadSigner(): SetOptionsResult; + + static setOptionsInvalidHomeDomain(): SetOptionsResult; + + static setOptionsAuthRevocableRequired(): SetOptionsResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetOptionsResult; + + static write(value: SetOptionsResult, io: Buffer): void; + + static isValid(value: SetOptionsResult): boolean; + + static toXDR(value: SetOptionsResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetOptionsResult; + + static fromXDR(input: string, format: "hex" | "base64"): SetOptionsResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ChangeTrustResult { + switch(): ChangeTrustResultCode; + + static changeTrustSuccess(): ChangeTrustResult; + + static changeTrustMalformed(): ChangeTrustResult; + + static changeTrustNoIssuer(): ChangeTrustResult; + + static changeTrustInvalidLimit(): ChangeTrustResult; + + static changeTrustLowReserve(): ChangeTrustResult; + + static changeTrustSelfNotAllowed(): ChangeTrustResult; + + static changeTrustTrustLineMissing(): ChangeTrustResult; + + static changeTrustCannotDelete(): ChangeTrustResult; + + static changeTrustNotAuthMaintainLiabilities(): ChangeTrustResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ChangeTrustResult; + + static write(value: ChangeTrustResult, io: Buffer): void; + + static isValid(value: ChangeTrustResult): boolean; + + static toXDR(value: ChangeTrustResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ChangeTrustResult; + + static fromXDR(input: string, format: "hex" | "base64"): ChangeTrustResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AllowTrustResult { + switch(): AllowTrustResultCode; + + static allowTrustSuccess(): AllowTrustResult; + + static allowTrustMalformed(): AllowTrustResult; + + static allowTrustNoTrustLine(): AllowTrustResult; + + static allowTrustTrustNotRequired(): AllowTrustResult; + + static allowTrustCantRevoke(): AllowTrustResult; + + static allowTrustSelfNotAllowed(): AllowTrustResult; + + static allowTrustLowReserve(): AllowTrustResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AllowTrustResult; + + static write(value: AllowTrustResult, io: Buffer): void; + + static isValid(value: AllowTrustResult): boolean; + + static toXDR(value: AllowTrustResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AllowTrustResult; + + static fromXDR(input: string, format: "hex" | "base64"): AllowTrustResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class AccountMergeResult { + switch(): AccountMergeResultCode; + + sourceAccountBalance(value?: Int64): Int64; + + static accountMergeSuccess(value: Int64): AccountMergeResult; + + static accountMergeMalformed(): AccountMergeResult; + + static accountMergeNoAccount(): AccountMergeResult; + + static accountMergeImmutableSet(): AccountMergeResult; + + static accountMergeHasSubEntries(): AccountMergeResult; + + static accountMergeSeqnumTooFar(): AccountMergeResult; + + static accountMergeDestFull(): AccountMergeResult; + + static accountMergeIsSponsor(): AccountMergeResult; + + value(): Int64 | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): AccountMergeResult; + + static write(value: AccountMergeResult, io: Buffer): void; + + static isValid(value: AccountMergeResult): boolean; + + static toXDR(value: AccountMergeResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): AccountMergeResult; + + static fromXDR(input: string, format: "hex" | "base64"): AccountMergeResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InflationResult { + switch(): InflationResultCode; + + payouts(value?: InflationPayout[]): InflationPayout[]; + + static inflationSuccess(value: InflationPayout[]): InflationResult; + + static inflationNotTime(): InflationResult; + + value(): InflationPayout[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InflationResult; + + static write(value: InflationResult, io: Buffer): void; + + static isValid(value: InflationResult): boolean; + + static toXDR(value: InflationResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InflationResult; + + static fromXDR(input: string, format: "hex" | "base64"): InflationResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ManageDataResult { + switch(): ManageDataResultCode; + + static manageDataSuccess(): ManageDataResult; + + static manageDataNotSupportedYet(): ManageDataResult; + + static manageDataNameNotFound(): ManageDataResult; + + static manageDataLowReserve(): ManageDataResult; + + static manageDataInvalidName(): ManageDataResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ManageDataResult; + + static write(value: ManageDataResult, io: Buffer): void; + + static isValid(value: ManageDataResult): boolean; + + static toXDR(value: ManageDataResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ManageDataResult; + + static fromXDR(input: string, format: "hex" | "base64"): ManageDataResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BumpSequenceResult { + switch(): BumpSequenceResultCode; + + static bumpSequenceSuccess(): BumpSequenceResult; + + static bumpSequenceBadSeq(): BumpSequenceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BumpSequenceResult; + + static write(value: BumpSequenceResult, io: Buffer): void; + + static isValid(value: BumpSequenceResult): boolean; + + static toXDR(value: BumpSequenceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): BumpSequenceResult; + + static fromXDR(input: string, format: "hex" | "base64"): BumpSequenceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class CreateClaimableBalanceResult { + switch(): CreateClaimableBalanceResultCode; + + balanceId(value?: ClaimableBalanceId): ClaimableBalanceId; + + static createClaimableBalanceSuccess( + value: ClaimableBalanceId + ): CreateClaimableBalanceResult; + + static createClaimableBalanceMalformed(): CreateClaimableBalanceResult; + + static createClaimableBalanceLowReserve(): CreateClaimableBalanceResult; + + static createClaimableBalanceNoTrust(): CreateClaimableBalanceResult; + + static createClaimableBalanceNotAuthorized(): CreateClaimableBalanceResult; + + static createClaimableBalanceUnderfunded(): CreateClaimableBalanceResult; + + value(): ClaimableBalanceId | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): CreateClaimableBalanceResult; + + static write(value: CreateClaimableBalanceResult, io: Buffer): void; + + static isValid(value: CreateClaimableBalanceResult): boolean; + + static toXDR(value: CreateClaimableBalanceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): CreateClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): CreateClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClaimClaimableBalanceResult { + switch(): ClaimClaimableBalanceResultCode; + + static claimClaimableBalanceSuccess(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceDoesNotExist(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceCannotClaim(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceLineFull(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceNoTrust(): ClaimClaimableBalanceResult; + + static claimClaimableBalanceNotAuthorized(): ClaimClaimableBalanceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClaimClaimableBalanceResult; + + static write(value: ClaimClaimableBalanceResult, io: Buffer): void; + + static isValid(value: ClaimClaimableBalanceResult): boolean; + + static toXDR(value: ClaimClaimableBalanceResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClaimClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClaimClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class BeginSponsoringFutureReservesResult { + switch(): BeginSponsoringFutureReservesResultCode; + + static beginSponsoringFutureReservesSuccess(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesMalformed(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesAlreadySponsored(): BeginSponsoringFutureReservesResult; + + static beginSponsoringFutureReservesRecursive(): BeginSponsoringFutureReservesResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): BeginSponsoringFutureReservesResult; + + static write(value: BeginSponsoringFutureReservesResult, io: Buffer): void; + + static isValid(value: BeginSponsoringFutureReservesResult): boolean; + + static toXDR(value: BeginSponsoringFutureReservesResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): BeginSponsoringFutureReservesResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): BeginSponsoringFutureReservesResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class EndSponsoringFutureReservesResult { + switch(): EndSponsoringFutureReservesResultCode; + + static endSponsoringFutureReservesSuccess(): EndSponsoringFutureReservesResult; + + static endSponsoringFutureReservesNotSponsored(): EndSponsoringFutureReservesResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): EndSponsoringFutureReservesResult; + + static write(value: EndSponsoringFutureReservesResult, io: Buffer): void; + + static isValid(value: EndSponsoringFutureReservesResult): boolean; + + static toXDR(value: EndSponsoringFutureReservesResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): EndSponsoringFutureReservesResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): EndSponsoringFutureReservesResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class RevokeSponsorshipResult { + switch(): RevokeSponsorshipResultCode; + + static revokeSponsorshipSuccess(): RevokeSponsorshipResult; + + static revokeSponsorshipDoesNotExist(): RevokeSponsorshipResult; + + static revokeSponsorshipNotSponsor(): RevokeSponsorshipResult; + + static revokeSponsorshipLowReserve(): RevokeSponsorshipResult; + + static revokeSponsorshipOnlyTransferable(): RevokeSponsorshipResult; + + static revokeSponsorshipMalformed(): RevokeSponsorshipResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): RevokeSponsorshipResult; + + static write(value: RevokeSponsorshipResult, io: Buffer): void; + + static isValid(value: RevokeSponsorshipResult): boolean; + + static toXDR(value: RevokeSponsorshipResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): RevokeSponsorshipResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): RevokeSponsorshipResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackResult { + switch(): ClawbackResultCode; + + static clawbackSuccess(): ClawbackResult; + + static clawbackMalformed(): ClawbackResult; + + static clawbackNotClawbackEnabled(): ClawbackResult; + + static clawbackNoTrust(): ClawbackResult; + + static clawbackUnderfunded(): ClawbackResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackResult; + + static write(value: ClawbackResult, io: Buffer): void; + + static isValid(value: ClawbackResult): boolean; + + static toXDR(value: ClawbackResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ClawbackResult; + + static fromXDR(input: string, format: "hex" | "base64"): ClawbackResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ClawbackClaimableBalanceResult { + switch(): ClawbackClaimableBalanceResultCode; + + static clawbackClaimableBalanceSuccess(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceDoesNotExist(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceNotIssuer(): ClawbackClaimableBalanceResult; + + static clawbackClaimableBalanceNotClawbackEnabled(): ClawbackClaimableBalanceResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ClawbackClaimableBalanceResult; + + static write(value: ClawbackClaimableBalanceResult, io: Buffer): void; + + static isValid(value: ClawbackClaimableBalanceResult): boolean; + + static toXDR(value: ClawbackClaimableBalanceResult): Buffer; + + static fromXDR( + input: Buffer, + format?: "raw" + ): ClawbackClaimableBalanceResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ClawbackClaimableBalanceResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SetTrustLineFlagsResult { + switch(): SetTrustLineFlagsResultCode; + + static setTrustLineFlagsSuccess(): SetTrustLineFlagsResult; + + static setTrustLineFlagsMalformed(): SetTrustLineFlagsResult; + + static setTrustLineFlagsNoTrustLine(): SetTrustLineFlagsResult; + + static setTrustLineFlagsCantRevoke(): SetTrustLineFlagsResult; + + static setTrustLineFlagsInvalidState(): SetTrustLineFlagsResult; + + static setTrustLineFlagsLowReserve(): SetTrustLineFlagsResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SetTrustLineFlagsResult; + + static write(value: SetTrustLineFlagsResult, io: Buffer): void; + + static isValid(value: SetTrustLineFlagsResult): boolean; + + static toXDR(value: SetTrustLineFlagsResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SetTrustLineFlagsResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): SetTrustLineFlagsResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolDepositResult { + switch(): LiquidityPoolDepositResultCode; + + static liquidityPoolDepositSuccess(): LiquidityPoolDepositResult; + + static liquidityPoolDepositMalformed(): LiquidityPoolDepositResult; + + static liquidityPoolDepositNoTrust(): LiquidityPoolDepositResult; + + static liquidityPoolDepositNotAuthorized(): LiquidityPoolDepositResult; + + static liquidityPoolDepositUnderfunded(): LiquidityPoolDepositResult; + + static liquidityPoolDepositLineFull(): LiquidityPoolDepositResult; + + static liquidityPoolDepositBadPrice(): LiquidityPoolDepositResult; + + static liquidityPoolDepositPoolFull(): LiquidityPoolDepositResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolDepositResult; + + static write(value: LiquidityPoolDepositResult, io: Buffer): void; + + static isValid(value: LiquidityPoolDepositResult): boolean; + + static toXDR(value: LiquidityPoolDepositResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolDepositResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolDepositResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class LiquidityPoolWithdrawResult { + switch(): LiquidityPoolWithdrawResultCode; + + static liquidityPoolWithdrawSuccess(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawMalformed(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawNoTrust(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawUnderfunded(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawLineFull(): LiquidityPoolWithdrawResult; + + static liquidityPoolWithdrawUnderMinimum(): LiquidityPoolWithdrawResult; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): LiquidityPoolWithdrawResult; + + static write(value: LiquidityPoolWithdrawResult, io: Buffer): void; + + static isValid(value: LiquidityPoolWithdrawResult): boolean; + + static toXDR(value: LiquidityPoolWithdrawResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): LiquidityPoolWithdrawResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): LiquidityPoolWithdrawResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InvokeHostFunctionResult { + switch(): InvokeHostFunctionResultCode; + + success(value?: ScVal): ScVal; + + static invokeHostFunctionSuccess(value: ScVal): InvokeHostFunctionResult; + + static invokeHostFunctionMalformed(): InvokeHostFunctionResult; + + static invokeHostFunctionTrapped(): InvokeHostFunctionResult; + + value(): ScVal | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InvokeHostFunctionResult; + + static write(value: InvokeHostFunctionResult, io: Buffer): void; + + static isValid(value: InvokeHostFunctionResult): boolean; + + static toXDR(value: InvokeHostFunctionResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InvokeHostFunctionResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InvokeHostFunctionResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationResultTr { + switch(): OperationType; + + createAccountResult(value?: CreateAccountResult): CreateAccountResult; + + paymentResult(value?: PaymentResult): PaymentResult; + + pathPaymentStrictReceiveResult( + value?: PathPaymentStrictReceiveResult + ): PathPaymentStrictReceiveResult; + + manageSellOfferResult(value?: ManageSellOfferResult): ManageSellOfferResult; + + createPassiveSellOfferResult( + value?: ManageSellOfferResult + ): ManageSellOfferResult; + + setOptionsResult(value?: SetOptionsResult): SetOptionsResult; + + changeTrustResult(value?: ChangeTrustResult): ChangeTrustResult; + + allowTrustResult(value?: AllowTrustResult): AllowTrustResult; + + accountMergeResult(value?: AccountMergeResult): AccountMergeResult; + + inflationResult(value?: InflationResult): InflationResult; + + manageDataResult(value?: ManageDataResult): ManageDataResult; + + bumpSeqResult(value?: BumpSequenceResult): BumpSequenceResult; + + manageBuyOfferResult(value?: ManageBuyOfferResult): ManageBuyOfferResult; + + pathPaymentStrictSendResult( + value?: PathPaymentStrictSendResult + ): PathPaymentStrictSendResult; + + createClaimableBalanceResult( + value?: CreateClaimableBalanceResult + ): CreateClaimableBalanceResult; + + claimClaimableBalanceResult( + value?: ClaimClaimableBalanceResult + ): ClaimClaimableBalanceResult; + + beginSponsoringFutureReservesResult( + value?: BeginSponsoringFutureReservesResult + ): BeginSponsoringFutureReservesResult; + + endSponsoringFutureReservesResult( + value?: EndSponsoringFutureReservesResult + ): EndSponsoringFutureReservesResult; + + revokeSponsorshipResult( + value?: RevokeSponsorshipResult + ): RevokeSponsorshipResult; + + clawbackResult(value?: ClawbackResult): ClawbackResult; + + clawbackClaimableBalanceResult( + value?: ClawbackClaimableBalanceResult + ): ClawbackClaimableBalanceResult; + + setTrustLineFlagsResult( + value?: SetTrustLineFlagsResult + ): SetTrustLineFlagsResult; + + liquidityPoolDepositResult( + value?: LiquidityPoolDepositResult + ): LiquidityPoolDepositResult; + + liquidityPoolWithdrawResult( + value?: LiquidityPoolWithdrawResult + ): LiquidityPoolWithdrawResult; + + invokeHostFunctionResult( + value?: InvokeHostFunctionResult + ): InvokeHostFunctionResult; + + static createAccount(value: CreateAccountResult): OperationResultTr; + + static payment(value: PaymentResult): OperationResultTr; + + static pathPaymentStrictReceive( + value: PathPaymentStrictReceiveResult + ): OperationResultTr; + + static manageSellOffer(value: ManageSellOfferResult): OperationResultTr; + + static createPassiveSellOffer( + value: ManageSellOfferResult + ): OperationResultTr; + + static setOptions(value: SetOptionsResult): OperationResultTr; + + static changeTrust(value: ChangeTrustResult): OperationResultTr; + + static allowTrust(value: AllowTrustResult): OperationResultTr; + + static accountMerge(value: AccountMergeResult): OperationResultTr; + + static inflation(value: InflationResult): OperationResultTr; + + static manageData(value: ManageDataResult): OperationResultTr; + + static bumpSequence(value: BumpSequenceResult): OperationResultTr; + + static manageBuyOffer(value: ManageBuyOfferResult): OperationResultTr; + + static pathPaymentStrictSend( + value: PathPaymentStrictSendResult + ): OperationResultTr; + + static createClaimableBalance( + value: CreateClaimableBalanceResult + ): OperationResultTr; + + static claimClaimableBalance( + value: ClaimClaimableBalanceResult + ): OperationResultTr; + + static beginSponsoringFutureReserves( + value: BeginSponsoringFutureReservesResult + ): OperationResultTr; + + static endSponsoringFutureReserves( + value: EndSponsoringFutureReservesResult + ): OperationResultTr; + + static revokeSponsorship(value: RevokeSponsorshipResult): OperationResultTr; + + static clawback(value: ClawbackResult): OperationResultTr; + + static clawbackClaimableBalance( + value: ClawbackClaimableBalanceResult + ): OperationResultTr; + + static setTrustLineFlags(value: SetTrustLineFlagsResult): OperationResultTr; + + static liquidityPoolDeposit( + value: LiquidityPoolDepositResult + ): OperationResultTr; + + static liquidityPoolWithdraw( + value: LiquidityPoolWithdrawResult + ): OperationResultTr; + + static invokeHostFunction( + value: InvokeHostFunctionResult + ): OperationResultTr; + + value(): + | CreateAccountResult + | PaymentResult + | PathPaymentStrictReceiveResult + | ManageSellOfferResult + | ManageSellOfferResult + | SetOptionsResult + | ChangeTrustResult + | AllowTrustResult + | AccountMergeResult + | InflationResult + | ManageDataResult + | BumpSequenceResult + | ManageBuyOfferResult + | PathPaymentStrictSendResult + | CreateClaimableBalanceResult + | ClaimClaimableBalanceResult + | BeginSponsoringFutureReservesResult + | EndSponsoringFutureReservesResult + | RevokeSponsorshipResult + | ClawbackResult + | ClawbackClaimableBalanceResult + | SetTrustLineFlagsResult + | LiquidityPoolDepositResult + | LiquidityPoolWithdrawResult + | InvokeHostFunctionResult; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationResultTr; + + static write(value: OperationResultTr, io: Buffer): void; + + static isValid(value: OperationResultTr): boolean; + + static toXDR(value: OperationResultTr): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationResultTr; + + static fromXDR(input: string, format: "hex" | "base64"): OperationResultTr; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class OperationResult { + switch(): OperationResultCode; + + tr(value?: OperationResultTr): OperationResultTr; + + static opInner(value: OperationResultTr): OperationResult; + + static opBadAuth(): OperationResult; + + static opNoAccount(): OperationResult; + + static opNotSupported(): OperationResult; + + static opTooManySubentries(): OperationResult; + + static opExceededWorkLimit(): OperationResult; + + static opTooManySponsoring(): OperationResult; + + value(): OperationResultTr | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): OperationResult; + + static write(value: OperationResult, io: Buffer): void; + + static isValid(value: OperationResult): boolean; + + static toXDR(value: OperationResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): OperationResult; + + static fromXDR(input: string, format: "hex" | "base64"): OperationResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultResult { + switch(): TransactionResultCode; + + results(value?: OperationResult[]): OperationResult[]; + + static txSuccess(value: OperationResult[]): InnerTransactionResultResult; + + static txFailed(value: OperationResult[]): InnerTransactionResultResult; + + static txTooEarly(): InnerTransactionResultResult; + + static txTooLate(): InnerTransactionResultResult; + + static txMissingOperation(): InnerTransactionResultResult; + + static txBadSeq(): InnerTransactionResultResult; + + static txBadAuth(): InnerTransactionResultResult; + + static txInsufficientBalance(): InnerTransactionResultResult; + + static txNoAccount(): InnerTransactionResultResult; + + static txInsufficientFee(): InnerTransactionResultResult; + + static txBadAuthExtra(): InnerTransactionResultResult; + + static txInternalError(): InnerTransactionResultResult; + + static txNotSupported(): InnerTransactionResultResult; + + static txBadSponsorship(): InnerTransactionResultResult; + + static txBadMinSeqAgeOrGap(): InnerTransactionResultResult; + + static txMalformed(): InnerTransactionResultResult; + + value(): OperationResult[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultResult; + + static write(value: InnerTransactionResultResult, io: Buffer): void; + + static isValid(value: InnerTransactionResultResult): boolean; + + static toXDR(value: InnerTransactionResultResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class InnerTransactionResultExt { + switch(): number; + + static 0(): InnerTransactionResultExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): InnerTransactionResultExt; + + static write(value: InnerTransactionResultExt, io: Buffer): void; + + static isValid(value: InnerTransactionResultExt): boolean; + + static toXDR(value: InnerTransactionResultExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): InnerTransactionResultExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): InnerTransactionResultExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultResult { + switch(): TransactionResultCode; + + innerResultPair( + value?: InnerTransactionResultPair + ): InnerTransactionResultPair; + + results(value?: OperationResult[]): OperationResult[]; + + static txFeeBumpInnerSuccess( + value: InnerTransactionResultPair + ): TransactionResultResult; + + static txFeeBumpInnerFailed( + value: InnerTransactionResultPair + ): TransactionResultResult; + + static txSuccess(value: OperationResult[]): TransactionResultResult; + + static txFailed(value: OperationResult[]): TransactionResultResult; + + static txTooEarly(): TransactionResultResult; + + static txTooLate(): TransactionResultResult; + + static txMissingOperation(): TransactionResultResult; + + static txBadSeq(): TransactionResultResult; + + static txBadAuth(): TransactionResultResult; + + static txInsufficientBalance(): TransactionResultResult; + + static txNoAccount(): TransactionResultResult; + + static txInsufficientFee(): TransactionResultResult; + + static txBadAuthExtra(): TransactionResultResult; + + static txInternalError(): TransactionResultResult; + + static txNotSupported(): TransactionResultResult; + + static txBadSponsorship(): TransactionResultResult; + + static txBadMinSeqAgeOrGap(): TransactionResultResult; + + static txMalformed(): TransactionResultResult; + + value(): InnerTransactionResultPair | OperationResult[] | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultResult; + + static write(value: TransactionResultResult, io: Buffer): void; + + static isValid(value: TransactionResultResult): boolean; + + static toXDR(value: TransactionResultResult): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultResult; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultResult; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class TransactionResultExt { + switch(): number; + + static 0(): TransactionResultExt; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): TransactionResultExt; + + static write(value: TransactionResultExt, io: Buffer): void; + + static isValid(value: TransactionResultExt): boolean; + + static toXDR(value: TransactionResultExt): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): TransactionResultExt; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): TransactionResultExt; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ExtensionPoint { + switch(): number; + + static 0(): ExtensionPoint; + + value(): void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ExtensionPoint; + + static write(value: ExtensionPoint, io: Buffer): void; + + static isValid(value: ExtensionPoint): boolean; + + static toXDR(value: ExtensionPoint): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ExtensionPoint; + + static fromXDR(input: string, format: "hex" | "base64"): ExtensionPoint; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class PublicKey { + switch(): PublicKeyType; + + ed25519(value?: Buffer): Buffer; + + static publicKeyTypeEd25519(value: Buffer): PublicKey; + + value(): Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): PublicKey; + + static write(value: PublicKey, io: Buffer): void; + + static isValid(value: PublicKey): boolean; + + static toXDR(value: PublicKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): PublicKey; + + static fromXDR(input: string, format: "hex" | "base64"): PublicKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class SignerKey { + switch(): SignerKeyType; + + ed25519(value?: Buffer): Buffer; + + preAuthTx(value?: Buffer): Buffer; + + hashX(value?: Buffer): Buffer; + + ed25519SignedPayload( + value?: SignerKeyEd25519SignedPayload + ): SignerKeyEd25519SignedPayload; + + static signerKeyTypeEd25519(value: Buffer): SignerKey; + + static signerKeyTypePreAuthTx(value: Buffer): SignerKey; + + static signerKeyTypeHashX(value: Buffer): SignerKey; + + static signerKeyTypeEd25519SignedPayload( + value: SignerKeyEd25519SignedPayload + ): SignerKey; + + value(): Buffer | Buffer | Buffer | SignerKeyEd25519SignedPayload; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): SignerKey; + + static write(value: SignerKey, io: Buffer): void; + + static isValid(value: SignerKey): boolean; + + static toXDR(value: SignerKey): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): SignerKey; + + static fromXDR(input: string, format: "hex" | "base64"): SignerKey; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScStatus { + switch(): ScStatusType; + + unknownCode(value?: ScUnknownErrorCode): ScUnknownErrorCode; + + valCode(value?: ScHostValErrorCode): ScHostValErrorCode; + + objCode(value?: ScHostObjErrorCode): ScHostObjErrorCode; + + fnCode(value?: ScHostFnErrorCode): ScHostFnErrorCode; + + storageCode(value?: ScHostStorageErrorCode): ScHostStorageErrorCode; + + contextCode(value?: ScHostContextErrorCode): ScHostContextErrorCode; + + vmCode(value?: ScVmErrorCode): ScVmErrorCode; + + contractCode(value?: number): number; + + authCode(value?: ScHostAuthErrorCode): ScHostAuthErrorCode; + + static sstOk(): ScStatus; + + static sstUnknownError(value: ScUnknownErrorCode): ScStatus; + + static sstHostValueError(value: ScHostValErrorCode): ScStatus; + + static sstHostObjectError(value: ScHostObjErrorCode): ScStatus; + + static sstHostFunctionError(value: ScHostFnErrorCode): ScStatus; + + static sstHostStorageError(value: ScHostStorageErrorCode): ScStatus; + + static sstHostContextError(value: ScHostContextErrorCode): ScStatus; + + static sstVmError(value: ScVmErrorCode): ScStatus; + + static sstContractError(value: number): ScStatus; + + static sstHostAuthError(value: ScHostAuthErrorCode): ScStatus; + + value(): + | ScUnknownErrorCode + | ScHostValErrorCode + | ScHostObjErrorCode + | ScHostFnErrorCode + | ScHostStorageErrorCode + | ScHostContextErrorCode + | ScVmErrorCode + | number + | ScHostAuthErrorCode + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScStatus; + + static write(value: ScStatus, io: Buffer): void; + + static isValid(value: ScStatus): boolean; + + static toXDR(value: ScStatus): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScStatus; + + static fromXDR(input: string, format: "hex" | "base64"): ScStatus; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScContractExecutable { + switch(): ScContractExecutableType; + + wasmId(value?: Buffer): Buffer; + + static sccontractExecutableWasmRef(value: Buffer): ScContractExecutable; + + static sccontractExecutableToken(): ScContractExecutable; + + value(): Buffer | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScContractExecutable; + + static write(value: ScContractExecutable, io: Buffer): void; + + static isValid(value: ScContractExecutable): boolean; + + static toXDR(value: ScContractExecutable): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScContractExecutable; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScContractExecutable; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScAddress { + switch(): ScAddressType; + + accountId(value?: AccountId): AccountId; + + contractId(value?: Buffer): Buffer; + + static scAddressTypeAccount(value: AccountId): ScAddress; + + static scAddressTypeContract(value: Buffer): ScAddress; + + value(): AccountId | Buffer; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScAddress; + + static write(value: ScAddress, io: Buffer): void; + + static isValid(value: ScAddress): boolean; + + static toXDR(value: ScAddress): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScAddress; + + static fromXDR(input: string, format: "hex" | "base64"): ScAddress; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScVal { + switch(): ScValType; + + b(value?: boolean): boolean; + + error(value?: ScStatus): ScStatus; + + u32(value?: number): number; + + i32(value?: number): number; + + u64(value?: Uint64): Uint64; + + i64(value?: Int64): Int64; + + timepoint(value?: TimePoint): TimePoint; + + duration(value?: Duration): Duration; + + u128(value?: UInt128Parts): UInt128Parts; + + i128(value?: Int128Parts): Int128Parts; + + u256(value?: UInt256Parts): UInt256Parts; + + i256(value?: Int256Parts): Int256Parts; + + bytes(value?: Buffer): Buffer; + + str(value?: string | Buffer): string | Buffer; + + sym(value?: string | Buffer): string | Buffer; + + vec(value?: null | ScVal[]): null | ScVal[]; + + map(value?: null | ScMapEntry[]): null | ScMapEntry[]; + + exec(value?: ScContractExecutable): ScContractExecutable; + + address(value?: ScAddress): ScAddress; + + nonceKey(value?: ScNonceKey): ScNonceKey; + + static scvBool(value: boolean): ScVal; + + static scvVoid(): ScVal; + + static scvStatus(value: ScStatus): ScVal; + + static scvU32(value: number): ScVal; + + static scvI32(value: number): ScVal; + + static scvU64(value: Uint64): ScVal; + + static scvI64(value: Int64): ScVal; + + static scvTimepoint(value: TimePoint): ScVal; + + static scvDuration(value: Duration): ScVal; + + static scvU128(value: UInt128Parts): ScVal; + + static scvI128(value: Int128Parts): ScVal; + + static scvU256(value: UInt256Parts): ScVal; + + static scvI256(value: Int256Parts): ScVal; + + static scvBytes(value: Buffer): ScVal; + + static scvString(value: string | Buffer): ScVal; + + static scvSymbol(value: string | Buffer): ScVal; + + static scvVec(value: null | ScVal[]): ScVal; + + static scvMap(value: null | ScMapEntry[]): ScVal; + + static scvContractExecutable(value: ScContractExecutable): ScVal; + + static scvAddress(value: ScAddress): ScVal; + + static scvLedgerKeyContractExecutable(): ScVal; + + static scvLedgerKeyNonce(value: ScNonceKey): ScVal; + + value(): + | boolean + | ScStatus + | number + | number + | Uint64 + | Int64 + | TimePoint + | Duration + | UInt128Parts + | Int128Parts + | UInt256Parts + | Int256Parts + | Buffer + | string + | Buffer + | string + | Buffer + | null + | ScVal[] + | null + | ScMapEntry[] + | ScContractExecutable + | ScAddress + | ScNonceKey + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScVal; + + static write(value: ScVal, io: Buffer): void; + + static isValid(value: ScVal): boolean; + + static toXDR(value: ScVal): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScVal; + + static fromXDR(input: string, format: "hex" | "base64"): ScVal; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScEnvMetaEntry { + switch(): ScEnvMetaKind; + + interfaceVersion(value?: Uint64): Uint64; + + static scEnvMetaKindInterfaceVersion(value: Uint64): ScEnvMetaEntry; + + value(): Uint64; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScEnvMetaEntry; + + static write(value: ScEnvMetaEntry, io: Buffer): void; + + static isValid(value: ScEnvMetaEntry): boolean; + + static toXDR(value: ScEnvMetaEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScEnvMetaEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ScEnvMetaEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecTypeDef { + switch(): ScSpecType; + + option(value?: ScSpecTypeOption): ScSpecTypeOption; + + result(value?: ScSpecTypeResult): ScSpecTypeResult; + + vec(value?: ScSpecTypeVec): ScSpecTypeVec; + + map(value?: ScSpecTypeMap): ScSpecTypeMap; + + set(value?: ScSpecTypeSet): ScSpecTypeSet; + + tuple(value?: ScSpecTypeTuple): ScSpecTypeTuple; + + bytesN(value?: ScSpecTypeBytesN): ScSpecTypeBytesN; + + udt(value?: ScSpecTypeUdt): ScSpecTypeUdt; + + static scSpecTypeVal(): ScSpecTypeDef; + + static scSpecTypeBool(): ScSpecTypeDef; + + static scSpecTypeVoid(): ScSpecTypeDef; + + static scSpecTypeStatus(): ScSpecTypeDef; + + static scSpecTypeU32(): ScSpecTypeDef; + + static scSpecTypeI32(): ScSpecTypeDef; + + static scSpecTypeU64(): ScSpecTypeDef; + + static scSpecTypeI64(): ScSpecTypeDef; + + static scSpecTypeTimepoint(): ScSpecTypeDef; + + static scSpecTypeDuration(): ScSpecTypeDef; + + static scSpecTypeU128(): ScSpecTypeDef; + + static scSpecTypeI128(): ScSpecTypeDef; + + static scSpecTypeU256(): ScSpecTypeDef; + + static scSpecTypeI256(): ScSpecTypeDef; + + static scSpecTypeBytes(): ScSpecTypeDef; + + static scSpecTypeString(): ScSpecTypeDef; + + static scSpecTypeSymbol(): ScSpecTypeDef; + + static scSpecTypeAddress(): ScSpecTypeDef; + + static scSpecTypeOption(value: ScSpecTypeOption): ScSpecTypeDef; + + static scSpecTypeResult(value: ScSpecTypeResult): ScSpecTypeDef; + + static scSpecTypeVec(value: ScSpecTypeVec): ScSpecTypeDef; + + static scSpecTypeMap(value: ScSpecTypeMap): ScSpecTypeDef; + + static scSpecTypeSet(value: ScSpecTypeSet): ScSpecTypeDef; + + static scSpecTypeTuple(value: ScSpecTypeTuple): ScSpecTypeDef; + + static scSpecTypeBytesN(value: ScSpecTypeBytesN): ScSpecTypeDef; + + static scSpecTypeUdt(value: ScSpecTypeUdt): ScSpecTypeDef; + + value(): + | ScSpecTypeOption + | ScSpecTypeResult + | ScSpecTypeVec + | ScSpecTypeMap + | ScSpecTypeSet + | ScSpecTypeTuple + | ScSpecTypeBytesN + | ScSpecTypeUdt + | void; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecTypeDef; + + static write(value: ScSpecTypeDef, io: Buffer): void; + + static isValid(value: ScSpecTypeDef): boolean; + + static toXDR(value: ScSpecTypeDef): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecTypeDef; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecTypeDef; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecUdtUnionCaseV0 { + switch(): ScSpecUdtUnionCaseV0Kind; + + voidCase(value?: ScSpecUdtUnionCaseVoidV0): ScSpecUdtUnionCaseVoidV0; + + tupleCase(value?: ScSpecUdtUnionCaseTupleV0): ScSpecUdtUnionCaseTupleV0; + + static scSpecUdtUnionCaseVoidV0( + value: ScSpecUdtUnionCaseVoidV0 + ): ScSpecUdtUnionCaseV0; + + static scSpecUdtUnionCaseTupleV0( + value: ScSpecUdtUnionCaseTupleV0 + ): ScSpecUdtUnionCaseV0; + + value(): ScSpecUdtUnionCaseVoidV0 | ScSpecUdtUnionCaseTupleV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecUdtUnionCaseV0; + + static write(value: ScSpecUdtUnionCaseV0, io: Buffer): void; + + static isValid(value: ScSpecUdtUnionCaseV0): boolean; + + static toXDR(value: ScSpecUdtUnionCaseV0): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecUdtUnionCaseV0; + + static fromXDR( + input: string, + format: "hex" | "base64" + ): ScSpecUdtUnionCaseV0; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } + + class ScSpecEntry { + switch(): ScSpecEntryKind; + + functionV0(value?: ScSpecFunctionV0): ScSpecFunctionV0; + + udtStructV0(value?: ScSpecUdtStructV0): ScSpecUdtStructV0; + + udtUnionV0(value?: ScSpecUdtUnionV0): ScSpecUdtUnionV0; + + udtEnumV0(value?: ScSpecUdtEnumV0): ScSpecUdtEnumV0; + + udtErrorEnumV0(value?: ScSpecUdtErrorEnumV0): ScSpecUdtErrorEnumV0; + + static scSpecEntryFunctionV0(value: ScSpecFunctionV0): ScSpecEntry; + + static scSpecEntryUdtStructV0(value: ScSpecUdtStructV0): ScSpecEntry; + + static scSpecEntryUdtUnionV0(value: ScSpecUdtUnionV0): ScSpecEntry; + + static scSpecEntryUdtEnumV0(value: ScSpecUdtEnumV0): ScSpecEntry; + + static scSpecEntryUdtErrorEnumV0(value: ScSpecUdtErrorEnumV0): ScSpecEntry; + + value(): + | ScSpecFunctionV0 + | ScSpecUdtStructV0 + | ScSpecUdtUnionV0 + | ScSpecUdtEnumV0 + | ScSpecUdtErrorEnumV0; + + toXDR(format?: "raw"): Buffer; + + toXDR(format: "hex" | "base64"): string; + + static read(io: Buffer): ScSpecEntry; + + static write(value: ScSpecEntry, io: Buffer): void; + + static isValid(value: ScSpecEntry): boolean; + + static toXDR(value: ScSpecEntry): Buffer; + + static fromXDR(input: Buffer, format?: "raw"): ScSpecEntry; + + static fromXDR(input: string, format: "hex" | "base64"): ScSpecEntry; + + static validateXDR(input: Buffer, format?: "raw"): boolean; + + static validateXDR(input: string, format: "hex" | "base64"): boolean; + } +} diff --git a/xdr/curr/Stellar-overlay.x b/xdr/curr/Stellar-overlay.x index 0601a3a4e..64fd97a6c 100644 --- a/xdr/curr/Stellar-overlay.x +++ b/xdr/curr/Stellar-overlay.x @@ -47,11 +47,20 @@ struct Hello uint256 nonce; }; + +// During the roll-out phrase, pull mode will be optional. +// Therefore, we need a way to communicate with other nodes +// that we want/don't want pull mode. +// However, the goal is for everyone to enable it by default, +// so we don't want to introduce a new member variable. +// For now, we'll use the `flags` field (originally named +// `unused`) in `Auth`. +// 100 is just a number that is not 0. +const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100; + struct Auth { - // Empty message, just to confirm - // establishment of MAC keys. - int unused; + int flags; }; enum IPAddrType @@ -102,7 +111,9 @@ enum MessageType SURVEY_REQUEST = 14, SURVEY_RESPONSE = 15, - SEND_MORE = 16 + SEND_MORE = 16, + FLOOD_ADVERT = 18, + FLOOD_DEMAND = 19 }; struct DontHave @@ -185,6 +196,22 @@ case SURVEY_TOPOLOGY: TopologyResponseBody topologyResponseBody; }; +const TX_ADVERT_VECTOR_MAX_SIZE = 1000; +typedef Hash TxAdvertVector; + +struct FloodAdvert +{ + TxAdvertVector txHashes; +}; + +const TX_DEMAND_VECTOR_MAX_SIZE = 1000; +typedef Hash TxDemandVector; + +struct FloodDemand +{ + TxDemandVector txHashes; +}; + union StellarMessage switch (MessageType type) { case ERROR_MSG: @@ -227,6 +254,12 @@ case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; + +// Pull mode +case FLOOD_ADVERT: + FloodAdvert floodAdvert; +case FLOOD_DEMAND: + FloodDemand floodDemand; }; union AuthenticatedMessage switch (uint32 v) diff --git a/xdr/next/Stellar-contract-spec.x b/xdr/next/Stellar-contract-spec.x index 336555900..8431e226f 100644 --- a/xdr/next/Stellar-contract-spec.x +++ b/xdr/next/Stellar-contract-spec.x @@ -10,19 +10,30 @@ namespace stellar { +const SC_SPEC_DOC_LIMIT = 1024; + enum SCSpecType { + SC_SPEC_TYPE_VAL = 0, + // Types with no parameters. - SC_SPEC_TYPE_U32 = 1, - SC_SPEC_TYPE_I32 = 2, - SC_SPEC_TYPE_U64 = 3, - SC_SPEC_TYPE_I64 = 4, - SC_SPEC_TYPE_BOOL = 5, - SC_SPEC_TYPE_SYMBOL = 6, - SC_SPEC_TYPE_BITSET = 7, - SC_SPEC_TYPE_STATUS = 8, - SC_SPEC_TYPE_BYTES = 9, - SC_SPEC_TYPE_BIG_INT = 10, + SC_SPEC_TYPE_BOOL = 1, + SC_SPEC_TYPE_VOID = 2, + SC_SPEC_TYPE_STATUS = 3, + SC_SPEC_TYPE_U32 = 4, + SC_SPEC_TYPE_I32 = 5, + SC_SPEC_TYPE_U64 = 6, + SC_SPEC_TYPE_I64 = 7, + SC_SPEC_TYPE_TIMEPOINT = 8, + SC_SPEC_TYPE_DURATION = 9, + SC_SPEC_TYPE_U128 = 10, + SC_SPEC_TYPE_I128 = 11, + SC_SPEC_TYPE_U256 = 12, + SC_SPEC_TYPE_I256 = 13, + SC_SPEC_TYPE_BYTES = 14, + SC_SPEC_TYPE_STRING = 16, + SC_SPEC_TYPE_SYMBOL = 17, + SC_SPEC_TYPE_ADDRESS = 19, // Types with parameters. SC_SPEC_TYPE_OPTION = 1000, @@ -31,6 +42,7 @@ enum SCSpecType SC_SPEC_TYPE_SET = 1003, SC_SPEC_TYPE_MAP = 1004, SC_SPEC_TYPE_TUPLE = 1005, + SC_SPEC_TYPE_BYTES_N = 1006, // User defined types. SC_SPEC_TYPE_UDT = 2000 @@ -68,6 +80,11 @@ struct SCSpecTypeTuple SCSpecTypeDef valueTypes<12>; }; +struct SCSpecTypeBytesN +{ + uint32 n; +}; + struct SCSpecTypeUDT { string name<60>; @@ -75,16 +92,24 @@ struct SCSpecTypeUDT union SCSpecTypeDef switch (SCSpecType type) { -case SC_SPEC_TYPE_U64: -case SC_SPEC_TYPE_I64: -case SC_SPEC_TYPE_U32: -case SC_SPEC_TYPE_I32: +case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: -case SC_SPEC_TYPE_SYMBOL: -case SC_SPEC_TYPE_BITSET: +case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_STATUS: +case SC_SPEC_TYPE_U32: +case SC_SPEC_TYPE_I32: +case SC_SPEC_TYPE_U64: +case SC_SPEC_TYPE_I64: +case SC_SPEC_TYPE_TIMEPOINT: +case SC_SPEC_TYPE_DURATION: +case SC_SPEC_TYPE_U128: +case SC_SPEC_TYPE_I128: +case SC_SPEC_TYPE_U256: +case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: -case SC_SPEC_TYPE_BIG_INT: +case SC_SPEC_TYPE_STRING: +case SC_SPEC_TYPE_SYMBOL: +case SC_SPEC_TYPE_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; @@ -98,46 +123,114 @@ case SC_SPEC_TYPE_SET: SCSpecTypeSet set; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; +case SC_SPEC_TYPE_BYTES_N: + SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; struct SCSpecUDTStructFieldV0 { + string doc; string name<30>; SCSpecTypeDef type; }; struct SCSpecUDTStructV0 { + string doc; + string lib<80>; string name<60>; SCSpecUDTStructFieldV0 fields<40>; }; -struct SCSpecUDTUnionCaseV0 +struct SCSpecUDTUnionCaseVoidV0 { + string doc; string name<60>; - SCSpecTypeDef *type; +}; + +struct SCSpecUDTUnionCaseTupleV0 +{ + string doc; + string name<60>; + SCSpecTypeDef type<12>; +}; + +enum SCSpecUDTUnionCaseV0Kind +{ + SC_SPEC_UDT_UNION_CASE_VOID_V0 = 0, + SC_SPEC_UDT_UNION_CASE_TUPLE_V0 = 1 +}; + +union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) +{ +case SC_SPEC_UDT_UNION_CASE_VOID_V0: + SCSpecUDTUnionCaseVoidV0 voidCase; +case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: + SCSpecUDTUnionCaseTupleV0 tupleCase; }; struct SCSpecUDTUnionV0 { + string doc; + string lib<80>; string name<60>; SCSpecUDTUnionCaseV0 cases<50>; }; +struct SCSpecUDTEnumCaseV0 +{ + string doc; + string name<60>; + uint32 value; +}; + +struct SCSpecUDTEnumV0 +{ + string doc; + string lib<80>; + string name<60>; + SCSpecUDTEnumCaseV0 cases<50>; +}; + +struct SCSpecUDTErrorEnumCaseV0 +{ + string doc; + string name<60>; + uint32 value; +}; + +struct SCSpecUDTErrorEnumV0 +{ + string doc; + string lib<80>; + string name<60>; + SCSpecUDTErrorEnumCaseV0 cases<50>; +}; + +struct SCSpecFunctionInputV0 +{ + string doc; + string name<30>; + SCSpecTypeDef type; +}; + struct SCSpecFunctionV0 { + string doc; SCSymbol name; - SCSpecTypeDef inputTypes<10>; - SCSpecTypeDef outputTypes<1>; + SCSpecFunctionInputV0 inputs<10>; + SCSpecTypeDef outputs<1>; }; enum SCSpecEntryKind { SC_SPEC_ENTRY_FUNCTION_V0 = 0, SC_SPEC_ENTRY_UDT_STRUCT_V0 = 1, - SC_SPEC_ENTRY_UDT_UNION_V0 = 2 + SC_SPEC_ENTRY_UDT_UNION_V0 = 2, + SC_SPEC_ENTRY_UDT_ENUM_V0 = 3, + SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0 = 4 }; union SCSpecEntry switch (SCSpecEntryKind kind) @@ -148,6 +241,10 @@ case SC_SPEC_ENTRY_UDT_STRUCT_V0: SCSpecUDTStructV0 udtStructV0; case SC_SPEC_ENTRY_UDT_UNION_V0: SCSpecUDTUnionV0 udtUnionV0; +case SC_SPEC_ENTRY_UDT_ENUM_V0: + SCSpecUDTEnumV0 udtEnumV0; +case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0: + SCSpecUDTErrorEnumV0 udtErrorEnumV0; }; } diff --git a/xdr/next/Stellar-contract.x b/xdr/next/Stellar-contract.x index 7a8863107..6084cdbe2 100644 --- a/xdr/next/Stellar-contract.x +++ b/xdr/next/Stellar-contract.x @@ -5,67 +5,73 @@ % #include "xdr/Stellar-types.h" namespace stellar { -/* - * Smart Contracts deal in SCVals. These are a (dynamic) disjoint union - * between several possible variants, to allow storing generic SCVals in - * generic data structures and passing them in and out of languages that - * have simple or dynamic type systems. - * - * SCVals are (in WASM's case) stored in a tagged 64-bit word encoding. Most - * signed 64-bit values in Stellar are actually signed positive values - * (sequence numbers, timestamps, amounts), so we don't need the high bit - * and can get away with 1-bit tagging and store them as "unsigned 63bit", - * (u63) separate from everything else. - * - * We actually reserve the low _four_ bits, leaving 3 bits for 8 cases of - * "non-u63 values", some of which have substructure of their own. - * - * 0x_NNNN_NNNN_NNNN_NNNX - u63, for any even X - * 0x_0000_000N_NNNN_NNN1 - u32 - * 0x_0000_000N_NNNN_NNN3 - i32 - * 0x_NNNN_NNNN_NNNN_NNN5 - static: void, true, false, ... (SCS_*) - * 0x_IIII_IIII_TTTT_TTT7 - object: 32-bit index I, 28-bit type code T - * 0x_NNNN_NNNN_NNNN_NNN9 - symbol: up to 10 6-bit identifier characters - * 0x_NNNN_NNNN_NNNN_NNNb - bitset: up to 60 bits - * 0x_CCCC_CCCC_TTTT_TTTd - status: 32-bit code C, 28-bit type code T - * 0x_NNNN_NNNN_NNNN_NNNf - reserved - * - * Up here in XDR we have variable-length tagged disjoint unions but no - * bit-level packing, so we can be more explicit in their structure, at the - * cost of spending more than 64 bits to encode many cases, and also having - * to convert. It's a little non-obvious at the XDR level why there's a - * split between SCVal and SCObject given that they are both immutable types - * with value semantics; but the split reflects the split that happens in - * the implementation, and marks a place where different implementations of - * immutability (CoW, structural sharing, etc.) will likely occur. - */ - -// A symbol is up to 10 chars drawn from [a-zA-Z0-9_], which can be packed -// into 60 bits with a 6-bit-per-character code, usable as a small key type -// to specify function, argument, tx-local environment and map entries -// efficiently. -typedef string SCSymbol<10>; + +// We fix a maximum of 128 value types in the system for two reasons: we want to +// keep the codes relatively small (<= 8 bits) when bit-packing values into a +// u64 at the environment interface level, so that we keep many bits for +// payloads (small strings, small numeric values, object handles); and then we +// actually want to go one step further and ensure (for code-size) that our +// codes fit in a single ULEB128-code byte, which means we can only use 7 bits. +// +// We also reserve several type codes from this space because we want to _reuse_ +// the SCValType codes at the environment interface level (or at least not +// exceed its number-space) but there are more types at that level, assigned to +// optimizations/special case representations of values abstract at this level. enum SCValType { - SCV_U63 = 0, - SCV_U32 = 1, - SCV_I32 = 2, - SCV_STATIC = 3, - SCV_OBJECT = 4, - SCV_SYMBOL = 5, - SCV_BITSET = 6, - SCV_STATUS = 7 -}; + SCV_BOOL = 0, + SCV_VOID = 1, + SCV_STATUS = 2, -% struct SCObject; + // 32 bits is the smallest type in WASM or XDR; no need for u8/u16. + SCV_U32 = 3, + SCV_I32 = 4, -enum SCStatic -{ - SCS_VOID = 0, - SCS_TRUE = 1, - SCS_FALSE = 2, - SCS_LEDGER_KEY_CONTRACT_CODE = 3 + // 64 bits is naturally supported by both WASM and XDR also. + SCV_U64 = 5, + SCV_I64 = 6, + + // Time-related u64 subtypes with their own functions and formatting. + SCV_TIMEPOINT = 7, + SCV_DURATION = 8, + + // 128 bits is naturally supported by Rust and we use it for Soroban + // fixed-point arithmetic prices / balances / similar "quantities". These + // are represented in XDR as a pair of 2 u64s, unlike {u,i}256 which is + // represented as an array of 32 bytes. + SCV_U128 = 9, + SCV_I128 = 10, + + // 256 bits is the size of sha256 output, ed25519 keys, and the EVM machine + // word, so for interop use we include this even though it requires a small + // amount of Rust guest and/or host library code. + SCV_U256 = 11, + SCV_I256 = 12, + + // TODO: possibly allocate subtypes of i64, i128 and/or u256 for + // fixed-precision with a specific number of decimals. + + // Bytes come in 3 flavors, 2 of which have meaningfully different + // formatting and validity-checking / domain-restriction. + SCV_BYTES = 13, + SCV_STRING = 14, + SCV_SYMBOL = 15, + + // Vecs and maps are just polymorphic containers of other ScVals. + SCV_VEC = 16, + SCV_MAP = 17, + + // SCContractExecutable and SCAddressType are types that gets used separately from + // SCVal so we do not flatten their structures into separate SCVal cases. + SCV_CONTRACT_EXECUTABLE = 18, + SCV_ADDRESS = 19, + + // SCV_LEDGER_KEY_CONTRACT_EXECUTABLE and SCV_LEDGER_KEY_NONCE are unique + // symbolic SCVals used as the key for ledger entries for a contract's code + // and an address' nonce, respectively. + SCV_LEDGER_KEY_CONTRACT_EXECUTABLE = 20, + SCV_LEDGER_KEY_NONCE = 21 }; enum SCStatusType @@ -77,7 +83,9 @@ enum SCStatusType SST_HOST_FUNCTION_ERROR = 4, SST_HOST_STORAGE_ERROR = 5, SST_HOST_CONTEXT_ERROR = 6, - SST_VM_ERROR = 7 + SST_VM_ERROR = 7, + SST_CONTRACT_ERROR = 8, + SST_HOST_AUTH_ERROR = 9 // TODO: add more }; @@ -127,6 +135,14 @@ enum SCHostStorageErrorCode HOST_STORAGE_GET_ON_DELETED_KEY = 5 }; +enum SCHostAuthErrorCode +{ + HOST_AUTH_UNKNOWN_ERROR = 0, + HOST_AUTH_NONCE_ERROR = 1, + HOST_AUTH_DUPLICATE_AUTHORIZATION = 2, + HOST_AUTH_NOT_AUTHORIZED = 3 +}; + enum SCHostContextErrorCode { HOST_CONTEXT_UNKNOWN_ERROR = 0, @@ -168,128 +184,165 @@ case SST_OK: case SST_UNKNOWN_ERROR: SCUnknownErrorCode unknownCode; case SST_HOST_VALUE_ERROR: - SCHostValErrorCode errorCode; + SCHostValErrorCode valCode; case SST_HOST_OBJECT_ERROR: - SCHostObjErrorCode errorCode; + SCHostObjErrorCode objCode; case SST_HOST_FUNCTION_ERROR: - SCHostFnErrorCode errorCode; + SCHostFnErrorCode fnCode; case SST_HOST_STORAGE_ERROR: - SCHostStorageErrorCode errorCode; + SCHostStorageErrorCode storageCode; case SST_HOST_CONTEXT_ERROR: - SCHostContextErrorCode errorCode; + SCHostContextErrorCode contextCode; case SST_VM_ERROR: - SCVmErrorCode errorCode; + SCVmErrorCode vmCode; +case SST_CONTRACT_ERROR: + uint32 contractCode; +case SST_HOST_AUTH_ERROR: + SCHostAuthErrorCode authCode; }; -union SCVal switch (SCValType type) -{ -case SCV_U63: - int64 u63; -case SCV_U32: - uint32 u32; -case SCV_I32: - int32 i32; -case SCV_STATIC: - SCStatic ic; -case SCV_OBJECT: - SCObject* obj; -case SCV_SYMBOL: - SCSymbol sym; -case SCV_BITSET: - uint64 bits; -case SCV_STATUS: - SCStatus status; +struct UInt128Parts { + uint64 hi; + uint64 lo; }; -enum SCObjectType -{ - // We have a few objects that represent non-stellar-specific concepts - // like general-purpose maps, vectors, numbers, blobs. - - SCO_VEC = 0, - SCO_MAP = 1, - SCO_U64 = 2, - SCO_I64 = 3, - SCO_BYTES = 4, - SCO_BIG_INT = 5, - SCO_HASH = 6, - SCO_PUBLIC_KEY = 7, - SCO_CONTRACT_CODE = 8 - - // TODO: add more +// A signed int128 has a high sign bit and 127 value bits. We break it into a +// signed high int64 (that carries the sign bit and the high 63 value bits) and +// a low unsigned uint64 that carries the low 64 bits. This will sort in +// generated code in the same order the underlying int128 sorts. +struct Int128Parts { + int64 hi; + uint64 lo; }; -struct SCMapEntry -{ - SCVal key; - SCVal val; +struct UInt256Parts { + uint64 hi_hi; + uint64 hi_lo; + uint64 lo_hi; + uint64 lo_lo; }; -const SCVAL_LIMIT = 256000; - -typedef SCVal SCVec; -typedef SCMapEntry SCMap; +// A signed int256 has a high sign bit and 255 value bits. We break it into a +// signed high int64 (that carries the sign bit and the high 63 value bits) and +// three low unsigned `uint64`s that carry the lower bits. This will sort in +// generated code in the same order the underlying int256 sorts. +struct Int256Parts { + int64 hi_hi; + uint64 hi_lo; + uint64 lo_hi; + uint64 lo_lo; +}; -enum SCNumSign +enum SCContractExecutableType { - NEGATIVE = -1, - ZERO = 0, - POSITIVE = 1 + SCCONTRACT_EXECUTABLE_WASM_REF = 0, + SCCONTRACT_EXECUTABLE_TOKEN = 1 }; -union SCBigInt switch (SCNumSign sign) +union SCContractExecutable switch (SCContractExecutableType type) { -case ZERO: +case SCCONTRACT_EXECUTABLE_WASM_REF: + Hash wasm_id; +case SCCONTRACT_EXECUTABLE_TOKEN: void; -case POSITIVE: -case NEGATIVE: - opaque magnitude<256000>; }; -enum SCHashType +enum SCAddressType { - SCHASH_SHA256 = 0 + SC_ADDRESS_TYPE_ACCOUNT = 0, + SC_ADDRESS_TYPE_CONTRACT = 1 }; -union SCHash switch (SCHashType type) +union SCAddress switch (SCAddressType type) { -case SCHASH_SHA256: - Hash sha256; +case SC_ADDRESS_TYPE_ACCOUNT: + AccountID accountId; +case SC_ADDRESS_TYPE_CONTRACT: + Hash contractId; }; -enum SCContractCodeType -{ - SCCONTRACT_CODE_WASM = 0, - SCCONTRACT_CODE_TOKEN = 1 +%struct SCVal; +%struct SCMapEntry; + +const SCVAL_LIMIT = 256000; +const SCSYMBOL_LIMIT = 32; + +typedef SCVal SCVec; +typedef SCMapEntry SCMap; + +typedef opaque SCBytes; +typedef string SCString; +typedef string SCSymbol; + +struct SCNonceKey { + SCAddress nonce_address; }; -union SCContractCode switch (SCContractCodeType type) +union SCVal switch (SCValType type) { -case SCCONTRACT_CODE_WASM: - opaque wasm; -case SCCONTRACT_CODE_TOKEN: + +case SCV_BOOL: + bool b; +case SCV_VOID: void; -}; +case SCV_STATUS: + SCStatus error; -union SCObject switch (SCObjectType type) -{ -case SCO_VEC: - SCVec vec; -case SCO_MAP: - SCMap map; -case SCO_U64: +case SCV_U32: + uint32 u32; +case SCV_I32: + int32 i32; + +case SCV_U64: uint64 u64; -case SCO_I64: +case SCV_I64: int64 i64; -case SCO_BYTES: - opaque bin; -case SCO_BIG_INT: - SCBigInt bigInt; -case SCO_HASH: - SCHash hash; -case SCO_PUBLIC_KEY: - PublicKey publicKey; -case SCO_CONTRACT_CODE: - SCContractCode contractCode; +case SCV_TIMEPOINT: + TimePoint timepoint; +case SCV_DURATION: + Duration duration; + +case SCV_U128: + UInt128Parts u128; +case SCV_I128: + Int128Parts i128; + +case SCV_U256: + UInt256Parts u256; +case SCV_I256: + Int256Parts i256; + +case SCV_BYTES: + SCBytes bytes; +case SCV_STRING: + SCString str; +case SCV_SYMBOL: + SCSymbol sym; + +// Vec and Map are recursive so need to live +// behind an option, due to xdrpp limitations. +case SCV_VEC: + SCVec *vec; +case SCV_MAP: + SCMap *map; + +case SCV_CONTRACT_EXECUTABLE: + SCContractExecutable exec; +case SCV_ADDRESS: + SCAddress address; + +// Special SCVals reserved for system-constructed contract-data +// ledger keys, not generally usable elsewhere. +case SCV_LEDGER_KEY_CONTRACT_EXECUTABLE: + void; +case SCV_LEDGER_KEY_NONCE: + SCNonceKey nonce_key; +}; + +struct SCMapEntry +{ + SCVal key; + SCVal val; }; + } diff --git a/xdr/next/Stellar-ledger-entries.x b/xdr/next/Stellar-ledger-entries.x index 20c37e35d..5a9c5d097 100644 --- a/xdr/next/Stellar-ledger-entries.x +++ b/xdr/next/Stellar-ledger-entries.x @@ -8,13 +8,10 @@ namespace stellar { -typedef PublicKey AccountID; typedef opaque Thresholds[4]; typedef string string32<32>; typedef string string64<64>; typedef int64 SequenceNumber; -typedef uint64 TimePoint; -typedef uint64 Duration; typedef opaque DataValue<64>; typedef Hash PoolID; // SHA256(LiquidityPoolParameters) @@ -101,7 +98,8 @@ enum LedgerEntryType CLAIMABLE_BALANCE = 4, LIQUIDITY_POOL = 5, CONTRACT_DATA = 6, - CONFIG_SETTING = 7 + CONTRACT_CODE = 7, + CONFIG_SETTING = 8 }; struct Signer @@ -500,33 +498,122 @@ struct ContractDataEntry { SCVal val; }; -enum ConfigSettingType +struct ContractCodeEntry { + ExtensionPoint ext; + + Hash hash; + opaque code; +}; + +// Identifiers of all the network settings. +enum ConfigSettingID { - CONFIG_SETTING_TYPE_UINT32 = 0 + CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, + CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, + CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, + CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, + CONFIG_SETTING_CONTRACT_META_DATA_V0 = 4, + CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, + CONFIG_SETTING_CONTRACT_HOST_LOGIC_VERSION = 6 }; -union ConfigSetting switch (ConfigSettingType type) +// "Compute" settings for contracts (instructions and memory). +struct ConfigSettingContractComputeV0 { -case CONFIG_SETTING_TYPE_UINT32: - uint32 uint32Val; + // Maximum instructions per ledger + int64 ledgerMaxInstructions; + // Maximum instructions per transaction + int64 txMaxInstructions; + // Cost of 10000 instructions + int64 feeRatePerInstructionsIncrement; + + // Memory limit per contract/host function invocation. Unlike + // instructions, there is no fee for memory and it's not + // accumulated between operations - the same limit is applied + // to every operation. + uint32 memoryLimit; }; -enum ConfigSettingID +// Ledger access settings for contracts. +struct ConfigSettingContractLedgerCostV0 { - CONFIG_SETTING_CONTRACT_MAX_SIZE = 0 + // Maximum number of ledger entry read operations per ledger + uint32 ledgerMaxReadLedgerEntries; + // Maximum number of bytes that can be read per ledger + uint32 ledgerMaxReadBytes; + // Maximum number of ledger entry write operations per ledger + uint32 ledgerMaxWriteLedgerEntries; + // Maximum number of bytes that can be written per ledger + uint32 ledgerMaxWriteBytes; + + // Maximum number of ledger entry read operations per transaction + uint32 txMaxReadLedgerEntries; + // Maximum number of bytes that can be read per transaction + uint32 txMaxReadBytes; + // Maximum number of ledger entry write operations per transaction + uint32 txMaxWriteLedgerEntries; + // Maximum number of bytes that can be written per transaction + uint32 txMaxWriteBytes; + + int64 feeReadLedgerEntry; // Fee per ledger entry read + int64 feeWriteLedgerEntry; // Fee per ledger entry write + + int64 feeRead1KB; // Fee for reading 1KB + int64 feeWrite1KB; // Fee for writing 1KB + + // Bucket list fees grow slowly up to that size + int64 bucketListSizeBytes; + // Fee rate in stroops when the bucket list is empty + int64 bucketListFeeRateLow; + // Fee rate in stroops when the bucket list reached bucketListSizeBytes + int64 bucketListFeeRateHigh; + // Rate multiplier for any additional data past the first bucketListSizeBytes + uint32 bucketListGrowthFactor; }; -struct ConfigSettingEntry +// Historical data (pushed to core archives) settings for contracts. +struct ConfigSettingContractHistoricalDataV0 { - union switch (int v) - { - case 0: - void; - } - ext; + int64 feeHistorical1KB; // Fee for storing 1KB in archives +}; + +// Meta data (pushed to downstream systems) settings for contracts. +struct ConfigSettingContractMetaDataV0 +{ + // Maximum size of extended meta data produced by a transaction + uint32 txMaxExtendedMetaDataSizeBytes; + // Fee for generating 1KB of extended meta data + int64 feeExtendedMetaData1KB; +}; - ConfigSettingID configSettingID; - ConfigSetting setting; +// Bandwidth related data settings for contracts +struct ConfigSettingContractBandwidthV0 +{ + // Maximum size in bytes to propagate per ledger + uint32 ledgerMaxPropagateSizeBytes; + // Maximum size in bytes for a transaction + uint32 txMaxSizeBytes; + + // Fee for propagating 1KB of data + int64 feePropagateData1KB; +}; + +union ConfigSettingEntry switch (ConfigSettingID configSettingID) +{ +case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: + uint32 contractMaxSizeBytes; +case CONFIG_SETTING_CONTRACT_COMPUTE_V0: + ConfigSettingContractComputeV0 contractCompute; +case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: + ConfigSettingContractLedgerCostV0 contractLedgerCost; +case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: + ConfigSettingContractHistoricalDataV0 contractHistoricalData; +case CONFIG_SETTING_CONTRACT_META_DATA_V0: + ConfigSettingContractMetaDataV0 contractMetaData; +case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: + ConfigSettingContractBandwidthV0 contractBandwidth; +case CONFIG_SETTING_CONTRACT_HOST_LOGIC_VERSION: + uint32 contractHostLogicVersion; }; struct LedgerEntryExtensionV1 @@ -561,6 +648,8 @@ struct LedgerEntry LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; + case CONTRACT_CODE: + ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; } @@ -623,6 +712,11 @@ case CONTRACT_DATA: Hash contractID; SCVal key; } contractData; +case CONTRACT_CODE: + struct + { + Hash hash; + } contractCode; case CONFIG_SETTING: struct { @@ -644,6 +738,10 @@ enum EnvelopeType ENVELOPE_TYPE_OP_ID = 6, ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7, ENVELOPE_TYPE_CONTRACT_ID_FROM_ED25519 = 8, - ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT = 9 + ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT = 9, + ENVELOPE_TYPE_CONTRACT_ID_FROM_ASSET = 10, + ENVELOPE_TYPE_CONTRACT_ID_FROM_SOURCE_ACCOUNT = 11, + ENVELOPE_TYPE_CREATE_CONTRACT_ARGS = 12, + ENVELOPE_TYPE_CONTRACT_AUTH = 13 }; } diff --git a/xdr/next/Stellar-ledger.x b/xdr/next/Stellar-ledger.x index 848b7d682..79d3d45d3 100644 --- a/xdr/next/Stellar-ledger.x +++ b/xdr/next/Stellar-ledger.x @@ -130,6 +130,11 @@ enum LedgerUpgradeType LEDGER_UPGRADE_CONFIG = 6 }; +struct ConfigUpgradeSetKey { + Hash contractID; + Hash contentHash; +}; + union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: @@ -143,11 +148,11 @@ case LEDGER_UPGRADE_BASE_RESERVE: case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: - struct - { - ConfigSettingID id; // id to update - ConfigSetting setting; // new value - } configSetting; + ConfigUpgradeSetKey newConfig; +}; + +struct ConfigUpgradeSet { + ConfigSettingEntry updatedEntry<>; }; /* Entries used to define the bucket list */ @@ -275,6 +280,32 @@ struct TransactionHistoryResultEntry ext; }; +struct TransactionResultPairV2 +{ + Hash transactionHash; + Hash hashOfMetaHashes; // hash of hashes in TransactionMetaV3 + // TransactionResult is in the meta +}; + +struct TransactionResultSetV2 +{ + TransactionResultPairV2 results<>; +}; + +struct TransactionHistoryResultEntryV2 +{ + uint32 ledgerSeq; + TransactionResultSetV2 txResultSet; + + // reserved for future use + union switch (int v) + { + case 0: + void; + } + ext; +}; + struct LedgerHeaderHistoryEntry { Hash hash; @@ -359,6 +390,70 @@ struct TransactionMetaV2 // applied if any }; +enum ContractEventType +{ + SYSTEM = 0, + CONTRACT = 1, + DIAGNOSTIC = 2 +}; + +struct ContractEvent +{ + // We can use this to add more fields, or because it + // is first, to change ContractEvent into a union. + ExtensionPoint ext; + + Hash* contractID; + ContractEventType type; + + union switch (int v) + { + case 0: + struct + { + SCVec topics; + SCVal data; + } v0; + } + body; +}; + +struct DiagnosticEvent +{ + bool inSuccessfulContractCall; + ContractEvent event; +}; + +struct OperationDiagnosticEvents +{ + DiagnosticEvent events<>; +}; + +struct OperationEvents +{ + ContractEvent events<>; +}; + +struct TransactionMetaV3 +{ + LedgerEntryChanges txChangesBefore; // tx level changes before operations + // are applied if any + OperationMeta operations<>; // meta for each operation + LedgerEntryChanges txChangesAfter; // tx level changes after operations are + // applied if any + OperationEvents events<>; // custom events populated by the + // contracts themselves. One list per operation. + TransactionResult txResult; + + Hash hashes[3]; // stores sha256(txChangesBefore, operations, txChangesAfter), + // sha256(events), and sha256(txResult) + + // Diagnostics events that are not hashed. One list per operation. + // This will contain all contract and diagnostic events. Even ones + // that were emitted in a failed contract call. + OperationDiagnosticEvents diagnosticEvents<>; +}; + // this is the meta produced when applying transactions // it does not include pre-apply updates such as fees union TransactionMeta switch (int v) @@ -369,6 +464,8 @@ case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; +case 3: + TransactionMetaV3 v3; }; // This struct groups together changes on a per transaction basis @@ -381,6 +478,13 @@ struct TransactionResultMeta TransactionMeta txApplyProcessing; }; +struct TransactionResultMetaV2 +{ + TransactionResultPairV2 result; + LedgerEntryChanges feeProcessing; + TransactionMeta txApplyProcessing; +}; + // this represents a single upgrade that was performed as part of a ledger // upgrade struct UpgradeEntryMeta @@ -425,11 +529,32 @@ struct LedgerCloseMetaV1 SCPHistoryEntry scpInfo<>; }; +// only difference between V1 and V2 is this uses TransactionResultMetaV2 +struct LedgerCloseMetaV2 +{ + LedgerHeaderHistoryEntry ledgerHeader; + + GeneralizedTransactionSet txSet; + + // NB: transactions are sorted in apply order here + // fees for all transactions are processed first + // followed by applying transactions + TransactionResultMetaV2 txProcessing<>; + + // upgrades are applied last + UpgradeEntryMeta upgradesProcessing<>; + + // other misc information attached to the ledger close + SCPHistoryEntry scpInfo<>; +}; + union LedgerCloseMeta switch (int v) { case 0: LedgerCloseMetaV0 v0; case 1: LedgerCloseMetaV1 v1; +case 2: + LedgerCloseMetaV2 v2; }; } diff --git a/xdr/next/Stellar-overlay.x b/xdr/next/Stellar-overlay.x index 0601a3a4e..8203258c8 100644 --- a/xdr/next/Stellar-overlay.x +++ b/xdr/next/Stellar-overlay.x @@ -47,11 +47,20 @@ struct Hello uint256 nonce; }; + +// During the roll-out phrase, pull mode will be optional. +// Therefore, we need a way to communicate with other nodes +// that we want/don't want pull mode. +// However, the goal is for everyone to enable it by default, +// so we don't want to introduce a new member variable. +// For now, we'll use the `flags` field (originally named +// `unused`) in `Auth`. +// 100 is just a number that is not 0. +const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100; + struct Auth { - // Empty message, just to confirm - // establishment of MAC keys. - int unused; + int flags; }; enum IPAddrType @@ -102,7 +111,9 @@ enum MessageType SURVEY_REQUEST = 14, SURVEY_RESPONSE = 15, - SEND_MORE = 16 + SEND_MORE = 16, + FLOOD_ADVERT = 18, + FLOOD_DEMAND = 19 }; struct DontHave @@ -116,6 +127,12 @@ enum SurveyMessageCommandType SURVEY_TOPOLOGY = 0 }; +enum SurveyMessageResponseType +{ + SURVEY_TOPOLOGY_RESPONSE_V0 = 0, + SURVEY_TOPOLOGY_RESPONSE_V1 = 1 +}; + struct SurveyRequestMessage { NodeID surveyorPeerID; @@ -170,7 +187,7 @@ struct PeerStats typedef PeerStats PeerStatList<25>; -struct TopologyResponseBody +struct TopologyResponseBodyV0 { PeerStatList inboundPeers; PeerStatList outboundPeers; @@ -179,10 +196,40 @@ struct TopologyResponseBody uint32 totalOutboundPeerCount; }; -union SurveyResponseBody switch (SurveyMessageCommandType type) +struct TopologyResponseBodyV1 { -case SURVEY_TOPOLOGY: - TopologyResponseBody topologyResponseBody; + PeerStatList inboundPeers; + PeerStatList outboundPeers; + + uint32 totalInboundPeerCount; + uint32 totalOutboundPeerCount; + + uint32 maxInboundPeerCount; + uint32 maxOutboundPeerCount; +}; + +union SurveyResponseBody switch (SurveyMessageResponseType type) +{ +case SURVEY_TOPOLOGY_RESPONSE_V0: + TopologyResponseBodyV0 topologyResponseBodyV0; +case SURVEY_TOPOLOGY_RESPONSE_V1: + TopologyResponseBodyV1 topologyResponseBodyV1; +}; + +const TX_ADVERT_VECTOR_MAX_SIZE = 1000; +typedef Hash TxAdvertVector; + +struct FloodAdvert +{ + TxAdvertVector txHashes; +}; + +const TX_DEMAND_VECTOR_MAX_SIZE = 1000; +typedef Hash TxDemandVector; + +struct FloodDemand +{ + TxDemandVector txHashes; }; union StellarMessage switch (MessageType type) @@ -227,6 +274,12 @@ case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; + +// Pull mode +case FLOOD_ADVERT: + FloodAdvert floodAdvert; +case FLOOD_DEMAND: + FloodDemand floodDemand; }; union AuthenticatedMessage switch (uint32 v) diff --git a/xdr/next/Stellar-transaction.x b/xdr/next/Stellar-transaction.x index 74d46738f..2b0b05872 100644 --- a/xdr/next/Stellar-transaction.x +++ b/xdr/next/Stellar-transaction.x @@ -474,22 +474,92 @@ struct LiquidityPoolWithdrawOp int64 minAmountB; // minimum amount of second asset to withdraw }; -enum HostFunction +enum HostFunctionType { - HOST_FN_CALL = 0, - HOST_FN_CREATE_CONTRACT = 1 + HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, + HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, + HOST_FUNCTION_TYPE_INSTALL_CONTRACT_CODE = 2 +}; + +enum ContractIDType +{ + CONTRACT_ID_FROM_SOURCE_ACCOUNT = 0, + CONTRACT_ID_FROM_ED25519_PUBLIC_KEY = 1, + CONTRACT_ID_FROM_ASSET = 2 +}; + +enum ContractIDPublicKeyType +{ + CONTRACT_ID_PUBLIC_KEY_SOURCE_ACCOUNT = 0, + CONTRACT_ID_PUBLIC_KEY_ED25519 = 1 +}; + +struct InstallContractCodeArgs +{ + opaque code; +}; + +union ContractID switch (ContractIDType type) +{ +case CONTRACT_ID_FROM_SOURCE_ACCOUNT: + uint256 salt; +case CONTRACT_ID_FROM_ED25519_PUBLIC_KEY: + struct + { + uint256 key; + Signature signature; + uint256 salt; + } fromEd25519PublicKey; +case CONTRACT_ID_FROM_ASSET: + Asset asset; +}; + +struct CreateContractArgs +{ + ContractID contractID; + SCContractExecutable source; +}; + +union HostFunction switch (HostFunctionType type) +{ +case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: + SCVec invokeArgs; +case HOST_FUNCTION_TYPE_CREATE_CONTRACT: + CreateContractArgs createContractArgs; +case HOST_FUNCTION_TYPE_INSTALL_CONTRACT_CODE: + InstallContractCodeArgs installContractCodeArgs; +}; + +struct AuthorizedInvocation +{ + Hash contractID; + SCSymbol functionName; + SCVec args; + AuthorizedInvocation subInvocations<>; +}; + +struct AddressWithNonce +{ + SCAddress address; + uint64 nonce; +}; + +struct ContractAuth +{ + AddressWithNonce* addressWithNonce; // not present for invoker + AuthorizedInvocation rootInvocation; + SCVec signatureArgs; }; struct InvokeHostFunctionOp { // The host function to invoke HostFunction function; - - // Parameters to the host function - SCVec parameters; - // The footprint for this invocation LedgerFootprint footprint; + // Per-address authorizations for this host fn + // Currently only supported for INVOKE_CONTRACT function + ContractAuth auth<>; }; /* An operation is the lowest unit of work that a transaction does */ @@ -577,15 +647,44 @@ case ENVELOPE_TYPE_POOL_REVOKE_OP_ID: case ENVELOPE_TYPE_CONTRACT_ID_FROM_ED25519: struct { + Hash networkID; uint256 ed25519; uint256 salt; } ed25519ContractID; case ENVELOPE_TYPE_CONTRACT_ID_FROM_CONTRACT: struct { + Hash networkID; Hash contractID; uint256 salt; } contractID; +case ENVELOPE_TYPE_CONTRACT_ID_FROM_ASSET: + struct + { + Hash networkID; + Asset asset; + } fromAsset; +case ENVELOPE_TYPE_CONTRACT_ID_FROM_SOURCE_ACCOUNT: + struct + { + Hash networkID; + AccountID sourceAccount; + uint256 salt; + } sourceAccountContractID; +case ENVELOPE_TYPE_CREATE_CONTRACT_ARGS: + struct + { + Hash networkID; + SCContractExecutable source; + uint256 salt; + } createContractArgs; +case ENVELOPE_TYPE_CONTRACT_AUTH: + struct + { + Hash networkID; + uint64 nonce; + AuthorizedInvocation invocation; + } contractAuth; }; enum MemoType @@ -1642,7 +1741,7 @@ enum InvokeHostFunctionResultCode union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: - void; + SCVal success; case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: void; diff --git a/xdr/next/Stellar-types.x b/xdr/next/Stellar-types.x index c3a1ebe2c..d71bf0d49 100644 --- a/xdr/next/Stellar-types.x +++ b/xdr/next/Stellar-types.x @@ -14,6 +14,9 @@ typedef int int32; typedef unsigned hyper uint64; typedef hyper int64; +typedef uint64 TimePoint; +typedef uint64 Duration; + // An ExtensionPoint is always marshaled as a 32-bit 0 value. At a // later point, it can be replaced by a different union so as to // extend a structure. @@ -79,6 +82,7 @@ typedef opaque Signature<64>; typedef opaque SignatureHint[4]; typedef PublicKey NodeID; +typedef PublicKey AccountID; struct Curve25519Secret {