multisig rhai flow POC app

This commit is contained in:
timurgordon
2025-05-20 22:08:00 +03:00
parent 795c04fc5a
commit 123dfc606c
16 changed files with 4021 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
// Minimal Single Signature Flow
let flow_id = create_flow("Quick Sign");
let step1_id = add_step(flow_id, "Sign the message", 0);
add_requirement(step1_id, "any_signer_pk", "Please provide your signature.");
print("Minimal Flow (ID: " + flow_id + ") defined.");
()

View File

@@ -0,0 +1,18 @@
// Flow with Multi-Requirement Step
// If create_flow, add_step, or add_requirement fail from Rust,
// the script will stop and the error will be reported by the server.
let flow_id = create_flow("Multi-Req Sign Off");
let step1_id = add_step(flow_id, "Initial Signatures (3 needed)", 0);
add_requirement(step1_id, "signer1_pk", "Signatory 1: Please sign terms.");
add_requirement(step1_id, "signer2_pk", "Signatory 2: Please sign terms.");
add_requirement(step1_id, "signer3_pk", "Signatory 3: Please sign terms.");
let step2_id = add_step(flow_id, "Final Confirmation", 1);
add_requirement(step2_id, "final_approver_pk", "Final approval for multi-req sign off.");
print("Multi-Requirement Flow (ID: " + flow_id + ") defined.");
()

View File

@@ -0,0 +1,14 @@
// Simple Two-Step Flow
// If create_flow, add_step, or add_requirement fail from Rust,
// the script will stop and the error will be reported by the server.
let flow_id = create_flow("Simple Two-Stepper");
let step1_id = add_step(flow_id, "Collect Document", 0);
add_requirement(step1_id, "user_pubkey_document", "Please sign the document hash.");
let step2_id = add_step(flow_id, "Approval Signature", 1);
add_requirement(step2_id, "approver_pubkey", "Please approve the collected document.");
print("Simple Two-Step Flow (ID: " + flow_id + ") defined.");
()