Snippets

chromawallet auth.rell

Created by Alex Mizrahi last modified
// Main module

struct auth_handler {
	auth_text_formatter: (gtv) -> text;
	flags: text;
	// we can add more stuff here, e.g. related to limits and such
}


@extendable function get_auth_handlers(): map<text,auth_handler> {
	return map();
}

function transfer_auth_text_formatter (gtv): text {
	return "Transfer something something";
} 

@extend (get_auth_handlers) function (): map<text, auth_handler> {
	return [ 'transfer': auth_handler(
		transfer_auth_text_formatter(*),
		"T"
	)];
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.