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
| Proof of Republic is based on the idea that a consensys should include as much spatial agreement | |
| and political agreement as possible similar to the electoria college of the Unites States. | |
| This takes into Account 2 main factors | |
| -GPS Location | |
| -Population Weight | |
| GPS location can be found by measuring the speed it takes for data to travel between nodes. | |
| The speed it takes for data to travel around the world at the speed of light is known. |
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
| { | |
| // Line breaks look like they might work. They appear in Rarible description | |
| description: 'Friendly OpenSea Creature that \n\nenjoys long swims in the ocean.', | |
| external_url: 'https://openseacreatures.io/3', | |
| image: 'https://storage.googleapis.com/opensea-prod.appspot.com/puffs/3.png', | |
| // Only makers place seems to use imageUrl | |
| imageUrl: 'https://ipfsgateway.makersplace.com/ipfs/QmZ15eQX8FPjfrtdX3QYbrhZxJpbLpvDpsgb2p3VEH8Bqq', | |
| animation_url: 'ipfs://ipfs/QmcToBg7HX9cigCKoUcYdVWdKhmSBy2DnLRPMG342h2Deu/animation.mp4', | |
| name: 'Dave Starbelly', | |
| title: 'Token Metadata', |
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
| /* Signature Verification | |
| # mostly from here https://solidity-by-example.org/signature/ | |
| */ | |
| function getMessageHash( | |
| uint256 _nonce, | |
| uint16 _qty | |
| ) public pure returns (bytes32) { | |
| return keccak256(abi.encodePacked(_nonce, _qty)); | |
| } | |
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
| const Arweave = require("arweave"); | |
| const loadArweaveWallet = () => { | |
| const walletPath = path.join(__dirname, "creds", "wallet.json"); | |
| if (!fs.existsSync(walletPath)) { | |
| throw new Error("Arweave wallet file not found at: " + walletPath); | |
| } | |
| return JSON.parse(fs.readFileSync(walletPath, "utf8")); | |
| }; |
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
| /** | |
| * Google Cloud DNS Manager for WTTP Bridge | |
| * | |
| * This utility can be used to automatically create DNS zones and records | |
| * when users add custom domains to the bridge service. Users can then | |
| * point their domain's nameservers to Google Cloud DNS to get full DNS | |
| * management including A/AAAA records pointing to the bridge server. | |
| * | |
| * Usage: | |
| * const dnsManager = require('./dns-manager'); |