| 145 | } |
| 146 | |
| 147 | fn open_request(&self, view: &str, capabilities: &[&str], ttl: u64) -> OpenSandboxRequest { |
| 148 | OpenSandboxRequest { |
| 149 | repository: Some(self.repository.clone()), |
| 150 | meta: None, |
| 151 | view: String::new(), |
| 152 | acting_as_did: Some("did:key:zAgent".to_string()), |
| 153 | ttl_secs: Some(ttl), |
| 154 | capabilities: capabilities.iter().map(|c| c.to_string()).collect(), |
| 155 | target: Some(wire::view_ref(view)), |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /// Mint a token for `view` (as the local admin). |
| 160 | fn open(&self, view: &str, capabilities: &[&str]) -> SandboxOpened { |