MCPcopy Create free account
hub / github.com/BitVM/BitVM / new

Method new

bridge/src/contexts/depositor.rs:33–49  ·  view source on GitHub ↗
(network: Network, depositor_secret: &str, n_of_n_public_keys: &[PublicKey])

Source from the content-addressed store, hash-verified

31
32impl DepositorContext {
33 pub fn new(network: Network, depositor_secret: &str, n_of_n_public_keys: &[PublicKey]) -> Self {
34 let (keypair, public_key) = generate_keys_from_secret(network, depositor_secret);
35 let (n_of_n_public_key, n_of_n_taproot_public_key) =
36 generate_n_of_n_public_key(n_of_n_public_keys);
37
38 DepositorContext {
39 network,
40
41 depositor_keypair: keypair,
42 depositor_public_key: public_key,
43 depositor_taproot_public_key: XOnlyPublicKey::from(public_key),
44
45 n_of_n_public_keys: n_of_n_public_keys.to_owned(),
46 n_of_n_public_key,
47 n_of_n_taproot_public_key,
48 }
49 }
50}

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected