phantasma-sdk-ts 0.1.71
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/.eslintignore +13 -0
- package/.eslintrc.cjs +15 -0
- package/.github/workflows/npm-publish.yml +47 -0
- package/.prettierignore +13 -0
- package/.prettierrc +8 -0
- package/LICENSE +201 -0
- package/README.md +842 -0
- package/babel.config.js +6 -0
- package/core/index.d.ts +10 -0
- package/core/index.d.ts.map +1 -0
- package/core/index.js +25 -0
- package/core/interfaces/IContract.d.ts +27 -0
- package/core/interfaces/IContract.d.ts.map +1 -0
- package/core/interfaces/IContract.js +25 -0
- package/core/interfaces/IKeyPair.d.ts +7 -0
- package/core/interfaces/IKeyPair.d.ts.map +1 -0
- package/core/interfaces/IKeyPair.js +2 -0
- package/core/interfaces/ISerializable.d.ts +6 -0
- package/core/interfaces/ISerializable.d.ts.map +1 -0
- package/core/interfaces/ISerializable.js +9 -0
- package/core/interfaces/IStack.d.ts +7 -0
- package/core/interfaces/IStack.d.ts.map +1 -0
- package/core/interfaces/IStack.js +2 -0
- package/core/interfaces/IToken.d.ts +29 -0
- package/core/interfaces/IToken.d.ts.map +1 -0
- package/core/interfaces/IToken.js +22 -0
- package/core/interfaces/Signature.d.ts +21 -0
- package/core/interfaces/Signature.d.ts.map +1 -0
- package/core/interfaces/Signature.js +31 -0
- package/core/interfaces/index.d.ts +7 -0
- package/core/interfaces/index.d.ts.map +1 -0
- package/core/interfaces/index.js +22 -0
- package/core/ledger/Address-Transcode.d.ts +20 -0
- package/core/ledger/Address-Transcode.d.ts.map +1 -0
- package/core/ledger/Address-Transcode.js +70 -0
- package/core/ledger/Ledger-Commands.d.ts +76 -0
- package/core/ledger/Ledger-Commands.d.ts.map +1 -0
- package/core/ledger/Ledger-Commands.js +530 -0
- package/core/ledger/Ledger-Utils.d.ts +74 -0
- package/core/ledger/Ledger-Utils.d.ts.map +1 -0
- package/core/ledger/Ledger-Utils.js +609 -0
- package/core/ledger/LedgerConfig.d.ts +17 -0
- package/core/ledger/LedgerConfig.d.ts.map +1 -0
- package/core/ledger/LedgerConfig.js +2 -0
- package/core/ledger/Mnemonic.d.ts +35 -0
- package/core/ledger/Mnemonic.d.ts.map +1 -0
- package/core/ledger/Mnemonic.js +65 -0
- package/core/ledger/Transaction-Sign.d.ts +10 -0
- package/core/ledger/Transaction-Sign.d.ts.map +1 -0
- package/core/ledger/Transaction-Sign.js +149 -0
- package/core/ledger/Transaction-Transcode.d.ts +24 -0
- package/core/ledger/Transaction-Transcode.d.ts.map +1 -0
- package/core/ledger/Transaction-Transcode.js +47 -0
- package/core/ledger/index.d.ts +9 -0
- package/core/ledger/index.d.ts.map +1 -0
- package/core/ledger/index.js +24 -0
- package/core/ledger/interfaces/ApplicationNameResponse.d.ts +6 -0
- package/core/ledger/interfaces/ApplicationNameResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/ApplicationNameResponse.js +2 -0
- package/core/ledger/interfaces/Device.d.ts +7 -0
- package/core/ledger/interfaces/Device.d.ts.map +1 -0
- package/core/ledger/interfaces/Device.js +2 -0
- package/core/ledger/interfaces/DeviceResponse.d.ts +7 -0
- package/core/ledger/interfaces/DeviceResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/DeviceResponse.js +2 -0
- package/core/ledger/interfaces/Ledger.d.ts +2 -0
- package/core/ledger/interfaces/Ledger.d.ts.map +1 -0
- package/core/ledger/interfaces/Ledger.js +2 -0
- package/core/ledger/interfaces/LedgerBalanceFromLedgerResponse.d.ts +12 -0
- package/core/ledger/interfaces/LedgerBalanceFromLedgerResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerBalanceFromLedgerResponse.js +2 -0
- package/core/ledger/interfaces/LedgerConfig.d.ts +17 -0
- package/core/ledger/interfaces/LedgerConfig.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerConfig.js +2 -0
- package/core/ledger/interfaces/LedgerDeviceInfoResponse.d.ts +7 -0
- package/core/ledger/interfaces/LedgerDeviceInfoResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerDeviceInfoResponse.js +2 -0
- package/core/ledger/interfaces/LedgerSendTransactionResponse.d.ts +5 -0
- package/core/ledger/interfaces/LedgerSendTransactionResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerSendTransactionResponse.js +2 -0
- package/core/ledger/interfaces/LedgerSigner.d.ts +6 -0
- package/core/ledger/interfaces/LedgerSigner.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerSigner.js +2 -0
- package/core/ledger/interfaces/LedgerSignerData.d.ts +8 -0
- package/core/ledger/interfaces/LedgerSignerData.d.ts.map +1 -0
- package/core/ledger/interfaces/LedgerSignerData.js +2 -0
- package/core/ledger/interfaces/PublicKeyResponse.d.ts +6 -0
- package/core/ledger/interfaces/PublicKeyResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/PublicKeyResponse.js +2 -0
- package/core/ledger/interfaces/SignResponse.d.ts +6 -0
- package/core/ledger/interfaces/SignResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/SignResponse.js +2 -0
- package/core/ledger/interfaces/VersionResponse.d.ts +6 -0
- package/core/ledger/interfaces/VersionResponse.d.ts.map +1 -0
- package/core/ledger/interfaces/VersionResponse.js +2 -0
- package/core/ledger/interfaces/index.d.ts +14 -0
- package/core/ledger/interfaces/index.d.ts.map +1 -0
- package/core/ledger/interfaces/index.js +29 -0
- package/core/ledger/ledger-comm.d.ts +85 -0
- package/core/ledger/ledger-comm.d.ts.map +1 -0
- package/core/ledger/ledger-comm.js +613 -0
- package/core/link/easyConnect.d.ts +23 -0
- package/core/link/easyConnect.d.ts.map +1 -0
- package/core/link/easyConnect.js +237 -0
- package/core/link/easyScript.d.ts +13 -0
- package/core/link/easyScript.d.ts.map +1 -0
- package/core/link/easyScript.js +52 -0
- package/core/link/index.d.ts +2 -0
- package/core/link/index.d.ts.map +1 -0
- package/core/link/index.js +17 -0
- package/core/link/interfaces/IAccount.d.ts +13 -0
- package/core/link/interfaces/IAccount.d.ts.map +1 -0
- package/core/link/interfaces/IAccount.js +2 -0
- package/core/link/interfaces/IFile.d.ts +7 -0
- package/core/link/interfaces/IFile.d.ts.map +1 -0
- package/core/link/interfaces/IFile.js +2 -0
- package/core/link/interfaces/ProofOfWork.d.ts +9 -0
- package/core/link/interfaces/ProofOfWork.d.ts.map +1 -0
- package/core/link/interfaces/ProofOfWork.js +12 -0
- package/core/link/interfaces/index.d.ts +4 -0
- package/core/link/interfaces/index.d.ts.map +1 -0
- package/core/link/interfaces/index.js +19 -0
- package/core/link/phantasmaLink.d.ts +41 -0
- package/core/link/phantasmaLink.d.ts.map +1 -0
- package/core/link/phantasmaLink.js +479 -0
- package/core/rpc/index.d.ts +3 -0
- package/core/rpc/index.d.ts.map +1 -0
- package/core/rpc/index.js +18 -0
- package/core/rpc/interfaces/ABIContract.d.ts +6 -0
- package/core/rpc/interfaces/ABIContract.d.ts.map +1 -0
- package/core/rpc/interfaces/ABIContract.js +2 -0
- package/core/rpc/interfaces/ABIEvent.d.ts +7 -0
- package/core/rpc/interfaces/ABIEvent.d.ts.map +1 -0
- package/core/rpc/interfaces/ABIEvent.js +2 -0
- package/core/rpc/interfaces/ABIMethod.d.ts +7 -0
- package/core/rpc/interfaces/ABIMethod.d.ts.map +1 -0
- package/core/rpc/interfaces/ABIMethod.js +2 -0
- package/core/rpc/interfaces/ABIParameter.d.ts +5 -0
- package/core/rpc/interfaces/ABIParameter.d.ts.map +1 -0
- package/core/rpc/interfaces/ABIParameter.js +2 -0
- package/core/rpc/interfaces/Account.d.ts +16 -0
- package/core/rpc/interfaces/Account.d.ts.map +1 -0
- package/core/rpc/interfaces/Account.js +2 -0
- package/core/rpc/interfaces/AccountTransactions.d.ts +6 -0
- package/core/rpc/interfaces/AccountTransactions.d.ts.map +1 -0
- package/core/rpc/interfaces/AccountTransactions.js +2 -0
- package/core/rpc/interfaces/Archive.d.ts +11 -0
- package/core/rpc/interfaces/Archive.d.ts.map +1 -0
- package/core/rpc/interfaces/Archive.js +2 -0
- package/core/rpc/interfaces/Auction.d.ts +13 -0
- package/core/rpc/interfaces/Auction.d.ts.map +1 -0
- package/core/rpc/interfaces/Auction.js +2 -0
- package/core/rpc/interfaces/Balance.d.ts +8 -0
- package/core/rpc/interfaces/Balance.d.ts.map +1 -0
- package/core/rpc/interfaces/Balance.js +2 -0
- package/core/rpc/interfaces/Block.d.ts +17 -0
- package/core/rpc/interfaces/Block.d.ts.map +1 -0
- package/core/rpc/interfaces/Block.js +2 -0
- package/core/rpc/interfaces/Chain.d.ts +10 -0
- package/core/rpc/interfaces/Chain.d.ts.map +1 -0
- package/core/rpc/interfaces/Chain.js +2 -0
- package/core/rpc/interfaces/Channel.d.ts +13 -0
- package/core/rpc/interfaces/Channel.d.ts.map +1 -0
- package/core/rpc/interfaces/Channel.js +2 -0
- package/core/rpc/interfaces/Contract.d.ts +11 -0
- package/core/rpc/interfaces/Contract.d.ts.map +1 -0
- package/core/rpc/interfaces/Contract.js +2 -0
- package/core/rpc/interfaces/Dapp.d.ts +6 -0
- package/core/rpc/interfaces/Dapp.d.ts.map +1 -0
- package/core/rpc/interfaces/Dapp.js +2 -0
- package/core/rpc/interfaces/Event.d.ts +7 -0
- package/core/rpc/interfaces/Event.d.ts.map +1 -0
- package/core/rpc/interfaces/Event.js +2 -0
- package/core/rpc/interfaces/Governance.d.ts +5 -0
- package/core/rpc/interfaces/Governance.d.ts.map +1 -0
- package/core/rpc/interfaces/Governance.js +2 -0
- package/core/rpc/interfaces/Interop.d.ts +5 -0
- package/core/rpc/interfaces/Interop.d.ts.map +1 -0
- package/core/rpc/interfaces/Interop.js +2 -0
- package/core/rpc/interfaces/KeyValue.d.ts +5 -0
- package/core/rpc/interfaces/KeyValue.d.ts.map +1 -0
- package/core/rpc/interfaces/KeyValue.js +2 -0
- package/core/rpc/interfaces/Leaderboard.d.ts +6 -0
- package/core/rpc/interfaces/Leaderboard.d.ts.map +1 -0
- package/core/rpc/interfaces/Leaderboard.js +2 -0
- package/core/rpc/interfaces/LeaderboardRow.d.ts +5 -0
- package/core/rpc/interfaces/LeaderboardRow.d.ts.map +1 -0
- package/core/rpc/interfaces/LeaderboardRow.js +2 -0
- package/core/rpc/interfaces/NFT.d.ts +14 -0
- package/core/rpc/interfaces/NFT.d.ts.map +1 -0
- package/core/rpc/interfaces/NFT.js +2 -0
- package/core/rpc/interfaces/Nexus.d.ts +14 -0
- package/core/rpc/interfaces/Nexus.d.ts.map +1 -0
- package/core/rpc/interfaces/Nexus.js +2 -0
- package/core/rpc/interfaces/Oracle.d.ts +5 -0
- package/core/rpc/interfaces/Oracle.d.ts.map +1 -0
- package/core/rpc/interfaces/Oracle.js +2 -0
- package/core/rpc/interfaces/Organization.d.ts +6 -0
- package/core/rpc/interfaces/Organization.d.ts.map +1 -0
- package/core/rpc/interfaces/Organization.js +2 -0
- package/core/rpc/interfaces/Paginated.d.ts +8 -0
- package/core/rpc/interfaces/Paginated.d.ts.map +1 -0
- package/core/rpc/interfaces/Paginated.js +2 -0
- package/core/rpc/interfaces/Peer.d.ts +8 -0
- package/core/rpc/interfaces/Peer.d.ts.map +1 -0
- package/core/rpc/interfaces/Peer.js +2 -0
- package/core/rpc/interfaces/Platform.d.ts +9 -0
- package/core/rpc/interfaces/Platform.d.ts.map +1 -0
- package/core/rpc/interfaces/Platform.js +2 -0
- package/core/rpc/interfaces/Receipt.d.ts +10 -0
- package/core/rpc/interfaces/Receipt.d.ts.map +1 -0
- package/core/rpc/interfaces/Receipt.js +2 -0
- package/core/rpc/interfaces/Script.d.ts +9 -0
- package/core/rpc/interfaces/Script.d.ts.map +1 -0
- package/core/rpc/interfaces/Script.js +2 -0
- package/core/rpc/interfaces/SendRawTx.d.ts +5 -0
- package/core/rpc/interfaces/SendRawTx.d.ts.map +1 -0
- package/core/rpc/interfaces/SendRawTx.js +2 -0
- package/core/rpc/interfaces/SignatureResult.d.ts +5 -0
- package/core/rpc/interfaces/SignatureResult.d.ts.map +1 -0
- package/core/rpc/interfaces/SignatureResult.js +2 -0
- package/core/rpc/interfaces/Stake.d.ts +6 -0
- package/core/rpc/interfaces/Stake.d.ts.map +1 -0
- package/core/rpc/interfaces/Stake.js +2 -0
- package/core/rpc/interfaces/Storage.d.ts +8 -0
- package/core/rpc/interfaces/Storage.d.ts.map +1 -0
- package/core/rpc/interfaces/Storage.js +2 -0
- package/core/rpc/interfaces/Swap.d.ts +13 -0
- package/core/rpc/interfaces/Swap.d.ts.map +1 -0
- package/core/rpc/interfaces/Swap.js +2 -0
- package/core/rpc/interfaces/Token.d.ts +19 -0
- package/core/rpc/interfaces/Token.d.ts.map +1 -0
- package/core/rpc/interfaces/Token.js +2 -0
- package/core/rpc/interfaces/TokenData.d.ts +13 -0
- package/core/rpc/interfaces/TokenData.d.ts.map +1 -0
- package/core/rpc/interfaces/TokenData.js +2 -0
- package/core/rpc/interfaces/TokenExternal.d.ts +5 -0
- package/core/rpc/interfaces/TokenExternal.d.ts.map +1 -0
- package/core/rpc/interfaces/TokenExternal.js +2 -0
- package/core/rpc/interfaces/TokenPrice.d.ts +8 -0
- package/core/rpc/interfaces/TokenPrice.d.ts.map +1 -0
- package/core/rpc/interfaces/TokenPrice.js +2 -0
- package/core/rpc/interfaces/TokenSeries.d.ts +12 -0
- package/core/rpc/interfaces/TokenSeries.d.ts.map +1 -0
- package/core/rpc/interfaces/TokenSeries.js +2 -0
- package/core/rpc/interfaces/TransactionData.d.ts +23 -0
- package/core/rpc/interfaces/TransactionData.d.ts.map +1 -0
- package/core/rpc/interfaces/TransactionData.js +2 -0
- package/core/rpc/interfaces/Validator.d.ts +5 -0
- package/core/rpc/interfaces/Validator.d.ts.map +1 -0
- package/core/rpc/interfaces/Validator.js +2 -0
- package/core/rpc/interfaces/index.d.ts +42 -0
- package/core/rpc/interfaces/index.d.ts.map +1 -0
- package/core/rpc/interfaces/index.js +57 -0
- package/core/rpc/phantasma.d.ts +89 -0
- package/core/rpc/phantasma.d.ts.map +1 -0
- package/core/rpc/phantasma.js +900 -0
- package/core/tx/SignatureKind.js +9 -0
- package/core/tx/Transaction.d.ts +28 -0
- package/core/tx/Transaction.d.ts.map +1 -0
- package/core/tx/Transaction.js +209 -0
- package/core/tx/index.d.ts +3 -0
- package/core/tx/index.d.ts.map +1 -0
- package/core/tx/index.js +18 -0
- package/core/tx/utils.d.ts +10 -0
- package/core/tx/utils.d.ts.map +1 -0
- package/core/tx/utils.js +147 -0
- package/core/types/Address.d.ts +41 -0
- package/core/types/Address.d.ts.map +1 -0
- package/core/types/Address.js +276 -0
- package/core/types/Consensus.d.ts +61 -0
- package/core/types/Consensus.d.ts.map +1 -0
- package/core/types/Consensus.js +151 -0
- package/core/types/Contract.d.ts +60 -0
- package/core/types/Contract.d.ts.map +1 -0
- package/core/types/Contract.js +342 -0
- package/core/types/DomainSettings.d.ts +87 -0
- package/core/types/DomainSettings.d.ts.map +1 -0
- package/core/types/DomainSettings.js +107 -0
- package/core/types/Ed25519Signature.d.ts +16 -0
- package/core/types/Ed25519Signature.d.ts.map +1 -0
- package/core/types/Ed25519Signature.js +78 -0
- package/core/types/Entropy.d.ts +5 -0
- package/core/types/Entropy.d.ts.map +1 -0
- package/core/types/Entropy.js +24 -0
- package/core/types/Extensions/Base16.d.ts +7 -0
- package/core/types/Extensions/Base16.d.ts.map +1 -0
- package/core/types/Extensions/Base16.js +36 -0
- package/core/types/Extensions/BinaryReader.d.ts +17 -0
- package/core/types/Extensions/BinaryReader.d.ts.map +1 -0
- package/core/types/Extensions/BinaryReader.js +192 -0
- package/core/types/Extensions/BinaryWriter.d.ts +25 -0
- package/core/types/Extensions/BinaryWriter.d.ts.map +1 -0
- package/core/types/Extensions/BinaryWriter.js +191 -0
- package/core/types/Extensions/Describer.d.ts +5 -0
- package/core/types/Extensions/Describer.d.ts.map +1 -0
- package/core/types/Extensions/Describer.js +25 -0
- package/core/types/Extensions/PBinaryReader.d.ts +42 -0
- package/core/types/Extensions/PBinaryReader.d.ts.map +1 -0
- package/core/types/Extensions/PBinaryReader.js +269 -0
- package/core/types/Extensions/PBinaryWriter.d.ts +49 -0
- package/core/types/Extensions/PBinaryWriter.d.ts.map +1 -0
- package/core/types/Extensions/PBinaryWriter.js +250 -0
- package/core/types/Extensions/TableColumns.d.ts +5 -0
- package/core/types/Extensions/TableColumns.d.ts.map +1 -0
- package/core/types/Extensions/TableColumns.js +22 -0
- package/core/types/Extensions/index.d.ts +5 -0
- package/core/types/Extensions/index.d.ts.map +1 -0
- package/core/types/Extensions/index.js +20 -0
- package/core/types/PhantasmaKeys.d.ts +19 -0
- package/core/types/PhantasmaKeys.d.ts.map +1 -0
- package/core/types/PhantasmaKeys.js +92 -0
- package/core/types/Serialization.d.ts +22 -0
- package/core/types/Serialization.d.ts.map +1 -0
- package/core/types/Serialization.js +195 -0
- package/core/types/Stack.d.ts +16 -0
- package/core/types/Stack.d.ts.map +1 -0
- package/core/types/Stack.js +42 -0
- package/core/types/Timestamp.d.ts +26 -0
- package/core/types/Timestamp.d.ts.map +1 -0
- package/core/types/Timestamp.js +74 -0
- package/core/types/index.d.ts +12 -0
- package/core/types/index.d.ts.map +1 -0
- package/core/types/index.js +27 -0
- package/core/utils/index.d.ts +25 -0
- package/core/utils/index.d.ts.map +1 -0
- package/core/utils/index.js +236 -0
- package/core/vm/Contracts.d.ts +17 -0
- package/core/vm/Contracts.d.ts.map +1 -0
- package/core/vm/Contracts.js +20 -0
- package/core/vm/Decoder.d.ts +19 -0
- package/core/vm/Decoder.d.ts.map +1 -0
- package/core/vm/Decoder.js +175 -0
- package/core/vm/EventData.d.ts +97 -0
- package/core/vm/EventData.d.ts.map +1 -0
- package/core/vm/EventData.js +134 -0
- package/core/vm/Opcode.d.ts +57 -0
- package/core/vm/Opcode.d.ts.map +1 -0
- package/core/vm/Opcode.js +69 -0
- package/core/vm/ScriptBuilder.d.ts +65 -0
- package/core/vm/ScriptBuilder.d.ts.map +1 -0
- package/core/vm/ScriptBuilder.js +592 -0
- package/core/vm/VMObject.d.ts +55 -0
- package/core/vm/VMObject.d.ts.map +1 -0
- package/core/vm/VMObject.js +1101 -0
- package/core/vm/VMType.d.ts +12 -0
- package/core/vm/VMType.d.ts.map +1 -0
- package/core/vm/VMType.js +15 -0
- package/core/vm/index.d.ts +8 -0
- package/core/vm/index.d.ts.map +1 -0
- package/core/vm/index.js +23 -0
- package/html/TestWebPage.html +187 -0
- package/html/phantasma.js +60504 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -0
- package/index.js +36 -0
- package/jest.config.js +5 -0
- package/package.json +67 -0
- package/src/core/index.ts +9 -0
- package/src/core/interfaces/IContract.ts +28 -0
- package/src/core/interfaces/IKeyPair.ts +14 -0
- package/src/core/interfaces/ISerializable.ts +6 -0
- package/src/core/interfaces/IStack.ts +6 -0
- package/src/core/interfaces/IToken.ts +31 -0
- package/src/core/interfaces/Signature.ts +32 -0
- package/src/core/interfaces/index.ts +6 -0
- package/src/core/ledger/Address-Transcode.ts +44 -0
- package/src/core/ledger/Ledger-Commands.ts +463 -0
- package/src/core/ledger/Ledger-Utils.ts +549 -0
- package/src/core/ledger/Mnemonic.ts +79 -0
- package/src/core/ledger/Transaction-Sign.ts +126 -0
- package/src/core/ledger/Transaction-Transcode.ts +56 -0
- package/src/core/ledger/index.ts +8 -0
- package/src/core/ledger/interfaces/ApplicationNameResponse.ts +5 -0
- package/src/core/ledger/interfaces/Device.ts +6 -0
- package/src/core/ledger/interfaces/DeviceResponse.ts +6 -0
- package/src/core/ledger/interfaces/Ledger.ts +10 -0
- package/src/core/ledger/interfaces/LedgerBalanceFromLedgerResponse.ts +9 -0
- package/src/core/ledger/interfaces/LedgerConfig.ts +17 -0
- package/src/core/ledger/interfaces/LedgerDeviceInfoResponse.ts +7 -0
- package/src/core/ledger/interfaces/LedgerSendTransactionResponse.ts +4 -0
- package/src/core/ledger/interfaces/LedgerSigner.ts +6 -0
- package/src/core/ledger/interfaces/LedgerSignerData.ts +8 -0
- package/src/core/ledger/interfaces/PublicKeyResponse.ts +5 -0
- package/src/core/ledger/interfaces/SignResponse.ts +5 -0
- package/src/core/ledger/interfaces/VersionResponse.ts +5 -0
- package/src/core/ledger/interfaces/index.ts +13 -0
- package/src/core/link/easyConnect.ts +214 -0
- package/src/core/link/easyScript.ts +67 -0
- package/src/core/link/index.ts +1 -0
- package/src/core/link/interfaces/IAccount.ts +13 -0
- package/src/core/link/interfaces/IFile.ts +6 -0
- package/src/core/link/interfaces/ProofOfWork.ts +8 -0
- package/src/core/link/interfaces/index.ts +3 -0
- package/src/core/link/phantasmaLink.ts +561 -0
- package/src/core/rpc/index.ts +2 -0
- package/src/core/rpc/interfaces/ABIContract.ts +6 -0
- package/src/core/rpc/interfaces/ABIEvent.ts +6 -0
- package/src/core/rpc/interfaces/ABIMethod.ts +7 -0
- package/src/core/rpc/interfaces/ABIParameter.ts +4 -0
- package/src/core/rpc/interfaces/Account.ts +16 -0
- package/src/core/rpc/interfaces/AccountTransactions.ts +6 -0
- package/src/core/rpc/interfaces/Archive.ts +10 -0
- package/src/core/rpc/interfaces/Auction.ts +12 -0
- package/src/core/rpc/interfaces/Balance.ts +7 -0
- package/src/core/rpc/interfaces/Block.ts +17 -0
- package/src/core/rpc/interfaces/Chain.ts +9 -0
- package/src/core/rpc/interfaces/Channel.ts +12 -0
- package/src/core/rpc/interfaces/Contract.ts +11 -0
- package/src/core/rpc/interfaces/Dapp.ts +5 -0
- package/src/core/rpc/interfaces/Event.ts +6 -0
- package/src/core/rpc/interfaces/Governance.ts +4 -0
- package/src/core/rpc/interfaces/Interop.ts +4 -0
- package/src/core/rpc/interfaces/KeyValue.ts +4 -0
- package/src/core/rpc/interfaces/Leaderboard.ts +6 -0
- package/src/core/rpc/interfaces/LeaderboardRow.ts +4 -0
- package/src/core/rpc/interfaces/NFT.ts +14 -0
- package/src/core/rpc/interfaces/Nexus.ts +14 -0
- package/src/core/rpc/interfaces/Oracle.ts +4 -0
- package/src/core/rpc/interfaces/Organization.ts +5 -0
- package/src/core/rpc/interfaces/Paginated.ts +7 -0
- package/src/core/rpc/interfaces/Peer.ts +7 -0
- package/src/core/rpc/interfaces/Platform.ts +9 -0
- package/src/core/rpc/interfaces/Receipt.ts +9 -0
- package/src/core/rpc/interfaces/Script.ts +9 -0
- package/src/core/rpc/interfaces/SendRawTx.ts +4 -0
- package/src/core/rpc/interfaces/SignatureResult.ts +4 -0
- package/src/core/rpc/interfaces/Stake.ts +5 -0
- package/src/core/rpc/interfaces/Storage.ts +8 -0
- package/src/core/rpc/interfaces/Swap.ts +12 -0
- package/src/core/rpc/interfaces/Token.ts +19 -0
- package/src/core/rpc/interfaces/TokenData.ts +12 -0
- package/src/core/rpc/interfaces/TokenExternal.ts +4 -0
- package/src/core/rpc/interfaces/TokenPrice.ts +7 -0
- package/src/core/rpc/interfaces/TokenSeries.ts +12 -0
- package/src/core/rpc/interfaces/TransactionData.ts +23 -0
- package/src/core/rpc/interfaces/Validator.ts +4 -0
- package/src/core/rpc/interfaces/index.ts +41 -0
- package/src/core/rpc/phantasma.ts +466 -0
- package/src/core/tx/Transaction.ts +258 -0
- package/src/core/tx/index.ts +2 -0
- package/src/core/tx/utils.ts +106 -0
- package/src/core/types/Address.ts +290 -0
- package/src/core/types/Consensus.ts +181 -0
- package/src/core/types/Contract.ts +324 -0
- package/src/core/types/DomainSettings.ts +128 -0
- package/src/core/types/Ed25519Signature.ts +78 -0
- package/src/core/types/Entropy.ts +16 -0
- package/src/core/types/Extensions/Base16.ts +36 -0
- package/src/core/types/Extensions/Describer.ts +17 -0
- package/src/core/types/Extensions/PBinaryReader.ts +247 -0
- package/src/core/types/Extensions/PBinaryWriter.ts +278 -0
- package/src/core/types/Extensions/index.ts +4 -0
- package/src/core/types/PhantasmaKeys.ts +119 -0
- package/src/core/types/Serialization.ts +211 -0
- package/src/core/types/Stack.ts +46 -0
- package/src/core/types/Timestamp.ts +93 -0
- package/src/core/types/index.ts +11 -0
- package/src/core/utils/index.ts +206 -0
- package/src/core/vm/Contracts.ts +17 -0
- package/src/core/vm/Decoder.ts +162 -0
- package/src/core/vm/Disassembler.ts +1 -0
- package/src/core/vm/EventData.ts +135 -0
- package/src/core/vm/Opcode.ts +74 -0
- package/src/core/vm/ScriptBuilder.ts +588 -0
- package/src/core/vm/VMObject.ts +1162 -0
- package/src/core/vm/VMType.ts +11 -0
- package/src/core/vm/index.ts +7 -0
- package/src/core/vm/utils/DisasmMethodCall.ts +22 -0
- package/src/core/vm/utils/DisasmUtils.ts +89 -0
- package/src/core/vm/utils/index.ts +2 -0
- package/src/index.ts +7 -0
- package/tests/VMObject.test.ts +146 -0
- package/tests/ledger/Address-Transacode.test.ts +26 -0
- package/tests/tx/Transaction.test.ts +274 -0
- package/tests/types/Address.test.ts +26 -0
- package/tests/types/Consensus.test.ts +67 -0
- package/tsconfig.json +29 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
+
if (ar || !(i in from)) {
|
|
57
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
+
ar[i] = from[i];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
62
|
+
};
|
|
63
|
+
var __values = (this && this.__values) || function(o) {
|
|
64
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
65
|
+
if (m) return m.call(o);
|
|
66
|
+
if (o && typeof o.length === "number") return {
|
|
67
|
+
next: function () {
|
|
68
|
+
if (o && i >= o.length) o = void 0;
|
|
69
|
+
return { value: o && o[i++], done: !o };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
73
|
+
};
|
|
74
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
75
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
76
|
+
};
|
|
77
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
+
exports.ScriptBuilder = void 0;
|
|
79
|
+
var bs58_1 = __importDefault(require("bs58"));
|
|
80
|
+
var interfaces_1 = require("../interfaces");
|
|
81
|
+
var types_1 = require("../types");
|
|
82
|
+
var utils_1 = require("../utils");
|
|
83
|
+
var Opcode_1 = require("./Opcode");
|
|
84
|
+
var VMObject_1 = require("./VMObject");
|
|
85
|
+
var VMType_1 = require("./VMType");
|
|
86
|
+
var Contracts_1 = require("./Contracts");
|
|
87
|
+
var MaxRegisterCount = 32;
|
|
88
|
+
var ScriptBuilder = /** @class */ (function () {
|
|
89
|
+
function ScriptBuilder() {
|
|
90
|
+
this._labelLocations = {};
|
|
91
|
+
this._jumpLocations = {};
|
|
92
|
+
this.NullAddress = "S1111111111111111111111111111111111";
|
|
93
|
+
this.str = "";
|
|
94
|
+
this.writer = new types_1.PBinaryWriter();
|
|
95
|
+
}
|
|
96
|
+
ScriptBuilder.ScriptBuilder = function () {
|
|
97
|
+
return new ScriptBuilder();
|
|
98
|
+
};
|
|
99
|
+
ScriptBuilder.prototype.BeginScript = function () {
|
|
100
|
+
this.str = "";
|
|
101
|
+
this.writer = new types_1.PBinaryWriter();
|
|
102
|
+
return this;
|
|
103
|
+
};
|
|
104
|
+
ScriptBuilder.prototype.GetScript = function () {
|
|
105
|
+
return (0, utils_1.uint8ArrayToHex)(this.writer.toUint8Array());
|
|
106
|
+
};
|
|
107
|
+
ScriptBuilder.prototype.EndScript = function () {
|
|
108
|
+
this.Emit(Opcode_1.Opcode.RET);
|
|
109
|
+
return (0, utils_1.uint8ArrayToHex)(this.writer.toUint8Array()).toUpperCase();
|
|
110
|
+
};
|
|
111
|
+
ScriptBuilder.prototype.Emit = function (opcode, bytes) {
|
|
112
|
+
this.AppendByte(opcode);
|
|
113
|
+
if (bytes) {
|
|
114
|
+
this.EmitBytes(bytes);
|
|
115
|
+
}
|
|
116
|
+
return this;
|
|
117
|
+
};
|
|
118
|
+
ScriptBuilder.prototype.EmitThorw = function (reg) {
|
|
119
|
+
this.Emit(Opcode_1.Opcode.THROW);
|
|
120
|
+
this.AppendByte(reg);
|
|
121
|
+
return this;
|
|
122
|
+
};
|
|
123
|
+
ScriptBuilder.prototype.EmitPush = function (reg) {
|
|
124
|
+
this.Emit(Opcode_1.Opcode.PUSH);
|
|
125
|
+
this.AppendByte(reg);
|
|
126
|
+
return this;
|
|
127
|
+
};
|
|
128
|
+
ScriptBuilder.prototype.EmitPop = function (reg) {
|
|
129
|
+
this.Emit(Opcode_1.Opcode.POP);
|
|
130
|
+
this.AppendByte(reg);
|
|
131
|
+
return this;
|
|
132
|
+
};
|
|
133
|
+
ScriptBuilder.prototype.EmitExtCall = function (method, reg) {
|
|
134
|
+
if (reg === void 0) { reg = 0; }
|
|
135
|
+
this.EmitLoad(reg, method);
|
|
136
|
+
this.Emit(Opcode_1.Opcode.EXTCALL);
|
|
137
|
+
this.AppendByte(reg);
|
|
138
|
+
return this;
|
|
139
|
+
};
|
|
140
|
+
ScriptBuilder.prototype.EmitBigInteger = function (value) {
|
|
141
|
+
var bytes = [];
|
|
142
|
+
if (value == "0") {
|
|
143
|
+
bytes = [0];
|
|
144
|
+
}
|
|
145
|
+
else if (value.startsWith("-1")) {
|
|
146
|
+
throw new Error("Unsigned bigint serialization not suppoted");
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
var hex = BigInt(value).toString(16);
|
|
150
|
+
if (hex.length % 2)
|
|
151
|
+
hex = "0" + hex;
|
|
152
|
+
var len = hex.length / 2;
|
|
153
|
+
var i = 0;
|
|
154
|
+
var j = 0;
|
|
155
|
+
while (i < len) {
|
|
156
|
+
bytes.unshift(parseInt(hex.slice(j, j + 2), 16)); // little endian
|
|
157
|
+
i += 1;
|
|
158
|
+
j += 2;
|
|
159
|
+
}
|
|
160
|
+
bytes.push(0); // add sign at the end
|
|
161
|
+
}
|
|
162
|
+
return this.EmitByteArray(bytes);
|
|
163
|
+
};
|
|
164
|
+
ScriptBuilder.prototype.EmitAddress = function (textAddress) {
|
|
165
|
+
var bytes = __spreadArray([], __read(bs58_1.default.decode(textAddress.substring(1))), false);
|
|
166
|
+
return this.EmitByteArray(bytes);
|
|
167
|
+
};
|
|
168
|
+
ScriptBuilder.prototype.RawString = function (value) {
|
|
169
|
+
//let bytes = stringToUint8Array(value);
|
|
170
|
+
//console.log(Array.from(bytes))
|
|
171
|
+
//return Array.from(bytes);
|
|
172
|
+
var data = [];
|
|
173
|
+
for (var i = 0; i < value.length; i++) {
|
|
174
|
+
data.push(value.charCodeAt(i));
|
|
175
|
+
}
|
|
176
|
+
return data;
|
|
177
|
+
};
|
|
178
|
+
ScriptBuilder.prototype.EmitLoad = function (reg, obj) {
|
|
179
|
+
var structType = Object.getPrototypeOf(obj).constructor.name;
|
|
180
|
+
switch (typeof obj) {
|
|
181
|
+
case "string": {
|
|
182
|
+
var bytes = this.RawString(obj);
|
|
183
|
+
this.EmitLoadBytes(reg, bytes, VMType_1.VMType.String);
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
case "boolean": {
|
|
187
|
+
var bytes = [obj ? 1 : 0];
|
|
188
|
+
this.EmitLoadBytes(reg, bytes, VMType_1.VMType.Bool);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case "number": {
|
|
192
|
+
// obj is BigInteger
|
|
193
|
+
// var bytes = val.ToSignedByteArray();
|
|
194
|
+
// this.emitLoadBytes(reg, bytes, VMType.Number);
|
|
195
|
+
//let bytes = this.RawString(BigInt(obj).toString());
|
|
196
|
+
if (Object.getPrototypeOf(structType).constructor.name == "enum") {
|
|
197
|
+
this.AppendByte(obj);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.EmitLoadVarInt(reg, obj);
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
case "object":
|
|
205
|
+
if (obj instanceof Uint8Array) {
|
|
206
|
+
this.EmitLoadBytes(reg, Array.from(obj));
|
|
207
|
+
}
|
|
208
|
+
else if (obj instanceof VMObject_1.VMObject) {
|
|
209
|
+
this.EmitLoadVMObject(reg, obj);
|
|
210
|
+
}
|
|
211
|
+
else if (Array.isArray(obj)) {
|
|
212
|
+
this.EmitLoadArray(reg, obj);
|
|
213
|
+
}
|
|
214
|
+
else if (obj instanceof Date || obj instanceof types_1.Timestamp) {
|
|
215
|
+
this.EmitLoadTimestamp(reg, obj);
|
|
216
|
+
}
|
|
217
|
+
else if (obj instanceof types_1.Address) {
|
|
218
|
+
this.EmitLoadAddress(reg, obj);
|
|
219
|
+
}
|
|
220
|
+
else if ((typeof obj.UnserializeData === "function" &&
|
|
221
|
+
typeof obj.SerializeData === "function") ||
|
|
222
|
+
obj instanceof interfaces_1.ISerializable) {
|
|
223
|
+
this.EmitLoadISerializable(reg, obj);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
if (Array.isArray(obj)) {
|
|
227
|
+
this.EmitLoadArray(reg, obj);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
throw Error("Load type " + typeof obj + " not supported");
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
default:
|
|
235
|
+
throw Error("Load type " + typeof obj + " not supported");
|
|
236
|
+
}
|
|
237
|
+
return this;
|
|
238
|
+
};
|
|
239
|
+
ScriptBuilder.prototype.EmitLoadBytes = function (reg, bytes, type) {
|
|
240
|
+
if (type === void 0) { type = VMType_1.VMType.Bytes; }
|
|
241
|
+
if (bytes.length > 0xffff)
|
|
242
|
+
throw new Error("tried to load too much data");
|
|
243
|
+
this.Emit(Opcode_1.Opcode.LOAD);
|
|
244
|
+
this.AppendByte(reg);
|
|
245
|
+
this.AppendByte(type);
|
|
246
|
+
this.EmitVarInt(bytes.length);
|
|
247
|
+
this.EmitBytes(bytes);
|
|
248
|
+
return this;
|
|
249
|
+
};
|
|
250
|
+
ScriptBuilder.prototype.EmitLoadArray = function (reg, obj) {
|
|
251
|
+
this.Emit(Opcode_1.Opcode.CAST, [reg, reg, VMType_1.VMType.None]);
|
|
252
|
+
for (var i = 0; i < obj.length; i++) {
|
|
253
|
+
var element = obj[i];
|
|
254
|
+
var temp_regVal = reg + 1;
|
|
255
|
+
var temp_regKey = reg + 2;
|
|
256
|
+
this.EmitLoad(temp_regVal, element);
|
|
257
|
+
this.EmitLoad(temp_regKey, i);
|
|
258
|
+
this.Emit(Opcode_1.Opcode.PUT, [temp_regVal, reg, temp_regKey]);
|
|
259
|
+
//this.EmitLoad(reg, element);
|
|
260
|
+
//this.EmitPush(reg);
|
|
261
|
+
//reg++;
|
|
262
|
+
}
|
|
263
|
+
return this;
|
|
264
|
+
};
|
|
265
|
+
ScriptBuilder.prototype.EmitLoadISerializable = function (reg, obj) {
|
|
266
|
+
var writer = new types_1.PBinaryWriter();
|
|
267
|
+
obj.SerializeData(writer);
|
|
268
|
+
this.EmitLoadBytes(reg, writer.toArray(), VMType_1.VMType.Bytes);
|
|
269
|
+
return this;
|
|
270
|
+
};
|
|
271
|
+
ScriptBuilder.prototype.EmitLoadVMObject = function (reg, obj) {
|
|
272
|
+
var e_1, _a;
|
|
273
|
+
var writer = new types_1.PBinaryWriter();
|
|
274
|
+
var result = obj.SerializeObjectCall(writer);
|
|
275
|
+
this.Emit(Opcode_1.Opcode.LOAD);
|
|
276
|
+
this.AppendByte(reg);
|
|
277
|
+
this.AppendByte(obj.Type);
|
|
278
|
+
if (result == undefined) {
|
|
279
|
+
//console.log("enter");
|
|
280
|
+
if (obj.Data instanceof Map ||
|
|
281
|
+
obj.Data instanceof Map && obj.Data instanceof VMObject_1.VMObject) {
|
|
282
|
+
var resultData = obj.Data;
|
|
283
|
+
this.EmitVarInt(resultData.size);
|
|
284
|
+
try {
|
|
285
|
+
for (var resultData_1 = __values(resultData), resultData_1_1 = resultData_1.next(); !resultData_1_1.done; resultData_1_1 = resultData_1.next()) {
|
|
286
|
+
var entry = resultData_1_1.value;
|
|
287
|
+
//console.log(entry[0]);
|
|
288
|
+
var key = entry[0];
|
|
289
|
+
var value = entry[1];
|
|
290
|
+
this.EmitLoadVMObject(reg + 1, key);
|
|
291
|
+
this.EmitLoadVMObject(reg + 2, value);
|
|
292
|
+
this.Emit(Opcode_1.Opcode.PUT, [reg + 1, reg, reg + 2]);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
296
|
+
finally {
|
|
297
|
+
try {
|
|
298
|
+
if (resultData_1_1 && !resultData_1_1.done && (_a = resultData_1.return)) _a.call(resultData_1);
|
|
299
|
+
}
|
|
300
|
+
finally { if (e_1) throw e_1.error; }
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else if (obj.Data instanceof VMObject_1.VMObject) {
|
|
304
|
+
var writerNew = new types_1.PBinaryWriter();
|
|
305
|
+
var bytes_1 = obj.Data.SerializeData(writerNew);
|
|
306
|
+
//console.log(bytes.length);
|
|
307
|
+
this.EmitVarInt(bytes_1.length);
|
|
308
|
+
this.AppendBytes(Array.from(bytes_1));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
//console.log("reg", reg);
|
|
313
|
+
var bytes = Array.from(result);
|
|
314
|
+
//console.log(bytes.length);
|
|
315
|
+
this.EmitVarInt(bytes.length);
|
|
316
|
+
this.AppendBytes(bytes);
|
|
317
|
+
}
|
|
318
|
+
//this.EmitLoadBytes(reg, Array.from(result), obj.Type);
|
|
319
|
+
return this;
|
|
320
|
+
};
|
|
321
|
+
ScriptBuilder.prototype.EmitLoadEnum = function (reg, enumVal) {
|
|
322
|
+
// var temp = Convert.ToUInt32(enumVal);
|
|
323
|
+
// var bytes = BitConverter.GetBytes(temp);
|
|
324
|
+
var bytes = [0, 0, 0, 0];
|
|
325
|
+
for (var i = 0; i < bytes.length; i++) {
|
|
326
|
+
var byte = enumVal & 0xff;
|
|
327
|
+
bytes[i] = byte;
|
|
328
|
+
enumVal = (enumVal - byte) / 256;
|
|
329
|
+
}
|
|
330
|
+
this.EmitLoadBytes(reg, bytes, VMType_1.VMType.Enum);
|
|
331
|
+
return this;
|
|
332
|
+
};
|
|
333
|
+
ScriptBuilder.prototype.EmitLoadAddress = function (reg, obj) {
|
|
334
|
+
var writer = new types_1.PBinaryWriter();
|
|
335
|
+
obj.SerializeData(writer);
|
|
336
|
+
var byteArray = Array.from(writer.toUint8Array());
|
|
337
|
+
this.EmitLoadBytes(reg, byteArray, VMType_1.VMType.Bytes);
|
|
338
|
+
return this;
|
|
339
|
+
};
|
|
340
|
+
ScriptBuilder.prototype.EmitLoadTimestamp = function (reg, obj) {
|
|
341
|
+
if (obj instanceof types_1.Timestamp) {
|
|
342
|
+
var bytes = Array.from(types_1.Serialization.Serialize(obj));
|
|
343
|
+
this.EmitLoadBytes(reg, bytes, VMType_1.VMType.Timestamp);
|
|
344
|
+
}
|
|
345
|
+
else if (obj instanceof Date) {
|
|
346
|
+
var num = (obj.getTime() + obj.getTimezoneOffset() * 60 * 1000) / 1000;
|
|
347
|
+
var a = (num & 0xff000000) >> 24;
|
|
348
|
+
var b = (num & 0x00ff0000) >> 16;
|
|
349
|
+
var c = (num & 0x0000ff00) >> 8;
|
|
350
|
+
var d = num & 0x000000ff;
|
|
351
|
+
var bytes = [d, c, b, a];
|
|
352
|
+
this.EmitLoadBytes(reg, bytes, VMType_1.VMType.Timestamp);
|
|
353
|
+
}
|
|
354
|
+
return this;
|
|
355
|
+
};
|
|
356
|
+
ScriptBuilder.prototype.EmitLoadVarInt = function (reg, val) {
|
|
357
|
+
var bytes = (0, utils_1.numberToByteArray)(val);
|
|
358
|
+
this.Emit(Opcode_1.Opcode.LOAD);
|
|
359
|
+
this.AppendByte(reg);
|
|
360
|
+
this.AppendByte(VMType_1.VMType.Number);
|
|
361
|
+
this.AppendByte(bytes.length);
|
|
362
|
+
this.EmitBytes(Array.from(bytes));
|
|
363
|
+
return this;
|
|
364
|
+
};
|
|
365
|
+
ScriptBuilder.prototype.EmitMove = function (src_reg, dst_reg) {
|
|
366
|
+
this.Emit(Opcode_1.Opcode.MOVE);
|
|
367
|
+
this.AppendByte(src_reg);
|
|
368
|
+
this.AppendByte(dst_reg);
|
|
369
|
+
return this;
|
|
370
|
+
};
|
|
371
|
+
ScriptBuilder.prototype.EmitCopy = function (src_reg, dst_reg) {
|
|
372
|
+
this.Emit(Opcode_1.Opcode.COPY);
|
|
373
|
+
this.AppendByte(src_reg);
|
|
374
|
+
this.AppendByte(dst_reg);
|
|
375
|
+
return this;
|
|
376
|
+
};
|
|
377
|
+
ScriptBuilder.prototype.EmitLabel = function (label) {
|
|
378
|
+
this.Emit(Opcode_1.Opcode.NOP);
|
|
379
|
+
this._labelLocations[label] = this.str.length;
|
|
380
|
+
return this;
|
|
381
|
+
};
|
|
382
|
+
ScriptBuilder.prototype.EmitJump = function (opcode, label, reg) {
|
|
383
|
+
if (reg === void 0) { reg = 0; }
|
|
384
|
+
switch (opcode) {
|
|
385
|
+
case Opcode_1.Opcode.JMP:
|
|
386
|
+
case Opcode_1.Opcode.JMPIF:
|
|
387
|
+
case Opcode_1.Opcode.JMPNOT:
|
|
388
|
+
this.Emit(opcode);
|
|
389
|
+
break;
|
|
390
|
+
default:
|
|
391
|
+
throw new Error("Invalid jump opcode: " + opcode);
|
|
392
|
+
}
|
|
393
|
+
if (opcode != Opcode_1.Opcode.JMP) {
|
|
394
|
+
this.AppendByte(reg);
|
|
395
|
+
}
|
|
396
|
+
var ofs = this.str.length;
|
|
397
|
+
this.AppendUshort(0);
|
|
398
|
+
this._jumpLocations[ofs] = label;
|
|
399
|
+
return this;
|
|
400
|
+
};
|
|
401
|
+
ScriptBuilder.prototype.EmitCall = function (label, regCount) {
|
|
402
|
+
if (regCount < 1 || regCount > MaxRegisterCount) {
|
|
403
|
+
throw new Error("Invalid number of registers");
|
|
404
|
+
}
|
|
405
|
+
var ofs = this.str.length; //(int)stream.Position;
|
|
406
|
+
ofs += 2;
|
|
407
|
+
this.Emit(Opcode_1.Opcode.CALL);
|
|
408
|
+
this.AppendByte(regCount);
|
|
409
|
+
this.AppendUshort(0);
|
|
410
|
+
this._jumpLocations[ofs] = label;
|
|
411
|
+
return this;
|
|
412
|
+
};
|
|
413
|
+
ScriptBuilder.prototype.EmitConditionalJump = function (opcode, src_reg, label) {
|
|
414
|
+
if (opcode != Opcode_1.Opcode.JMPIF && opcode != Opcode_1.Opcode.JMPNOT) {
|
|
415
|
+
throw new Error("Opcode is not a conditional jump");
|
|
416
|
+
}
|
|
417
|
+
var ofs = this.str.length;
|
|
418
|
+
ofs += 2;
|
|
419
|
+
this.Emit(opcode);
|
|
420
|
+
this.AppendByte(src_reg);
|
|
421
|
+
this.AppendUshort(0);
|
|
422
|
+
this._jumpLocations[ofs] = label;
|
|
423
|
+
return this;
|
|
424
|
+
};
|
|
425
|
+
ScriptBuilder.prototype.InsertMethodArgs = function (args) {
|
|
426
|
+
var temp_reg = 0;
|
|
427
|
+
for (var i = args.length - 1; i >= 0; i--) {
|
|
428
|
+
var arg = args[i];
|
|
429
|
+
this.EmitLoad(temp_reg, arg);
|
|
430
|
+
this.EmitPush(temp_reg);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
ScriptBuilder.prototype.CallInterop = function (method, args) {
|
|
434
|
+
this.InsertMethodArgs(args);
|
|
435
|
+
var dest_reg = 0;
|
|
436
|
+
this.EmitLoad(dest_reg, method);
|
|
437
|
+
this.Emit(Opcode_1.Opcode.EXTCALL, [dest_reg]);
|
|
438
|
+
return this;
|
|
439
|
+
};
|
|
440
|
+
ScriptBuilder.prototype.CallContract = function (contractName, method, args) {
|
|
441
|
+
this.InsertMethodArgs(args);
|
|
442
|
+
var temp_reg = 0;
|
|
443
|
+
this.EmitLoad(temp_reg, method);
|
|
444
|
+
this.EmitPush(temp_reg);
|
|
445
|
+
var src_reg = 0;
|
|
446
|
+
var dest_reg = 1;
|
|
447
|
+
this.EmitLoad(src_reg, contractName);
|
|
448
|
+
this.Emit(Opcode_1.Opcode.CTX, [src_reg, dest_reg]);
|
|
449
|
+
this.Emit(Opcode_1.Opcode.SWITCH, [dest_reg]);
|
|
450
|
+
return this;
|
|
451
|
+
};
|
|
452
|
+
//#region ScriptBuilderExtensions
|
|
453
|
+
ScriptBuilder.prototype.AllowGas = function (from, to, gasPrice, gasLimit) {
|
|
454
|
+
return this.CallContract(Contracts_1.Contracts.GasContractName, "AllowGas", [
|
|
455
|
+
from,
|
|
456
|
+
to,
|
|
457
|
+
gasPrice,
|
|
458
|
+
gasLimit,
|
|
459
|
+
]);
|
|
460
|
+
};
|
|
461
|
+
ScriptBuilder.prototype.SpendGas = function (address) {
|
|
462
|
+
return this.CallContract(Contracts_1.Contracts.GasContractName, "SpendGas", [address]);
|
|
463
|
+
};
|
|
464
|
+
ScriptBuilder.prototype.CallRPC = function (methodName, params) {
|
|
465
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
466
|
+
return __generator(this, function (_a) {
|
|
467
|
+
return [2 /*return*/, "bla"];
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
ScriptBuilder.prototype.GetAddressTransactionCount = function (address, chainInput) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
473
|
+
var params;
|
|
474
|
+
return __generator(this, function (_a) {
|
|
475
|
+
switch (_a.label) {
|
|
476
|
+
case 0:
|
|
477
|
+
params = [address, chainInput];
|
|
478
|
+
return [4 /*yield*/, this.CallRPC("getAddressTransactionCount", params)];
|
|
479
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
//#endregion
|
|
485
|
+
ScriptBuilder.prototype.EmitTimestamp = function (obj) {
|
|
486
|
+
var num = (obj.getTime() + obj.getTimezoneOffset() * 60 * 1000) / 1000;
|
|
487
|
+
var a = (num & 0xff000000) >> 24;
|
|
488
|
+
var b = (num & 0x00ff0000) >> 16;
|
|
489
|
+
var c = (num & 0x0000ff00) >> 8;
|
|
490
|
+
var d = num & 0x000000ff;
|
|
491
|
+
var bytes = [d, c, b, a];
|
|
492
|
+
this.AppendBytes(bytes);
|
|
493
|
+
return this;
|
|
494
|
+
};
|
|
495
|
+
ScriptBuilder.prototype.EmitByteArray = function (bytes) {
|
|
496
|
+
this.EmitVarInt(bytes.length);
|
|
497
|
+
this.EmitBytes(bytes);
|
|
498
|
+
return this;
|
|
499
|
+
};
|
|
500
|
+
ScriptBuilder.prototype.EmitVarString = function (text) {
|
|
501
|
+
var bytes = this.RawString(text);
|
|
502
|
+
this.EmitVarInt(bytes.length);
|
|
503
|
+
this.EmitBytes(bytes);
|
|
504
|
+
return this;
|
|
505
|
+
};
|
|
506
|
+
ScriptBuilder.prototype.EmitVarInt = function (value) {
|
|
507
|
+
if (value < 0)
|
|
508
|
+
throw "negative value invalid";
|
|
509
|
+
if (value < 0xfd) {
|
|
510
|
+
this.AppendByte(value);
|
|
511
|
+
}
|
|
512
|
+
else if (value <= 0xffff) {
|
|
513
|
+
var B = (value & 0x0000ff00) >> 8;
|
|
514
|
+
var A = value & 0x000000ff;
|
|
515
|
+
// TODO check if the endianess is correct, might have to reverse order of appends
|
|
516
|
+
this.AppendByte(0xfd);
|
|
517
|
+
this.AppendByte(A);
|
|
518
|
+
this.AppendByte(B);
|
|
519
|
+
}
|
|
520
|
+
else if (value <= 0xffffffff) {
|
|
521
|
+
var C = (value & 0x00ff0000) >> 16;
|
|
522
|
+
var B = (value & 0x0000ff00) >> 8;
|
|
523
|
+
var A = value & 0x000000ff;
|
|
524
|
+
// TODO check if the endianess is correct, might have to reverse order of appends
|
|
525
|
+
this.AppendByte(0xfe);
|
|
526
|
+
this.AppendByte(A);
|
|
527
|
+
this.AppendByte(B);
|
|
528
|
+
this.AppendByte(C);
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
var D = (value & 0xff000000) >> 24;
|
|
532
|
+
var C = (value & 0x00ff0000) >> 16;
|
|
533
|
+
var B = (value & 0x0000ff00) >> 8;
|
|
534
|
+
var A = value & 0x000000ff;
|
|
535
|
+
// TODO check if the endianess is correct, might have to reverse order of appends
|
|
536
|
+
this.AppendByte(0xff);
|
|
537
|
+
this.AppendByte(A);
|
|
538
|
+
this.AppendByte(B);
|
|
539
|
+
this.AppendByte(C);
|
|
540
|
+
this.AppendByte(D);
|
|
541
|
+
}
|
|
542
|
+
return this;
|
|
543
|
+
};
|
|
544
|
+
ScriptBuilder.prototype.EmitUInt32 = function (value) {
|
|
545
|
+
if (value < 0)
|
|
546
|
+
throw "negative value invalid";
|
|
547
|
+
var D = (value & 0xff000000) >> 24;
|
|
548
|
+
var C = (value & 0x00ff0000) >> 16;
|
|
549
|
+
var B = (value & 0x0000ff00) >> 8;
|
|
550
|
+
var A = value & 0x000000ff;
|
|
551
|
+
// TODO check if the endianess is correct, might have to reverse order of appends
|
|
552
|
+
this.AppendByte(0xff);
|
|
553
|
+
this.AppendByte(A);
|
|
554
|
+
this.AppendByte(B);
|
|
555
|
+
this.AppendByte(C);
|
|
556
|
+
this.AppendByte(D);
|
|
557
|
+
return this;
|
|
558
|
+
};
|
|
559
|
+
ScriptBuilder.prototype.EmitBytes = function (bytes) {
|
|
560
|
+
for (var i = 0; i < bytes.length; i++)
|
|
561
|
+
this.AppendByte(bytes[i]);
|
|
562
|
+
// writer.Write(bytes);
|
|
563
|
+
return this;
|
|
564
|
+
};
|
|
565
|
+
//Custom Modified
|
|
566
|
+
ScriptBuilder.prototype.ByteToHex = function (byte) {
|
|
567
|
+
var result = ("0" + (byte & 0xff).toString(16)).slice(-2);
|
|
568
|
+
return result;
|
|
569
|
+
};
|
|
570
|
+
ScriptBuilder.prototype.AppendByte = function (byte) {
|
|
571
|
+
this.str += this.ByteToHex(byte);
|
|
572
|
+
this.writer.writeByte(byte);
|
|
573
|
+
};
|
|
574
|
+
//Custom Modified
|
|
575
|
+
ScriptBuilder.prototype.AppendBytes = function (bytes) {
|
|
576
|
+
for (var i = 0; i < bytes.length; i++) {
|
|
577
|
+
this.AppendByte(bytes[i]);
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
ScriptBuilder.prototype.AppendUshort = function (ushort) {
|
|
581
|
+
this.str +=
|
|
582
|
+
this.ByteToHex(ushort & 0xff) + this.ByteToHex((ushort >> 8) & 0xff);
|
|
583
|
+
this.writer.writeUnsignedShort(ushort);
|
|
584
|
+
};
|
|
585
|
+
ScriptBuilder.prototype.AppendHexEncoded = function (bytes) {
|
|
586
|
+
this.str += bytes;
|
|
587
|
+
this.writer.writeBytes(Array.from((0, utils_1.stringToUint8Array)(bytes)));
|
|
588
|
+
return this;
|
|
589
|
+
};
|
|
590
|
+
return ScriptBuilder;
|
|
591
|
+
}());
|
|
592
|
+
exports.ScriptBuilder = ScriptBuilder;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { VMType } from "./VMType";
|
|
2
|
+
import { Timestamp } from "../types/Timestamp";
|
|
3
|
+
import { PBinaryReader, PBinaryWriter } from "../types";
|
|
4
|
+
import { ISerializable } from "../interfaces";
|
|
5
|
+
import { Type } from "typescript";
|
|
6
|
+
export declare class VMObject implements ISerializable {
|
|
7
|
+
Type: VMType;
|
|
8
|
+
Data: object | null | undefined;
|
|
9
|
+
get IsEmpty(): boolean;
|
|
10
|
+
private _localSize;
|
|
11
|
+
private static readonly TimeFormat;
|
|
12
|
+
GetChildren(): Map<VMObject, VMObject> | null;
|
|
13
|
+
get Size(): number;
|
|
14
|
+
constructor();
|
|
15
|
+
AsTimestamp(): Timestamp;
|
|
16
|
+
AsByteArray(): Uint8Array;
|
|
17
|
+
AsString(): string;
|
|
18
|
+
ToString(): string;
|
|
19
|
+
AsNumber(): number;
|
|
20
|
+
AsEnum<T extends any>(): T;
|
|
21
|
+
GetArrayType(): VMType;
|
|
22
|
+
AsType(type: VMType): any;
|
|
23
|
+
static isEnum(instance: any): boolean;
|
|
24
|
+
AsBool(): boolean;
|
|
25
|
+
static isStructOrClass(type: Type): boolean;
|
|
26
|
+
static isSerializable(type: any): boolean;
|
|
27
|
+
static isPrimitive(type: any): boolean;
|
|
28
|
+
static isValueType(type: any): boolean;
|
|
29
|
+
static isClass(type: any): boolean;
|
|
30
|
+
static isInterface(type: any): boolean;
|
|
31
|
+
private static ConvertObjectInternal;
|
|
32
|
+
ToArray(arrayElementType: any): any[];
|
|
33
|
+
ToObjectType(type: any): any;
|
|
34
|
+
ToObject(): any;
|
|
35
|
+
ToStruct<T>(structType: any): T;
|
|
36
|
+
static GetVMType(type: any): any;
|
|
37
|
+
static IsVMType(type: any): boolean;
|
|
38
|
+
SetValue(value: any): VMObject;
|
|
39
|
+
setValue(val: any, type: VMType): void;
|
|
40
|
+
static ValidateStructKey(key: VMObject): void;
|
|
41
|
+
CastViaReflection(srcObj: any, level: number, dontConvertSerializables?: boolean): any;
|
|
42
|
+
SetKey(key: VMObject, obj: VMObject): void;
|
|
43
|
+
Copy(other: VMObject): void;
|
|
44
|
+
SetType(type: VMType): void;
|
|
45
|
+
static FromArray(array: Array<any>): VMObject;
|
|
46
|
+
static CastTo(srcObj: VMObject, type: VMType): VMObject;
|
|
47
|
+
static FromObject(obj: any): any;
|
|
48
|
+
static FromEnum(obj: any): VMObject;
|
|
49
|
+
static FromStruct(obj: any): VMObject;
|
|
50
|
+
static FromBytes(bytes: any): VMObject;
|
|
51
|
+
SerializeData(writer: PBinaryWriter): Uint8Array;
|
|
52
|
+
SerializeObjectCall(writer: PBinaryWriter): Uint8Array;
|
|
53
|
+
UnserializeData(reader: PBinaryReader): void;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=VMObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VMObject.d.ts","sourceRoot":"","sources":["../../src/core/vm/VMObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAIL,aAAa,EACb,aAAa,EAEd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAO9C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC,qBAAa,QAAS,YAAW,aAAa;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,IAAW,OAAO,IAAI,OAAO,CAE5B;IACD,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAiC;IAE5D,WAAW,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,IAAI;IAMpD,IAAW,IAAI,IAAI,MAAM,CAcxB;;IAOM,WAAW,IAAI,SAAS;IAQxB,WAAW,IAAI,UAAU;IA6BzB,QAAQ,IAAI,MAAM;IAmDlB,QAAQ,IAAI,MAAM;IAgDlB,QAAQ,IAAI,MAAM;IA8ClB,MAAM,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;IAY1B,YAAY,IAAI,MAAM;IA4BtB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAiBhC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO;IAoC9B,MAAM,IAAI,OAAO;WAaV,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;WAUpC,cAAc,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;WASlC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;WAM/B,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;WAI/B,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;WAU3B,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;IAI7C,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,gBAAgB,EAAE,GAAG,GAAG,GAAG,EAAE;IA6CrC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAgB5B,QAAQ,IAAI,GAAG;IAkCf,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;WAkExB,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;WA8CzB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;IAKnC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,QAAQ;IAK9B,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM;WAgDxB,iBAAiB,CAAC,GAAG,EAAE,QAAQ;IAYtC,iBAAiB,CACtB,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,MAAM,EACb,wBAAwB,GAAE,OAAc,GACvC,GAAG;IA0DN,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ;IAsBnC,IAAI,CAAC,KAAK,EAAE,QAAQ;IAqBb,OAAO,CAAC,IAAI,EAAE,MAAM;WAIb,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ;IAUpD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ;WA8DzC,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;WAmDzB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ;WAM5B,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ;WAM9B,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,QAAQ;IAO7C,aAAa,CAAC,MAAM,EAAE,aAAa;IA2D5B,mBAAmB,CAAC,MAAM,EAAE,aAAa;IA8FhD,eAAe,CAAC,MAAM,EAAE,aAAa;CA0EtC"}
|