Summary

Farcaster is changing its hashing scheme in v2, and warpcast needs to update its hashes. Warpcast will provide and accept v1 and v2 hashes over API’s for two weeks, after which only v2 hashes will be accepted.

Details

v1 Hashes were 32 bytes long keccak hashes while v2 hashes will be 20 byte long blake3 hashes

// v1 keccak hash
"0x96afabd9dc379e4853df12c80865a5f40c6776de4879c4657df16cc9986adfab"

// v2 blake3 hash
"0x0ee9323ff6fd1fab692a485a432b52b6f307952e"

Starting Mar 1st all Warpcast clients will accept v1 and v2 hashes, and will return both hashes in the format shown below


// Either of these requests will work 
curl -X 'GET' \\
  '<https://api.warpcast.com/v2/cast?hash=0x321712dc8eccc5d2be38e38c1ef0c8916c49949a80ffe20ec575>' \\
  -H 'accept: application/json' \\
  -H 'authorization: Bearer <$your_app_bearer_token>'

curl -X 'GET' \\
  '<https://api.warpcast.com/v2/cast?hash=0xe47764a4291da670bc2884ae83e8e5da3cc7b661>' \\
  -H 'accept: application/json' \\
  -H 'authorization: Bearer <$your_app_bearer_token>'

// Sample response from Cast endpoint, which now has multiple hashes 
{
  "result": {
			"cast": {
			  "hash": "0x3217...", // Will be the v1 hash until Mar 14
			  "_hashV1": "0x3217...", // Will always be v1 hash, available till Mar 21
			  "_hashV2": "0xe477...", // Will always be v2 hash, available till Mar 21
			  "threadHash": "0x8b0d...", 
			  "_threadHashV2": "0x8b0d....",
			  "_threadHashV2": "0xe35e....",
			  "parentHash": "0x9c7f...", 
			  "_parentHashV2": "0x9c7f...", 
			  "_parentHashV2": "0x893d...",
			  // Omitted for brevity
				}
	  }
}

On March 14th, the default hash property will return the v2 value instead of the v1 value.

// Either of these requests will work 
curl -X 'GET' \\
  '<https://api.warpcast.com/v2/cast?hash=0x321712dc8eccc5d2be38e38c1ef0c8916c49949a80ffe20ec575>' \\
  -H 'accept: application/json' \\
  -H 'authorization: Bearer <$your_app_bearer_token>'

curl -X 'GET' \\
  '<https://api.warpcast.com/v2/cast?hash=0xe47764a4291da670bc2884ae83e8e5da3cc7b661>' \\
  -H 'accept: application/json' \\
  -H 'authorization: Bearer <$your_app_bearer_token>'

// Sample response from Cast endpoint, which now has multiple hashes 
{
  "result": {
			"cast": {
			  "hash": "0xe477...", // Will be the v2 hash
			  "_hashV1": "0x3217...", // Will always be v1 hash, available till Mar 21
			  "_hashV2": "0xe477...", // Will always be v2 hash, available till Mar 21
			  "threadHash": "0xe35e...", 
			  "_threadHashV2": "0x8b0d....",
			  "_threadHashV2": "0xe35e....",
			  "parentHash": "0x893d...", 
			  "_parentHashV2": "0x9c7f...", 
			  "_parentHashV2": "0x893d...",
			  // Omitted for brevity
				}
	  }
}