diff --git a/.github/workflows/test-swift.yaml b/.github/workflows/test-swift.yaml index 89174bbb..d2274221 100644 --- a/.github/workflows/test-swift.yaml +++ b/.github/workflows/test-swift.yaml @@ -13,7 +13,7 @@ on: jobs: build: name: "Build and test" - runs-on: macos-12 + runs-on: macos-13 steps: - name: "Checkout" uses: actions/checkout@v3 diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 104c5a74..e73e3952 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -660,6 +660,9 @@ interface EsploraClient { [Throws=EsploraError] Transaction? get_tx(string txid); + + [Throws=EsploraError] + u32 get_height(); }; // ------------------------------------------------------------------------ diff --git a/bdk-ffi/src/esplora.rs b/bdk-ffi/src/esplora.rs index 934a9079..7708cdf7 100644 --- a/bdk-ffi/src/esplora.rs +++ b/bdk-ffi/src/esplora.rs @@ -89,4 +89,8 @@ impl EsploraClient { let tx_opt = self.0.get_tx(&txid)?; Ok(tx_opt.map(|inner| Arc::new(Transaction::from(inner)))) } + + pub fn get_height(&self) -> Result { + self.0.get_height().map_err(EsploraError::from) + } }