Use Pink Extension
All the unique capabilities of Phat Contract are implemented in pink-extension. Informally speaking:
It is worth noting that the Phat Contract is not a trivial extension of ink! contract since all these extra functions only work under the off-chain computation.
Functionality | Function Name | Query Support | Transaction Support |
---|---|---|---|
Internet Access | http_request | ✅ | ❌ |
Crypto | getrandom | ✅ | ❌ |
| ecdsa_sign_prehashed | ✅ | ✅ |
| ecdsa_verify_prehashed | ✅ | ✅ |
| sign (ecdsa/ed25519) | ✅ | ✅ |
| sign (sr25519) | ✅ | ❌ |
| verify | ✅ | ✅ |
| derive_sr25519_key | ✅ | ✅ |
| get_public_key | ✅ | ✅ |
Volatile Cache | cache_set | ✅ | ✅ |
| cache_set_expire | ✅ | ✅ |
| cache_get | ✅ | ❌ |
| cache_remove | ✅ | ✅ |
Misc | log | ✅ | ✅ |
| is_running_in_command | ✅ | ✅ |
Last modified 5mo ago