Created
          February 10, 2024 11:59 
        
      - 
      
- 
        Save stevedylandev/eafc340e2e2224ebc84249502db970c1 to your computer and use it in GitHub Desktop. 
    Hub GRPC Test
  
        
  
    
      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 { getSSLHubRpcClient, Message } = require("@farcaster/hub-nodejs"); | |
| async function doStuff() { | |
| try { | |
| const HUB_URL = "hub-grpc.pinata.cloud" | |
| const client = getSSLHubRpcClient(HUB_URL); | |
| const messageBytes = "0a5e080d10d72518ede2b52e200182014f0a3068747470733a2f2f70696e61746164726f70732e636f6d2f6170692f7369676e61747572652d76616c69646174696f6e10011a1908d725121400000000000000000000000000000000000000011214a4d95afb8cf3761b8dff60375c398f8a1407ea7418012240bc9d823ea9b025a7750bc60461ecb8d6ef656d89f3ed24564d7d86e4ad18974d8b9ccb14a3bd6886cbb7249aeecfed5edd156e35cb34123b8a6da3da6c93ed0228013220975eb342c8b39f185e569eab3cf509fbac0c8f6b51e487b1bba30af339dbb79b" | |
| const message = Message.decode(Buffer.from(messageBytes, 'hex')); | |
| const result = await client.validateMessage(message); | |
| console.log(result); | |
| } catch (err) { | |
| console.log(err); | |
| } | |
| } | |
| doStuff(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment