@airgap/coinlib-core 0.13.6-beta.6 → 0.13.6-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/airgap-coinlib-core.min.js +1126 -2542
- package/index.d.ts +2 -1
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/protocols/tezos/TezosProtocol.d.ts +0 -15
- package/protocols/tezos/TezosProtocol.js +17 -354
- package/protocols/tezos/TezosProtocol.js.map +1 -1
- package/protocols/tezos/TezosProtocolOptions.d.ts +4 -6
- package/protocols/tezos/TezosProtocolOptions.js +4 -18
- package/protocols/tezos/TezosProtocolOptions.js.map +1 -1
- package/protocols/tezos/contract/TezosContract.d.ts +9 -7
- package/protocols/tezos/contract/TezosContract.js +63 -84
- package/protocols/tezos/contract/TezosContract.js.map +1 -1
- package/protocols/tezos/contract/TezosContractEntrypoint.js +1 -1
- package/protocols/tezos/contract/TezosContractEntrypoint.js.map +1 -1
- package/protocols/tezos/domains/TezosDomains.d.ts +2 -2
- package/protocols/tezos/domains/TezosDomains.js +36 -27
- package/protocols/tezos/domains/TezosDomains.js.map +1 -1
- package/protocols/tezos/fa/TezosBTC.d.ts +0 -1
- package/protocols/tezos/fa/TezosBTC.js +1 -43
- package/protocols/tezos/fa/TezosBTC.js.map +1 -1
- package/protocols/tezos/fa/TezosETHtz.d.ts +0 -1
- package/protocols/tezos/fa/TezosETHtz.js +1 -40
- package/protocols/tezos/fa/TezosETHtz.js.map +1 -1
- package/protocols/tezos/fa/TezosFA2Protocol.d.ts +0 -3
- package/protocols/tezos/fa/TezosFA2Protocol.js +28 -102
- package/protocols/tezos/fa/TezosFA2Protocol.js.map +1 -1
- package/protocols/tezos/fa/TezosFAProtocol.d.ts +2 -6
- package/protocols/tezos/fa/TezosFAProtocol.js +29 -167
- package/protocols/tezos/fa/TezosFAProtocol.js.map +1 -1
- package/protocols/tezos/fa/TezosKolibriUSD.d.ts +0 -1
- package/protocols/tezos/fa/TezosKolibriUSD.js +1 -40
- package/protocols/tezos/fa/TezosKolibriUSD.js.map +1 -1
- package/protocols/tezos/fa/TezosStaker.js +1 -15
- package/protocols/tezos/fa/TezosStaker.js.map +1 -1
- package/protocols/tezos/fa/TezosUSD.d.ts +0 -1
- package/protocols/tezos/fa/TezosUSD.js +1 -38
- package/protocols/tezos/fa/TezosUSD.js.map +1 -1
- package/protocols/tezos/fa/TezosWrapped.js +1 -36
- package/protocols/tezos/fa/TezosWrapped.js.map +1 -1
- package/protocols/tezos/indexerClient/TezosIndexerClient.d.ts +25 -0
- package/protocols/tezos/indexerClient/TezosIndexerClient.js +245 -0
- package/protocols/tezos/indexerClient/TezosIndexerClient.js.map +1 -0
- package/protocols/tezos/indexerClient/TezosProtocolIndexerClient.d.ts +26 -0
- package/protocols/tezos/indexerClient/TezosProtocolIndexerClient.js +3 -0
- package/protocols/tezos/indexerClient/TezosProtocolIndexerClient.js.map +1 -0
- package/protocols/tezos/kt/TezosKtProtocol.js +3 -33
- package/protocols/tezos/kt/TezosKtProtocol.js.map +1 -1
- package/protocols/tezos/sapling/TezosSaplingProtocolOptions.js +5 -1
- package/protocols/tezos/sapling/TezosSaplingProtocolOptions.js.map +1 -1
- package/protocols/tezos/types/TezosTransactionCursor.d.ts +1 -1
- package/protocols/tezos/types/contract/BigMap.d.ts +7 -0
- package/protocols/tezos/types/contract/{BigMapResult.js → BigMap.js} +1 -1
- package/protocols/tezos/types/contract/BigMap.js.map +1 -0
- package/protocols/tezos/types/contract/BigMapEnrtyFilter.d.ts +5 -0
- package/protocols/tezos/types/contract/{ConseilPredicate.js → BigMapEnrtyFilter.js} +1 -1
- package/protocols/tezos/types/contract/BigMapEnrtyFilter.js.map +1 -0
- package/protocols/tezos/types/contract/BigMapEntry.d.ts +7 -0
- package/protocols/tezos/types/contract/{BigMapPredicate.js → BigMapEntry.js} +1 -1
- package/protocols/tezos/types/contract/BigMapEntry.js.map +1 -0
- package/protocols/tezos/types/contract/BigMapRequest.d.ts +5 -4
- package/protocols/tezos/types/micheline/MichelineNodeUtils.js +1 -1
- package/protocols/tezos/types/micheline/MichelineNodeUtils.js.map +1 -1
- package/protocols/tezos/types/michelson/MichelsonTypeMeta.js +2 -2
- package/protocols/tezos/types/michelson/MichelsonTypeMeta.js.map +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonMap.js +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonMap.js.map +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonOption.js +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonOption.js.map +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonOr.js +2 -2
- package/protocols/tezos/types/michelson/generics/MichelsonOr.js.map +1 -1
- package/protocols/tezos/types/michelson/generics/MichelsonPair.js +2 -2
- package/protocols/tezos/types/michelson/generics/MichelsonPair.js.map +1 -1
- package/protocols/tezos/types/michelson/primitives/MichelsonBool.js +1 -1
- package/protocols/tezos/types/michelson/primitives/MichelsonBool.js.map +1 -1
- package/protocols/tezos/types/michelson/primitives/MichelsonUnit.js +1 -1
- package/protocols/tezos/types/michelson/primitives/MichelsonUnit.js.map +1 -1
- package/protocols/tezos/types/utils.d.ts +4 -1
- package/protocols/tezos/types/utils.js +7 -3
- package/protocols/tezos/types/utils.js.map +1 -1
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation005.d.ts +0 -14
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation005.js +0 -164
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation005.js.map +0 -1
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation006.d.ts +0 -9
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation006.js +0 -51
- package/protocols/tezos/rewardcalculation/TezosRewardCalculation006.js.map +0 -1
- package/protocols/tezos/rewardcalculation/TezosRewardCalculationDefault.d.ts +0 -36
- package/protocols/tezos/rewardcalculation/TezosRewardCalculationDefault.js +0 -642
- package/protocols/tezos/rewardcalculation/TezosRewardCalculationDefault.js.map +0 -1
- package/protocols/tezos/types/contract/BigMapPredicate.d.ts +0 -4
- package/protocols/tezos/types/contract/BigMapPredicate.js.map +0 -1
- package/protocols/tezos/types/contract/BigMapResult.d.ts +0 -6
- package/protocols/tezos/types/contract/BigMapResult.js.map +0 -1
- package/protocols/tezos/types/contract/ConseilPredicate.d.ts +0 -7
- package/protocols/tezos/types/contract/ConseilPredicate.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ import { TezosUBTC, TezosUBTCProtocolConfig } from './protocols/tezos/fa/TezosUB
|
|
|
145
145
|
import { TezosDOGA, TezosDOGAProtocolConfig } from './protocols/tezos/fa/TezosDOGA';
|
|
146
146
|
import { TezosBTCTez, TezosBTCTezProtocolConfig } from './protocols/tezos/fa/TezosBTCtez';
|
|
147
147
|
import { TezosSIRS, TezosSIRSProtocolConfig } from './protocols/tezos/fa/TezosSIRS';
|
|
148
|
+
import { TezosIndexerClient } from './protocols/tezos/indexerClient/TezosIndexerClient';
|
|
148
149
|
export { AirGapWallet, AirGapMarketWallet, AirGapCoinWallet, AirGapWalletStatus, AirGapNFTWallet, IAirGapWallet, IAirGapTransaction, ICoinProtocol, ICoinSubProtocol, ICoinDelegateProtocol, CryptoClient, ProtocolBlockExplorer, ProtocolNetwork, ProtocolSymbols, MainProtocolSymbols, SubProtocolSymbols, NetworkType, FeeDefaults };
|
|
149
150
|
export { AeternityProtocol, AeternityCryptoClient, AeternityProtocolOptions, AeternalBlockExplorer, AeternityProtocolNetwork, AeternityAddress, RawAeternityTransaction };
|
|
150
151
|
export { BitcoinProtocol, BitcoinTestnetProtocol, BitcoinCryptoClient, BitcoinProtocolNetworkExtras, BlockcypherBlockExplorer, BitcoinProtocolNetwork, BitcoinProtocolConfig, BitcoinProtocolOptions, BitcoinAddress, RawBitcoinTransaction };
|
|
@@ -153,7 +154,7 @@ export { CosmosProtocol, CosmosCryptoClient, MintscanBlockExplorer, CosmosProtoc
|
|
|
153
154
|
export { EthereumProtocol, EthereumRopstenProtocol, EthereumClassicProtocol, GenericERC20, EthereumCryptoClient, EthereumProtocolNetworkExtras, EtherscanBlockExplorer, EthereumProtocolNetwork, EthereumProtocolConfig, EthereumProtocolOptions, EthereumERC20ProtocolConfig, EthereumERC20ProtocolOptions, EthereumAddress, RawEthereumTransaction };
|
|
154
155
|
export { GroestlcoinProtocol, GroestlcoinTestnetProtocol, GroestlcoinProtocolNetworkExtras, CryptoidBlockExplorer, GroestlcoinProtocolNetwork, GroestlcoinProtocolConfig, GroestlcoinProtocolOptions };
|
|
155
156
|
export { SubstrateProtocol, SubstrateDelegateProtocol, PolkadotProtocol, KusamaProtocol, MoonbeamProtocol, MoonbaseProtocol, MoonriverProtocol, AstarProtocol, ShidenProtocol, SubstrateNetwork, SubstratePayee, SubstrateCryptoClient, SubstrateProtocolNetworkExtras, SubstrateProtocolConfig, SubstrateProtocolNetwork, SubstrateProtocolOptions, SubstrateNodeClient, KusamaProtocolNetworkExtras, KusamaSubscanBlockExplorer as KusamaPolkascanBlockExplorer, KusamaProtocolConfig, KusamaProtocolNetwork, KusamaProtocolOptions, PolkadotProtocolNetworkExtras, PolkadotSubscanBlockExplorer, PolkadotProtocolConfig, PolkadotProtocolNetwork, PolkadotProtocolOptions, MoonbaseProtocolNetworkExtras, MoonbaseSubscanBlockExplorer, MoonbaseProtocolConfig, MoonbaseProtocolNetwork, MoonbaseProtocolOptions, MoonriverProtocolNetworkExtras, MoonriverSubscanBlockExplorer, MoonriverProtocolConfig, MoonriverProtocolNetwork, MoonriverProtocolOptions, SubstrateElectionStatus, SubstrateNominationStatus, SubstrateNominatorDetails, SubstrateStakingDetails, SubstrateStakingActionType, SubstrateValidatorDetails, SubstrateTransaction, SubstrateAddress, RawSubstrateTransaction };
|
|
156
|
-
export { TezosProtocol, TezosKtProtocol, TezosFAProtocol, TezosFA1Protocol, TezosFA1p2Protocol, TezosFA2Protocol, TezosBTC, TezosStaker, TezosUSD, TezosUSDT, TezosETHtz as TezosETH, TezosUUSD, TezosYOU, TezosUDEFI, TezosUBTC, TezosWrapped, TezosWRAP, TezosKolibriUSD, TezosCTez, TezosPlenty, TezosQUIPU, TezosDOGA, TezosBTCTez, TezosSIRS, TezosTransactionResult, TezosTransactionCursor, BakerInfo, DelegationRewardInfo, DelegationInfo, TezosPayoutInfo, TezosDelegatorAction, TezosCryptoClient, TezosProtocolNetworkExtras, TezblockBlockExplorer, TezosProtocolNetwork, TezosProtocolConfig, TezosProtocolOptions, TezosFAProtocolConfig, TezosFA2ProtocolConfig, TezosBTCProtocolConfig, TezosETHtzProtocolConfig as TezosETHProtocolConfig, TezosUUSDProtocolConfig, TezosYOUProtocolConfig, TezosWrappedProtocolConfig, TezosKolibriUSDProtocolConfig, TezosStakerProtocolConfig, TezosUSDProtocolConfig, TezosUSDTProtocolConfig, TezosCTezProtocolConfig, TezosPlentyProtocolConfig, TezosUDEFIProtocolConfig, TezosUBTCProtocolConfig, TezosWRAPProtocolConfig, TezosQUIPUProtocolConfig, TezosDOGAProtocolConfig, TezosSIRSProtocolConfig, TezosBTCTezProtocolConfig, TezosFAProtocolOptions, TezosFA2ProtocolOptions, TezosNetwork, TezosSaplingProtocol, TezosShieldedTezProtocol, TezosSaplingProtocolOptions, TezosSaplingProtocolConfig, TezosShieldedTezProtocolConfig, TezosSaplingExternalMethodProvider, TezosSaplingTransaction, TezosUtils, TezosWrappedOperation, TezosAddress, RawTezosTransaction, TezosDomains };
|
|
157
|
+
export { TezosProtocol, TezosKtProtocol, TezosFAProtocol, TezosFA1Protocol, TezosFA1p2Protocol, TezosFA2Protocol, TezosBTC, TezosStaker, TezosUSD, TezosUSDT, TezosETHtz as TezosETH, TezosUUSD, TezosYOU, TezosUDEFI, TezosUBTC, TezosWrapped, TezosWRAP, TezosKolibriUSD, TezosCTez, TezosPlenty, TezosQUIPU, TezosDOGA, TezosBTCTez, TezosSIRS, TezosTransactionResult, TezosTransactionCursor, BakerInfo, DelegationRewardInfo, DelegationInfo, TezosPayoutInfo, TezosDelegatorAction, TezosCryptoClient, TezosProtocolNetworkExtras, TezblockBlockExplorer, TezosProtocolNetwork, TezosProtocolConfig, TezosProtocolOptions, TezosFAProtocolConfig, TezosFA2ProtocolConfig, TezosBTCProtocolConfig, TezosETHtzProtocolConfig as TezosETHProtocolConfig, TezosUUSDProtocolConfig, TezosYOUProtocolConfig, TezosWrappedProtocolConfig, TezosKolibriUSDProtocolConfig, TezosStakerProtocolConfig, TezosUSDProtocolConfig, TezosUSDTProtocolConfig, TezosCTezProtocolConfig, TezosPlentyProtocolConfig, TezosUDEFIProtocolConfig, TezosUBTCProtocolConfig, TezosWRAPProtocolConfig, TezosQUIPUProtocolConfig, TezosDOGAProtocolConfig, TezosSIRSProtocolConfig, TezosBTCTezProtocolConfig, TezosFAProtocolOptions, TezosFA2ProtocolOptions, TezosNetwork, TezosSaplingProtocol, TezosShieldedTezProtocol, TezosSaplingProtocolOptions, TezosSaplingProtocolConfig, TezosShieldedTezProtocolConfig, TezosSaplingExternalMethodProvider, TezosSaplingTransaction, TezosUtils, TezosWrappedOperation, TezosAddress, RawTezosTransaction, TezosDomains, TezosIndexerClient };
|
|
157
158
|
export { IACMessageType, IACMessageDefinitionObject, IACMessageDefinitionObjectV3, AccountShareResponse, MessageSignRequest, MessageSignResponse, SignedTransaction, UnsignedTransaction, UnsignedAeternityTransaction, UnsignedBitcoinTransaction, UnsignedBitcoinSegwitTransaction, UnsignedCosmosTransaction, UnsignedEthereumTransaction, UnsignedTypedEthereumTransaction, UnsignedTezosTransaction, SignedAeternityTransaction, SignedBitcoinTransaction, SignedBitcoinSegwitTransaction, SignedCosmosTransaction, SignedEthereumTransaction, SignedTezosTransaction, Serializer, SerializerV3, Message, SerializedAirGapWallet };
|
|
158
159
|
export { Action, RepeatableAction, LinkedAction, SimpleAction, ImportAccountAction, ImportAccoutActionContext };
|
|
159
160
|
export { isNetworkEqual, getProtocolOptionsByIdentifier, addSupportedProtocol, getProtocolByIdentifier, getSubProtocolsByIdentifier, supportedProtocols, isProtocolSymbol, isMainProtocolSymbol, isSubProtocolSymbol, TypeNotSupported, SerializerVersionMismatch, ProtocolNotSupported, NetworkError, CoinlibError, SerializerErrorType, ProtocolErrorType, BalanceError, TransactionError, Domain, isCoinlibReady, addSubProtocol, generateId, generateIdV2, TimeInterval, DelegateeDetails, DelegatorAction, DelegatorDetails, DelegatorReward, IAirGapSignedTransaction, IAirGapTransactionResult, AirGapWalletPriceService, IProtocolTransactionCursor, SubProtocolType, assertNever };
|
package/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EthereumAddress = exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.EthereumCryptoClient = exports.GenericERC20 = exports.EthereumClassicProtocol = exports.EthereumRopstenProtocol = exports.EthereumProtocol = exports.CosmosTransaction = exports.CosmosAddress = exports.CosmosDelegationActionType = exports.CosmosProtocolOptions = exports.CosmosProtocolConfig = exports.CosmosProtocolNetwork = exports.MintscanBlockExplorer = exports.CosmosCryptoClient = exports.CosmosProtocol = exports.BitcoinSegwitAddress = exports.BitcoinSegwitProtocol = exports.BitcoinAddress = exports.BitcoinProtocolOptions = exports.BitcoinProtocolConfig = exports.BitcoinProtocolNetwork = exports.BlockcypherBlockExplorer = exports.BitcoinProtocolNetworkExtras = exports.BitcoinCryptoClient = exports.BitcoinTestnetProtocol = exports.BitcoinProtocol = exports.AeternityAddress = exports.AeternityProtocolNetwork = exports.AeternalBlockExplorer = exports.AeternityProtocolOptions = exports.AeternityCryptoClient = exports.AeternityProtocol = exports.NetworkType = exports.SubProtocolSymbols = exports.MainProtocolSymbols = exports.ProtocolNetwork = exports.ProtocolBlockExplorer = exports.CryptoClient = exports.AirGapNFTWallet = exports.AirGapWalletStatus = exports.AirGapCoinWallet = exports.AirGapMarketWallet = exports.AirGapWallet = void 0;
|
|
4
4
|
exports.TezosProtocol = exports.SubstrateAddress = exports.SubstrateTransaction = exports.SubstrateStakingActionType = exports.SubstrateNominationStatus = exports.SubstrateElectionStatus = exports.MoonriverProtocolOptions = exports.MoonriverProtocolNetwork = exports.MoonriverProtocolConfig = exports.MoonriverSubscanBlockExplorer = exports.MoonriverProtocolNetworkExtras = exports.MoonbaseProtocolOptions = exports.MoonbaseProtocolNetwork = exports.MoonbaseProtocolConfig = exports.MoonbaseSubscanBlockExplorer = exports.MoonbaseProtocolNetworkExtras = exports.PolkadotProtocolOptions = exports.PolkadotProtocolNetwork = exports.PolkadotProtocolConfig = exports.PolkadotSubscanBlockExplorer = exports.PolkadotProtocolNetworkExtras = exports.KusamaProtocolOptions = exports.KusamaProtocolNetwork = exports.KusamaProtocolConfig = exports.KusamaPolkascanBlockExplorer = exports.KusamaProtocolNetworkExtras = exports.SubstrateNodeClient = exports.SubstrateProtocolOptions = exports.SubstrateProtocolNetwork = exports.SubstrateProtocolConfig = exports.SubstrateProtocolNetworkExtras = exports.SubstrateCryptoClient = exports.SubstratePayee = exports.SubstrateNetwork = exports.ShidenProtocol = exports.AstarProtocol = exports.MoonriverProtocol = exports.MoonbaseProtocol = exports.MoonbeamProtocol = exports.KusamaProtocol = exports.PolkadotProtocol = exports.SubstrateDelegateProtocol = exports.SubstrateProtocol = exports.GroestlcoinProtocolOptions = exports.GroestlcoinProtocolConfig = exports.GroestlcoinProtocolNetwork = exports.CryptoidBlockExplorer = exports.GroestlcoinProtocolNetworkExtras = exports.GroestlcoinTestnetProtocol = exports.GroestlcoinProtocol = void 0;
|
|
5
|
-
exports.TezosBTCTezProtocolConfig = exports.TezosSIRSProtocolConfig = exports.TezosDOGAProtocolConfig = exports.TezosQUIPUProtocolConfig = exports.TezosWRAPProtocolConfig = exports.TezosUBTCProtocolConfig = exports.TezosUDEFIProtocolConfig = exports.TezosPlentyProtocolConfig = exports.TezosCTezProtocolConfig = exports.TezosUSDTProtocolConfig = exports.TezosUSDProtocolConfig = exports.TezosStakerProtocolConfig = exports.TezosKolibriUSDProtocolConfig = exports.TezosWrappedProtocolConfig = exports.TezosYOUProtocolConfig = exports.TezosUUSDProtocolConfig = exports.TezosETHProtocolConfig = exports.TezosBTCProtocolConfig = exports.TezosFA2ProtocolConfig = exports.TezosFAProtocolConfig = exports.TezosProtocolOptions = exports.TezosProtocolConfig = exports.TezosProtocolNetwork = exports.TezblockBlockExplorer = exports.
|
|
6
|
-
exports.bufferFrom = exports.assertNever = exports.SubProtocolType = exports.TimeInterval = exports.generateIdV2 = exports.generateId = exports.addSubProtocol = exports.isCoinlibReady = exports.Domain = exports.TransactionError = exports.BalanceError = exports.ProtocolErrorType = exports.SerializerErrorType = exports.CoinlibError = exports.NetworkError = exports.ProtocolNotSupported = exports.SerializerVersionMismatch = exports.TypeNotSupported = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.isProtocolSymbol = exports.supportedProtocols = exports.getSubProtocolsByIdentifier = exports.getProtocolByIdentifier = exports.addSupportedProtocol = exports.getProtocolOptionsByIdentifier = exports.isNetworkEqual = exports.ImportAccountAction = exports.SimpleAction = exports.LinkedAction = exports.RepeatableAction = exports.Action = exports.Message = exports.SerializerV3 = exports.Serializer = exports.IACMessageType = exports.TezosDomains = exports.TezosAddress = exports.TezosUtils = exports.TezosShieldedTezProtocolConfig = exports.TezosSaplingProtocolConfig = exports.TezosSaplingProtocolOptions = exports.TezosShieldedTezProtocol = exports.TezosSaplingProtocol = exports.TezosNetwork = exports.TezosFA2ProtocolOptions =
|
|
5
|
+
exports.TezosFAProtocolOptions = exports.TezosBTCTezProtocolConfig = exports.TezosSIRSProtocolConfig = exports.TezosDOGAProtocolConfig = exports.TezosQUIPUProtocolConfig = exports.TezosWRAPProtocolConfig = exports.TezosUBTCProtocolConfig = exports.TezosUDEFIProtocolConfig = exports.TezosPlentyProtocolConfig = exports.TezosCTezProtocolConfig = exports.TezosUSDTProtocolConfig = exports.TezosUSDProtocolConfig = exports.TezosStakerProtocolConfig = exports.TezosKolibriUSDProtocolConfig = exports.TezosWrappedProtocolConfig = exports.TezosYOUProtocolConfig = exports.TezosUUSDProtocolConfig = exports.TezosETHProtocolConfig = exports.TezosBTCProtocolConfig = exports.TezosFA2ProtocolConfig = exports.TezosFAProtocolConfig = exports.TezosProtocolOptions = exports.TezosProtocolConfig = exports.TezosProtocolNetwork = exports.TezblockBlockExplorer = exports.TezosCryptoClient = exports.TezosDelegatorAction = exports.TezosSIRS = exports.TezosBTCTez = exports.TezosDOGA = exports.TezosQUIPU = exports.TezosPlenty = exports.TezosCTez = exports.TezosKolibriUSD = exports.TezosWRAP = exports.TezosWrapped = exports.TezosUBTC = exports.TezosUDEFI = exports.TezosYOU = exports.TezosUUSD = exports.TezosETH = exports.TezosUSDT = exports.TezosUSD = exports.TezosStaker = exports.TezosBTC = exports.TezosFA2Protocol = exports.TezosFA1p2Protocol = exports.TezosFA1Protocol = exports.TezosFAProtocol = exports.TezosKtProtocol = void 0;
|
|
6
|
+
exports.bufferFrom = exports.assertNever = exports.SubProtocolType = exports.TimeInterval = exports.generateIdV2 = exports.generateId = exports.addSubProtocol = exports.isCoinlibReady = exports.Domain = exports.TransactionError = exports.BalanceError = exports.ProtocolErrorType = exports.SerializerErrorType = exports.CoinlibError = exports.NetworkError = exports.ProtocolNotSupported = exports.SerializerVersionMismatch = exports.TypeNotSupported = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.isProtocolSymbol = exports.supportedProtocols = exports.getSubProtocolsByIdentifier = exports.getProtocolByIdentifier = exports.addSupportedProtocol = exports.getProtocolOptionsByIdentifier = exports.isNetworkEqual = exports.ImportAccountAction = exports.SimpleAction = exports.LinkedAction = exports.RepeatableAction = exports.Action = exports.Message = exports.SerializerV3 = exports.Serializer = exports.IACMessageType = exports.TezosIndexerClient = exports.TezosDomains = exports.TezosAddress = exports.TezosUtils = exports.TezosShieldedTezProtocolConfig = exports.TezosSaplingProtocolConfig = exports.TezosSaplingProtocolOptions = exports.TezosShieldedTezProtocol = exports.TezosSaplingProtocol = exports.TezosNetwork = exports.TezosFA2ProtocolOptions = void 0;
|
|
7
7
|
// tslint:disable:ordered-imports
|
|
8
8
|
// This needs to be imported first, otherwise the tests won't run anymore
|
|
9
9
|
var EthereumProtocol_1 = require("./protocols/ethereum/EthereumProtocol");
|
|
@@ -172,7 +172,6 @@ Object.defineProperty(exports, "PolkadotProtocolOptions", { enumerable: true, ge
|
|
|
172
172
|
var CryptoClient_1 = require("./protocols/CryptoClient");
|
|
173
173
|
Object.defineProperty(exports, "CryptoClient", { enumerable: true, get: function () { return CryptoClient_1.CryptoClient; } });
|
|
174
174
|
var TezosProtocolOptions_1 = require("./protocols/tezos/TezosProtocolOptions");
|
|
175
|
-
Object.defineProperty(exports, "TezosProtocolNetworkExtras", { enumerable: true, get: function () { return TezosProtocolOptions_1.TezosProtocolNetworkExtras; } });
|
|
176
175
|
Object.defineProperty(exports, "TezblockBlockExplorer", { enumerable: true, get: function () { return TezosProtocolOptions_1.TezblockBlockExplorer; } });
|
|
177
176
|
Object.defineProperty(exports, "TezosProtocolNetwork", { enumerable: true, get: function () { return TezosProtocolOptions_1.TezosProtocolNetwork; } });
|
|
178
177
|
Object.defineProperty(exports, "TezosProtocolConfig", { enumerable: true, get: function () { return TezosProtocolOptions_1.TezosProtocolConfig; } });
|
|
@@ -315,4 +314,6 @@ Object.defineProperty(exports, "TezosBTCTezProtocolConfig", { enumerable: true,
|
|
|
315
314
|
var TezosSIRS_1 = require("./protocols/tezos/fa/TezosSIRS");
|
|
316
315
|
Object.defineProperty(exports, "TezosSIRS", { enumerable: true, get: function () { return TezosSIRS_1.TezosSIRS; } });
|
|
317
316
|
Object.defineProperty(exports, "TezosSIRSProtocolConfig", { enumerable: true, get: function () { return TezosSIRS_1.TezosSIRSProtocolConfig; } });
|
|
317
|
+
var TezosIndexerClient_1 = require("./protocols/tezos/indexerClient/TezosIndexerClient");
|
|
318
|
+
Object.defineProperty(exports, "TezosIndexerClient", { enumerable: true, get: function () { return TezosIndexerClient_1.TezosIndexerClient; } });
|
|
318
319
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,yEAAyE;AACzE,0EAAwE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,yEAAyE;AACzE,0EAAwE;AA+UtE,iGA/UO,mCAAgB,OA+UP;AA7UlB,mCASiB;AA4gBf,qGAphBA,6BAAoB,OAohBA;AADpB,0GAlhBA,kCAAyB,OAkhBA;AADzB,iGAhhBA,yBAAgB,OAghBA;AAGhB,6FAlhBA,qBAAY,OAkhBA;AAEZ,oGAnhBA,4BAAmB,OAmhBA;AACnB,kGAnhBA,0BAAiB,OAmhBA;AACjB,6FAnhBA,qBAAY,OAmhBA;AACZ,iGAnhBA,yBAAgB,OAmhBA;AAjhBlB,wDAA6D;AA6gB3D,6FA7gBO,4BAAY,OA6gBP;AAKZ,uFAlhBqB,sBAAM,OAkhBrB;AA/gBR,6EAA2E;AAqRzE,kGArRO,qCAAiB,OAqRP;AApRnB,uEAAqE;AA+RnE,gGA/RO,iCAAe,OA+RP;AA9RjB,qFAAmF;AA+RjF,uGA/RO,+CAAsB,OA+RP;AA9RxB,oEAA8F;AAsT5F,2GAtTO,2CAA0B,OAsTP;AAR1B,+FA9SmC,+BAAc,OA8SnC;AA7ShB,wEAAsE;AA+TpE,6FA/TO,2BAAY,OA+TP;AA9Td,wFAAsF;AA6TpF,wGA7TO,iDAAuB,OA6TP;AA5TzB,wFAAsF;AA2TpF,wGA3TO,iDAAuB,OA2TP;AA1TzB,mFAAiF;AA2U/E,oGA3UO,yCAAmB,OA2UP;AA1UrB,iGAA+F;AA2U7F,2GA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E,wGA5JA,kDAAuB,OA4JA;AACvB,yGA5JA,mDAAwB,OA4JA;AAHxB,+GAxJA,yDAA8B,OAwJA;AAI9B,yGA3JA,mDAAwB,OA2JA;AAHxB,8GAvJA,wDAA6B,OAuJA;AArJ/B,oFAAkF;AAwHhF,iGAxHO,mCAAgB,OAwHP;AArHlB,8DAAsF;AAgLpF,2FAhLO,uBAAU,OAgLP;AAqCV,yGArNmB,qCAAwB,OAqNnB;AApN1B,4DAAmF;AAoLjF,0FApLO,qBAAS,OAoLP;AA8BT,wGAlNkB,mCAAuB,OAkNlB;AAjNzB,gEAAyF;AAoLvF,4FApLO,yBAAW,OAoLP;AA8BX,0GAlNoB,uCAAyB,OAkNpB;AAjN3B,4DAAmF;AAgLjF,0FAhLO,qBAAS,OAgLP;AAoCT,wGApNkB,mCAAuB,OAoNlB;AAnNzB,8DAAsF;AAmLpF,2FAnLO,uBAAU,OAmLP;AAiCV,yGApNmB,qCAAwB,OAoNnB;AAjN1B,2EAAyE;AAiHvE,8FAjHO,6BAAa,OAiHP;AAhHf,oFAAkF;AAiHhF,+FAjHO,+BAAc,OAiHP;AAhHhB,4DAAmF;AAwKjF,0FAxKO,qBAAS,OAwKP;AAqCT,wGA7MkB,mCAAuB,OA6MlB;AA5MzB,4DAAmF;AA8KjF,0FA9KO,qBAAS,OA8KP;AAiCT,wGA/MkB,mCAAuB,OA+MlB;AA9MzB,gEAAyF;AA8KvF,4FA9KO,yBAAW,OA8KP;AAkCX,0GAhNoB,uCAAyB,OAgNpB;AA/M3B,4DAAmF;AA8KjF,0FA9KO,qBAAS,OA8KP;AAgCT,wGA9MkB,mCAAuB,OA8MlB;AA7MzB,yFAAuF;AA8NrF,mGA9NO,uCAAkB,OA8NP"}
|
package/package.json
CHANGED
|
@@ -128,12 +128,6 @@ export declare class TezosProtocol extends NonExtendedProtocol implements ICoinD
|
|
|
128
128
|
protected readonly originationBurn: BigNumber;
|
|
129
129
|
readonly cryptoClient: TezosCryptoClient;
|
|
130
130
|
get jsonRPCAPI(): string;
|
|
131
|
-
get baseApiUrl(): string;
|
|
132
|
-
get baseApiNetwork(): string;
|
|
133
|
-
readonly headers: {
|
|
134
|
-
'Content-Type': string;
|
|
135
|
-
apiKey: string;
|
|
136
|
-
};
|
|
137
131
|
constructor(options?: TezosProtocolOptions);
|
|
138
132
|
getBlockExplorerLinkForAddress(address: string): Promise<string>;
|
|
139
133
|
getBlockExplorerLinkForTxId(txId: string): Promise<string>;
|
|
@@ -206,21 +200,13 @@ export declare class TezosProtocol extends NonExtendedProtocol implements ICoinD
|
|
|
206
200
|
createRevealOperation(counter: BigNumber, publicKey: string, address: string, fee?: string): Promise<TezosRevealOperation>;
|
|
207
201
|
getTezosVotingInfo(blockHash: string): Promise<TezosVotingInfo[]>;
|
|
208
202
|
fetchCurrentCycle(): Promise<number>;
|
|
209
|
-
private static readonly FIRST_005_CYCLE;
|
|
210
|
-
private static readonly FIRST_006_CYCLE;
|
|
211
203
|
private static readonly FIRST_010_CYCLE;
|
|
212
204
|
private static readonly BLOCKS_PER_CYCLE;
|
|
213
205
|
private static readonly TIME_BETWEEN_BLOCKS;
|
|
214
206
|
timeIntervalBetweenCycles(fromCycle: number, toCycle: number): number;
|
|
215
207
|
cycleToBlockLevel(cycle: number): number;
|
|
216
208
|
blockLevelToCycle(blockLevel: number): number;
|
|
217
|
-
private readonly rewardCalculations;
|
|
218
|
-
calculateRewards(bakerAddress: string, cycle: number, currentCycle?: number, breakDownRewards?: boolean): Promise<TezosRewards>;
|
|
219
|
-
calculatePayouts(rewards: TezosRewards, offsetOrAddresses: number | string[], limit?: number): Promise<TezosPayoutInfo[]>;
|
|
220
|
-
calculatePayout(address: string, rewards: TezosRewards): Promise<TezosPayoutInfo>;
|
|
221
|
-
private calculatePayoutForAddresses;
|
|
222
209
|
private fetchBlockMetadata;
|
|
223
|
-
private fetchBalances;
|
|
224
210
|
signMessage(message: string, keypair: {
|
|
225
211
|
privateKey: Buffer;
|
|
226
212
|
}): Promise<string>;
|
|
@@ -263,7 +249,6 @@ export interface TezosEndorsingRight {
|
|
|
263
249
|
number_of_slots: number;
|
|
264
250
|
}
|
|
265
251
|
export interface TezosRewardsCalculations {
|
|
266
|
-
protocol: TezosProtocol;
|
|
267
252
|
calculateRewards(bakerAddress: string, cycle: number, breakDownRewards: boolean, currentCycleIn?: number): Promise<TezosRewards>;
|
|
268
253
|
}
|
|
269
254
|
export interface TezosRewards {
|
|
@@ -90,13 +90,9 @@ var bignumber_1 = __importDefault(require("../../dependencies/src/bignumber.js-9
|
|
|
90
90
|
var index_2 = require("../../dependencies/src/bip39-2.5.0/index");
|
|
91
91
|
var bs58check = __importStar(require("../../dependencies/src/bs58check-2.1.2/index"));
|
|
92
92
|
var index_3 = require("../../dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/index");
|
|
93
|
-
var IAirGapTransaction_1 = require("../../interfaces/IAirGapTransaction");
|
|
94
93
|
var ProtocolSymbols_1 = require("../../utils/ProtocolSymbols");
|
|
95
94
|
var subProtocols_1 = require("../../utils/subProtocols");
|
|
96
95
|
var NonExtendedProtocol_1 = require("../NonExtendedProtocol");
|
|
97
|
-
var TezosRewardCalculation005_1 = require("./rewardcalculation/TezosRewardCalculation005");
|
|
98
|
-
var TezosRewardCalculation006_1 = require("./rewardcalculation/TezosRewardCalculation006");
|
|
99
|
-
var TezosRewardCalculationDefault_1 = require("./rewardcalculation/TezosRewardCalculationDefault");
|
|
100
96
|
var TezosAddress_1 = require("./TezosAddress");
|
|
101
97
|
var TezosCryptoClient_1 = require("./TezosCryptoClient");
|
|
102
98
|
var TezosProtocolOptions_1 = require("./TezosProtocolOptions");
|
|
@@ -166,13 +162,6 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
166
162
|
_this.activationBurn = _this.originationSize.times(_this.storageCostPerByte);
|
|
167
163
|
_this.originationBurn = _this.originationSize.times(_this.storageCostPerByte); // https://tezos.stackexchange.com/a/787
|
|
168
164
|
_this.cryptoClient = new TezosCryptoClient_1.TezosCryptoClient(TezosUtils_1.TezosUtils.tezosPrefixes.edsig);
|
|
169
|
-
_this.headers = { 'Content-Type': 'application/json', apiKey: 'airgap00391' };
|
|
170
|
-
_this.rewardCalculations = {
|
|
171
|
-
alpha: new TezosRewardCalculationDefault_1.TezosRewardsCalculationDefault(_this),
|
|
172
|
-
babylon: new TezosRewardCalculation005_1.TezosRewardsCalculation005(_this),
|
|
173
|
-
cartha: new TezosRewardCalculation006_1.TezosRewardsCalculation006(_this)
|
|
174
|
-
};
|
|
175
|
-
_this.headers.apiKey = options.network.extras.conseilApiKey;
|
|
176
165
|
return _this;
|
|
177
166
|
}
|
|
178
167
|
Object.defineProperty(TezosProtocol.prototype, "subProtocols", {
|
|
@@ -190,20 +179,6 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
190
179
|
enumerable: false,
|
|
191
180
|
configurable: true
|
|
192
181
|
});
|
|
193
|
-
Object.defineProperty(TezosProtocol.prototype, "baseApiUrl", {
|
|
194
|
-
get: function () {
|
|
195
|
-
return this.options.network.extras.conseilUrl;
|
|
196
|
-
},
|
|
197
|
-
enumerable: false,
|
|
198
|
-
configurable: true
|
|
199
|
-
});
|
|
200
|
-
Object.defineProperty(TezosProtocol.prototype, "baseApiNetwork", {
|
|
201
|
-
get: function () {
|
|
202
|
-
return this.options.network.extras.conseilNetwork;
|
|
203
|
-
},
|
|
204
|
-
enumerable: false,
|
|
205
|
-
configurable: true
|
|
206
|
-
});
|
|
207
182
|
TezosProtocol.prototype.getBlockExplorerLinkForAddress = function (address) {
|
|
208
183
|
return __awaiter(this, void 0, void 0, function () {
|
|
209
184
|
return __generator(this, function (_a) {
|
|
@@ -309,112 +284,21 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
309
284
|
});
|
|
310
285
|
};
|
|
311
286
|
TezosProtocol.prototype.getTransactionsFromAddresses = function (addresses, limit, cursor) {
|
|
287
|
+
var _a;
|
|
312
288
|
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
var
|
|
289
|
+
var address, results;
|
|
314
290
|
var _this = this;
|
|
315
|
-
return __generator(this, function (
|
|
316
|
-
switch (
|
|
317
|
-
case 0:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
fields: ['status', 'amount', 'fee', 'source', 'destination', 'operation_group_hash', 'timestamp', 'block_level'],
|
|
321
|
-
predicates: [
|
|
322
|
-
{
|
|
323
|
-
field: 'source',
|
|
324
|
-
operation: 'eq',
|
|
325
|
-
set: [address],
|
|
326
|
-
inverse: false,
|
|
327
|
-
group: 'a'
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
field: 'destination',
|
|
331
|
-
operation: 'eq',
|
|
332
|
-
set: [address],
|
|
333
|
-
inverse: false,
|
|
334
|
-
group: 'b'
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
field: 'kind',
|
|
338
|
-
operation: 'eq',
|
|
339
|
-
set: ['transaction'],
|
|
340
|
-
inverse: false,
|
|
341
|
-
group: 'a'
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
field: 'kind',
|
|
345
|
-
operation: 'eq',
|
|
346
|
-
set: ['transaction'],
|
|
347
|
-
inverse: false,
|
|
348
|
-
group: 'b'
|
|
349
|
-
}
|
|
350
|
-
],
|
|
351
|
-
orderBy: [
|
|
352
|
-
{
|
|
353
|
-
field: 'block_level',
|
|
354
|
-
direction: 'desc'
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
limit: limit
|
|
358
|
-
};
|
|
359
|
-
if (cursor && cursor.lastBlockLevel) {
|
|
360
|
-
body.predicates.push({
|
|
361
|
-
field: 'block_level',
|
|
362
|
-
operation: 'lt',
|
|
363
|
-
set: [cursor.lastBlockLevel.toString()],
|
|
364
|
-
inverse: false,
|
|
365
|
-
group: 'a'
|
|
366
|
-
});
|
|
367
|
-
body.predicates.push({
|
|
368
|
-
field: 'block_level',
|
|
369
|
-
operation: 'lt',
|
|
370
|
-
set: [cursor.lastBlockLevel.toString()],
|
|
371
|
-
inverse: false,
|
|
372
|
-
group: 'b'
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
return body;
|
|
376
|
-
};
|
|
377
|
-
// AirGapTransactionStatus.APPLIED : AirGapTransactionStatus.FAILED
|
|
378
|
-
return new Promise(function (resolve, _reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
379
|
-
var result;
|
|
380
|
-
return __generator(this, function (_a) {
|
|
381
|
-
switch (_a.label) {
|
|
382
|
-
case 0: return [4 /*yield*/, index_1.default
|
|
383
|
-
.post(this.options.network.extras.conseilUrl + "/v2/data/tezos/" + this.options.network.extras.conseilNetwork + "/operations", getRequestBody(), {
|
|
384
|
-
headers: this.headers
|
|
385
|
-
})
|
|
386
|
-
.catch(function () {
|
|
387
|
-
return { data: [] };
|
|
388
|
-
})];
|
|
389
|
-
case 1:
|
|
390
|
-
result = _a.sent();
|
|
391
|
-
resolve(result.data);
|
|
392
|
-
return [2 /*return*/];
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
}); });
|
|
396
|
-
}))];
|
|
291
|
+
return __generator(this, function (_b) {
|
|
292
|
+
switch (_b.label) {
|
|
293
|
+
case 0:
|
|
294
|
+
address = addresses[0];
|
|
295
|
+
return [4 /*yield*/, this.options.network.extras.indexerClient.getTransactions(address, limit, cursor === null || cursor === void 0 ? void 0 : cursor.offset)];
|
|
397
296
|
case 1:
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
amount: new bignumber_1.default(transaction.amount),
|
|
404
|
-
fee: new bignumber_1.default(transaction.fee),
|
|
405
|
-
from: [transaction.source],
|
|
406
|
-
isInbound: addresses.indexOf(transaction.destination) !== -1,
|
|
407
|
-
protocolIdentifier: _this.identifier,
|
|
408
|
-
network: _this.options.network,
|
|
409
|
-
to: [transaction.destination],
|
|
410
|
-
hash: transaction.operation_group_hash,
|
|
411
|
-
timestamp: transaction.timestamp / 1000,
|
|
412
|
-
blockHeight: transaction.block_level,
|
|
413
|
-
status: transaction.status === 'applied' ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED : IAirGapTransaction_1.AirGapTransactionStatus.FAILED
|
|
414
|
-
};
|
|
415
|
-
});
|
|
416
|
-
lastEntryBlockLevel = allTransactions.length > 0 ? allTransactions[allTransactions.length - 1].blockHeight : 0;
|
|
417
|
-
return [2 /*return*/, { transactions: allTransactions, cursor: { lastBlockLevel: lastEntryBlockLevel } }];
|
|
297
|
+
results = _b.sent();
|
|
298
|
+
return [2 /*return*/, {
|
|
299
|
+
transactions: results.map(function (transaction) { return (__assign(__assign({}, transaction), { protocolIdentifier: _this.identifier, network: _this.options.network })); }),
|
|
300
|
+
cursor: { offset: ((_a = cursor === null || cursor === void 0 ? void 0 : cursor.offset) !== null && _a !== void 0 ? _a : 0) + results.length }
|
|
301
|
+
}];
|
|
418
302
|
}
|
|
419
303
|
});
|
|
420
304
|
});
|
|
@@ -1408,70 +1292,19 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
1408
1292
|
TezosProtocol.prototype.getDelegationInfo = function (delegatedAddress, fetchExtraInfo) {
|
|
1409
1293
|
if (fetchExtraInfo === void 0) { fetchExtraInfo = true; }
|
|
1410
1294
|
return __awaiter(this, void 0, void 0, function () {
|
|
1411
|
-
var data, delegatedOpLevel, delegatedDate,
|
|
1295
|
+
var data, delegatedOpLevel, delegatedDate, recentTransactionData;
|
|
1412
1296
|
return __generator(this, function (_a) {
|
|
1413
1297
|
switch (_a.label) {
|
|
1414
1298
|
case 0: return [4 /*yield*/, index_1.default.get(this.options.network.rpcUrl + "/chains/main/blocks/head/context/contracts/" + delegatedAddress)];
|
|
1415
1299
|
case 1:
|
|
1416
1300
|
data = (_a.sent()).data;
|
|
1417
1301
|
if (!(data.delegate && fetchExtraInfo)) return [3 /*break*/, 3];
|
|
1418
|
-
|
|
1419
|
-
if (transactions.length > 0) {
|
|
1420
|
-
var mostRecentTransaction = transactions[0];
|
|
1421
|
-
return {
|
|
1422
|
-
date: new Date(mostRecentTransaction.timestamp),
|
|
1423
|
-
opLevel: mostRecentTransaction.block_level
|
|
1424
|
-
};
|
|
1425
|
-
}
|
|
1426
|
-
};
|
|
1427
|
-
getRequestBody = function (field, set) {
|
|
1428
|
-
return {
|
|
1429
|
-
predicates: [
|
|
1430
|
-
{
|
|
1431
|
-
field: field,
|
|
1432
|
-
operation: 'eq',
|
|
1433
|
-
set: [delegatedAddress],
|
|
1434
|
-
inverse: false
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
field: 'kind',
|
|
1438
|
-
operation: 'eq',
|
|
1439
|
-
set: [set],
|
|
1440
|
-
inverse: false
|
|
1441
|
-
}
|
|
1442
|
-
],
|
|
1443
|
-
orderBy: [
|
|
1444
|
-
{
|
|
1445
|
-
field: 'block_level',
|
|
1446
|
-
direction: 'desc'
|
|
1447
|
-
}
|
|
1448
|
-
]
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
transactionSourceUrl = this.options.network.extras.conseilUrl + "/v2/data/tezos/" + this.options.network.extras.conseilNetwork + "/operations";
|
|
1452
|
-
return [4 /*yield*/, Promise.all([
|
|
1453
|
-
index_1.default
|
|
1454
|
-
.post(transactionSourceUrl, getRequestBody('source', 'delegation'), {
|
|
1455
|
-
headers: this.headers
|
|
1456
|
-
})
|
|
1457
|
-
.catch(function () {
|
|
1458
|
-
return { data: [] };
|
|
1459
|
-
}),
|
|
1460
|
-
index_1.default
|
|
1461
|
-
.post(transactionSourceUrl, getRequestBody('manager_pubkey', 'origination'), {
|
|
1462
|
-
headers: this.headers
|
|
1463
|
-
})
|
|
1464
|
-
.catch(function () {
|
|
1465
|
-
return { data: [] };
|
|
1466
|
-
})
|
|
1467
|
-
])];
|
|
1302
|
+
return [4 /*yield*/, this.options.network.extras.indexerClient.getDelegationInfo(delegatedAddress)];
|
|
1468
1303
|
case 2:
|
|
1469
|
-
|
|
1470
|
-
combinedData = results[0].data.concat(results[1].data);
|
|
1471
|
-
recentTransactionData = getDataFromMostRecentTransaction(combinedData);
|
|
1304
|
+
recentTransactionData = _a.sent();
|
|
1472
1305
|
if (recentTransactionData) {
|
|
1473
1306
|
delegatedDate = recentTransactionData.date;
|
|
1474
|
-
delegatedOpLevel = recentTransactionData.
|
|
1307
|
+
delegatedOpLevel = recentTransactionData.level;
|
|
1475
1308
|
}
|
|
1476
1309
|
_a.label = 3;
|
|
1477
1310
|
case 3: return [2 /*return*/, {
|
|
@@ -1842,95 +1675,6 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
1842
1675
|
}
|
|
1843
1676
|
return cycle;
|
|
1844
1677
|
};
|
|
1845
|
-
TezosProtocol.prototype.calculateRewards = function (bakerAddress, cycle, currentCycle, breakDownRewards) {
|
|
1846
|
-
if (breakDownRewards === void 0) { breakDownRewards = true; }
|
|
1847
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1848
|
-
var is005, is006, rewardCalculation;
|
|
1849
|
-
return __generator(this, function (_a) {
|
|
1850
|
-
is005 = this.options.network.extras.network === TezosNetwork.MAINNET && cycle >= TezosProtocol.FIRST_005_CYCLE;
|
|
1851
|
-
is006 = this.options.network.extras.network !== TezosNetwork.MAINNET || cycle >= TezosProtocol.FIRST_006_CYCLE;
|
|
1852
|
-
if (is006) {
|
|
1853
|
-
rewardCalculation = this.rewardCalculations.cartha;
|
|
1854
|
-
}
|
|
1855
|
-
else if (is005) {
|
|
1856
|
-
rewardCalculation = this.rewardCalculations.babylon;
|
|
1857
|
-
}
|
|
1858
|
-
else {
|
|
1859
|
-
rewardCalculation = this.rewardCalculations.alpha;
|
|
1860
|
-
}
|
|
1861
|
-
return [2 /*return*/, rewardCalculation.calculateRewards(bakerAddress, cycle, breakDownRewards, currentCycle)];
|
|
1862
|
-
});
|
|
1863
|
-
});
|
|
1864
|
-
};
|
|
1865
|
-
TezosProtocol.prototype.calculatePayouts = function (rewards, offsetOrAddresses, limit) {
|
|
1866
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1867
|
-
var delegators;
|
|
1868
|
-
return __generator(this, function (_a) {
|
|
1869
|
-
if (typeof offsetOrAddresses === 'number') {
|
|
1870
|
-
if (limit === undefined) {
|
|
1871
|
-
throw new index_4.ConditionViolationError(coinlib_error_1.Domain.TEZOS, 'limit parameter is required when providing offset');
|
|
1872
|
-
}
|
|
1873
|
-
delegators = rewards.delegatedContracts.slice(offsetOrAddresses, Math.min(offsetOrAddresses + limit, rewards.delegatedContracts.length));
|
|
1874
|
-
}
|
|
1875
|
-
else {
|
|
1876
|
-
delegators = offsetOrAddresses;
|
|
1877
|
-
}
|
|
1878
|
-
return [2 /*return*/, this.calculatePayoutForAddresses(delegators, rewards)];
|
|
1879
|
-
});
|
|
1880
|
-
});
|
|
1881
|
-
};
|
|
1882
|
-
TezosProtocol.prototype.calculatePayout = function (address, rewards) {
|
|
1883
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1884
|
-
var result;
|
|
1885
|
-
return __generator(this, function (_a) {
|
|
1886
|
-
switch (_a.label) {
|
|
1887
|
-
case 0: return [4 /*yield*/, this.calculatePayoutForAddresses([address], rewards)];
|
|
1888
|
-
case 1:
|
|
1889
|
-
result = (_a.sent()).pop();
|
|
1890
|
-
if (result === undefined) {
|
|
1891
|
-
return [2 /*return*/, {
|
|
1892
|
-
delegator: address,
|
|
1893
|
-
share: '0',
|
|
1894
|
-
payout: '0',
|
|
1895
|
-
balance: '0'
|
|
1896
|
-
}];
|
|
1897
|
-
}
|
|
1898
|
-
return [2 /*return*/, result];
|
|
1899
|
-
}
|
|
1900
|
-
});
|
|
1901
|
-
});
|
|
1902
|
-
};
|
|
1903
|
-
TezosProtocol.prototype.calculatePayoutForAddresses = function (addresses, rewards) {
|
|
1904
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1905
|
-
var result, totalRewardsBN, balances, _i, balances_1, balance, amount, share, payoutAmount;
|
|
1906
|
-
return __generator(this, function (_a) {
|
|
1907
|
-
switch (_a.label) {
|
|
1908
|
-
case 0:
|
|
1909
|
-
result = [];
|
|
1910
|
-
totalRewardsBN = new bignumber_1.default(rewards.totalRewards).plus(new bignumber_1.default(rewards.fees));
|
|
1911
|
-
return [4 /*yield*/, this.fetchBalances(addresses, rewards.snapshotBlockLevel)];
|
|
1912
|
-
case 1:
|
|
1913
|
-
balances = _a.sent();
|
|
1914
|
-
for (_i = 0, balances_1 = balances; _i < balances_1.length; _i++) {
|
|
1915
|
-
balance = balances_1[_i];
|
|
1916
|
-
amount = balance.balance;
|
|
1917
|
-
if (amount === undefined) {
|
|
1918
|
-
amount = new bignumber_1.default(0);
|
|
1919
|
-
}
|
|
1920
|
-
share = amount.div(rewards.stakingBalance);
|
|
1921
|
-
payoutAmount = totalRewardsBN.multipliedBy(share);
|
|
1922
|
-
result.push({
|
|
1923
|
-
delegator: balance.address,
|
|
1924
|
-
share: share.toFixed(),
|
|
1925
|
-
payout: payoutAmount.toFixed(),
|
|
1926
|
-
balance: amount.toFixed()
|
|
1927
|
-
});
|
|
1928
|
-
}
|
|
1929
|
-
return [2 /*return*/, result];
|
|
1930
|
-
}
|
|
1931
|
-
});
|
|
1932
|
-
});
|
|
1933
|
-
};
|
|
1934
1678
|
TezosProtocol.prototype.fetchBlockMetadata = function (block) {
|
|
1935
1679
|
return __awaiter(this, void 0, void 0, function () {
|
|
1936
1680
|
var result;
|
|
@@ -1944,41 +1688,6 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
1944
1688
|
});
|
|
1945
1689
|
});
|
|
1946
1690
|
};
|
|
1947
|
-
TezosProtocol.prototype.fetchBalances = function (addresses, blockLevel) {
|
|
1948
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1949
|
-
var body, result;
|
|
1950
|
-
return __generator(this, function (_a) {
|
|
1951
|
-
switch (_a.label) {
|
|
1952
|
-
case 0:
|
|
1953
|
-
body = {
|
|
1954
|
-
fields: ['account_id', 'balance'],
|
|
1955
|
-
predicates: [
|
|
1956
|
-
{
|
|
1957
|
-
field: 'account_id',
|
|
1958
|
-
operation: 'in',
|
|
1959
|
-
set: addresses
|
|
1960
|
-
}
|
|
1961
|
-
],
|
|
1962
|
-
snapshot: {
|
|
1963
|
-
field: 'block_level',
|
|
1964
|
-
value: blockLevel
|
|
1965
|
-
}
|
|
1966
|
-
};
|
|
1967
|
-
return [4 /*yield*/, index_1.default.post(this.options.network.extras.conseilUrl + "/v2/data/tezos/" + this.options.network.extras.conseilNetwork + "/accounts_history", body, {
|
|
1968
|
-
headers: this.headers
|
|
1969
|
-
})];
|
|
1970
|
-
case 1:
|
|
1971
|
-
result = _a.sent();
|
|
1972
|
-
return [2 /*return*/, result.data.map(function (account) {
|
|
1973
|
-
return {
|
|
1974
|
-
address: account.account_id,
|
|
1975
|
-
balance: new bignumber_1.default(account.balance)
|
|
1976
|
-
};
|
|
1977
|
-
})];
|
|
1978
|
-
}
|
|
1979
|
-
});
|
|
1980
|
-
});
|
|
1981
|
-
};
|
|
1982
1691
|
TezosProtocol.prototype.signMessage = function (message, keypair) {
|
|
1983
1692
|
return __awaiter(this, void 0, void 0, function () {
|
|
1984
1693
|
return __generator(this, function (_a) {
|
|
@@ -2023,57 +1732,11 @@ var TezosProtocol = /** @class */ (function (_super) {
|
|
|
2023
1732
|
};
|
|
2024
1733
|
TezosProtocol.prototype.getTransactionStatuses = function (transactionHashes) {
|
|
2025
1734
|
return __awaiter(this, void 0, void 0, function () {
|
|
2026
|
-
var body, result, statusGroups;
|
|
2027
1735
|
return __generator(this, function (_a) {
|
|
2028
|
-
|
|
2029
|
-
case 0:
|
|
2030
|
-
body = {
|
|
2031
|
-
fields: ['status', 'operation_group_hash'],
|
|
2032
|
-
predicates: [
|
|
2033
|
-
{
|
|
2034
|
-
field: 'operation_group_hash',
|
|
2035
|
-
operation: 'in',
|
|
2036
|
-
set: transactionHashes
|
|
2037
|
-
},
|
|
2038
|
-
{
|
|
2039
|
-
field: 'kind',
|
|
2040
|
-
operation: 'eq',
|
|
2041
|
-
set: ['transaction']
|
|
2042
|
-
}
|
|
2043
|
-
]
|
|
2044
|
-
};
|
|
2045
|
-
return [4 /*yield*/, index_1.default.post(this.options.network.extras.conseilUrl + "/v2/data/tezos/" + this.options.network.extras.conseilNetwork + "/operations", body, {
|
|
2046
|
-
headers: this.headers
|
|
2047
|
-
})];
|
|
2048
|
-
case 1:
|
|
2049
|
-
result = _a.sent();
|
|
2050
|
-
statusGroups = {};
|
|
2051
|
-
result.data.forEach(function (element) {
|
|
2052
|
-
var currentStatus = element.status === 'applied' ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED : IAirGapTransaction_1.AirGapTransactionStatus.FAILED;
|
|
2053
|
-
if (statusGroups[element.operation_group_hash] === IAirGapTransaction_1.AirGapTransactionStatus.FAILED) {
|
|
2054
|
-
// If status is "failed", we can move on because it will not change anymore
|
|
2055
|
-
return;
|
|
2056
|
-
}
|
|
2057
|
-
else if (statusGroups[element.operation_group_hash] === IAirGapTransaction_1.AirGapTransactionStatus.APPLIED) {
|
|
2058
|
-
if (currentStatus === IAirGapTransaction_1.AirGapTransactionStatus.FAILED) {
|
|
2059
|
-
// If the status so far is "applied" but the current one "failed", we need to update the status
|
|
2060
|
-
statusGroups[element.operation_group_hash] = currentStatus;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
else {
|
|
2064
|
-
// If no status is set, use the current one
|
|
2065
|
-
statusGroups[element.operation_group_hash] = currentStatus;
|
|
2066
|
-
}
|
|
2067
|
-
});
|
|
2068
|
-
return [2 /*return*/, transactionHashes.map(function (txHash) {
|
|
2069
|
-
return statusGroups[txHash];
|
|
2070
|
-
})];
|
|
2071
|
-
}
|
|
1736
|
+
throw new Error('Method not implemented.');
|
|
2072
1737
|
});
|
|
2073
1738
|
});
|
|
2074
1739
|
};
|
|
2075
|
-
TezosProtocol.FIRST_005_CYCLE = 160;
|
|
2076
|
-
TezosProtocol.FIRST_006_CYCLE = 208;
|
|
2077
1740
|
TezosProtocol.FIRST_010_CYCLE = 388;
|
|
2078
1741
|
TezosProtocol.BLOCKS_PER_CYCLE = (_a = {},
|
|
2079
1742
|
_a[TezosNetwork.MAINNET] = [4096, 8192],
|