{"id":17963940,"url":"https://github.com/pablolion/algorand-auction-cli","last_synced_at":"2025-04-03T19:27:56.188Z","repository":{"id":128556256,"uuid":"426942704","full_name":"PabloLION/algorand-auction-cli","owner":"PabloLION","description":"A byproduct of personnal studying.","archived":false,"fork":false,"pushed_at":"2021-11-13T08:55:24.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T07:36:04.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PabloLION.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-11T09:30:07.000Z","updated_at":"2021-11-13T08:55:26.000Z","dependencies_parsed_at":"2023-04-10T23:16:05.347Z","dependency_job_id":null,"html_url":"https://github.com/PabloLION/algorand-auction-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PabloLION%2Falgorand-auction-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PabloLION%2Falgorand-auction-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PabloLION%2Falgorand-auction-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PabloLION%2Falgorand-auction-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PabloLION","download_url":"https://codeload.github.com/PabloLION/algorand-auction-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247064423,"owners_count":20877593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T11:45:56.049Z","updated_at":"2025-04-03T19:27:56.153Z","avatar_url":"https://github.com/PabloLION.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# algorand-auction-cli\n\nAn interactive NodeJS CLI version of algorand auction-demo repo with Typescript. Also a byproduct of personal studying.\n[algorand/auction-demo](https://github.com/algorand/auction-demo).\n\n## Install\n\nDo `yarn install` then `yarn build`.\nThis package will add two CLI commands: `algorand-auction-cli` and `algorand`\nStarting with setting up an\n\n### Trouble shooting\n\n- [Permission denied for package after using yarn link](https://github.com/yarnpkg/yarn/issues/3587)\n\n## CLI usage example\n\n### Var\n\n```shell\n$AAC_USER            # username of current user\n$AAC_ACCESSED_USERS  # list of users that have can be accessed\n$AAC_AUCTION_ID      # auction id of current auction\n$AAC_CLIENT_ID       # client id of current client\n```\n\n### Type and class\n\n```shell\n\u003cstr_num\u003e      # parse 20k; 20m; 200_000; 2,000;\n\u003cauction_info\u003e # auction info like start time and end time etc.\n\u003cclient_id\u003e    # client id, supposedly a unique string.\n```\n\n### Client\n\n```shell\n$ aac client create [--client-id \u003cclient_id\u003e]  # create and switch to client. The \u003cclient_id\u003e would be printed and stored in $AAC_CLIENT_ID\nacc client list-user [--verbose]               # list all users that can be accessed\n```\n\n### User\n\n```shell\naac user create --user \u003cusername\u003e --key \u003ckey\u003e --client \u003cclient_id\u003e  # create a user with name:\u003cusername\u003e and key:\u003ckey\u003e in client:\u003cclient_id\u003e\naac user login --user \u003cusername\u003e --key \u003ckey\u003e --client \u003cclient_id\u003e # set AAC_USER as \u003cusername\u003e in client:\u003cclient_id\u003e\naac logout                               # clear AAC_USER\n```\n\n### NFT\n\n```shell\nacc nft create [--user \u003cusername\u003e] [--name \u003cname\u003e] [--symbol \u003csymbol\u003e] [--total \u003ctotal\u003e] [--url \u003curl\u003e] [--description \u003cdescription\u003e] [--id \u003cnft_id\u003e]\n```\n\n### Auction\n\n```shell\naac auction list --current   #\naac auction list             # list all current open auctions with current bid\naac auction list -all        #\naac auction list -a          # list all auctions with last bid\naac auction create --nft \u003cnft_id\u003e [--start \u003cstart_time\u003e] [--end \u003cend_time\u003e] [--price \u003cprice\u003e] [--client \u003cclient_id\u003e]       # create an auction\n```\n\n#### Auction actions\n\n- All commands in this chapter requires AAC_USER.\n- All commands in this chapter use AAC_AUCTION_ID if no flag --auction-id is offered.\n- Auction should be open to interact with, otherwise will return an error.\n\n```shell\naac new \u003cauction_info\u003e          # ??? new user? new client? new auction?\naac auction new \u003cauction_info\u003e  # create an auction. require AAC_USER\naac bid \u003cstr_num\u003e               #\naac auction bid \u003cstr_num\u003e       # bid on an auction. require AAC_USER\naac raise \u003cstr_num\u003e             #\naac auction raise \u003cstr_num\u003e     # bid with \u003clast_bid\u003e+\u003cstr_num\u003e on an auction. require AAC_USER\n```\n\n## Contribute\n\nThere's no contribution guide. You can PR whatever you want.\n\n### Todo\n\n- [ ] Use Docker\n- [ ] Write tests\n- [ ] Write example like [algorand/auction-demo](https://github.com/algorand/auction-demo).\n- [ ] Running index will show help then ask for example\n- [ ] Web GUI to show API usage\n\n#### example\n\nOutput from [algorand dev portal](https://developer.algorand.org/docs/get-started/dapps/pyteal/#setup-environment-and-run-tests)\n\n```\n#output\nAlice is generating temporary accounts...\nAlice is generating an example NFT...\nThe NFT ID is: 17\nAlice is creating auction smart contract that lasts 30 seconds to auction off NFT...\nAlice is setting up and funding NFT auction...\nAlice's algo balance:  99998100  algos\nThe smart contract now holds the following: {0: 202000, 17: 1}\nCarla wants to bid on NFT, her algo balance:  100000100  algos\nCarla is placing bid for:  1000000  algos\nCarla is opting into NFT with id: 17\nAlice is closing out the auction....\nThe smart contract now holds the following: {0: 0}\nCarla's NFT balance: 1  for NFT ID:  17\nAlice's balances after auction:  {0: 101197100, 17: 0}  Algos\nCarla's balances after auction:  {0: 98997100, 17: 1}  Algos\n```\n\nIdeal Output\n\n```\n#output\n[Alice ]   Generating temporary accounts...\n[Alice ]   Generating an example NFT...\n[Client]   The NFT ID is: 17\n[Alice ]   Creating auction smart contract that lasts 30 seconds to auction off NFT...\n[Alice ]   Setting up and funding NFT auction...\n[Alice ]   algo balance:  99998100  algos\n[Client]   The smart contract now holds the following: {0: 202000, 17: 1}\n[Bob   ]   wants to bid on NFT, with algo balance:  100000100  algos\n[Bob   ]   placing bid for:  1000000  algos\n[Bob   ]   opting into NFT with id: 17\n[Alice ]   Closing out the auction....\n[Client]   The smart contract now holds the following: {0: 0}\n[Bob   ]   NFT balance: 1  for NFT ID:  17\n[Alice ]   balances after auction:  {0: 101197100, 17: 0}  Algos\n[Bob   ]   balances after auction:  {0: 98997100, 17: 1}  Algos\n```\n\nIdeal CLI to run:\n\n```shell\naac client create\naac nft create --user CLIENT --id:0 --total 202000 # get balance for smart contract CLIENT\naac user create --user Alice\naac nft create --user Alice --id:0 --total 99998100 # get balance for smart contract CLIENT\naac user create --user Bob\naac nft create --user Bob --id:0 --total 100000100 # get balance for smart contract CLIENT\naac user login --user Alice\naac nft create --user Alice | $nft_id # create a new NFT under name of Alice\n## or how to use the nft_id from the previous command\naac auction create --nft $nft_id --start \"now\" --end \"+30s\" --price 1000000\naac bid --user Bob 1000000 # aac bid --user Bob 1000k # aac bid --user Bob 1M\nacc client list-user --verbose --all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablolion%2Falgorand-auction-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablolion%2Falgorand-auction-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablolion%2Falgorand-auction-cli/lists"}