├── .gitattributes ├── convex-cli ├── src │ ├── main │ │ ├── launch │ │ │ └── .gitignore │ │ ├── java │ │ │ └── convex │ │ │ │ └── cli │ │ │ │ ├── mixins │ │ │ │ ├── ClientKeyMixin.java │ │ │ │ ├── ClientMixin.java │ │ │ │ └── AMixin.java │ │ │ │ ├── ATopCommand.java │ │ │ │ └── desktop │ │ │ │ └── Desktop.java │ │ └── resources │ │ │ └── art │ │ │ └── convex.logo │ ├── test │ │ └── resources │ │ │ └── test.txt │ └── docs │ │ └── examples.md └── .gitignore ├── convex-observer ├── .gitignore └── src │ ├── main │ └── java │ │ └── module-info.java │ └── test │ └── java │ └── convex │ └── observer │ └── ObserverTest.java ├── convex-core ├── src │ ├── test │ │ ├── cvx │ │ │ └── test │ │ │ │ └── convex │ │ │ │ └── lab │ │ │ │ └── quasiquote.cvx │ │ ├── java │ │ │ ├── convex │ │ │ │ ├── store │ │ │ │ │ └── ParamTestStores.java │ │ │ │ ├── core │ │ │ │ │ ├── examples │ │ │ │ │ │ └── JuiceTrials.java │ │ │ │ │ ├── util │ │ │ │ │ │ └── VisitCounter.java │ │ │ │ │ ├── crypto │ │ │ │ │ │ ├── WalletTest.java │ │ │ │ │ │ ├── PBETest.java │ │ │ │ │ │ └── util │ │ │ │ │ │ │ └── Base58Test.java │ │ │ │ │ └── lang │ │ │ │ │ │ ├── SyntaxTest.java │ │ │ │ │ │ └── CodeTest.java │ │ │ │ ├── util │ │ │ │ │ ├── UMathTest.java │ │ │ │ │ ├── BitsTest.java │ │ │ │ │ └── GenTestUMath.java │ │ │ │ └── test │ │ │ │ │ └── generators │ │ │ │ │ └── AGenerator.java │ │ │ ├── junit-platform.properties │ │ │ └── examples │ │ │ │ └── generators │ │ │ │ └── BadListTest.java │ │ └── resources │ │ │ ├── utils │ │ │ ├── config-test.json │ │ │ └── test.json5 │ │ │ ├── testsource │ │ │ └── min.con │ │ │ ├── examples │ │ │ ├── samples.cvx │ │ │ └── language.cvx │ │ │ └── contracts │ │ │ ├── hello.con │ │ │ ├── deposit-box.con │ │ │ └── exceptional.con │ └── main │ │ ├── cvx │ │ ├── convex │ │ │ ├── trust │ │ │ │ └── governance.cvx │ │ │ ├── user.cvx │ │ │ ├── torus │ │ │ │ └── genesis-currencies.cvx │ │ │ ├── asset │ │ │ │ └── spatial.cvx │ │ │ └── lab │ │ │ │ ├── messenger.cvx │ │ │ │ └── curation-market.cvx │ │ └── app │ │ │ └── names.cvx │ │ ├── resources-filtered │ │ └── convex │ │ │ └── core │ │ │ └── build.properties │ │ └── java │ │ └── convex │ │ ├── etch │ │ ├── package-info.java │ │ ├── EtchCorruptionError.java │ │ └── IEtchIndexVisitor.java │ │ ├── core │ │ ├── store │ │ │ └── package-info.java │ │ ├── data │ │ │ ├── prim │ │ │ │ └── package-info.java │ │ │ ├── type │ │ │ │ ├── package-info.java │ │ │ │ └── ANumericType.java │ │ │ ├── IAssociative.java │ │ │ ├── ASpecialVector.java │ │ │ ├── Lists.java │ │ │ └── IRefFunction.java │ │ ├── lang │ │ │ ├── impl │ │ │ │ └── package-info.java │ │ │ ├── reader │ │ │ │ ├── antlr │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── cvm │ │ │ ├── transactions │ │ │ │ ├── package-info.java │ │ │ │ └── Transactions.java │ │ │ ├── ops │ │ │ │ └── package-info.java │ │ │ ├── exception │ │ │ │ ├── AReturn.java │ │ │ │ ├── AThrowable.java │ │ │ │ └── ATrampoline.java │ │ │ ├── package-info.java │ │ │ ├── ACVMCode.java │ │ │ ├── impl │ │ │ │ └── InvalidBlockException.java │ │ │ └── Log.java │ │ ├── init │ │ │ └── package-info.java │ │ ├── util │ │ │ ├── UnsafeRunnable.java │ │ │ ├── package-info.java │ │ │ ├── BenchUtils.java │ │ │ └── MergeFunction.java │ │ ├── exceptions │ │ │ ├── package-info.java │ │ │ ├── ParseException.java │ │ │ ├── TODOException.java │ │ │ ├── Panic.java │ │ │ ├── BadSignatureException.java │ │ │ └── FastRuntimeException.java │ │ ├── text │ │ │ ├── package-info.java │ │ │ └── AFormat.java │ │ ├── crypto │ │ │ ├── package-info.java │ │ │ ├── wallet │ │ │ │ ├── IWallet.java │ │ │ │ ├── AWallet.java │ │ │ │ └── LockedWalletException.java │ │ │ └── Encoding.java │ │ ├── cpos │ │ │ └── package-info.java │ │ ├── message │ │ │ ├── package-info.java │ │ │ └── MessageTag.java │ │ ├── Networks.java │ │ └── json │ │ │ └── package-info.java │ │ └── lattice │ │ ├── cursor │ │ └── package-info.java │ │ └── Lattice.java └── .gitignore ├── convex-java ├── .gitignore └── src │ ├── test │ └── resources │ │ └── example │ │ └── trader │ │ └── .gitignore │ └── main │ └── java │ ├── convex │ └── java │ │ ├── ClientException.java │ │ └── asset │ │ └── BaseAsset.java │ └── module-info.java ├── convex-benchmarks └── .gitignore ├── convex-gui ├── .gitignore ├── docs │ ├── images │ │ ├── hacker-hires.png │ │ ├── testnet-hires.png │ │ ├── wallet-hires.png │ │ ├── world-hires.png │ │ ├── convex-desktop.png │ │ ├── ecosystem-hires.png │ │ ├── terminal-hires.png │ │ └── filesystem-hires.png │ └── icons │ │ └── feather │ │ ├── circle.svg │ │ ├── check.svg │ │ ├── minus.svg │ │ ├── play.svg │ │ ├── chevron-up.svg │ │ ├── chevron-down.svg │ │ ├── chevron-left.svg │ │ ├── chevron-right.svg │ │ ├── droplet.svg │ │ ├── framer.svg │ │ ├── twitch.svg │ │ ├── cloud.svg │ │ ├── moon.svg │ │ ├── navigation.svg │ │ ├── shield.svg │ │ ├── square.svg │ │ ├── volume.svg │ │ ├── zap.svg │ │ ├── activity.svg │ │ ├── navigation-2.svg │ │ ├── bookmark.svg │ │ ├── disc.svg │ │ ├── edit-2.svg │ │ ├── filter.svg │ │ ├── umbrella.svg │ │ ├── x.svg │ │ ├── bluetooth.svg │ │ ├── clock.svg │ │ ├── plus.svg │ │ ├── thermometer.svg │ │ ├── code.svg │ │ ├── crop.svg │ │ ├── facebook.svg │ │ ├── power.svg │ │ ├── search.svg │ │ ├── arrow-up.svg │ │ ├── eye.svg │ │ ├── folder.svg │ │ ├── message-square.svg │ │ ├── pause.svg │ │ ├── send.svg │ │ ├── slash.svg │ │ ├── terminal.svg │ │ ├── user.svg │ │ ├── arrow-down.svg │ │ ├── arrow-left.svg │ │ ├── edit-3.svg │ │ ├── minus-circle.svg │ │ ├── mouse-pointer.svg │ │ ├── pie-chart.svg │ │ ├── play-circle.svg │ │ ├── skip-back.svg │ │ ├── stop-circle.svg │ │ ├── tv.svg │ │ ├── arrow-right.svg │ │ ├── arrow-up-left.svg │ │ ├── arrow-up-right.svg │ │ ├── at-sign.svg │ │ ├── bell.svg │ │ ├── chevrons-up.svg │ │ ├── corner-left-up.svg │ │ ├── corner-right-up.svg │ │ ├── corner-up-left.svg │ │ ├── lock.svg │ │ ├── map-pin.svg │ │ ├── octagon.svg │ │ ├── rewind.svg │ │ ├── rotate-ccw.svg │ │ ├── skip-forward.svg │ │ ├── underline.svg │ │ ├── unlock.svg │ │ ├── arrow-down-left.svg │ │ ├── arrow-down-right.svg │ │ ├── award.svg │ │ ├── battery.svg │ │ ├── bold.svg │ │ ├── chevrons-down.svg │ │ ├── chevrons-left.svg │ │ ├── chevrons-right.svg │ │ ├── columns.svg │ │ ├── corner-down-left.svg │ │ ├── corner-left-down.svg │ │ ├── corner-up-right.svg │ │ ├── music.svg │ │ ├── rotate-cw.svg │ │ ├── rss.svg │ │ ├── sidebar.svg │ │ ├── tablet.svg │ │ ├── toggle-left.svg │ │ ├── triangle.svg │ │ ├── video.svg │ │ ├── wind.svg │ │ ├── corner-down-right.svg │ │ ├── corner-right-down.svg │ │ ├── fast-forward.svg │ │ ├── flag.svg │ │ ├── home.svg │ │ ├── maximize.svg │ │ ├── minimize.svg │ │ ├── toggle-right.svg │ │ ├── trending-up.svg │ │ ├── volume-1.svg │ │ ├── check-circle.svg │ │ ├── credit-card.svg │ │ ├── file.svg │ │ ├── minus-square.svg │ │ ├── smartphone.svg │ │ ├── star.svg │ │ ├── target.svg │ │ ├── trending-down.svg │ │ ├── book-open.svg │ │ ├── book.svg │ │ ├── compass.svg │ │ ├── divide.svg │ │ ├── dollar-sign.svg │ │ ├── git-merge.svg │ │ ├── table.svg │ │ ├── anchor.svg │ │ ├── briefcase.svg │ │ ├── info.svg │ │ ├── italic.svg │ │ ├── menu.svg │ │ ├── more-vertical.svg │ │ ├── x-circle.svg │ │ ├── check-square.svg │ │ ├── copy.svg │ │ ├── key.svg │ │ ├── mail.svg │ │ ├── more-horizontal.svg │ │ ├── percent.svg │ │ ├── tag.svg │ │ ├── type.svg │ │ ├── bar-chart.svg │ │ ├── camera.svg │ │ ├── cloud-lightning.svg │ │ ├── link-2.svg │ │ ├── paperclip.svg │ │ ├── pause-circle.svg │ │ ├── plus-circle.svg │ │ ├── pocket.svg │ │ ├── thumbs-up.svg │ │ ├── trash.svg │ │ ├── zoom-out.svg │ │ ├── airplay.svg │ │ ├── alert-circle.svg │ │ ├── archive.svg │ │ ├── bar-chart-2.svg │ │ ├── edit.svg │ │ ├── git-commit.svg │ │ ├── hexagon.svg │ │ ├── share.svg │ │ ├── voicemail.svg │ │ ├── volume-2.svg │ │ ├── arrow-up-circle.svg │ │ ├── folder-minus.svg │ │ ├── image.svg │ │ ├── layers.svg │ │ ├── layout.svg │ │ ├── log-in.svg │ │ ├── log-out.svg │ │ ├── speaker.svg │ │ ├── upload.svg │ │ ├── arrow-down-circle.svg │ │ ├── arrow-left-circle.svg │ │ ├── arrow-right-circle.svg │ │ ├── download.svg │ │ ├── heart.svg │ │ ├── help-circle.svg │ │ ├── link.svg │ │ ├── map.svg │ │ ├── monitor.svg │ │ ├── trello.svg │ │ ├── user-check.svg │ │ ├── user-minus.svg │ │ ├── volume-x.svg │ │ ├── x-square.svg │ │ ├── clipboard.svg │ │ ├── cloud-off.svg │ │ ├── database.svg │ │ ├── delete.svg │ │ ├── feather.svg │ │ ├── plus-square.svg │ │ ├── shopping-bag.svg │ │ ├── git-branch.svg │ │ ├── thumbs-down.svg │ │ ├── video-off.svg │ │ ├── cast.svg │ │ ├── hash.svg │ │ ├── meh.svg │ │ ├── radio.svg │ │ ├── smile.svg │ │ ├── tool.svg │ │ ├── camera-off.svg │ │ ├── file-minus.svg │ │ ├── frown.svg │ │ ├── pen-tool.svg │ │ ├── repeat.svg │ │ ├── save.svg │ │ ├── shopping-cart.svg │ │ ├── download-cloud.svg │ │ ├── external-link.svg │ │ ├── git-pull-request.svg │ │ ├── zoom-in.svg │ │ ├── align-left.svg │ │ ├── align-right.svg │ │ ├── grid.svg │ │ ├── headphones.svg │ │ ├── instagram.svg │ │ ├── linkedin.svg │ │ ├── users.svg │ │ ├── wifi.svg │ │ ├── align-center.svg │ │ ├── align-justify.svg │ │ ├── divide-circle.svg │ │ ├── globe.svg │ │ ├── inbox.svg │ │ ├── maximize-2.svg │ │ ├── minimize-2.svg │ │ ├── printer.svg │ │ ├── refresh-ccw.svg │ │ ├── refresh-cw.svg │ │ ├── user-x.svg │ │ ├── calendar.svg │ │ ├── folder-plus.svg │ │ ├── shield-off.svg │ │ ├── twitter.svg │ │ ├── user-plus.svg │ │ ├── x-octagon.svg │ │ ├── mic.svg │ │ ├── truck.svg │ │ ├── alert-octagon.svg │ │ ├── command.svg │ │ ├── cloud-rain.svg │ │ ├── divide-square.svg │ │ ├── dribbble.svg │ │ ├── alert-triangle.svg │ │ ├── server.svg │ │ ├── battery-charging.svg │ │ ├── file-plus.svg │ │ ├── message-circle.svg │ │ ├── upload-cloud.svg │ │ ├── zap-off.svg │ │ ├── crosshair.svg │ │ ├── shuffle.svg │ │ ├── chrome.svg │ │ ├── coffee.svg │ │ ├── scissors.svg │ │ ├── share-2.svg │ │ ├── trash-2.svg │ │ ├── bell-off.svg │ │ ├── box.svg │ │ ├── eye-off.svg │ │ ├── watch.svg │ │ ├── file-text.svg │ │ ├── gift.svg │ │ ├── list.svg │ │ ├── codepen.svg │ │ ├── hard-drive.svg │ │ ├── move.svg │ │ ├── gitlab.svg │ │ ├── mic-off.svg │ │ ├── package.svg │ │ ├── phone.svg │ │ ├── github.svg │ │ ├── figma.svg │ │ ├── cloud-drizzle.svg │ │ ├── youtube.svg │ │ ├── aperture.svg │ │ ├── wifi-off.svg │ │ ├── cloud-snow.svg │ │ ├── life-buoy.svg │ │ ├── phone-call.svg │ │ ├── film.svg │ │ ├── sunset.svg │ │ ├── sunrise.svg │ │ ├── phone-off.svg │ │ └── sliders.svg └── src │ └── main │ ├── java │ └── convex │ │ └── gui │ │ ├── models │ │ ├── BaseColumn.java │ │ └── BaseTableModel.java │ │ ├── components │ │ ├── package-info.java │ │ ├── NonUpdatingCaret.java │ │ ├── BaseImageButton.java │ │ ├── renderer │ │ │ ├── StringRenderer.java │ │ │ ├── CellRenderer.java │ │ │ └── AddressRenderer.java │ │ └── BaseListComponent.java │ │ ├── utils │ │ └── TextFormat.java │ │ ├── wallet │ │ └── FriendPanel.java │ │ └── actor │ │ ├── ArgBox.java │ │ └── ParamLabel.java │ └── resources │ ├── images │ ├── cog.png │ ├── www.png │ ├── Convex.png │ ├── hacker.png │ ├── wallet.png │ ├── world.png │ ├── ecosystem.png │ ├── padlock.png │ ├── terminal.png │ ├── testnet.png │ ├── filesystem.png │ ├── padlock-open.png │ ├── terminal-icon.png │ ├── ic_cake_black_36dp.png │ ├── ic_stars_black_36dp.png │ ├── ic_lock_open_black_36dp.png │ ├── ic_lock_outline_black_36dp.png │ └── ic_priority_high_black_36dp.png │ └── fonts │ ├── MaterialSymbolsSharp.ttf │ └── SourceCodePro-Regular.ttf ├── convex-peer ├── .gitignore ├── src │ └── main │ │ └── java │ │ ├── convex │ │ ├── api │ │ │ └── package-info.java │ │ ├── net │ │ │ ├── package-info.java │ │ │ └── impl │ │ │ │ └── HandlerException.java │ │ └── peer │ │ │ ├── package-info.java │ │ │ ├── PeerException.java │ │ │ ├── LaunchException.java │ │ │ └── ConfigException.java │ │ └── module-info.java └── README.md ├── convex-restapi ├── .gitignore └── src │ └── main │ ├── java │ └── convex │ │ └── restapi │ │ ├── pub │ │ └── package-info.java │ │ ├── model │ │ ├── CreateAccountRequest.java │ │ ├── FaucetRequest.java │ │ ├── CreateAccountResponse.java │ │ ├── QueryRequest.java │ │ ├── JsonRPCRequest.java │ │ ├── TransactRequest.java │ │ ├── TransactionSubmitRequest.java │ │ ├── TransactionPrepareRequest.java │ │ ├── JsonRPCResponse.java │ │ ├── TransactionPrepareResponse.java │ │ ├── QueryAccountResponse.java │ │ └── ResultResponse.java │ │ └── api │ │ └── DepAPI.java │ └── resources │ └── convex │ └── restapi │ ├── pub │ ├── Convex.png │ └── favicon.ico │ └── mcp │ └── tools │ └── peerStatus.json ├── convex ├── convex-integration ├── src │ └── main │ │ ├── resources │ │ └── logback.xml │ │ └── java │ │ └── convex │ │ └── main │ │ └── Main.java └── README.md └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | *.cvx linguist-language=clojure 2 | -------------------------------------------------------------------------------- /convex-cli/src/main/launch/.gitignore: -------------------------------------------------------------------------------- 1 | /convex.exe 2 | -------------------------------------------------------------------------------- /convex-cli/src/test/resources/test.txt: -------------------------------------------------------------------------------- 1 | Test file for CLI -------------------------------------------------------------------------------- /convex-observer/.gitignore: -------------------------------------------------------------------------------- 1 | /pom.xml.versionsBackup 2 | -------------------------------------------------------------------------------- /convex-core/src/test/cvx/test/convex/lab/quasiquote.cvx: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /convex-java/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /.settings/ 4 | -------------------------------------------------------------------------------- /convex-java/src/test/resources/example/trader/.gitignore: -------------------------------------------------------------------------------- 1 | /APIKEY 2 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/trust/governance.cvx: -------------------------------------------------------------------------------- 1 | 'convex.governance -------------------------------------------------------------------------------- /convex-core/src/main/resources-filtered/convex/core/build.properties: -------------------------------------------------------------------------------- 1 | convex.core.version=${project.version} -------------------------------------------------------------------------------- /convex-benchmarks/.gitignore: -------------------------------------------------------------------------------- 1 | /.settings/ 2 | /.classpath 3 | /.project 4 | /pom.xml.versionsBackup 5 | /bin/ 6 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/user.cvx: -------------------------------------------------------------------------------- 1 | ;; CNS implementation and registry for `user.xxxx` names 2 | 3 | 'user -------------------------------------------------------------------------------- /convex-cli/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /pom.xml.versionsBackup 6 | /bin/ 7 | -------------------------------------------------------------------------------- /convex-gui/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /pom.xml.versionsBackup 6 | /bin/ 7 | -------------------------------------------------------------------------------- /convex-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.project 3 | /.classpath 4 | /.settings/ 5 | /pom.xml.versionsBackup 6 | /bin/ 7 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/etch/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex network transaction types. 3 | */ 4 | package convex.etch; -------------------------------------------------------------------------------- /convex-gui/docs/images/hacker-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/hacker-hires.png -------------------------------------------------------------------------------- /convex-gui/docs/images/testnet-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/testnet-hires.png -------------------------------------------------------------------------------- /convex-gui/docs/images/wallet-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/wallet-hires.png -------------------------------------------------------------------------------- /convex-gui/docs/images/world-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/world-hires.png -------------------------------------------------------------------------------- /convex-peer/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.settings/ 3 | /.project 4 | /pom.xml.versionsBackup 5 | /temp-join-db.etch 6 | /bin/ 7 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/store/ParamTestStores.java: -------------------------------------------------------------------------------- 1 | package convex.store; 2 | 3 | public class ParamTestStores { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/utils/config-test.json: -------------------------------------------------------------------------------- 1 | { 2 | /** Conif jest file in JSON5 **/ 3 | "config":"test", 4 | "array":[] 5 | } -------------------------------------------------------------------------------- /convex-gui/docs/images/convex-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/convex-desktop.png -------------------------------------------------------------------------------- /convex-gui/docs/images/ecosystem-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/ecosystem-hires.png -------------------------------------------------------------------------------- /convex-gui/docs/images/terminal-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/terminal-hires.png -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/models/BaseColumn.java: -------------------------------------------------------------------------------- 1 | package convex.gui.models; 2 | 3 | public class BaseColumn { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /convex-gui/docs/images/filesystem-hires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/docs/images/filesystem-hires.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/cog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/cog.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/www.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/www.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/Convex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/Convex.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/hacker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/hacker.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/wallet.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/world.png -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Public API for Convex clients and related utilities 3 | */ 4 | package convex.api; -------------------------------------------------------------------------------- /convex-restapi/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /.settings/ 4 | /pom.xml.versionsBackup 5 | /.apt_generated/ 6 | /.apt_generated_tests/ 7 | -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ecosystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ecosystem.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/padlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/padlock.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/terminal.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/testnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/testnet.png -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/store/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Etch database for convergent immutable storage 3 | */ 4 | package convex.core.store; -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/filesystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/filesystem.png -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/prim/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementation of CVM Primitive Data types 3 | */ 4 | package convex.core.data.prim; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/lang/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal CVM language implementation classes 3 | */ 4 | package convex.core.lang.impl; -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/padlock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/padlock-open.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/terminal-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/terminal-icon.png -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/net/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Networking protocol implementations for Convex and Lattice peers. 3 | */ 4 | package convex.net; -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/peer/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex Peer Server implementation using the P2P binary protocol 3 | */ 4 | package convex.peer; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/transactions/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex network transaction types. 3 | */ 4 | package convex.core.cvm.transactions; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/lattice/cursor/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Base package for lattice processing operations 3 | */ 4 | package convex.lattice.cursor; -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/pub/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Package for static resources used by convex-restapi 3 | */ 4 | package convex.restapi.pub; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/ops/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * CVM Operations, effectively the "machine code" of the CVM 3 | */ 4 | package convex.core.cvm.ops; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/init/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Package used to create genesis states for new Convex networks 3 | */ 4 | package convex.core.init; -------------------------------------------------------------------------------- /convex-gui/src/main/resources/fonts/MaterialSymbolsSharp.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/fonts/MaterialSymbolsSharp.ttf -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ic_cake_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ic_cake_black_36dp.png -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ic_stars_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ic_stars_black_36dp.png -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/type/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * CVM type system implementation. Currently internal to CVM. 3 | */ 4 | package convex.core.data.type; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/util/UnsafeRunnable.java: -------------------------------------------------------------------------------- 1 | package convex.core.util; 2 | 3 | public interface UnsafeRunnable { 4 | void run () throws Exception; 5 | } 6 | -------------------------------------------------------------------------------- /convex-gui/src/main/resources/fonts/SourceCodePro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/fonts/SourceCodePro-Regular.ttf -------------------------------------------------------------------------------- /convex-cli/src/docs/examples.md: -------------------------------------------------------------------------------- 1 | ./convex key gen 2 | 3 | ./convex key list 4 | 5 | ./convex local start --public-key 660 6 | 7 | ./convex transact -a 11 --port 62854 "*balance*" -------------------------------------------------------------------------------- /convex-core/src/main/cvx/app/names.cvx: -------------------------------------------------------------------------------- 1 | 'app.names 2 | 3 | ;; A CNS name manager for purchasable / tradable names 4 | 5 | 6 | ;; Map of String -> [monitor expiry] 7 | (def names {}) -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/lang/reader/antlr/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated ANTLR classes for the Convex Reader 3 | */ 4 | package convex.core.lang.reader.antlr; -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ic_lock_open_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ic_lock_open_black_36dp.png -------------------------------------------------------------------------------- /convex-restapi/src/main/resources/convex/restapi/pub/Convex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-restapi/src/main/resources/convex/restapi/pub/Convex.png -------------------------------------------------------------------------------- /convex-restapi/src/main/resources/convex/restapi/pub/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-restapi/src/main/resources/convex/restapi/pub/favicon.ico -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ic_lock_outline_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ic_lock_outline_black_36dp.png -------------------------------------------------------------------------------- /convex: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BASE_PATH=$(dirname $0) 4 | JAR_NAME=`ls -1 $BASE_PATH/convex-integration/target/convex.jar` 5 | 6 | # echo "using: $JAR_NAME" 7 | 8 | java -jar $JAR_NAME $@ 9 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/lang/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Core CVM language implementation for Convex Lisp and associated runtime functions 3 | */ 4 | package convex.core.lang; -------------------------------------------------------------------------------- /convex-gui/src/main/resources/images/ic_priority_high_black_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Convex-Dev/convex/HEAD/convex-gui/src/main/resources/images/ic_priority_high_black_36dp.png -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Specialised exception classes used in the Convex implementation and libraries 3 | */ 4 | package convex.core.exceptions; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/text/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Text and String handling utilities, primarily involving the {@link convex.core.data.AString} type 3 | */ 4 | package convex.core.text; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/crypto/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Crypto algorithms used within Convex, particularly for digital signatures and 3 | * cryptographic hashes 4 | */ 5 | package convex.core.crypto; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/exception/AReturn.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm.exception; 2 | 3 | /** 4 | * Abstract base class for exceptional returns 5 | */ 6 | public abstract class AReturn extends AExceptional { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/torus/genesis-currencies.cvx: -------------------------------------------------------------------------------- 1 | [ 2 | ["USDF" "Foundation USD" "Convex Foundation USD pre-payment credits" "$" 10000 2 1.0] 3 | ["GBPF" "Foundation GBP" "Convex Foundation GBP pre-payment credits" "£" 10000 2 1.27] 4 | ] -------------------------------------------------------------------------------- /convex-java/src/main/java/convex/java/ClientException.java: -------------------------------------------------------------------------------- 1 | package convex.java; 2 | 3 | /** 4 | * Exception class for Convex client errors 5 | */ 6 | @SuppressWarnings("serial") 7 | public class ClientException extends Exception { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/asset/spatial.cvx: -------------------------------------------------------------------------------- 1 | 'asset.spatial 2 | 3 | ;; Spatial tokens 4 | 5 | (defn build [options] 6 | (let [end (blob (or (:end options) 0x010000000000000000))] 7 | [ 8 | `(def supply (index ~start ~end)) 9 | ])) -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package provides general purpose Convex GUI components 3 | *

4 | * 5 | * @since 0.7.13 6 | * @author mikera 7 | * @version 1.1 8 | */ 9 | package convex.gui.components; -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/models/BaseTableModel.java: -------------------------------------------------------------------------------- 1 | package convex.gui.models; 2 | 3 | import javax.swing.table.AbstractTableModel; 4 | 5 | @SuppressWarnings("serial") 6 | public abstract class BaseTableModel extends AbstractTableModel { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/CreateAccountRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class CreateAccountRequest { 7 | public String accountKey; 8 | } 9 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/crypto/wallet/IWallet.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto.wallet; 2 | 3 | import convex.core.data.AccountKey; 4 | 5 | public interface IWallet { 6 | 7 | public void getKeyPair(AccountKey pubKey) throws LockedWalletException; 8 | } 9 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Core CVM implementation. The CVM implements the Convex state transition function when 3 | * transactions are executed on the Convex network to modify the global state 4 | */ 5 | package convex.core.cvm; -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/utils/TextFormat.java: -------------------------------------------------------------------------------- 1 | package convex.gui.utils; 2 | 3 | import convex.core.text.Text; 4 | 5 | public class TextFormat { 6 | public String convexBalance(long bal) { 7 | return Text.toFriendlyNumber(bal); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cpos/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementation of Convergent Proof of Stake consensus 3 | * 4 | *

See: Convex Whitepaper

5 | */ 6 | package convex.core.cpos; -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/etch/EtchCorruptionError.java: -------------------------------------------------------------------------------- 1 | package convex.etch; 2 | 3 | @SuppressWarnings("serial") 4 | public class EtchCorruptionError extends Error { 5 | 6 | public EtchCorruptionError(String message) { 7 | super(message); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/testsource/min.con: -------------------------------------------------------------------------------- 1 | (defn mymin [& vals] 2 | (let [fst (first vals) 3 | n (count vals)] 4 | (loop [min fst i 1] 5 | (if (>= i n) 6 | min 7 | (let [v (nth vals i)] 8 | (recur (if (< v min) v min) (inc i))))))) -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/FaucetRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class FaucetRequest { 7 | public String address; 8 | public Object amount; 9 | } 10 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/lang/reader/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementation of the standard Convex Lisp / CVX format 3 | * 4 | *

5 | * See: CVM Reader 6 | *

7 | */ 8 | package convex.core.lang.reader; -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-cli/src/main/java/convex/cli/mixins/ClientKeyMixin.java: -------------------------------------------------------------------------------- 1 | package convex.cli.mixins; 2 | 3 | import picocli.CommandLine.Mixin; 4 | 5 | public class ClientKeyMixin { 6 | 7 | @Mixin 8 | public KeyMixin keyMixin; 9 | 10 | @Mixin 11 | public KeyStoreMixin storeMixin; 12 | } 13 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/examples/JuiceTrials.java: -------------------------------------------------------------------------------- 1 | package convex.core.examples; 2 | 3 | /** 4 | * Test class for juice costs relative to execution time 5 | */ 6 | public class JuiceTrials { 7 | 8 | 9 | public static void main(String[] args) { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /convex-core/src/test/java/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled=true 2 | junit.jupiter.execution.parallel.mode.default = concurrent 3 | junit.jupiter.execution.parallel.mode.classes.default = concurrent 4 | junit.jupiter.testinstance.lifecycle.default = per_class 5 | 6 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-java/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex Java client library 3 | */ 4 | module convex.java { 5 | requires java.net.http; 6 | 7 | exports convex.java.asset; 8 | exports convex.java; 9 | 10 | requires transitive convex.core; 11 | requires transitive convex.peer; 12 | } -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/CreateAccountResponse.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class CreateAccountResponse { 7 | public String address; 8 | 9 | public String amount; 10 | } 11 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/QueryRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class QueryRequest { 7 | public String address; 8 | public String source; 9 | public boolean raw; 10 | } 11 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/text/AFormat.java: -------------------------------------------------------------------------------- 1 | package convex.core.text; 2 | 3 | /** 4 | * Base class for Convex-specific formats. 5 | * 6 | * These are all thread safe. 7 | */ 8 | @SuppressWarnings("serial") 9 | public abstract class AFormat extends java.text.Format { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevron-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevron-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevron-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevron-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/droplet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/framer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/twitch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/JsonRPCRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class JsonRPCRequest { 7 | String jsonrpc; 8 | String id; 9 | String method; 10 | Object params; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/TransactRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class TransactRequest { 7 | public String source; 8 | public String seed; 9 | public String address; 10 | } 11 | -------------------------------------------------------------------------------- /convex-cli/src/main/java/convex/cli/mixins/ClientMixin.java: -------------------------------------------------------------------------------- 1 | package convex.cli.mixins; 2 | 3 | import picocli.CommandLine.Mixin; 4 | 5 | public class ClientMixin extends AMixin { 6 | 7 | @Mixin 8 | ClientKeyMixin clientKeyMixin; 9 | 10 | @Mixin 11 | RemotePeerMixin peerMixin; 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/navigation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/shield.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/volume.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/zap.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/etch/IEtchIndexVisitor.java: -------------------------------------------------------------------------------- 1 | package convex.etch; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * Visitor for Etch index 7 | */ 8 | public interface IEtchIndexVisitor { 9 | public void visit(Etch e, int level, int[] digits, long indexPointer) throws IOException; 10 | } 11 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/util/VisitCounter.java: -------------------------------------------------------------------------------- 1 | package convex.core.util; 2 | 3 | import java.util.function.Consumer; 4 | 5 | public class VisitCounter implements Consumer { 6 | 7 | public long count; 8 | 9 | @Override 10 | public void accept(T t) { 11 | count++; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/examples/samples.cvx: -------------------------------------------------------------------------------- 1 | ;; Deploy a new token 2 | 3 | (def my-token (deploy (fungible/build-token {:supply 1000000}))) 4 | 5 | ;; Create new new market 6 | 7 | (torus/create-market my-token) 8 | 9 | 10 | 11 | ;; Buy USD tokens with my-token 12 | 13 | (torus/buy USD 10000 my-token) -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/activity.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/navigation-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/crypto/wallet/AWallet.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto.wallet; 2 | 3 | /** 4 | * Base class for wallet implementations. A wallet implementation provides access and storage for multiple wallet entries 5 | */ 6 | public abstract class AWallet implements IWallet { 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bookmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/disc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/edit-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/filter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/umbrella.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/TransactionSubmitRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class TransactionSubmitRequest { 7 | public String hash; 8 | public String accountKey; 9 | public String sig; 10 | } 11 | -------------------------------------------------------------------------------- /convex-cli/src/main/resources/art/convex.logo: -------------------------------------------------------------------------------- 1 | _______ 2 | / ___ \ ____ _______ __ ____ ___ ___ 3 | / \ \/ / _ \ / \ \/ // __ \\ \/ / 4 | \ \___( <_> ) | \ /\ ___/ > < 5 | \______ /\____/|___| /\_/ \___ \>__/\_ \ 6 | \/ \/ \/ \/ -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/TransactionPrepareRequest.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class TransactionPrepareRequest { 7 | public String address; 8 | public String source; 9 | public long sequence; 10 | } 11 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/crypto/Encoding.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto; 2 | 3 | /** 4 | * Class for crypto encoding constants and utility functions 5 | */ 6 | public class Encoding { 7 | 8 | /** 9 | * Format for private keys 10 | */ 11 | public static final String PRIVATE_KEY_FORMAT="PKCS#8"; 12 | } 13 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bluetooth.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/clock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/thermometer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/type/ANumericType.java: -------------------------------------------------------------------------------- 1 | package convex.core.data.type; 2 | 3 | import convex.core.data.prim.APrimitive; 4 | 5 | public abstract class ANumericType extends AStandardType { 6 | 7 | protected ANumericType(Class klass) { 8 | super(klass); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/crop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/facebook.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/power.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/IAssociative.java: -------------------------------------------------------------------------------- 1 | package convex.core.data; 2 | 3 | /** 4 | * Interface for associative data structures 5 | * 6 | * @param Type of associative keys 7 | * @param Type of associative values 8 | */ 9 | public interface IAssociative { 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/message/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Canonical message types for the CVM peer-to-peer network. 3 | * 4 | *

These messages are used to communicate between CVM peers on the network, and are effectively light-weight wrappers around the underlying CAD3 data structures.

5 | */ 6 | package convex.core.message; -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/folder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/message-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/pause.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/send.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/slash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/terminal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/lab/messenger.cvx: -------------------------------------------------------------------------------- 1 | (defn accept 2 | 3 | ^{:callable true 4 | :doc {:description "Accepts a message and offered assets." 5 | :examples [{:code "(call messenger (accept message-id))"}] 6 | :signature [{:params [token holder]}]}} 7 | [message-id] 8 | 9 | ) 10 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex utility classes and miscellaneous functionality 3 | * 4 | * These are subject to change and refactoring and do not represent a fixed public API, 5 | * however they are available for use in applications depending on convex-core if helpful. 6 | */ 7 | package convex.core.util; -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/edit-3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/minus-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/mouse-pointer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/pie-chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/play-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/skip-back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/stop-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/tv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/JsonRPCResponse.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class JsonRPCResponse { 7 | 8 | public String jsonrpc; 9 | public Object result; 10 | public Object error; 11 | public String id; 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-up-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-up-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/at-sign.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bell.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevrons-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-left-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-right-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-up-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/map-pin.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/octagon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/rewind.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/rotate-ccw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/skip-forward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/underline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/unlock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-down-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-down-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/award.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/battery.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bold.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevrons-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevrons-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chevrons-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/columns.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-down-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-left-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-up-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/music.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/rotate-cw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/rss.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/sidebar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/tablet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/toggle-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/triangle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/video.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/wind.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-down-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/corner-right-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/fast-forward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/flag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/home.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/maximize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/minimize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/toggle-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/trending-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/volume-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/wallet/FriendPanel.java: -------------------------------------------------------------------------------- 1 | package convex.gui.wallet; 2 | 3 | import javax.swing.JPanel; 4 | 5 | import convex.api.Convex; 6 | 7 | @SuppressWarnings("serial") 8 | public class FriendPanel extends JPanel { 9 | 10 | public FriendPanel(Convex convex) { 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/check-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/credit-card.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/minus-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/smartphone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/target.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/trending-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/book-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/book.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/compass.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/divide.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/dollar-sign.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/git-merge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/anchor.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/briefcase.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/info.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/italic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/menu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/more-vertical.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/x-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/check-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/key.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/mail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/more-horizontal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/percent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/tag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/type.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/NonUpdatingCaret.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components; 2 | 3 | import java.awt.Rectangle; 4 | 5 | import javax.swing.text.DefaultCaret; 6 | 7 | @SuppressWarnings("serial") 8 | public class NonUpdatingCaret extends DefaultCaret { 9 | @Override 10 | protected void adjustVisibility(Rectangle nloc) { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/peer/PeerException.java: -------------------------------------------------------------------------------- 1 | package convex.peer; 2 | 3 | /** 4 | * Base exception class for peer operations and functionality 5 | */ 6 | @SuppressWarnings("serial") 7 | public class PeerException extends Exception { 8 | 9 | public PeerException(String message, Throwable cause) { 10 | super (message,cause); 11 | } 12 | 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/TransactionPrepareResponse.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class TransactionPrepareResponse { 7 | public String address; 8 | public String source; 9 | public long sequence; 10 | public String hash; 11 | public String data; 12 | } 13 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/contracts/hello.con: -------------------------------------------------------------------------------- 1 | ;; The Hello World of smart contracts 2 | (do 3 | 4 | (def people #{}) 5 | 6 | (defn greet 7 | ^{:callable true} 8 | [name] 9 | (if (people name) 10 | (str "Welcome back " name) 11 | (do 12 | (def people (conj people name)) 13 | (str "Hello " name) 14 | ))) 15 | 16 | ) 17 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bar-chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/camera.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud-lightning.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/link-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/paperclip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/pause-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/plus-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/pocket.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/thumbs-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/trash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/zoom-out.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-integration/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/airplay.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/alert-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/archive.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bar-chart-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/git-commit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/hexagon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/voicemail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/volume-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/BaseImageButton.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components; 2 | 3 | import javax.swing.Icon; 4 | import javax.swing.JButton; 5 | 6 | @SuppressWarnings("serial") 7 | public class BaseImageButton extends JButton { 8 | 9 | public BaseImageButton(Icon icon) { 10 | super(icon); 11 | this.setAlignmentX(JButton.CENTER_ALIGNMENT); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /convex-observer/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Convex Observer - lightweight observability for Convex peers 3 | * 4 | * @author Mike Anderson and Contributors 5 | */ 6 | module convex.observer { 7 | requires java.base; 8 | requires java.net.http; 9 | 10 | requires transitive convex.core; 11 | requires transitive convex.peer; 12 | 13 | requires org.slf4j; 14 | } -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/ACVMCode.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm; 2 | 3 | import convex.core.data.ACell; 4 | 5 | /** 6 | * Abstract base class for CVM code constructs 7 | */ 8 | public abstract class ACVMCode extends ACell { 9 | 10 | @Override public final boolean isCVMValue() { 11 | // CVM code objects are CVM values by definition 12 | return true; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-up-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/folder-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/layers.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/layout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/log-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/log-out.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/speaker.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/net/impl/HandlerException.java: -------------------------------------------------------------------------------- 1 | package convex.net.impl; 2 | 3 | /** 4 | * Exception thrown when an unexpected error occurs in a message handler 5 | */ 6 | @SuppressWarnings("serial") 7 | public class HandlerException extends Exception { 8 | 9 | public HandlerException(String message, Exception cause) { 10 | super(message,cause); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /convex-core/src/main/cvx/convex/lab/curation-market.cvx: -------------------------------------------------------------------------------- 1 | 'asset.curation-market 2 | 3 | 4 | ;; Map for curation markets 5 | ;; { ID -> Market record } 6 | ;; 7 | ;; Where market record is a vector 8 | ;; 0 = controller can be nil 9 | ;; 1 = bonding asset (address or scoped token) 10 | ;; 2 = shape (double, defining price = supply ^ shape, 1.0 is linear price growth) 11 | 12 | (def markets {}) -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-down-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-left-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/arrow-right-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/heart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/help-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/map.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/monitor.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/trello.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/user-check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/user-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/volume-x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/x-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/clipboard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/database.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/delete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/feather.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/plus-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/shopping-bag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/util/UMathTest.java: -------------------------------------------------------------------------------- 1 | package convex.util; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.util.UMath; 8 | 9 | public class UMathTest { 10 | 11 | @Test 12 | public void testMultiplyHigh() { 13 | assertEquals(1L,UMath.multiplyHigh(0x100000000L, 0x100000000L)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/git-branch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/thumbs-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/video-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/renderer/StringRenderer.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components.renderer; 2 | 3 | import javax.swing.JLabel; 4 | 5 | @SuppressWarnings("serial") 6 | public class StringRenderer extends CellRenderer { 7 | public StringRenderer(int alignment) { 8 | super(alignment); 9 | } 10 | 11 | public StringRenderer() { 12 | super(JLabel.RIGHT); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /convex-peer/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module convex.peer { 2 | exports convex.net; 3 | exports convex.peer; 4 | exports convex.net.store; 5 | exports convex.api; 6 | 7 | requires transitive convex.core; 8 | requires java.net.http; 9 | requires org.slf4j; 10 | requires transitive io.netty.common; 11 | requires io.netty.transport; 12 | requires io.netty.buffer; 13 | requires io.netty.codec; 14 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.jar 2 | *.class 3 | *.jfr 4 | *.iml 5 | /lib/ 6 | /classes/ 7 | target/ 8 | /checkouts/ 9 | .nrepl-port 10 | .cpcache/ 11 | **/.project 12 | **/.classpath 13 | **/.settings/ 14 | /.apt_generated/ 15 | /myrecording.jfr 16 | /.apt_generated_tests/ 17 | **/.factorypath 18 | /etch-db 19 | /bin/ 20 | .idea/ 21 | .vscode/ 22 | .DS_Store 23 | /peers-shared-db 24 | .metadata 25 | /pom.xml.versionsBackup 26 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/Networks.java: -------------------------------------------------------------------------------- 1 | package convex.core; 2 | 3 | import convex.core.data.Hash; 4 | 5 | /** 6 | * Constants related to well-known networks 7 | */ 8 | public class Networks { 9 | 10 | /** 11 | * Genesis state hash for Protonet 12 | */ 13 | public static final Hash PRONONET_GENESIS=Hash.parse("0xb0e44f2a645abfa539f5b96b7a0eabb0f902866feaff0f7c12d1213e02333f13"); 14 | } 15 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cast.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/hash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/meh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/radio.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/smile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/tool.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/actor/ArgBox.java: -------------------------------------------------------------------------------- 1 | package convex.gui.actor; 2 | 3 | import java.awt.Dimension; 4 | 5 | import javax.swing.JTextField; 6 | 7 | import convex.gui.utils.Toolkit; 8 | 9 | @SuppressWarnings("serial") 10 | public class ArgBox extends JTextField { 11 | 12 | public ArgBox() { 13 | setFont(Toolkit.MONO_FONT); 14 | this.setPreferredSize(new Dimension(300,30)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/camera-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/file-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/frown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/pen-tool.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/repeat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/shopping-cart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/QueryAccountResponse.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import io.javalin.openapi.OpenApiByFields; 4 | 5 | @OpenApiByFields 6 | public class QueryAccountResponse { 7 | public long address; 8 | public long sequence; 9 | public long balance; 10 | public long allowance; 11 | public long memorySize; 12 | public String key; 13 | public String type; 14 | } 15 | -------------------------------------------------------------------------------- /convex-cli/src/main/java/convex/cli/ATopCommand.java: -------------------------------------------------------------------------------- 1 | package convex.cli; 2 | 3 | import picocli.CommandLine.ParentCommand; 4 | 5 | /** 6 | * Abstract base class for top level subcommands, i.e. convex xxxx 7 | */ 8 | public abstract class ATopCommand extends ACommand { 9 | 10 | @ParentCommand 11 | protected Main mainParent; 12 | 13 | @Override 14 | public Main cli() { 15 | return mainParent; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/download-cloud.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/external-link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/git-pull-request.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/zoom-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/lattice/Lattice.java: -------------------------------------------------------------------------------- 1 | package convex.lattice; 2 | 3 | import convex.core.cvm.Keywords; 4 | import convex.lattice.data.DataLattice; 5 | import convex.lattice.generic.KeyedLattice; 6 | 7 | /** 8 | * Static utility base for the lattice 9 | */ 10 | public class Lattice { 11 | 12 | public static KeyedLattice ROOT = KeyedLattice.create( 13 | Keywords.DATA, DataLattice.INSTANCE 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/align-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/align-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/grid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/headphones.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/instagram.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/linkedin.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/users.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/wifi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/align-center.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/align-justify.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/divide-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/globe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/inbox.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/maximize-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/minimize-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/printer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/refresh-ccw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/refresh-cw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/user-x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/calendar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/folder-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/shield-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/user-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/x-octagon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/mic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/truck.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/transactions/Transactions.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm.transactions; 2 | 3 | import java.util.HashMap; 4 | 5 | import convex.core.util.JSON; 6 | 7 | public class Transactions { 8 | 9 | public static HashMap toJSON(ATransaction tx) { 10 | HashMap result= JSON.jsonMap(tx); 11 | result.put("type", tx.getClass().getSimpleName()); 12 | return result; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/ParseException.java: -------------------------------------------------------------------------------- 1 | package convex.core.exceptions; 2 | 3 | /** 4 | * Class for parse exceptions 5 | * 6 | */ 7 | @SuppressWarnings("serial") 8 | public class ParseException extends RuntimeException { 9 | 10 | public ParseException(String message) { 11 | super(message); 12 | } 13 | 14 | public ParseException(String message, Throwable cause) { 15 | super(message, cause); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/alert-octagon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/command.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/util/BenchUtils.java: -------------------------------------------------------------------------------- 1 | package convex.core.util; 2 | 3 | import java.util.function.Consumer; 4 | 5 | public class BenchUtils { 6 | 7 | public static void benchMark(int runs, Runnable r, Consumer report) { 8 | for (int i=0; i< runs; i++) { 9 | long start=System.nanoTime(); 10 | r.run(); 11 | long end=System.nanoTime(); 12 | report.accept((1e-9*(end-start))); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud-rain.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/divide-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/dribbble.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/alert-triangle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/server.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/impl/InvalidBlockException.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm.impl; 2 | 3 | import convex.core.exceptions.ValidationException; 4 | 5 | /** 6 | * Exception thrown when a Block contains invalid structure or data 7 | */ 8 | @SuppressWarnings("serial") 9 | public class InvalidBlockException extends ValidationException { 10 | 11 | public InvalidBlockException(String message) { 12 | super(message); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/battery-charging.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/file-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/message-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/upload-cloud.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/zap-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-integration/README.md: -------------------------------------------------------------------------------- 1 | # Convex Integration 2 | 3 | This module is used for contructing primary Convex artifacts and integration testing. 4 | 5 | ## `convex.jar` construction 6 | 7 | The `convex-integration` module builds `convex.jar` as a fat jar with dependencies for convenient distribution and usage (e.g. at the CLI) 8 | 9 | ## Integration Tests 10 | 11 | To run live integration tests do: 12 | 13 | ```bash 14 | mvn verify -Pintegration-tests 15 | ``` -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/crosshair.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/shuffle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/TODOException.java: -------------------------------------------------------------------------------- 1 | package convex.core.exceptions; 2 | 3 | @SuppressWarnings("serial") 4 | public class TODOException extends UnsupportedOperationException { 5 | 6 | public TODOException(String message) { 7 | super("TODO: "+message); 8 | } 9 | 10 | public TODOException() { 11 | super("TODO"); 12 | } 13 | 14 | public TODOException(Exception e) { 15 | super("TODO: "+e.getMessage(),e); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/chrome.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/coffee.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/scissors.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/share-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/peer/LaunchException.java: -------------------------------------------------------------------------------- 1 | package convex.peer; 2 | 3 | /** 4 | * Exception thrown when a failure occurs during peer launch 5 | */ 6 | @SuppressWarnings("serial") 7 | public class LaunchException extends PeerException { 8 | 9 | public LaunchException(String message, Throwable cause) { 10 | super(message, cause); 11 | 12 | } 13 | 14 | public LaunchException(String message) { 15 | this(message, null); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/crypto/wallet/LockedWalletException.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto.wallet; 2 | 3 | import convex.core.exceptions.BaseException; 4 | 5 | @SuppressWarnings("serial") 6 | public class LockedWalletException extends BaseException { 7 | 8 | public LockedWalletException(String message) { 9 | super(message); 10 | } 11 | public LockedWalletException(String message, Throwable cause) { 12 | super(message, cause); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/Log.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm; 2 | 3 | /** 4 | * Constants and utility functions for CVM log 5 | * 6 | * See CAD33 7 | */ 8 | public class Log { 9 | 10 | public static final int ENTRY_LENGTH = 4; 11 | 12 | // Positions of fields in log entries 13 | public static final int P_ADDRESS=0; 14 | public static final int P_SCOPE=1; 15 | public static final int P_LOCATION=2; 16 | public static final int P_VALUES=3; 17 | } 18 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/trash-2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-peer/src/main/java/convex/peer/ConfigException.java: -------------------------------------------------------------------------------- 1 | package convex.peer; 2 | 3 | /** 4 | * Message thrown when a failure occurs during peer configuration 5 | */ 6 | @SuppressWarnings("serial") 7 | public class ConfigException extends PeerException { 8 | 9 | public ConfigException(String message, Throwable cause) { 10 | super(message, cause); 11 | 12 | } 13 | 14 | public ConfigException(String message) { 15 | this(message, null); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/utils/test.json5: -------------------------------------------------------------------------------- 1 | { 2 | // comments 3 | unquoted: 'and you can quote me on that', 4 | singleQuotes: 'I can use "double quotes" here', 5 | // lineBreaks: "Look, Mom! \ 6 | // No \\n's!", 7 | hexadecimal: 0xdecaf, 8 | leadingDecimalPoint: .8675309, andTrailing: 8675309., 9 | positiveSign: +1, 10 | trailingComma: 'in objects', andIn: ['arrays',], 11 | "backwardsCompatible": "with JSON", 12 | /** Note training comma above */ 13 | } 14 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/bell-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/box.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/eye-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/watch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/file-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/gift.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/list.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-cli/src/main/java/convex/cli/desktop/Desktop.java: -------------------------------------------------------------------------------- 1 | package convex.cli.desktop; 2 | 3 | import convex.cli.ATopCommand; 4 | import convex.gui.MainGUI; 5 | import picocli.CommandLine.Command; 6 | 7 | @Command(name="desktop", 8 | mixinStandardHelpOptions=false, 9 | description="Run the Convex Desktop GUI") 10 | public class Desktop extends ATopCommand { 11 | 12 | @Override 13 | public void execute() { 14 | MainGUI gui = new MainGUI(); 15 | gui.run(); 16 | gui.waitForClose(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/codepen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/hard-drive.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/move.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-peer/README.md: -------------------------------------------------------------------------------- 1 | # Convex Peer Server 2 | 3 | Implementation of a Peer on the Convex network plus Peer protocol networking 4 | 5 | ## Overview 6 | 7 | Key features: 8 | - Operate a Peer on the Convex Network 9 | - Interact with Peers using the binary Peer Protocol 10 | - Messaging and Networking implementation to support the Convex Network 11 | 12 | ## License 13 | 14 | Copyright 2019-2023 The Convex Foundation and Contributors 15 | 16 | Code in `convex-peer` is provided under the Convex Public License -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/crypto/WalletTest.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertNotNull; 4 | 5 | import java.io.File; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | import convex.core.crypto.wallet.PKCS12Wallet; 10 | 11 | public class WalletTest { 12 | 13 | @Test 14 | public void testTempStore() { 15 | String password="OmarSharif"; 16 | File file=PKCS12Wallet.createTempStore(password); 17 | assertNotNull(file); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/lang/SyntaxTest.java: -------------------------------------------------------------------------------- 1 | package convex.core.lang; 2 | 3 | import static convex.test.Assertions.assertCVMEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.cvm.Syntax; 8 | import convex.core.data.ObjectsTest; 9 | 10 | public class SyntaxTest { 11 | 12 | @Test 13 | public void testSyntaxConstructor() { 14 | Syntax s = Syntax.create(RT.cvm(1L)); 15 | assertCVMEquals(1L, s.getValue()); 16 | 17 | ObjectsTest.doAnyValueTests(s); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/gitlab.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/mic-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/crypto/PBETest.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.bouncycastle.util.encoders.Hex; 6 | import org.junit.jupiter.api.Test; 7 | 8 | public class PBETest { 9 | 10 | @Test 11 | public void testKeyDerivation() { 12 | byte[] bs = PBE.deriveKey(new char[0], new byte[1], 128); 13 | assertEquals(16, bs.length); 14 | assertEquals("a352cdf92312599de774874ad9f3fcc5", Hex.toHexString(bs)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/renderer/CellRenderer.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components.renderer; 2 | 3 | import javax.swing.table.DefaultTableCellRenderer; 4 | 5 | import convex.core.util.Utils; 6 | 7 | @SuppressWarnings("serial") 8 | public class CellRenderer extends DefaultTableCellRenderer { 9 | public CellRenderer(int alignment) { 10 | super(); 11 | this.setHorizontalAlignment(alignment); 12 | } 13 | 14 | public void setValue(Object value) { 15 | setText(Utils.toString(value)); 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/util/BitsTest.java: -------------------------------------------------------------------------------- 1 | package convex.util; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.util.Bits; 8 | 9 | public class BitsTest { 10 | 11 | @Test public void testLeadingZeros() { 12 | assertEquals(16,Bits.leadingZeros(0x00FFFF)); 13 | assertEquals(15,Bits.leadingZeros(0x010000)); 14 | 15 | assertEquals(18,Bits.leadingZeros(16383)); 16 | assertEquals(17,Bits.leadingZeros(16384)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/package.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/phone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-cli/src/main/java/convex/cli/mixins/AMixin.java: -------------------------------------------------------------------------------- 1 | package convex.cli.mixins; 2 | 3 | import convex.cli.ACommand; 4 | import convex.cli.Main; 5 | import picocli.CommandLine.ParentCommand; 6 | 7 | public class AMixin extends ACommand{ 8 | 9 | @ParentCommand 10 | ACommand parentCommand; 11 | 12 | @Override 13 | public void execute() { 14 | throw new UnsupportedOperationException("Mixin should not be called as command!"); 15 | } 16 | 17 | @Override 18 | public Main cli() { 19 | return parentCommand.cli(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/contracts/deposit-box.con: -------------------------------------------------------------------------------- 1 | ;; A mostly stateless smart contract that allows deposits from any account 2 | ;; and a full withdrawal by anyone. A public charity box. 3 | ;; 4 | (fn [] 5 | 6 | ;; Deposit function accepts any offer. 7 | ;; 8 | (defn deposit 9 | ^{:callable true} 10 | [] 11 | (accept *offer*)) 12 | 13 | 14 | ;; Withdraw function sends the caller the complete balance. 15 | ;; 16 | (defn withdraw 17 | ^{:callable true} 18 | [] 19 | (transfer *caller* *balance*))) 20 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/github.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/actor/ParamLabel.java: -------------------------------------------------------------------------------- 1 | package convex.gui.actor; 2 | 3 | import javax.swing.JLabel; 4 | import javax.swing.SwingConstants; 5 | 6 | import convex.gui.utils.Toolkit; 7 | 8 | /** 9 | * Generic label component for displaying code 10 | */ 11 | @SuppressWarnings("serial") 12 | public class ParamLabel extends JLabel { 13 | 14 | public ParamLabel(String text) { 15 | super(" " + text + " "); 16 | this.setHorizontalAlignment(SwingConstants.RIGHT); 17 | this.setFont(Toolkit.MONO_FONT); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/Panic.java: -------------------------------------------------------------------------------- 1 | package convex.core.exceptions; 2 | 3 | /** 4 | * Class representing an unexpected error that should halt the system 5 | * 6 | * Should not usually be caught 7 | */ 8 | @SuppressWarnings("serial") 9 | public class Panic extends Error { 10 | public Panic(String message, Throwable cause) { 11 | super(message,cause); 12 | } 13 | 14 | public Panic(String message) { 15 | this(message,null); 16 | } 17 | 18 | public Panic(Throwable cause) { 19 | this(null,cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/json/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * JSON utilities for the CVM. 3 | * 4 | *

This package contains utilities for working with JSON data in the CVM, including parsing, printing, and converting to and from other data structures.

5 | * 6 | *

Note that JSON is a strict subset of the CVM data types, so we expect to encode all valid JSON perfectly in CAD3 / CVM data structures.

7 | * 8 | *

See: JSON in the CVM

9 | */ 10 | package convex.core.json; -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/BaseListComponent.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components; 2 | 3 | import javax.swing.JPanel; 4 | import javax.swing.border.BevelBorder; 5 | import javax.swing.border.CompoundBorder; 6 | 7 | import convex.gui.utils.Toolkit; 8 | 9 | @SuppressWarnings("serial") 10 | public class BaseListComponent extends JPanel { 11 | 12 | public BaseListComponent() { 13 | setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null), 14 | Toolkit.createEmptyBorder(2))); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/util/MergeFunction.java: -------------------------------------------------------------------------------- 1 | package convex.core.util; 2 | 3 | public abstract interface MergeFunction { 4 | 5 | public abstract V merge(V a, V b); 6 | 7 | /** 8 | * Reverse a MergeFunction so that it can be applied with opposite ordering. 9 | * This is useful for handling merge functions that are not commutative. 10 | * 11 | * @return A MergeFunction that merges the arguments in the reverse order. 12 | */ 13 | public default MergeFunction reverse() { 14 | return (a, b) -> merge(b, a); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/exception/AThrowable.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm.exception; 2 | 3 | import convex.core.data.ACell; 4 | 5 | public abstract class AThrowable extends AExceptional { 6 | 7 | protected final ACell code; 8 | 9 | public AThrowable(ACell code) { 10 | if (code==null) throw new IllegalArgumentException("Error code must not be null"); 11 | this.code=code; 12 | } 13 | 14 | @Override 15 | public final ACell getCode() { 16 | return code; 17 | } 18 | 19 | public abstract void addTrace(String traceMessage); 20 | } 21 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/lang/CodeTest.java: -------------------------------------------------------------------------------- 1 | package convex.core.lang; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.cvm.Symbols; 8 | import convex.core.data.Lists; 9 | import convex.core.data.prim.CVMLong; 10 | 11 | public class CodeTest { 12 | @Test public void testQuote() { 13 | assertEquals(Lists.of(Symbols.QUOTE, Symbols.FOO),Code.quote(Symbols.FOO)); 14 | assertEquals(Lists.of(Symbols.QUOTE, 1),Code.quote(CVMLong.ONE)); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /convex-java/src/main/java/convex/java/asset/BaseAsset.java: -------------------------------------------------------------------------------- 1 | package convex.java.asset; 2 | 3 | import convex.core.cvm.Address; 4 | import convex.java.ConvexJSON; 5 | 6 | /** 7 | * Abstract base class for asset instances 8 | * @param Type of asset quantity values 9 | */ 10 | public abstract class BaseAsset { 11 | 12 | protected final ConvexJSON convex; 13 | 14 | protected BaseAsset(ConvexJSON convex) { 15 | this.convex=convex; 16 | } 17 | 18 | public abstract T getBalance(); 19 | 20 | public abstract T getBalance(Address holder); 21 | } 22 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/figma.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/ASpecialVector.java: -------------------------------------------------------------------------------- 1 | package convex.core.data; 2 | 3 | import java.util.function.Consumer; 4 | 5 | /** 6 | * BAse class for specialised vector implementations 7 | */ 8 | public abstract class ASpecialVector extends AVector { 9 | 10 | public ASpecialVector(long count) { 11 | super(count); 12 | } 13 | 14 | @SuppressWarnings("unchecked") 15 | @Override 16 | protected void visitAllChildren(Consumer> visitor) { 17 | ((AVector)getCanonical()).visitAllChildren(visitor); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/Lists.java: -------------------------------------------------------------------------------- 1 | package convex.core.data; 2 | 3 | public class Lists { 4 | 5 | @SuppressWarnings("unchecked") 6 | public static List empty() { 7 | return (List) List.EMPTY; 8 | } 9 | 10 | @SuppressWarnings("unchecked") 11 | public static > L create(java.util.List list) { 12 | return (L) List.create(Cells.toCellArray(list)); 13 | } 14 | 15 | @SafeVarargs 16 | public static AList of(Object... vals) { 17 | return List.of(vals); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /convex-integration/src/main/java/convex/main/Main.java: -------------------------------------------------------------------------------- 1 | package convex.main; 2 | 3 | import convex.gui.utils.Terminal; 4 | 5 | /** 6 | * Implements the main entry point for convex.jar 7 | */ 8 | public class Main { 9 | 10 | /** 11 | * Main entry point for convex.jar 12 | * 13 | * @param args Command line arguments 14 | */ 15 | public static void main(String... args) { 16 | boolean terminal=Terminal.checkIfTerminal(); 17 | if (terminal) { 18 | convex.cli.Main.main(args); 19 | } else { 20 | convex.gui.MainGUI.main(args); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/model/ResultResponse.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.model; 2 | 3 | import java.util.List; 4 | 5 | import io.javalin.openapi.*; 6 | 7 | @OpenApiByFields 8 | public class ResultResponse { 9 | public Object value; 10 | public String result; 11 | public String errorCode; 12 | public TransactionInfo info; 13 | 14 | @OpenApiByFields 15 | public static class TransactionInfo { 16 | public Long juice; 17 | public String tx; 18 | public String source; 19 | public Long fees; 20 | 21 | public List loc; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/examples/language.cvx: -------------------------------------------------------------------------------- 1 | ;; Define a Vector 2 | (def a [1 2 3]) 3 | 4 | (conj a 4) 5 | => [1 2 3 4] 6 | 7 | ;; Define a Function 8 | (def square [x] 9 | (* x x)) 10 | 11 | (square 10) 12 | => 100 13 | 14 | 15 | 16 | (defmacro defonce [sym exp] 17 | `(if (defined? '~sym) nil (def ~sym ~exp))) 18 | 19 | (defonce foo 12) 20 | => 12 21 | 22 | (defonce foo 17) 23 | => nil 24 | 25 | foo 26 | => 12 27 | 28 | (call ;;#177 29 | (run 30 | `(do 31 | (undef run) 32 | (set-controller ~*address*)))) 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /convex-core/src/test/java/examples/generators/BadListTest.java: -------------------------------------------------------------------------------- 1 | package examples.generators; 2 | 3 | //import org.junit.runner.RunWith; 4 | 5 | //import com.pholser.junit.quickcheck.*; 6 | //import com.pholser.junit.quickcheck.runner.JUnitQuickcheck; 7 | 8 | // @RunWith(JUnitQuickcheck.class) 9 | public class BadListTest { 10 | // This explodes! 11 | // @Property 12 | // public void testListFunctions(@From(BadListGen.class) Object a) { 13 | // System.out.println(a); 14 | // } 15 | 16 | // @Property 17 | public void test2(Object a) { 18 | // System.out.println(a); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud-drizzle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/youtube.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/data/IRefFunction.java: -------------------------------------------------------------------------------- 1 | package convex.core.data; 2 | 3 | /** 4 | * Functional interface for operations on Cell Refs that may throw a 5 | * MissingDataException 6 | * 7 | * In general, IRefFunction is used to provide a visitor for data objects containing nested Refs. 8 | */ 9 | @FunctionalInterface 10 | public interface IRefFunction { 11 | 12 | // Note we can't have a generic type parameter in a functional interface. 13 | // So using a wildcard seems the best option? 14 | 15 | @SuppressWarnings("rawtypes") 16 | public Ref apply(Ref t); 17 | } 18 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/aperture.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/wifi-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/cloud-snow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/life-buoy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-observer/src/test/java/convex/observer/ObserverTest.java: -------------------------------------------------------------------------------- 1 | package convex.observer; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.data.ACell; 8 | import convex.core.data.AString; 9 | import convex.core.lang.RT; 10 | import convex.core.util.JSON; 11 | 12 | public class ObserverTest { 13 | @Test public void testArrayJSON() { 14 | long [] ls=new long[] {1,2,3}; 15 | ACell al=RT.cvm(ls); 16 | 17 | AString s=JSON.print(al); 18 | assertEquals("[1,2,3]",s.toString()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/phone-call.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/java/convex/restapi/api/DepAPI.java: -------------------------------------------------------------------------------- 1 | package convex.restapi.api; 2 | 3 | import convex.restapi.RESTServer; 4 | import io.javalin.Javalin; 5 | 6 | /** 7 | * Class for Data Ecosystem services 8 | * 9 | * Designed to conform with the Datacraft DEP standards, see https://github.com/datacraft-dsc/DEPs 10 | */ 11 | public class DepAPI extends ABaseAPI { 12 | 13 | public DepAPI(RESTServer restServer) { 14 | super(restServer); 15 | 16 | } 17 | 18 | @Override 19 | public void addRoutes(Javalin app) { 20 | // TODO Auto-generated method stub 21 | 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/message/MessageTag.java: -------------------------------------------------------------------------------- 1 | package convex.core.message; 2 | 3 | import convex.core.data.Keyword; 4 | 5 | /** 6 | * Constant tags used to identify general purpose messages 7 | */ 8 | public class MessageTag { 9 | 10 | public static final Keyword STATUS_REQUEST = Keyword.intern("SR"); 11 | public static final Keyword QUERY=Keyword.intern("Q"); 12 | public static final Keyword TRANSACT=Keyword.intern("TX"); 13 | 14 | public static final Keyword DATA_REQUEST=Keyword.intern("DR"); 15 | 16 | public static final Keyword BYE=Keyword.intern("BYE"); 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/test/generators/AGenerator.java: -------------------------------------------------------------------------------- 1 | package convex.test.generators; 2 | 3 | import com.pholser.junit.quickcheck.generator.GenerationStatus; 4 | import com.pholser.junit.quickcheck.generator.Generator; 5 | import com.pholser.junit.quickcheck.random.SourceOfRandomness; 6 | 7 | /** 8 | * Generator for arbitrary Addresses 9 | */ 10 | public abstract class AGenerator extends Generator { 11 | 12 | protected AGenerator(Class type) { 13 | super(type); 14 | } 15 | 16 | @Override 17 | public abstract T generate(SourceOfRandomness r, GenerationStatus status); 18 | } 19 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/film.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/sunset.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/core/crypto/util/Base58Test.java: -------------------------------------------------------------------------------- 1 | package convex.core.crypto.util; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import convex.core.data.Blob; 8 | 9 | public class Base58Test { 10 | 11 | @Test public void testBase58() { 12 | // Test vectors from: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02 13 | assertEquals("Hello World!",new String(Base58.decode("2NEpo7TZRRrLZSi2U"))); 14 | 15 | assertEquals("11233QC4",Base58.encode(Blob.parse("0x0000287fb4cd").getBytes())); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/sunrise.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-restapi/src/main/resources/convex/restapi/mcp/tools/peerStatus.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "peerStatus", 3 | "title": "Peer Status", 4 | "description": "Return current peer status information", 5 | "inputSchema": { 6 | "type": "object", 7 | "properties": {} 8 | }, 9 | "outputSchema": { 10 | "type": "object", 11 | "properties": { 12 | "status": { 13 | "description": "Peer status map keyed by keyword" 14 | }, 15 | "message": { 16 | "type": "string", 17 | "description": "Optional human-readable message" 18 | } 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/BadSignatureException.java: -------------------------------------------------------------------------------- 1 | package convex.core.exceptions; 2 | 3 | import convex.core.data.ACell; 4 | import convex.core.data.SignedData; 5 | 6 | @SuppressWarnings("serial") 7 | public class BadSignatureException extends ValidationException { 8 | 9 | private SignedData sig; 10 | 11 | public BadSignatureException(String message, SignedData sig) { 12 | super(message); 13 | this.sig = sig; 14 | } 15 | 16 | @SuppressWarnings("unchecked") 17 | public SignedData getSignature() { 18 | return (SignedData) sig; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/phone-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /convex-core/src/test/java/convex/util/GenTestUMath.java: -------------------------------------------------------------------------------- 1 | package convex.util; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.runner.RunWith; 6 | 7 | import com.pholser.junit.quickcheck.Property; 8 | import com.pholser.junit.quickcheck.runner.JUnitQuickcheck; 9 | 10 | import convex.core.util.UMath; 11 | 12 | @RunWith(JUnitQuickcheck.class) 13 | public class GenTestUMath { 14 | 15 | 16 | @Property 17 | public void singleOps(Long a) { 18 | long mulHigh=UMath.multiplyHigh(a, a); 19 | 20 | assertEquals(mulHigh,UMath.multiplyHigh(-a, -a)); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /convex-core/src/test/resources/contracts/exceptional.con: -------------------------------------------------------------------------------- 1 | (do ;; Test contract for state changes and rollback. 2 | 3 | (def fragile :ok) 4 | 5 | (defn halt-fn 6 | ^{:callable true} 7 | [x] 8 | (halt x) 9 | (return :foo) 10 | :bar) 11 | 12 | (defn rollback-fn 13 | ^{:callable true} 14 | [x] 15 | (def fragile :broken) 16 | (rollback x) 17 | :bar) 18 | 19 | (defn break-fn 20 | ^{:callable true} 21 | [x] 22 | (def fragile :broken) 23 | x) 24 | 25 | (defn get-fragile 26 | ^{:callable true} 27 | [] 28 | (return fragile)) 29 | 30 | ) 31 | -------------------------------------------------------------------------------- /convex-gui/src/main/java/convex/gui/components/renderer/AddressRenderer.java: -------------------------------------------------------------------------------- 1 | package convex.gui.components.renderer; 2 | 3 | import javax.swing.JLabel; 4 | 5 | import convex.core.cvm.Address; 6 | import convex.core.util.Utils; 7 | 8 | @SuppressWarnings("serial") 9 | public class AddressRenderer extends CellRenderer { 10 | 11 | public AddressRenderer(int alignment) { 12 | super(alignment); 13 | } 14 | 15 | public AddressRenderer() { 16 | super(JLabel.LEFT); 17 | } 18 | 19 | @Override 20 | public void setValue(Object o) { 21 | String s=Utils.toString(Address.parse(o)); 22 | super.setValue(s); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/cvm/exception/ATrampoline.java: -------------------------------------------------------------------------------- 1 | package convex.core.cvm.exception; 2 | 3 | import convex.core.data.ACell; 4 | 5 | /** 6 | * Abstract base class for trampolining function return values 7 | */ 8 | public abstract class ATrampoline extends AReturn { 9 | 10 | protected final ACell[] args; 11 | 12 | public ATrampoline(ACell[] values) { 13 | this.args=values; 14 | } 15 | 16 | public ACell getValue(int i) { 17 | return args[i]; 18 | } 19 | 20 | public ACell[] getValues() { 21 | return args; 22 | } 23 | 24 | public int arity() { 25 | return args.length; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /convex-core/src/main/java/convex/core/exceptions/FastRuntimeException.java: -------------------------------------------------------------------------------- 1 | package convex.core.exceptions; 2 | 3 | import convex.core.Constants; 4 | 5 | @SuppressWarnings("serial") 6 | public class FastRuntimeException extends RuntimeException { 7 | 8 | public FastRuntimeException(String message) { 9 | super(message); 10 | } 11 | 12 | // Don't fill in a stack trace for fast exceptions. We are going to catch and ignore it anyway..... 13 | @Override 14 | public Throwable fillInStackTrace() { 15 | if (Constants.OMIT_VALIDATION_STACKTRACES) return this; 16 | return super.fillInStackTrace(); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /convex-gui/docs/icons/feather/sliders.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------