Documentation ¶
Index ¶
Constants ¶
View Source
const ( SMART_CONTRACT = 1 FUNCTION_CONTRACT = 2 CDN_CONTRACT = 3 CDN_BUNDLE = 4 )
Variables ¶
This section is empty.
Functions ¶
func FindCDNFilePath ¶
Returns a filepath for a wallet and a filename. Very fragile because bad escaping could lead to file traversal vulnerabilties.
func ProcessCDNBundle ¶
Takes a bson encoded Contract with a CDNFileBundle as Definition and stores it
func StartCDNServer ¶
func StartCDNServer()
func VerifyContract ¶
Types ¶
type CDNContract ¶
type CDNFileBundle ¶
type Contract ¶
type Contract struct { PubKey []byte `bson:"p"` Type uint8 `bson:"t"` Definition []byte `bson:"d"` SenderSig [2][]byte `bson:"rs"` }
func CreateCDNContract ¶
Creates a contract for all files passed to files.
func (*Contract) AppendKeyAndSign ¶
type SmartContract ¶
func NewSmartContract ¶
func NewSmartContract(code []byte, isWasm bool) (SmartContract, error)
Click to show internal directories.
Click to hide internal directories.