@@ -10,16 +10,14 @@ use derive_more::{From, Into};
1010/// User-defined variables to be put into context
1111#[ wasm_bindgen]
1212#[ derive( PartialEq , Eq , Debug , Clone , From , Into ) ]
13- pub struct ContextExtension (
14- ergo_lib:: ergotree_interpreter:: sigma_protocol:: prover:: ContextExtension ,
15- ) ;
13+ pub struct ContextExtension ( ergo_lib:: ergotree_ir:: chain:: context_extension:: ContextExtension ) ;
1614
1715#[ wasm_bindgen]
1816impl ContextExtension {
1917 /// Create new ContextExtension instance
2018 #[ wasm_bindgen( constructor) ]
2119 pub fn new ( ) -> Self {
22- Self ( ergo_lib:: ergotree_interpreter :: sigma_protocol :: prover :: ContextExtension :: empty ( ) )
20+ Self ( ergo_lib:: ergotree_ir :: chain :: context_extension :: ContextExtension :: empty ( ) )
2321 }
2422
2523 /// Set the supplied pair in the ContextExtension
@@ -29,13 +27,11 @@ impl ContextExtension {
2927
3028 /// Returns the number of elements in the collection
3129 pub fn len ( & self ) -> usize {
32- let wrapped: ergo_lib:: ergotree_interpreter:: sigma_protocol:: prover:: ContextExtension =
33- self . 0 . clone ( ) ;
34- wrapped. values . len ( )
30+ self . 0 . values . len ( )
3531 }
3632 /// get from map or fail if key is missing
3733 pub fn get ( & self , key : u8 ) -> Result < Constant , JsValue > {
38- let wrapped: ergo_lib:: ergotree_interpreter :: sigma_protocol :: prover :: ContextExtension =
34+ let wrapped: ergo_lib:: ergotree_ir :: chain :: context_extension :: ContextExtension =
3935 self . 0 . clone ( ) ;
4036 Ok ( wrapped
4137 . values
@@ -47,7 +43,7 @@ impl ContextExtension {
4743
4844 /// Returns all keys in the map
4945 pub fn keys ( & self ) -> Vec < u8 > {
50- let wrapped: ergo_lib:: ergotree_interpreter :: sigma_protocol :: prover :: ContextExtension =
46+ let wrapped: ergo_lib:: ergotree_ir :: chain :: context_extension :: ContextExtension =
5147 self . 0 . clone ( ) ;
5248 wrapped. values . keys ( ) . cloned ( ) . collect ( )
5349 }
0 commit comments