Make some APIs more flexible and fix corner-case encoding bugs#439
Open
SpaceManiac wants to merge 11 commits intomasterfrom
Open
Make some APIs more flexible and fix corner-case encoding bugs#439SpaceManiac wants to merge 11 commits intomasterfrom
SpaceManiac wants to merge 11 commits intomasterfrom
Conversation
SpaceManiac
added a commit
to PaimaStudios/tower-defense-backend
that referenced
this pull request
Oct 29, 2024
- Remove external indexer dependencies in favor of Paima primitives
- Add Hardhat configuration for AnnotatedMintNft contract, like Tarochi for Genesis Trainers
- Use `Tarochi Genesis Trainer` entry in `extensions.$ENV.yml` to track NFT ownership
- Track per-NFT win/lose stats in a new table, according to what NFT was selected when a lobby was created or joined
- Fulfill relevant API routes:
- `/account-nfts`
- Includes all linked wallets
- `/historical-owner` (currently ignores passed-in contract address and block height)
- `/title-image` (currently ignores passed-in contract address)
- `/nft-score` (currently ignores passed-in contract address)
- Add LocalWallet and wallet delegation handling
- Add batcher startup configuration
- Old middleware method `userWalletLogin` returns as soon as LocalWallet is ready
- LocalWallet and batcher are used for most game transactions instead of requiring signing each time
- New middleware method `externalWalletConnect` follows full delegation procedure and posts `&wd|` message to batcher
- All API routes use "main wallet" when sensible
- Update a few more misc NPM packages
Future work:
- Test NFT-less play in non-debug builds
- Test/refine "main wallet" handling in API for corner cases, such as playing some NFT-less games then connecting a wallet
Depends on: PaimaStudios/paima-engine#439
SpaceManiac
added a commit
to PaimaStudios/tower-defense-backend
that referenced
this pull request
Nov 6, 2024
- Add esbuild configuration so backend can be packed for deployment - Minify middleware and add scripts to pack it properly for deployment - Tweak Hardhat configs to be able to test emulated blocks - Serve list of detected EVM wallets to frontend See PaimaStudios/paima-engine#439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getRelatedWalletsto accept anyIDatabaseConnection, not justPoolClient.scheduledPrefixoptional in case a game doesn't need to react to mint events.buildQueryhelper not escaping values; e.g.{"a": "b&c=d"}now properly round-trips.getAdjustedHeightfor emulated block mode always infinite looping.toLowerCaseinstead oftoLocaleLowerCaseon wallet addresses to avoid theoretical problems if a server is ever run in Turkish locale.mina-signerby upgrading to a version that has native ESM support.